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
Boxiang Sun
gitlab-ce
Commits
1fc4e2b6
Commit
1fc4e2b6
authored
Nov 01, 2017
by
Filipa Lacerda
Committed by
Phil Hughes
Nov 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export logo and labels select as ES6 modules
parent
b6e69673
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
422 additions
and
430 deletions
+422
-430
app/assets/javascripts/boards/components/board_sidebar.js
app/assets/javascripts/boards/components/board_sidebar.js
+1
-1
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+1
-1
app/assets/javascripts/init_issuable_sidebar.js
app/assets/javascripts/init_issuable_sidebar.js
+1
-1
app/assets/javascripts/init_legacy_filters.js
app/assets/javascripts/init_legacy_filters.js
+1
-1
app/assets/javascripts/issuable_bulk_update_sidebar.js
app/assets/javascripts/issuable_bulk_update_sidebar.js
+1
-2
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+411
-415
app/assets/javascripts/logo.js
app/assets/javascripts/logo.js
+3
-5
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+2
-2
spec/javascripts/labels_issue_sidebar_spec.js
spec/javascripts/labels_issue_sidebar_spec.js
+1
-2
No files found.
app/assets/javascripts/boards/components/board_sidebar.js
View file @
1fc4e2b6
/* eslint-disable comma-dangle, space-before-function-paren, no-new */
/* eslint-disable comma-dangle, space-before-function-paren, no-new */
/* global MilestoneSelect */
/* global MilestoneSelect */
/* global LabelsSelect */
/* global Sidebar */
/* global Sidebar */
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
...
@@ -11,6 +10,7 @@ import Assignees from '../../sidebar/components/assignees/assignees';
...
@@ -11,6 +10,7 @@ import Assignees from '../../sidebar/components/assignees/assignees';
import
DueDateSelectors
from
'
../../due_date_select
'
;
import
DueDateSelectors
from
'
../../due_date_select
'
;
import
'
./sidebar/remove_issue
'
;
import
'
./sidebar/remove_issue
'
;
import
IssuableContext
from
'
../../issuable_context
'
;
import
IssuableContext
from
'
../../issuable_context
'
;
import
LabelsSelect
from
'
../../labels_select
'
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
...
...
app/assets/javascripts/dispatcher.js
View file @
1fc4e2b6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
import
IssuableIndex
from
'
./issuable_index
'
;
import
IssuableIndex
from
'
./issuable_index
'
;
/* global Milestone */
/* global Milestone */
import
IssuableForm
from
'
./issuable_form
'
;
import
IssuableForm
from
'
./issuable_form
'
;
/* global LabelsSelect */
import
LabelsSelect
from
'
./labels_select
'
;
/* global MilestoneSelect */
/* global MilestoneSelect */
/* global NewBranchForm */
/* global NewBranchForm */
/* global NotificationsForm */
/* global NotificationsForm */
...
...
app/assets/javascripts/init_issuable_sidebar.js
View file @
1fc4e2b6
/* eslint-disable no-new */
/* eslint-disable no-new */
/* global MilestoneSelect */
/* global MilestoneSelect */
/* global LabelsSelect */
import
LabelsSelect
from
'
./labels_select
'
;
import
IssuableContext
from
'
./issuable_context
'
;
import
IssuableContext
from
'
./issuable_context
'
;
/* global Sidebar */
/* global Sidebar */
...
...
app/assets/javascripts/init_legacy_filters.js
View file @
1fc4e2b6
/* eslint-disable no-new */
/* eslint-disable no-new */
/* global LabelsSelect */
import
LabelsSelect
from
'
./labels_select
'
;
/* global MilestoneSelect */
/* global MilestoneSelect */
/* global SubscriptionSelect */
/* global SubscriptionSelect */
...
...
app/assets/javascripts/issuable_bulk_update_sidebar.js
View file @
1fc4e2b6
/* eslint-disable class-methods-use-this, no-new */
/* eslint-disable class-methods-use-this, no-new */
/* global LabelsSelect */
/* global MilestoneSelect */
/* global MilestoneSelect */
/* global SubscriptionSelect */
/* global SubscriptionSelect */
...
@@ -7,7 +6,7 @@ import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
...
@@ -7,7 +6,7 @@ import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
import
'
./milestone_select
'
;
import
'
./milestone_select
'
;
import
issueStatusSelect
from
'
./issue_status_select
'
;
import
issueStatusSelect
from
'
./issue_status_select
'
;
import
'
./subscription_select
'
;
import
'
./subscription_select
'
;
import
'
./labels_select
'
;
import
LabelsSelect
from
'
./labels_select
'
;
const
HIDDEN_CLASS
=
'
hidden
'
;
const
HIDDEN_CLASS
=
'
hidden
'
;
const
DISABLED_CONTENT_CLASS
=
'
disabled-content
'
;
const
DISABLED_CONTENT_CLASS
=
'
disabled-content
'
;
...
...
app/assets/javascripts/labels_select.js
View file @
1fc4e2b6
...
@@ -6,9 +6,8 @@ import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
...
@@ -6,9 +6,8 @@ import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
import
DropdownUtils
from
'
./filtered_search/dropdown_utils
'
;
import
DropdownUtils
from
'
./filtered_search/dropdown_utils
'
;
import
CreateLabelDropdown
from
'
./create_label
'
;
import
CreateLabelDropdown
from
'
./create_label
'
;
(
function
()
{
export
default
class
LabelsSelect
{
this
.
LabelsSelect
=
(
function
()
{
constructor
(
els
)
{
function
LabelsSelect
(
els
)
{
var
_this
,
$els
;
var
_this
,
$els
;
_this
=
this
;
_this
=
this
;
...
@@ -408,22 +407,22 @@ import CreateLabelDropdown from './create_label';
...
@@ -408,22 +407,22 @@ import CreateLabelDropdown from './create_label';
this
.
bindEvents
();
this
.
bindEvents
();
}
}
LabelsSelect
.
prototype
.
bindEvents
=
function
()
{
bindEvents
()
{
return
$
(
'
body
'
).
on
(
'
change
'
,
'
.selected_issue
'
,
this
.
onSelectCheckboxIssue
);
return
$
(
'
body
'
).
on
(
'
change
'
,
'
.selected_issue
'
,
this
.
onSelectCheckboxIssue
);
};
}
// eslint-disable-next-line class-methods-use-this
LabelsSelect
.
prototype
.
onSelectCheckboxIssue
=
function
()
{
onSelectCheckboxIssue
()
{
if
(
$
(
'
.selected_issue:checked
'
).
length
)
{
if
(
$
(
'
.selected_issue:checked
'
).
length
)
{
return
;
return
;
}
}
return
$
(
'
.issues-bulk-update .labels-filter .dropdown-toggle-text
'
).
text
(
'
Label
'
);
return
$
(
'
.issues-bulk-update .labels-filter .dropdown-toggle-text
'
).
text
(
'
Label
'
);
};
}
// eslint-disable-next-line class-methods-use-this
LabelsSelect
.
prototype
.
enableBulkLabelDropdown
=
functio
n
()
{
enableBulkLabelDropdow
n
()
{
IssuableBulkUpdateActions
.
willUpdateLabels
=
true
;
IssuableBulkUpdateActions
.
willUpdateLabels
=
true
;
};
}
// eslint-disable-next-line class-methods-use-this
LabelsSelect
.
prototype
.
setDropdownData
=
function
(
$dropdown
,
isMarking
,
value
)
{
setDropdownData
(
$dropdown
,
isMarking
,
value
)
{
var
i
,
markedIds
,
unmarkedIds
,
indeterminateIds
;
var
i
,
markedIds
,
unmarkedIds
,
indeterminateIds
;
markedIds
=
$dropdown
.
data
(
'
marked
'
)
||
[];
markedIds
=
$dropdown
.
data
(
'
marked
'
)
||
[];
...
@@ -464,16 +463,13 @@ import CreateLabelDropdown from './create_label';
...
@@ -464,16 +463,13 @@ import CreateLabelDropdown from './create_label';
$dropdown
.
data
(
'
marked
'
,
markedIds
);
$dropdown
.
data
(
'
marked
'
,
markedIds
);
$dropdown
.
data
(
'
unmarked
'
,
unmarkedIds
);
$dropdown
.
data
(
'
unmarked
'
,
unmarkedIds
);
$dropdown
.
data
(
'
indeterminate
'
,
indeterminateIds
);
$dropdown
.
data
(
'
indeterminate
'
,
indeterminateIds
);
};
}
// eslint-disable-next-line class-methods-use-this
LabelsSelect
.
prototype
.
setOriginalDropdownData
=
function
(
$container
,
$dropdown
)
{
setOriginalDropdownData
(
$container
,
$dropdown
)
{
var
labels
=
[];
const
labels
=
[];
$container
.
find
(
'
[name="label_name[]"]
'
).
map
(
function
()
{
$container
.
find
(
'
[name="label_name[]"]
'
).
map
(
function
()
{
return
labels
.
push
(
this
.
value
);
return
labels
.
push
(
this
.
value
);
});
});
$dropdown
.
data
(
'
marked
'
,
labels
);
$dropdown
.
data
(
'
marked
'
,
labels
);
};
}
}
return
LabelsSelect
;
})();
}).
call
(
window
);
app/assets/javascripts/logo.js
View file @
1fc4e2b6
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback */
export
default
function
initLogoAnimation
()
{
window
.
addEventListener
(
'
beforeunload
'
,
()
=>
{
(
function
()
{
window
.
addEventListener
(
'
beforeunload
'
,
function
()
{
$
(
'
.tanuki-logo
'
).
addClass
(
'
animate
'
);
$
(
'
.tanuki-logo
'
).
addClass
(
'
animate
'
);
});
});
}
).
call
(
window
);
}
app/assets/javascripts/main.js
View file @
1fc4e2b6
...
@@ -55,11 +55,10 @@ import './gl_field_errors';
...
@@ -55,11 +55,10 @@ import './gl_field_errors';
import
'
./gl_form
'
;
import
'
./gl_form
'
;
import
initTodoToggle
from
'
./header
'
;
import
initTodoToggle
from
'
./header
'
;
import
initImporterStatus
from
'
./importer_status
'
;
import
initImporterStatus
from
'
./importer_status
'
;
import
'
./labels_select
'
;
import
'
./layout_nav
'
;
import
'
./layout_nav
'
;
import
LazyLoader
from
'
./lazy_loader
'
;
import
LazyLoader
from
'
./lazy_loader
'
;
import
'
./line_highlighter
'
;
import
'
./line_highlighter
'
;
import
'
./logo
'
;
import
initLogoAnimation
from
'
./logo
'
;
import
'
./merge_request
'
;
import
'
./merge_request
'
;
import
'
./merge_request_tabs
'
;
import
'
./merge_request_tabs
'
;
import
'
./milestone
'
;
import
'
./milestone
'
;
...
@@ -134,6 +133,7 @@ $(function () {
...
@@ -134,6 +133,7 @@ $(function () {
initBreadcrumbs
();
initBreadcrumbs
();
initImporterStatus
();
initImporterStatus
();
initTodoToggle
();
initTodoToggle
();
initLogoAnimation
();
// Set the default path for all cookies to GitLab's root directory
// Set the default path for all cookies to GitLab's root directory
Cookies
.
defaults
.
path
=
gon
.
relative_url_root
||
'
/
'
;
Cookies
.
defaults
.
path
=
gon
.
relative_url_root
||
'
/
'
;
...
...
spec/javascripts/labels_issue_sidebar_spec.js
View file @
1fc4e2b6
/* eslint-disable no-new */
/* eslint-disable no-new */
import
IssuableContext
from
'
~/issuable_context
'
;
import
IssuableContext
from
'
~/issuable_context
'
;
/* global LabelsSelect */
import
LabelsSelect
from
'
~/labels_select
'
;
import
'
~/gl_dropdown
'
;
import
'
~/gl_dropdown
'
;
import
'
select2
'
;
import
'
select2
'
;
import
'
~/api
'
;
import
'
~/api
'
;
import
'
~/create_label
'
;
import
'
~/create_label
'
;
import
'
~/users_select
'
;
import
'
~/users_select
'
;
import
'
~/labels_select
'
;
(()
=>
{
(()
=>
{
let
saveLabelCount
=
0
;
let
saveLabelCount
=
0
;
...
...
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