Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
51b2ffaf
Commit
51b2ffaf
authored
Dec 13, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address feedback
parent
518dc990
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
app/assets/javascripts/dispatcher.js.es6
app/assets/javascripts/dispatcher.js.es6
+1
-5
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+1
-1
app/assets/javascripts/issues_bulk_assignment.js.es6
app/assets/javascripts/issues_bulk_assignment.js.es6
+8
-6
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+13
-5
No files found.
app/assets/javascripts/dispatcher.js.es6
View file @
51b2ffaf
...
...
@@ -37,7 +37,7 @@
case 'projects:issues:index':
Issuable.init();
new gl.IssuableBulkActions({
p
age
p
refixId: page === 'projects:merge_requests:index' ? 'merge_request_' : 'issue_'
});
shortcut_handler = new ShortcutsNavigation();
break;
...
...
@@ -108,10 +108,6 @@
new ZenMode();
new MergedButtons();
break;
case 'projects:merge_requests:index':
shortcut_handler = new ShortcutsNavigation();
Issuable.init();
break;
case 'dashboard:activity':
new gl.Activities();
break;
...
...
app/assets/javascripts/gl_dropdown.js
View file @
51b2ffaf
...
...
@@ -605,7 +605,7 @@
};
GitLabDropdown
.
prototype
.
rowClicked
=
function
(
el
)
{
var
field
,
fieldName
,
groupName
,
isInput
,
selectedIndex
,
selectedObject
,
value
,
markedIds
,
unmarkedIds
,
i
,
isMarking
;
var
field
,
fieldName
,
groupName
,
isInput
,
selectedIndex
,
selectedObject
,
value
,
isMarking
;
fieldName
=
this
.
options
.
fieldName
;
isInput
=
$
(
this
.
el
).
is
(
'
input
'
);
...
...
app/assets/javascripts/issues_bulk_assignment.js.es6
View file @
51b2ffaf
...
...
@@ -2,8 +2,8 @@
((global) => {
class IssuableBulkActions {
constructor({ container, form, issues, p
age
} = {}) {
this.prefixId = p
age === 'projects:merge_requests:index' ? 'merge_request_' :
'issue_';
constructor({ container, form, issues, p
refixId
} = {}) {
this.prefixId = p
refixId ||
'issue_';
this.form = form || this.getElement('.bulk-update');
this.$labelDropdown = this.form.find('.js-label-select');
this.issues = issues || this.getElement('.issues-list .issue');
...
...
@@ -104,9 +104,10 @@
}
setOriginalDropdownData() {
$('.bulk-update .js-label-select').data('common', this.getOriginalCommonIds());
$('.bulk-update .js-label-select').data('marked', this.getOriginalMarkedIds());
$('.bulk-update .js-label-select').data('indeterminate', this.getOriginalIndeterminateIds());
let $labelSelect = $('.bulk-update .js-label-select');
$labelSelect.data('common', this.getOriginalCommonIds());
$labelSelect.data('marked', this.getOriginalMarkedIds());
$labelSelect.data('indeterminate', this.getOriginalIndeterminateIds());
}
// From issuable's initial bulk selection
...
...
@@ -153,7 +154,8 @@
}
getElement(selector) {
return $('.content').find(selector);
this.scopeEl = this.scopeEl || $('.content');
return this.scopeEl.find(selector);
}
}
...
...
app/assets/javascripts/labels_select.js
View file @
51b2ffaf
...
...
@@ -7,7 +7,7 @@
$
(
'
.js-label-select
'
).
each
(
function
(
i
,
dropdown
)
{
var
$block
,
$colorPreview
,
$dropdown
,
$form
,
$loading
,
$selectbox
,
$sidebarCollapsedValue
,
$value
,
abilityName
,
defaultLabel
,
enableLabelCreateButton
,
issueURLSplit
,
issueUpdateURL
,
labelHTMLTemplate
,
labelNoneHTMLTemplate
,
labelUrl
,
namespacePath
,
projectPath
,
saveLabelData
,
selectedLabel
,
showAny
,
showNo
,
$sidebarLabelTooltip
,
initialSelected
,
$toggleText
,
fieldName
,
useId
,
propertyName
,
showMenuAbove
,
$container
;
$dropdown
=
$
(
dropdown
);
$dropdownContainer
=
$dropdown
.
closest
(
'
.labels-filter
'
)
$dropdownContainer
=
$dropdown
.
closest
(
'
.labels-filter
'
)
;
$toggleText
=
$dropdown
.
find
(
'
.dropdown-toggle-text
'
);
namespacePath
=
$dropdown
.
data
(
'
namespace-path
'
);
projectPath
=
$dropdown
.
data
(
'
project-path
'
);
...
...
@@ -170,7 +170,7 @@
});
},
renderRow
:
function
(
label
,
instance
)
{
var
$a
,
$li
,
color
,
colorEl
,
indeterminate
,
removesAll
,
selectedClass
,
spacing
,
i
,
marked
;
var
$a
,
$li
,
color
,
colorEl
,
indeterminate
,
removesAll
,
selectedClass
,
spacing
,
i
,
marked
,
dropdownName
,
dropdownValue
;
$li
=
$
(
'
<li>
'
);
$a
=
$
(
'
<a href="#">
'
);
selectedClass
=
[];
...
...
@@ -192,8 +192,13 @@
selectedClass
.
push
(
'
is-active
'
);
}
}
else
{
if
(
this
.
id
(
label
)
&&
$form
.
find
(
"
input[type='hidden'][name='
"
+
(
$dropdown
.
data
(
'
fieldName
'
))
+
"
'][value='
"
+
this
.
id
(
label
).
toString
().
replace
(
/'/g
,
'
\\\'
'
)
+
"
']
"
).
length
)
{
selectedClass
.
push
(
'
is-active
'
);
if
(
this
.
id
(
label
))
{
dropdownName
=
$dropdown
.
data
(
'
fieldName
'
);
dropdownValue
=
this
.
id
(
label
).
toString
().
replace
(
/'/g
,
'
\\\'
'
);
if
(
$form
.
find
(
"
input[type='hidden'][name='
"
+
dropdownName
+
"
'][value='
"
+
dropdownValue
+
"
']
"
).
length
)
{
selectedClass
.
push
(
'
is-active
'
);
}
}
if
(
$dropdown
.
hasClass
(
'
js-multiselect
'
)
&&
removesAll
)
{
...
...
@@ -423,6 +428,7 @@
};
LabelsSelect
.
prototype
.
setDropdownData
=
function
(
$dropdown
,
isMarking
,
value
)
{
var
i
,
markedIds
,
unmarkedIds
,
indeterminateIds
;
var
issuableBulkActions
=
$
(
'
.bulk-update
'
).
data
(
'
bulkActions
'
);
markedIds
=
$dropdown
.
data
(
'
marked
'
)
||
[];
...
...
@@ -467,7 +473,9 @@
LabelsSelect
.
prototype
.
setOriginalDropdownData
=
function
(
$container
,
$dropdown
)
{
var
labels
=
[];
$container
.
find
(
'
[name="label_name[]"]
'
).
map
(
function
()
{
return
labels
.
push
(
this
.
value
);
});
$container
.
find
(
'
[name="label_name[]"]
'
).
map
(
function
()
{
return
labels
.
push
(
this
.
value
);
});
$dropdown
.
data
(
'
marked
'
,
labels
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment