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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b3917d48
Commit
b3917d48
authored
Sep 09, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set defaults in constructor, in case opts are undefined.
parent
7beb9f34
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
22 deletions
+15
-22
app/assets/javascripts/blob/blob_ci_yaml.js.es6
app/assets/javascripts/blob/blob_ci_yaml.js.es6
+2
-2
app/assets/javascripts/issues-bulk-assignment.js.es6
app/assets/javascripts/issues-bulk-assignment.js.es6
+0
-0
app/assets/javascripts/profile/profile.js.es6
app/assets/javascripts/profile/profile.js.es6
+2
-2
app/assets/javascripts/search_autocomplete.js.es6
app/assets/javascripts/search_autocomplete.js.es6
+6
-13
app/assets/javascripts/todos.js.es6
app/assets/javascripts/todos.js.es6
+2
-2
app/assets/javascripts/user_tabs.js.es6
app/assets/javascripts/user_tabs.js.es6
+3
-3
No files found.
app/assets/javascripts/blob/blob_ci_yaml.js.es6
View file @
b3917d48
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
global.BlobCiYamlSelector = BlobCiYamlSelector;
global.BlobCiYamlSelector = BlobCiYamlSelector;
class BlobCiYamlSelectors {
class BlobCiYamlSelectors {
constructor({ editor, $dropdowns
= $('.js-gitlab-ci-yml-selector')
}) {
constructor({ editor, $dropdowns }) {
this.editor = editor;
this.editor = editor;
this.$dropdowns = $dropdowns;
this.$dropdowns = $dropdowns
|| $('.js-gitlab-ci-yml-selector')
;
this.initSelectors();
this.initSelectors();
}
}
...
...
app/assets/javascripts/issues-bulk-assignment.js
→
app/assets/javascripts/issues-bulk-assignment.js
.es6
View file @
b3917d48
File moved
app/assets/javascripts/profile/profile.js.es6
View file @
b3917d48
((global) => {
((global) => {
class Profile {
class Profile {
constructor({ form
= $('.edit-user') } = {
}) {
constructor({ form }) {
this.onSubmitForm = this.onSubmitForm.bind(this);
this.onSubmitForm = this.onSubmitForm.bind(this);
this.form = form;
this.form = form
|| $('.edit-user')
;
this.bindEvents();
this.bindEvents();
this.initAvatarGlCrop();
this.initAvatarGlCrop();
}
}
...
...
app/assets/javascripts/search_autocomplete.js.es6
View file @
b3917d48
...
@@ -9,20 +9,13 @@
...
@@ -9,20 +9,13 @@
};
};
class SearchAutocomplete {
class SearchAutocomplete {
constructor({
constructor({ wrap, optsEl, autocompletePath, projectId, projectRef }) {
wrap = $('.search'),
optsEl = wrap.find('.search-autocomplete-opts'),
autocompletePath = optsEl.data('autocomplete-path'),
projectId = (optsEl.data('autocomplete-project-id') || ''),
projectRef = (optsEl.data('autocomplete-project-ref') || '')
} = {}) {
this.bindEventContext();
this.bindEventContext();
this.wrap = wrap;
this.wrap = wrap
|| $('.search')
;
this.optsEl = optsEl;
this.optsEl = optsEl
|| wrap.find('.search-autocomplete-opts')
;
this.autocompletePath = autocompletePath;
this.autocompletePath = autocompletePath
|| optsEl.data('autocomplete-path')
;
this.projectId = projectId;
this.projectId = projectId
|| (optsEl.data('autocomplete-project-id') || '')
;
this.projectRef = projectRef;
this.projectRef = projectRef
|| (optsEl.data('autocomplete-project-ref') || '')
;
this.dropdown = wrap.find('.dropdown');
this.dropdown = wrap.find('.dropdown');
this.dropdownContent = this.dropdown.find('.dropdown-content');
this.dropdownContent = this.dropdown.find('.dropdown-content');
this.locationBadgeEl = this.getElement('.location-badge');
this.locationBadgeEl = this.getElement('.location-badge');
...
...
app/assets/javascripts/todos.js.es6
View file @
b3917d48
((global) => {
((global) => {
class Todos {
class Todos {
constructor({ el
= $('.js-todos-options')
}) {
constructor({ el }) {
this.allDoneClicked = this.allDoneClicked.bind(this);
this.allDoneClicked = this.allDoneClicked.bind(this);
this.doneClicked = this.doneClicked.bind(this);
this.doneClicked = this.doneClicked.bind(this);
this.el = el;
this.el = el
|| $('.js-todos-options')
;
this.perPage = el.data('perPage');
this.perPage = el.data('perPage');
this.clearListeners();
this.clearListeners();
this.initBtnListeners();
this.initBtnListeners();
...
...
app/assets/javascripts/user_tabs.js.es6
View file @
b3917d48
...
@@ -59,10 +59,10 @@ content on the Users#show page.
...
@@ -59,10 +59,10 @@ content on the Users#show page.
*/
*/
((global) => {
((global) => {
class UserTabs {
class UserTabs {
constructor ({ defaultAction
= 'activity', action = defaultA
ction, parentEl }) {
constructor ({ defaultAction
, a
ction, parentEl }) {
this.loaded = {};
this.loaded = {};
this.defaultAction = defaultAction;
this.defaultAction = defaultAction
|| 'activity'
;
this.action = action;
this.action = action
|| this.defaultAction
;
this.$parentEl = $(parentEl) || $(document);
this.$parentEl = $(parentEl) || $(document);
this._location = window.location;
this._location = window.location;
this.$parentEl.find('.nav-links a')
this.$parentEl.find('.nav-links a')
...
...
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