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
dab08be6
Commit
dab08be6
authored
Aug 03, 2017
by
Tim Zallmann
Committed by
Phil Hughes
Aug 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Specific Async Script Loading by using a Page Variable"
parent
db271a6b
Changes
46
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
92 additions
and
26 deletions
+92
-26
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+1
-1
app/assets/javascripts/behaviors/requires_input.js
app/assets/javascripts/behaviors/requires_input.js
+6
-3
app/assets/javascripts/behaviors/toggler_behavior.js
app/assets/javascripts/behaviors/toggler_behavior.js
+0
-1
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+1
-0
app/assets/javascripts/boards/components/board_blank_state.js
...assets/javascripts/boards/components/board_blank_state.js
+1
-0
app/assets/javascripts/boards/components/new_list_dropdown.js
...assets/javascripts/boards/components/new_list_dropdown.js
+1
-0
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+1
-1
app/assets/javascripts/commons/index.js
app/assets/javascripts/commons/index.js
+1
-0
app/assets/javascripts/copy_as_gfm.js
app/assets/javascripts/copy_as_gfm.js
+1
-1
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+4
-4
app/assets/javascripts/dropzone_input.js
app/assets/javascripts/dropzone_input.js
+1
-2
app/assets/javascripts/emoji/index.js
app/assets/javascripts/emoji/index.js
+1
-0
app/assets/javascripts/filterable_list.js
app/assets/javascripts/filterable_list.js
+2
-0
app/assets/javascripts/filtered_search/dropdown_utils.js
app/assets/javascripts/filtered_search/dropdown_utils.js
+1
-0
app/assets/javascripts/gfm_auto_complete.js
app/assets/javascripts/gfm_auto_complete.js
+1
-0
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+1
-0
app/assets/javascripts/graphs/stat_graph_contributors.js
app/assets/javascripts/graphs/stat_graph_contributors.js
+1
-0
app/assets/javascripts/graphs/stat_graph_contributors_graph.js
...ssets/javascripts/graphs/stat_graph_contributors_graph.js
+1
-1
app/assets/javascripts/graphs/stat_graph_contributors_util.js
...assets/javascripts/graphs/stat_graph_contributors_util.js
+1
-0
app/assets/javascripts/issuable_bulk_update_actions.js
app/assets/javascripts/issuable_bulk_update_actions.js
+1
-0
app/assets/javascripts/issuable_index.js
app/assets/javascripts/issuable_index.js
+1
-1
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+1
-1
app/assets/javascripts/lib/utils/pretty_time.js
app/assets/javascripts/lib/utils/pretty_time.js
+2
-0
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+7
-4
app/assets/javascripts/milestone_select.js
app/assets/javascripts/milestone_select.js
+1
-0
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+1
-0
app/assets/javascripts/pipeline_schedules/components/interval_pattern_input.vue
.../pipeline_schedules/components/interval_pattern_input.vue
+2
-0
app/assets/javascripts/profile/gl_crop.js
app/assets/javascripts/profile/gl_crop.js
+1
-0
app/assets/javascripts/project_edit.js
app/assets/javascripts/project_edit.js
+1
-1
app/assets/javascripts/protected_branches/protected_branch_dropdown.js
...vascripts/protected_branches/protected_branch_dropdown.js
+2
-0
app/assets/javascripts/protected_tags/protected_tag_dropdown.js
...sets/javascripts/protected_tags/protected_tag_dropdown.js
+2
-0
app/assets/javascripts/right_sidebar.js
app/assets/javascripts/right_sidebar.js
+1
-0
app/assets/javascripts/shortcuts_issuable.js
app/assets/javascripts/shortcuts_issuable.js
+2
-1
app/assets/javascripts/sidebar/components/time_tracking/sidebar_time_tracking.js
...sidebar/components/time_tracking/sidebar_time_tracking.js
+2
-0
app/assets/javascripts/sidebar_height_manager.js
app/assets/javascripts/sidebar_height_manager.js
+2
-1
app/assets/javascripts/todos.js
app/assets/javascripts/todos.js
+3
-0
app/assets/javascripts/u2f/authenticate.js
app/assets/javascripts/u2f/authenticate.js
+2
-0
app/assets/javascripts/u2f/register.js
app/assets/javascripts/u2f/register.js
+2
-0
app/assets/javascripts/username_validator.js
app/assets/javascripts/username_validator.js
+2
-0
app/assets/javascripts/users/activity_calendar.js
app/assets/javascripts/users/activity_calendar.js
+1
-0
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+1
-0
app/helpers/defer_script_tag_helper.rb
app/helpers/defer_script_tag_helper.rb
+6
-0
app/views/layouts/_bootlint.haml
app/views/layouts/_bootlint.haml
+4
-3
app/views/layouts/_init_auto_complete.html.haml
app/views/layouts/_init_auto_complete.html.haml
+1
-0
app/views/projects/merge_requests/show.html.haml
app/views/projects/merge_requests/show.html.haml
+1
-0
spec/helpers/defer_script_tag_helper_spec.rb
spec/helpers/defer_script_tag_helper_spec.rb
+13
-0
No files found.
app/assets/javascripts/awards_handler.js
View file @
dab08be6
/* eslint-disable class-methods-use-this */
/* eslint-disable class-methods-use-this */
/* global Flash */
/* global Flash */
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
const
animationEndEventString
=
'
animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd
'
;
const
animationEndEventString
=
'
animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd
'
;
...
...
app/assets/javascripts/behaviors/requires_input.js
View file @
dab08be6
import
_
from
'
underscore
'
;
import
'
../commons/bootstrap
'
;
import
'
../commons/bootstrap
'
;
// Requires Input behavior
// Requires Input behavior
...
@@ -48,7 +49,9 @@ function hideOrShowHelpBlock(form) {
...
@@ -48,7 +49,9 @@ function hideOrShowHelpBlock(form) {
$
(()
=>
{
$
(()
=>
{
const
$form
=
$
(
'
form.js-requires-input
'
);
const
$form
=
$
(
'
form.js-requires-input
'
);
$form
.
requiresInput
();
if
(
$form
)
{
hideOrShowHelpBlock
(
$form
);
$form
.
requiresInput
();
$
(
'
.select2.js-select-namespace
'
).
change
(()
=>
hideOrShowHelpBlock
(
$form
));
hideOrShowHelpBlock
(
$form
);
$
(
'
.select2.js-select-namespace
'
).
change
(()
=>
hideOrShowHelpBlock
(
$form
));
}
});
});
app/assets/javascripts/behaviors/toggler_behavior.js
View file @
dab08be6
// Toggle button. Show/hide content inside parent container.
// Toggle button. Show/hide content inside parent container.
// Button does not change visibility. If button has icon - it changes chevron style.
// Button does not change visibility. If button has icon - it changes chevron style.
//
//
...
...
app/assets/javascripts/boards/boards_bundle.js
View file @
dab08be6
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
/* global BoardService */
/* global BoardService */
/* global Flash */
/* global Flash */
import
_
from
'
underscore
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
VueResource
from
'
vue-resource
'
;
import
VueResource
from
'
vue-resource
'
;
import
FilteredSearchBoards
from
'
./filtered_search_boards
'
;
import
FilteredSearchBoards
from
'
./filtered_search_boards
'
;
...
...
app/assets/javascripts/boards/components/board_blank_state.js
View file @
dab08be6
/* global ListLabel */
/* global ListLabel */
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
...
...
app/assets/javascripts/boards/components/new_list_dropdown.js
View file @
dab08be6
/* eslint-disable comma-dangle, func-names, no-new, space-before-function-paren, one-var,
/* eslint-disable comma-dangle, func-names, no-new, space-before-function-paren, one-var,
promise/catch-or-return */
promise/catch-or-return */
import
_
from
'
underscore
'
;
window
.
gl
=
window
.
gl
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
dab08be6
/* eslint-disable comma-dangle, space-before-function-paren, one-var, no-shadow, dot-notation, max-len */
/* eslint-disable comma-dangle, space-before-function-paren, one-var, no-shadow, dot-notation, max-len */
/* global List */
/* global List */
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
window
.
gl
=
window
.
gl
||
{};
window
.
gl
=
window
.
gl
||
{};
...
...
app/assets/javascripts/commons/index.js
View file @
dab08be6
import
'
underscore
'
;
import
'
./polyfills
'
;
import
'
./polyfills
'
;
import
'
./jquery
'
;
import
'
./jquery
'
;
import
'
./bootstrap
'
;
import
'
./bootstrap
'
;
app/assets/javascripts/copy_as_gfm.js
View file @
dab08be6
/* eslint-disable class-methods-use-this, object-shorthand, no-unused-vars, no-use-before-define, no-new, max-len, no-restricted-syntax, guard-for-in, no-continue */
/* eslint-disable class-methods-use-this, object-shorthand, no-unused-vars, no-use-before-define, no-new, max-len, no-restricted-syntax, guard-for-in, no-continue */
import
_
from
'
underscore
'
;
import
'
./lib/utils/common_utils
'
;
import
'
./lib/utils/common_utils
'
;
import
{
placeholderImage
}
from
'
./lazy_loader
'
;
import
{
placeholderImage
}
from
'
./lazy_loader
'
;
...
...
app/assets/javascripts/dispatcher.js
View file @
dab08be6
...
@@ -79,10 +79,6 @@ import GpgBadges from './gpg_badges';
...
@@ -79,10 +79,6 @@ import GpgBadges from './gpg_badges';
(
function
()
{
(
function
()
{
var
Dispatcher
;
var
Dispatcher
;
$
(
function
()
{
return
new
Dispatcher
();
});
Dispatcher
=
(
function
()
{
Dispatcher
=
(
function
()
{
function
Dispatcher
()
{
function
Dispatcher
()
{
this
.
initSearch
();
this
.
initSearch
();
...
@@ -637,4 +633,8 @@ import GpgBadges from './gpg_badges';
...
@@ -637,4 +633,8 @@ import GpgBadges from './gpg_badges';
return
Dispatcher
;
return
Dispatcher
;
})();
})();
$
(
function
()
{
new
Dispatcher
();
});
}).
call
(
window
);
}).
call
(
window
);
app/assets/javascripts/dropzone_input.js
View file @
dab08be6
/* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, one-var, no-var, one-var-declaration-per-line, no-unused-vars, camelcase, quotes, no-useless-concat, prefer-template, quote-props, comma-dangle, object-shorthand, consistent-return, prefer-arrow-callback */
/* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, one-var, no-var, one-var-declaration-per-line, no-unused-vars, camelcase, quotes, no-useless-concat, prefer-template, quote-props, comma-dangle, object-shorthand, consistent-return, prefer-arrow-callback */
/* global Dropzone */
/* global Dropzone */
import
_
from
'
underscore
'
;
import
'
./preview_markdown
'
;
import
'
./preview_markdown
'
;
window
.
DropzoneInput
=
(
function
()
{
window
.
DropzoneInput
=
(
function
()
{
function
DropzoneInput
(
form
)
{
function
DropzoneInput
(
form
)
{
Dropzone
.
autoDiscover
=
false
;
const
divHover
=
'
<div class="div-dropzone-hover"></div>
'
;
const
divHover
=
'
<div class="div-dropzone-hover"></div>
'
;
const
iconPaperclip
=
'
<i class="fa fa-paperclip div-dropzone-icon"></i>
'
;
const
iconPaperclip
=
'
<i class="fa fa-paperclip div-dropzone-icon"></i>
'
;
const
$attachButton
=
form
.
find
(
'
.button-attach-file
'
);
const
$attachButton
=
form
.
find
(
'
.button-attach-file
'
);
...
...
app/assets/javascripts/emoji/index.js
View file @
dab08be6
import
_
from
'
underscore
'
;
import
emojiMap
from
'
emojis/digests.json
'
;
import
emojiMap
from
'
emojis/digests.json
'
;
import
emojiAliases
from
'
emojis/aliases.json
'
;
import
emojiAliases
from
'
emojis/aliases.json
'
;
...
...
app/assets/javascripts/filterable_list.js
View file @
dab08be6
import
_
from
'
underscore
'
;
/**
/**
* Makes search request for content when user types a value in the search input.
* Makes search request for content when user types a value in the search input.
* Updates the html content of the page with the received one.
* Updates the html content of the page with the received one.
...
...
app/assets/javascripts/filtered_search/dropdown_utils.js
View file @
dab08be6
import
_
from
'
underscore
'
;
import
FilteredSearchContainer
from
'
./container
'
;
import
FilteredSearchContainer
from
'
./container
'
;
class
DropdownUtils
{
class
DropdownUtils
{
...
...
app/assets/javascripts/gfm_auto_complete.js
View file @
dab08be6
import
_
from
'
underscore
'
;
import
glRegexp
from
'
./lib/utils/regexp
'
;
import
glRegexp
from
'
./lib/utils/regexp
'
;
import
AjaxCache
from
'
./lib/utils/ajax_cache
'
;
import
AjaxCache
from
'
./lib/utils/ajax_cache
'
;
...
...
app/assets/javascripts/gl_dropdown.js
View file @
dab08be6
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, one-var-declaration-per-line, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, prefer-template, no-param-reassign, no-loop-func, no-mixed-operators */
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, one-var-declaration-per-line, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, prefer-template, no-param-reassign, no-loop-func, no-mixed-operators */
/* global fuzzaldrinPlus */
/* global fuzzaldrinPlus */
import
_
from
'
underscore
'
;
import
{
isObject
}
from
'
./lib/utils/type_utility
'
;
import
{
isObject
}
from
'
./lib/utils/type_utility
'
;
var
GitLabDropdown
,
GitLabDropdownFilter
,
GitLabDropdownRemote
;
var
GitLabDropdown
,
GitLabDropdownFilter
,
GitLabDropdownRemote
;
...
...
app/assets/javascripts/graphs/stat_graph_contributors.js
View file @
dab08be6
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, one-var, camelcase, one-var-declaration-per-line, quotes, no-param-reassign, quote-props, comma-dangle, prefer-template, max-len, no-return-assign, no-shadow */
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, one-var, camelcase, one-var-declaration-per-line, quotes, no-param-reassign, quote-props, comma-dangle, prefer-template, max-len, no-return-assign, no-shadow */
import
_
from
'
underscore
'
;
import
d3
from
'
d3
'
;
import
d3
from
'
d3
'
;
import
{
ContributorsGraph
,
ContributorsAuthorGraph
,
ContributorsMasterGraph
}
from
'
./stat_graph_contributors_graph
'
;
import
{
ContributorsGraph
,
ContributorsAuthorGraph
,
ContributorsMasterGraph
}
from
'
./stat_graph_contributors_graph
'
;
import
ContributorsStatGraphUtil
from
'
./stat_graph_contributors_util
'
;
import
ContributorsStatGraphUtil
from
'
./stat_graph_contributors_util
'
;
...
...
app/assets/javascripts/graphs/stat_graph_contributors_graph.js
View file @
dab08be6
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, max-len, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, comma-dangle, no-return-assign, prefer-arrow-callback, quotes, prefer-template, newline-per-chained-call, no-else-return, no-shadow */
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, max-len, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, comma-dangle, no-return-assign, prefer-arrow-callback, quotes, prefer-template, newline-per-chained-call, no-else-return, no-shadow */
import
_
from
'
underscore
'
;
import
d3
from
'
d3
'
;
import
d3
from
'
d3
'
;
const
extend
=
function
(
child
,
parent
)
{
for
(
var
key
in
parent
)
{
if
(
hasProp
.
call
(
parent
,
key
))
child
[
key
]
=
parent
[
key
];
}
function
ctor
()
{
this
.
constructor
=
child
;
}
ctor
.
prototype
=
parent
.
prototype
;
child
.
prototype
=
new
ctor
();
child
.
__super__
=
parent
.
prototype
;
return
child
;
};
const
extend
=
function
(
child
,
parent
)
{
for
(
var
key
in
parent
)
{
if
(
hasProp
.
call
(
parent
,
key
))
child
[
key
]
=
parent
[
key
];
}
function
ctor
()
{
this
.
constructor
=
child
;
}
ctor
.
prototype
=
parent
.
prototype
;
child
.
prototype
=
new
ctor
();
child
.
__super__
=
parent
.
prototype
;
return
child
;
};
...
...
app/assets/javascripts/graphs/stat_graph_contributors_util.js
View file @
dab08be6
/* eslint-disable func-names, space-before-function-paren, object-shorthand, no-var, one-var, camelcase, one-var-declaration-per-line, comma-dangle, no-param-reassign, no-return-assign, quotes, prefer-arrow-callback, wrap-iife, consistent-return, no-unused-vars, max-len, no-cond-assign, no-else-return, max-len */
/* eslint-disable func-names, space-before-function-paren, object-shorthand, no-var, one-var, camelcase, one-var-declaration-per-line, comma-dangle, no-param-reassign, no-return-assign, quotes, prefer-arrow-callback, wrap-iife, consistent-return, no-unused-vars, max-len, no-cond-assign, no-else-return, max-len */
import
_
from
'
underscore
'
;
export
default
{
export
default
{
parse_log
:
function
(
log
)
{
parse_log
:
function
(
log
)
{
...
...
app/assets/javascripts/issuable_bulk_update_actions.js
View file @
dab08be6
/* eslint-disable comma-dangle, quotes, consistent-return, func-names, array-callback-return, space-before-function-paren, prefer-arrow-callback, max-len, no-unused-expressions, no-sequences, no-underscore-dangle, no-unused-vars, no-param-reassign */
/* eslint-disable comma-dangle, quotes, consistent-return, func-names, array-callback-return, space-before-function-paren, prefer-arrow-callback, max-len, no-unused-expressions, no-sequences, no-underscore-dangle, no-unused-vars, no-param-reassign */
/* global IssuableIndex */
/* global IssuableIndex */
/* global Flash */
/* global Flash */
import
_
from
'
underscore
'
;
export
default
{
export
default
{
init
({
container
,
form
,
issues
,
prefixId
}
=
{})
{
init
({
container
,
form
,
issues
,
prefixId
}
=
{})
{
...
...
app/assets/javascripts/issuable_index.js
View file @
dab08be6
/* eslint-disable no-param-reassign, func-names, no-var, camelcase, no-unused-vars, object-shorthand, space-before-function-paren, no-return-assign, comma-dangle, consistent-return, one-var, one-var-declaration-per-line, quotes, prefer-template, prefer-arrow-callback, wrap-iife, max-len */
/* eslint-disable no-param-reassign, func-names, no-var, camelcase, no-unused-vars, object-shorthand, space-before-function-paren, no-return-assign, comma-dangle, consistent-return, one-var, one-var-declaration-per-line, quotes, prefer-template, prefer-arrow-callback, wrap-iife, max-len */
/* global IssuableIndex */
/* global IssuableIndex */
import
_
from
'
underscore
'
;
import
IssuableBulkUpdateSidebar
from
'
./issuable_bulk_update_sidebar
'
;
import
IssuableBulkUpdateSidebar
from
'
./issuable_bulk_update_sidebar
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
...
...
app/assets/javascripts/labels_select.js
View file @
dab08be6
/* eslint-disable no-useless-return, func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, no-unused-vars, one-var-declaration-per-line, prefer-template, no-new, consistent-return, object-shorthand, comma-dangle, no-shadow, no-param-reassign, brace-style, vars-on-top, quotes, no-lonely-if, no-else-return, dot-notation, no-empty, no-return-assign, camelcase, prefer-spread */
/* eslint-disable no-useless-return, func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, no-unused-vars, one-var-declaration-per-line, prefer-template, no-new, consistent-return, object-shorthand, comma-dangle, no-shadow, no-param-reassign, brace-style, vars-on-top, quotes, no-lonely-if, no-else-return, dot-notation, no-empty, no-return-assign, camelcase, prefer-spread */
/* global Issuable */
/* global Issuable */
/* global ListLabel */
/* global ListLabel */
import
_
from
'
underscore
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
DropdownUtils
from
'
./filtered_search/dropdown_utils
'
;
import
DropdownUtils
from
'
./filtered_search/dropdown_utils
'
;
...
...
app/assets/javascripts/lib/utils/pretty_time.js
View file @
dab08be6
import
_
from
'
underscore
'
;
(()
=>
{
(()
=>
{
/*
/*
* TODO: Make these methods more configurable (e.g. parseSeconds timePeriodContstraints,
* TODO: Make these methods more configurable (e.g. parseSeconds timePeriodContstraints,
...
...
app/assets/javascripts/main.js
View file @
dab08be6
...
@@ -36,9 +36,6 @@ import './shortcuts_find_file';
...
@@ -36,9 +36,6 @@ import './shortcuts_find_file';
import
'
./shortcuts_issuable
'
;
import
'
./shortcuts_issuable
'
;
import
'
./shortcuts_network
'
;
import
'
./shortcuts_network
'
;
// behaviors
import
'
./behaviors/
'
;
// templates
// templates
import
'
./templates/issuable_template_selector
'
;
import
'
./templates/issuable_template_selector
'
;
import
'
./templates/issuable_template_selectors
'
;
import
'
./templates/issuable_template_selectors
'
;
...
@@ -56,6 +53,9 @@ import './lib/utils/pretty_time';
...
@@ -56,6 +53,9 @@ import './lib/utils/pretty_time';
import
'
./lib/utils/text_utility
'
;
import
'
./lib/utils/text_utility
'
;
import
'
./lib/utils/url_utility
'
;
import
'
./lib/utils/url_utility
'
;
// behaviors
import
'
./behaviors/
'
;
// u2f
// u2f
import
'
./u2f/authenticate
'
;
import
'
./u2f/authenticate
'
;
import
'
./u2f/error
'
;
import
'
./u2f/error
'
;
...
@@ -86,7 +86,6 @@ import './copy_as_gfm';
...
@@ -86,7 +86,6 @@ import './copy_as_gfm';
import
'
./copy_to_clipboard
'
;
import
'
./copy_to_clipboard
'
;
import
'
./create_label
'
;
import
'
./create_label
'
;
import
'
./diff
'
;
import
'
./diff
'
;
import
'
./dispatcher
'
;
import
'
./dropzone_input
'
;
import
'
./dropzone_input
'
;
import
'
./due_date_select
'
;
import
'
./due_date_select
'
;
import
'
./files_comment_button
'
;
import
'
./files_comment_button
'
;
...
@@ -150,9 +149,13 @@ import './subscription';
...
@@ -150,9 +149,13 @@ import './subscription';
import
'
./subscription_select
'
;
import
'
./subscription_select
'
;
import
'
./syntax_highlight
'
;
import
'
./syntax_highlight
'
;
import
'
./dispatcher
'
;
// eslint-disable-next-line global-require, import/no-commonjs
// eslint-disable-next-line global-require, import/no-commonjs
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
require
(
'
./test_utils/
'
);
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
require
(
'
./test_utils/
'
);
Dropzone
.
autoDiscover
=
false
;
document
.
addEventListener
(
'
beforeunload
'
,
function
()
{
document
.
addEventListener
(
'
beforeunload
'
,
function
()
{
// Unbind scroll events
// Unbind scroll events
$
(
document
).
off
(
'
scroll
'
);
$
(
document
).
off
(
'
scroll
'
);
...
...
app/assets/javascripts/milestone_select.js
View file @
dab08be6
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, one-var-declaration-per-line, no-unused-vars, object-shorthand, comma-dangle, no-else-return, no-self-compare, consistent-return, no-param-reassign, no-shadow */
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, one-var-declaration-per-line, no-unused-vars, object-shorthand, comma-dangle, no-else-return, no-self-compare, consistent-return, no-param-reassign, no-shadow */
/* global Issuable */
/* global Issuable */
/* global ListMilestone */
/* global ListMilestone */
import
_
from
'
underscore
'
;
(
function
()
{
(
function
()
{
this
.
MilestoneSelect
=
(
function
()
{
this
.
MilestoneSelect
=
(
function
()
{
...
...
app/assets/javascripts/notes.js
View file @
dab08be6
...
@@ -11,6 +11,7 @@ newline-per-chained-call, no-useless-escape, class-methods-use-this */
...
@@ -11,6 +11,7 @@ newline-per-chained-call, no-useless-escape, class-methods-use-this */
/* global mrRefreshWidgetUrl */
/* global mrRefreshWidgetUrl */
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
import
autosize
from
'
vendor/autosize
'
;
import
autosize
from
'
vendor/autosize
'
;
import
Dropzone
from
'
dropzone
'
;
import
Dropzone
from
'
dropzone
'
;
...
...
app/assets/javascripts/pipeline_schedules/components/interval_pattern_input.vue
View file @
dab08be6
<
script
>
<
script
>
import
_
from
'
underscore
'
;
export
default
{
export
default
{
props
:
{
props
:
{
initialCronInterval
:
{
initialCronInterval
:
{
...
...
app/assets/javascripts/profile/gl_crop.js
View file @
dab08be6
/* eslint-disable no-useless-escape, max-len, quotes, no-var, no-underscore-dangle, func-names, space-before-function-paren, no-unused-vars, no-return-assign, object-shorthand, one-var, one-var-declaration-per-line, comma-dangle, consistent-return, class-methods-use-this, new-parens */
/* eslint-disable no-useless-escape, max-len, quotes, no-var, no-underscore-dangle, func-names, space-before-function-paren, no-unused-vars, no-return-assign, object-shorthand, one-var, one-var-declaration-per-line, comma-dangle, consistent-return, class-methods-use-this, new-parens */
import
'
cropper
'
;
import
'
cropper
'
;
import
_
from
'
underscore
'
;
((
global
)
=>
{
((
global
)
=>
{
// Matches everything but the file name
// Matches everything but the file name
...
...
app/assets/javascripts/project_edit.js
View file @
dab08be6
export
default
function
setupProjectEdit
()
{
export
default
function
setupProjectEdit
()
{
const
$transferForm
=
$
(
'
.js-project-transfer-form
'
);
const
$transferForm
=
$
(
'
.js-project-transfer-form
'
);
const
$selectNamespace
=
$transferForm
.
find
(
'
.select2
'
);
const
$selectNamespace
=
$transferForm
.
find
(
'
select
.select2
'
);
$selectNamespace
.
on
(
'
change
'
,
()
=>
{
$selectNamespace
.
on
(
'
change
'
,
()
=>
{
$transferForm
.
find
(
'
:submit
'
).
prop
(
'
disabled
'
,
!
$selectNamespace
.
val
());
$transferForm
.
find
(
'
:submit
'
).
prop
(
'
disabled
'
,
!
$selectNamespace
.
val
());
...
...
app/assets/javascripts/protected_branches/protected_branch_dropdown.js
View file @
dab08be6
import
_
from
'
underscore
'
;
export
default
class
ProtectedBranchDropdown
{
export
default
class
ProtectedBranchDropdown
{
/**
/**
* @param {Object} options containing
* @param {Object} options containing
...
...
app/assets/javascripts/protected_tags/protected_tag_dropdown.js
View file @
dab08be6
import
_
from
'
underscore
'
;
export
default
class
ProtectedTagDropdown
{
export
default
class
ProtectedTagDropdown
{
/**
/**
* @param {Object} options containing
* @param {Object} options containing
...
...
app/assets/javascripts/right_sidebar.js
View file @
dab08be6
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-unused-vars, consistent-return, one-var, one-var-declaration-per-line, quotes, prefer-template, object-shorthand, comma-dangle, no-else-return, no-param-reassign, max-len */
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-unused-vars, consistent-return, one-var, one-var-declaration-per-line, quotes, prefer-template, object-shorthand, comma-dangle, no-else-return, no-param-reassign, max-len */
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
import
SidebarHeightManager
from
'
./sidebar_height_manager
'
;
import
SidebarHeightManager
from
'
./sidebar_height_manager
'
;
...
...
app/assets/javascripts/shortcuts_issuable.js
View file @
dab08be6
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
/* global ShortcutsNavigation */
/* global ShortcutsNavigation */
/* global sidebar */
/* global sidebar */
import
_
from
'
underscore
'
;
import
'
mousetrap
'
;
import
'
mousetrap
'
;
import
'
./shortcuts_navigation
'
;
import
'
./shortcuts_navigation
'
;
...
@@ -58,7 +59,7 @@ import './shortcuts_navigation';
...
@@ -58,7 +59,7 @@ import './shortcuts_navigation';
});
});
// If replyField already has some content, add a newline before our quote
// If replyField already has some content, add a newline before our quote
separator
=
replyField
.
val
().
trim
()
!==
""
&&
"
\n\n
"
||
''
;
separator
=
replyField
.
val
().
trim
()
!==
""
&&
"
\n\n
"
||
''
;
replyField
.
val
(
function
(
_
,
current
)
{
replyField
.
val
(
function
(
a
,
current
)
{
return
current
+
separator
+
quote
.
join
(
''
)
+
"
\n
"
;
return
current
+
separator
+
quote
.
join
(
''
)
+
"
\n
"
;
});
});
...
...
app/assets/javascripts/sidebar/components/time_tracking/sidebar_time_tracking.js
View file @
dab08be6
import
_
from
'
underscore
'
;
import
'
~/smart_interval
'
;
import
'
~/smart_interval
'
;
import
timeTracker
from
'
./time_tracker
'
;
import
timeTracker
from
'
./time_tracker
'
;
...
...
app/assets/javascripts/sidebar_height_manager.js
View file @
dab08be6
import
_
from
'
underscore
'
;
export
default
{
export
default
{
init
()
{
init
()
{
if
(
!
this
.
initialized
)
{
if
(
!
this
.
initialized
)
{
...
@@ -30,4 +32,3 @@ export default {
...
@@ -30,4 +32,3 @@ export default {
}
}
},
},
};
};
app/assets/javascripts/todos.js
View file @
dab08be6
...
@@ -52,6 +52,7 @@ export default class Todos {
...
@@ -52,6 +52,7 @@ export default class Todos {
}
}
updateRowStateClicked
(
e
)
{
updateRowStateClicked
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
e
.
preventDefault
();
const
target
=
e
.
target
;
const
target
=
e
.
target
;
...
@@ -92,6 +93,7 @@ export default class Todos {
...
@@ -92,6 +93,7 @@ export default class Todos {
}
}
updateAllStateClicked
(
e
)
{
updateAllStateClicked
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
e
.
preventDefault
();
const
target
=
e
.
currentTarget
;
const
target
=
e
.
currentTarget
;
...
@@ -142,6 +144,7 @@ export default class Todos {
...
@@ -142,6 +144,7 @@ export default class Todos {
if
(
gl
.
utils
.
isMetaClick
(
e
))
{
if
(
gl
.
utils
.
isMetaClick
(
e
))
{
const
windowTarget
=
'
_blank
'
;
const
windowTarget
=
'
_blank
'
;
const
selected
=
e
.
target
;
const
selected
=
e
.
target
;
e
.
stopPropagation
();
e
.
preventDefault
();
e
.
preventDefault
();
if
(
selected
.
tagName
===
'
IMG
'
)
{
if
(
selected
.
tagName
===
'
IMG
'
)
{
...
...
app/assets/javascripts/u2f/authenticate.js
View file @
dab08be6
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
/* global U2FError */
/* global U2FError */
/* global U2FUtil */
/* global U2FUtil */
import
_
from
'
underscore
'
;
// Authenticate U2F (universal 2nd factor) devices for users to authenticate with.
// Authenticate U2F (universal 2nd factor) devices for users to authenticate with.
//
//
// State Flow #1: setup -> in_progress -> authenticated -> POST to server
// State Flow #1: setup -> in_progress -> authenticated -> POST to server
...
...
app/assets/javascripts/u2f/register.js
View file @
dab08be6
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
/* global U2FError */
/* global U2FError */
/* global U2FUtil */
/* global U2FUtil */
import
_
from
'
underscore
'
;
// Register U2F (universal 2nd factor) devices for users to authenticate with.
// Register U2F (universal 2nd factor) devices for users to authenticate with.
//
//
// State Flow #1: setup -> in_progress -> registered -> POST to server
// State Flow #1: setup -> in_progress -> registered -> POST to server
...
...
app/assets/javascripts/username_validator.js
View file @
dab08be6
/* eslint-disable comma-dangle, consistent-return, class-methods-use-this, arrow-parens, no-param-reassign, max-len */
/* eslint-disable comma-dangle, consistent-return, class-methods-use-this, arrow-parens, no-param-reassign, max-len */
import
_
from
'
underscore
'
;
const
debounceTimeoutDuration
=
1000
;
const
debounceTimeoutDuration
=
1000
;
const
invalidInputClass
=
'
gl-field-error-outline
'
;
const
invalidInputClass
=
'
gl-field-error-outline
'
;
const
successInputClass
=
'
gl-field-success-outline
'
;
const
successInputClass
=
'
gl-field-success-outline
'
;
...
...
app/assets/javascripts/users/activity_calendar.js
View file @
dab08be6
import
_
from
'
underscore
'
;
import
d3
from
'
d3
'
;
import
d3
from
'
d3
'
;
const
LOADING_HTML
=
`
const
LOADING_HTML
=
`
...
...
app/assets/javascripts/users_select.js
View file @
dab08be6
/* eslint-disable func-names, space-before-function-paren, one-var, no-var, prefer-rest-params, wrap-iife, quotes, max-len, one-var-declaration-per-line, vars-on-top, prefer-arrow-callback, consistent-return, comma-dangle, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, no-lonely-if, yoda, prefer-spread, no-void, camelcase, no-param-reassign */
/* eslint-disable func-names, space-before-function-paren, one-var, no-var, prefer-rest-params, wrap-iife, quotes, max-len, one-var-declaration-per-line, vars-on-top, prefer-arrow-callback, consistent-return, comma-dangle, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, no-lonely-if, yoda, prefer-spread, no-void, camelcase, no-param-reassign */
/* global Issuable */
/* global Issuable */
/* global emitSidebarEvent */
/* global emitSidebarEvent */
import
_
from
'
underscore
'
;
// TODO: remove eventHub hack after code splitting refactor
// TODO: remove eventHub hack after code splitting refactor
window
.
emitSidebarEvent
=
window
.
emitSidebarEvent
||
$
.
noop
;
window
.
emitSidebarEvent
=
window
.
emitSidebarEvent
||
$
.
noop
;
...
...
app/helpers/defer_script_tag_helper.rb
0 → 100644
View file @
dab08be6
module
DeferScriptTagHelper
# Override the default ActionView `javascript_include_tag` helper to support page specific deferred loading
def
javascript_include_tag
(
*
sources
)
super
(
*
sources
,
defer:
true
)
end
end
app/views/layouts/_bootlint.haml
View file @
dab08be6
-# haml-lint:disable InlineJavaScript
:javascript
:javascript
jQuery
(
document
).
ready
(
function
()
{
window
.
onload
=
function
()
{
javascript
:(
function
(){
var
s
=
document
.
createElement
(
"
script
"
);
s
.
onload
=
function
(){
bootlint
.
showLintReportForCurrentDocument
([],
{
hasProblems
:
false
,
problemFree
:
false
});};
s
.
src
=
"
https://maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js
"
;
document
.
body
.
appendChild
(
s
)})(
);
var
s
=
document
.
createElement
(
"
script
"
);
s
.
onload
=
function
(){
bootlint
.
showLintReportForCurrentDocument
([],
{
hasProblems
:
false
,
problemFree
:
false
});};
s
.
src
=
"
https://maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js
"
;
document
.
body
.
appendChild
(
s
);
}
);
}
app/views/layouts/_init_auto_complete.html.haml
View file @
dab08be6
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
-
if
project
-
if
project
-# haml-lint:disable InlineJavaScript
-# haml-lint:disable InlineJavaScript
:javascript
:javascript
gl
=
window
.
gl
||
{};
gl
.
GfmAutoComplete
=
gl
.
GfmAutoComplete
||
{};
gl
.
GfmAutoComplete
=
gl
.
GfmAutoComplete
||
{};
gl
.
GfmAutoComplete
.
dataSources
=
{
gl
.
GfmAutoComplete
.
dataSources
=
{
members
:
"
#{
members_project_autocomplete_sources_path
(
project
,
type:
noteable_type
,
type_id:
params
[
:id
])
}
"
,
members
:
"
#{
members_project_autocomplete_sources_path
(
project
,
type:
noteable_type
,
type_id:
params
[
:id
])
}
"
,
...
...
app/views/projects/merge_requests/show.html.haml
View file @
dab08be6
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
-# haml-lint:disable InlineJavaScript
-# haml-lint:disable InlineJavaScript
:javascript
:javascript
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
mrWidgetData
=
#{
serialize_issuable
(
@merge_request
)
}
window
.
gl
.
mrWidgetData
=
#{
serialize_issuable
(
@merge_request
)
}
#js-vue-mr-widget
.mr-widget
#js-vue-mr-widget
.mr-widget
...
...
spec/helpers/defer_script_tag_helper_spec.rb
0 → 100644
View file @
dab08be6
# coding: utf-8
require
'spec_helper'
describe
DeferScriptTagHelper
do
describe
'script tag'
do
script_url
=
'test.js'
it
'returns an script tag with defer=true'
do
expect
(
javascript_include_tag
(
script_url
).
to_s
)
.
to
eq
"<script src=
\"
/javascripts/
#{
script_url
}
\"
defer=
\"
defer
\"
></script>"
end
end
end
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