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
2c5bd97d
Commit
2c5bd97d
authored
Sep 12, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert BlobLicenseSelctors to ES6.
parent
53541e26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
25 deletions
+21
-25
app/assets/javascripts/blob/blob_license_selectors.js
app/assets/javascripts/blob/blob_license_selectors.js
+0
-25
app/assets/javascripts/blob/blob_license_selectors.js.es6
app/assets/javascripts/blob/blob_license_selectors.js.es6
+21
-0
No files found.
app/assets/javascripts/blob/blob_license_selectors.js
deleted
100644 → 0
View file @
53541e26
(
function
()
{
this
.
BlobLicenseSelectors
=
(
function
()
{
function
BlobLicenseSelectors
(
opts
)
{
var
ref
;
this
.
$dropdowns
=
(
ref
=
opts
.
$dropdowns
)
!=
null
?
ref
:
$
(
'
.js-license-selector
'
),
this
.
editor
=
opts
.
editor
;
this
.
$dropdowns
.
each
((
function
(
_this
)
{
return
function
(
i
,
dropdown
)
{
var
$dropdown
;
$dropdown
=
$
(
dropdown
);
return
new
BlobLicenseSelector
({
pattern
:
/^
(
.+
\/)?(
licen
[
sc
]
e|copying
)(
$|
\.)
/i
,
data
:
$dropdown
.
data
(
'
data
'
),
wrapper
:
$dropdown
.
closest
(
'
.js-license-selector-wrap
'
),
dropdown
:
$dropdown
,
editor
:
_this
.
editor
});
};
})(
this
));
}
return
BlobLicenseSelectors
;
})();
}).
call
(
this
);
app/assets/javascripts/blob/blob_license_selectors.js.es6
0 → 100644
View file @
2c5bd97d
((global) => {
class BlobLicenseSelectors() {
constructor({ $dropdowns, editor }) {
this.$dropdowns = $('.js-license-selector');
this.editor = editor;
this.$dropdowns.each((dropdown) => {
const $dropdown = $(dropdown);
return new BlobLicenseSelector({
editor,
pattern: /^(.+\/)?(licen[sc]e|copying)($|\.)/i,
data: $dropdown.data('data'),
wrapper: $dropdown.closest('.js-license-selector-wrap'),
dropdown: $dropdown,
});
});
}
}
global.BlobLicenseSelectors = BlobLicenseSelectors;
})(window.gl || (window.gl = {}));
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