Commit 7c4d25a4 authored by Clement Ho's avatar Clement Ho

Fix CE conflicts from master

parent d0ddfcd0
......@@ -54,10 +54,6 @@ export default class FileTemplateSelector {
reportSelection(options) {
const { query, e, data } = options;
<<<<<<< HEAD
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
e.preventDefault();
return this.mediator.selectTemplateFile(this, query, data);
}
......
......@@ -64,11 +64,8 @@ $(() => {
rootPath: $boardApp.dataset.rootPath,
bulkUpdatePath: $boardApp.dataset.bulkUpdatePath,
detailIssue: Store.detail,
<<<<<<< HEAD
milestoneTitle: $boardApp.dataset.boardMilestoneTitle,
=======
defaultAvatar: $boardApp.dataset.defaultAvatar,
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
},
computed: {
detailIssueVisible () {
......
......@@ -157,11 +157,7 @@ gl.issueBoards.IssueCardInner = Vue.extend({
>
<img
class="avatar avatar-inline s20"
<<<<<<< HEAD
:src="assignee.avatarUrl"
=======
:src="assignee.avatar"
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
width="20"
height="20"
:alt="avatarUrlTitle(assignee)"
......
......@@ -5,7 +5,7 @@ class ListAssignee {
this.id = user.id;
this.name = user.name;
this.username = user.username;
this.avatarUrl = user.avatar_url;
this.avatar = user.avatar_url;
}
}
......
......@@ -17,10 +17,7 @@ class ListIssue {
this.assignees = [];
this.selected = false;
this.position = obj.relative_position || Infinity;
<<<<<<< HEAD
this.milestone_id = obj.milestone_id;
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
if (obj.milestone) {
this.milestone = new ListMilestone(obj.milestone);
......@@ -30,11 +27,7 @@ class ListIssue {
this.labels.push(new ListLabel(label));
});
<<<<<<< HEAD
this.assignees = obj.assignees.map(a => new ListAssignee(a));
=======
this.assignees = obj.assignees.map(a => new ListAssignee(a, defaultAvatar));
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
}
addLabel (label) {
......
......@@ -23,18 +23,13 @@ gl.issueBoards.BoardsStore = {
this.state.lists = [];
this.filter.path = gl.utils.getUrlParamsArray().join('&');
},
<<<<<<< HEAD
createNewListDropdownData() {
this.state.currentBoard = {};
this.state.currentPage = '';
this.state.reload = false;
},
addList (listObj) {
const list = new List(listObj);
=======
addList (listObj, defaultAvatar) {
const list = new List(listObj, defaultAvatar);
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
this.state.lists.push(list);
return list;
......
......@@ -53,12 +53,9 @@ import UserCallout from './user_callout';
import { ProtectedTagCreate, ProtectedTagEditList } from './protected_tags';
import ShortcutsWiki from './shortcuts_wiki';
import BlobViewer from './blob/viewer/index';
<<<<<<< HEAD
import GeoNodes from './geo_nodes';
import ServiceDeskRoot from './projects/settings_service_desk/service_desk_root';
=======
import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select';
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
const ShortcutsBlob = require('./shortcuts_blob');
......
......@@ -13,17 +13,13 @@ class FilteredSearchManager {
this.tokensContainer = this.container.querySelector('.tokens-container');
this.filteredSearchTokenKeys = gl.FilteredSearchTokenKeys;
<<<<<<< HEAD
if (page === 'issues' || page === 'boards') {
this.filteredSearchTokenKeys = gl.FilteredSearchTokenKeysWithWeights;
}
this.recentSearchesStore = new RecentSearchesStore();
=======
this.recentSearchesStore = new RecentSearchesStore({
isLocalStorageAvailable: RecentSearchesService.isAvailable(),
});
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
let recentSearchesKey = 'issue-recent-searches';
if (page === 'merge_requests') {
recentSearchesKey = 'merge-request-recent-searches';
......
......@@ -44,7 +44,6 @@
return $el.text();
},
clicked: (options) => {
<<<<<<< HEAD
const $link = options.$el;
if (!$link.data('revert')) {
......@@ -60,9 +59,6 @@
$dateInput.enable();
});
}
=======
this.formSubmit(null, options.$el);
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
},
});
});
......
......@@ -126,7 +126,6 @@
return $value.css('display', '');
},
vue: $dropdown.hasClass('js-issue-board-sidebar'),
<<<<<<< HEAD
hideRow: function(milestone) {
if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar') &&
!$dropdown.closest('.add-issues-modal').length && gl.issueBoards.BoardsStore.state.currentBoard.milestone) {
......@@ -143,8 +142,6 @@
return true;
},
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
clicked: function(options) {
const { $el, e } = options;
let selected = options.selectedObj;
......
......@@ -54,12 +54,8 @@
}
},
clicked(opts) {
<<<<<<< HEAD
const { $el, e } = opts;
const item = opts.selectedObj;
=======
const { e } = opts;
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
e.preventDefault();
......
......@@ -84,11 +84,7 @@ export default {
return !this.showLess || (index < this.defaultRenderCount && this.showLess);
},
avatarUrl(user) {
<<<<<<< HEAD
return user.avatarUrl || user.avatar_url;
=======
return user.avatar || user.avatar_url;
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
},
assigneeUrl(user) {
return `${this.rootPath}${user.username}`;
......
......@@ -33,23 +33,12 @@ export default {
saveAssignees() {
this.loading = true;
<<<<<<< HEAD
this.mediator.saveAssignees(this.field)
.then(() => {
this.loading = false;
})
.catch(() => {
this.loading = false;
=======
function setLoadingFalse() {
this.loading = false;
}
this.mediator.saveAssignees(this.field)
.then(setLoadingFalse.bind(this))
.catch(() => {
setLoadingFalse();
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
return new Flash('Error occurred when saving assignees');
});
},
......
......@@ -17,17 +17,6 @@ export default {
},
methods: {
listenForSlashCommands() {
<<<<<<< HEAD
$(document).on('ajax:success', '.gfm-form', (e, data) => {
const subscribedCommands = ['spend_time', 'time_estimate'];
const changedCommands = data.commands_changes
? Object.keys(data.commands_changes)
: [];
if (changedCommands && _.intersection(subscribedCommands, changedCommands).length) {
this.mediator.fetch();
}
});
=======
$(document).on('ajax:success', '.gfm-form', this.slashCommandListened);
},
slashCommandListened(e, data) {
......@@ -43,7 +32,6 @@ export default {
if (changedCommands && _.intersection(subscribedCommands, changedCommands).length) {
this.mediator.fetch();
}
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
},
},
mounted() {
......
......@@ -4,11 +4,7 @@ import sidebarAssignees from './components/assignees/sidebar_assignees';
import Mediator from './sidebar_mediator';
<<<<<<< HEAD
document.addEventListener('DOMContentLoaded', () => {
=======
function domContentLoaded() {
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
const mediator = new Mediator(gl.sidebarOptions);
mediator.fetch();
......@@ -21,13 +17,8 @@ function domContentLoaded() {
}
new Vue(sidebarTimeTracking).$mount('#issuable-time-tracker');
<<<<<<< HEAD
});
=======
}
document.addEventListener('DOMContentLoaded', domContentLoaded);
export default domContentLoaded;
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
......@@ -30,13 +30,8 @@ export default class SidebarMediator {
this.service.get()
.then((response) => {
const data = response.json();
<<<<<<< HEAD
this.store.processAssigneeData(data);
this.store.processTimeTrackingData(data);
=======
this.store.setAssigneeData(data);
this.store.setTimeTrackingData(data);
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
})
.catch(() => new Flash('Error occured when fetching sidebar data'));
}
......
......@@ -17,21 +17,13 @@ export default class SidebarStore {
return SidebarStore.singleton;
}
<<<<<<< HEAD
processAssigneeData(data) {
=======
setAssigneeData(data) {
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
if (data.assignees) {
this.assignees = data.assignees;
}
}
<<<<<<< HEAD
processTimeTrackingData(data) {
=======
setTimeTrackingData(data) {
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
this.timeEstimate = data.time_estimate;
this.totalTimeSpent = data.total_time_spent;
this.humanTimeEstimate = data.human_time_estimate;
......
......@@ -284,18 +284,10 @@
.avatar-counter {
display: none;
vertical-align: middle;
<<<<<<< HEAD
line-height: 18px;
height: 20px;
padding-left: 3px;
padding-right: 3px;
=======
min-width: 20px;
line-height: 19px;
height: 20px;
padding-left: 2px;
padding-right: 2px;
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
border-radius: 2em;
}
......
......@@ -450,10 +450,6 @@
margin: -5px;
}
<<<<<<< HEAD
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
.user-list {
display: flex;
flex-wrap: wrap;
......
......@@ -8,10 +8,7 @@
- if current_user
:javascript
window.uploads_path = "#{namespace_project_uploads_path project.namespace,project}";
<<<<<<< HEAD
window.preview_markdown_path = "#{preview_markdown_path(project)}";
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
- content_for :header_content do
.js-dropdown-menu-projects
......
......@@ -16,11 +16,7 @@
"v-if" => "issue.assignees",
"v-for" => "assignee in issue.assignees" }
.dropdown
<<<<<<< HEAD
%button.dropdown-menu-toggle.js-user-search.js-author-search.js-multiselect.js-save-user-data.js-issue-board-sidebar{ type: "button", ref: "assigneeDropdown", data: { toggle: "dropdown", field_name: "issue[assignee_ids][]", first_user: (current_user.username if current_user), current_user: "true", project_id: @project.id, null_user: "true", multi_select: "true", dropdown: { header: 'Assignee(s)'} },
=======
%button.dropdown-menu-toggle.js-user-search.js-author-search.js-multiselect.js-save-user-data.js-issue-board-sidebar{ type: "button", ref: "assigneeDropdown", data: { toggle: "dropdown", field_name: "issue[assignee_ids][]", first_user: (current_user.username if current_user), current_user: "true", project_id: @project.id, null_user: "true", multi_select: "true", 'max-select' => 1, dropdown: { header: 'Assignee' } },
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
":data-issuable-id" => "issue.id",
":data-selected" => "assigneeId",
":data-issue-update" => "'#{namespace_project_issues_path(@project.namespace, @project)}/' + issue.id + '.json'" }
......
......@@ -50,11 +50,7 @@
= link_to 'Edit', edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'hidden-xs hidden-sm btn btn-grouped issuable-edit'
.issue-details.issuable-details
<<<<<<< HEAD
.detail-page-description.content-block{ class: ('hide-bottom-border' unless @issue.description.present? ) }
=======
.detail-page-description.content-block
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
.issue-title-data.hidden{ "data" => { "endpoint" => rendered_title_namespace_project_issue_path(@project.namespace, @project, @issue),
"can-update-tasks-class" => can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '',
} }
......
......@@ -24,22 +24,15 @@
.col-md-10
.merge_access_levels-container
= dropdown_tag('Select',
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-merge js-multiselect wide',
dropdown_class: 'dropdown-menu-user dropdown-menu-selectable capitalize-header', filter: true,
data: { input_id: 'merge_access_levels_attributes', default_label: 'Select' } })
=======
options: { toggle_class: 'js-allowed-to-merge wide',
dropdown_class: 'dropdown-menu-selectable capitalize-header',
data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes' }})
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
.form-group
%label.col-md-2.text-right{ for: 'push_access_levels_attributes' }
Allowed to push:
.col-md-10
.push_access_levels-container
= dropdown_tag('Select',
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-push js-multiselect wide',
dropdown_class: 'dropdown-menu-user dropdown-menu-selectable capitalize-header', filter: true,
data: { input_id: 'push_access_levels_attributes', default_label: 'Select' } })
......@@ -47,11 +40,6 @@
Only groups that
= link_to 'have this project shared', help_page_path('workflow/share_projects_with_other_groups')
can be added here
=======
options: { toggle_class: 'js-allowed-to-push wide',
dropdown_class: 'dropdown-menu-selectable capitalize-header',
data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes' }})
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
.panel-footer
= f.submit 'Protect', class: 'btn-create btn', disabled: true
%td
= hidden_field_tag "allowed_to_merge_#{protected_branch.id}", protected_branch.merge_access_levels.first.access_level
= dropdown_tag( (protected_branch.merge_access_levels.first.humanize || 'Select') ,
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header',
=======
options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header',
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
data: { field_name: "allowed_to_merge_#{protected_branch.id}", access_level_id: protected_branch.merge_access_levels.first.id }})
%td
= hidden_field_tag "allowed_to_push_#{protected_branch.id}", protected_branch.push_access_levels.first.access_level
= dropdown_tag( (protected_branch.push_access_levels.first.humanize || 'Select') ,
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-push', dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container capitalize-header',
=======
options: { toggle_class: 'js-allowed-to-push', dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container capitalize-header',
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
data: { field_name: "allowed_to_push_#{protected_branch.id}", access_level_id: protected_branch.push_access_levels.first.id }})
......@@ -52,7 +52,6 @@
.selectbox.hide-collapsed
- issuable.assignees.each do |assignee|
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", assignee.id, id: nil
<<<<<<< HEAD
- options = { toggle_class: 'js-user-search js-author-search', title: 'Assign to', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author', placeholder: 'Search users', data: { first_user: (current_user.username if current_user), current_user: true, project_id: (@project.id if @project), author_id: issuable.author_id, field_name: "#{issuable.to_ability_name}[assignee_id]", issue_update: issuable_json_path(issuable), ability_name: issuable.to_ability_name, null_user: true } }
......@@ -60,25 +59,11 @@
- if issuable.assignees.length == 0
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil
- title = 'Select assignee(s)'
=======
- options = { toggle_class: 'js-user-search js-author-search', title: 'Assign to', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author', placeholder: 'Search users', data: { first_user: (current_user.username if current_user), current_user: true, project_id: (@project.id if @project), author_id: issuable.author_id, field_name: "#{issuable.to_ability_name}[assignee_ids][]", issue_update: issuable_json_path(issuable), ability_name: issuable.to_ability_name, null_user: true } }
- if issuable.instance_of?(Issue)
- if issuable.assignees.length == 0
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil
- title = 'Select assignee'
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
- options[:toggle_class] += ' js-multiselect js-save-user-data'
- options[:data][:field_name] = "#{issuable.to_ability_name}[assignee_ids][]"
- options[:data][:multi_select] = true
- options[:data]['dropdown-title'] = title
<<<<<<< HEAD
- options[:data]['dropdown-header'] = 'Assignee(s)'
=======
- options[:data]['dropdown-header'] = 'Assignee'
- options[:data]['max-select'] = 1
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
- else
- title = 'Select assignee'
......
......@@ -20,11 +20,7 @@
- if issuable.assignees.length === 0
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil, data: { meta: '' }
<<<<<<< HEAD
= dropdown_tag(users_dropdown_label(issuable.assignees), options: issue_dropdown_options(issuable, true))
=======
= dropdown_tag(users_dropdown_label(issuable.assignees), options: issue_dropdown_options(issuable,false))
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
= link_to 'Assign to me', '#', class: "assign-to-me-link #{'hide' if issuable.assignees.include?(current_user)}"
- else
= form.label :assignee_id, "Assignee", class: "control-label #{"col-lg-4" if has_due_date}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment