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
c1de0d70
Commit
c1de0d70
authored
Jan 18, 2021
by
Lukas Eipert
Committed by
Mike Greiling
Mar 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove jquery ajax setup
parent
90295540
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
32 deletions
+2
-32
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+2
-29
locale/gitlab.pot
locale/gitlab.pot
+0
-3
No files found.
app/assets/javascripts/main.js
View file @
c1de0d70
...
...
@@ -16,21 +16,16 @@ import { initRails } from '~/lib/utils/rails_ujs';
import
*
as
popovers
from
'
~/popovers
'
;
import
*
as
tooltips
from
'
~/tooltips
'
;
import
initAlertHandler
from
'
./alert_handler
'
;
import
{
deprecatedCreateFlash
as
Flash
,
removeFlashClickListener
}
from
'
./flash
'
;
import
{
removeFlashClickListener
}
from
'
./flash
'
;
import
initTodoToggle
from
'
./header
'
;
import
initLayoutNav
from
'
./layout_nav
'
;
import
{
handleLocationHash
,
addSelectOnFocusBehaviour
,
getCspNonceValue
,
}
from
'
./lib/utils/common_utils
'
;
import
{
handleLocationHash
,
addSelectOnFocusBehaviour
}
from
'
./lib/utils/common_utils
'
;
import
{
localTimeAgo
}
from
'
./lib/utils/datetime_utility
'
;
import
{
getLocationHash
,
visitUrl
}
from
'
./lib/utils/url_utility
'
;
// everything else
import
initFeatureHighlight
from
'
./feature_highlight
'
;
import
LazyLoader
from
'
./lazy_loader
'
;
import
{
__
}
from
'
./locale
'
;
import
initLogoAnimation
from
'
./logo
'
;
import
initFrequentItemDropdowns
from
'
./frequent_items
'
;
import
initBreadcrumbs
from
'
./breadcrumb
'
;
...
...
@@ -49,17 +44,6 @@ applyGitLabUIConfig();
window
.
jQuery
=
jQuery
;
window
.
$
=
jQuery
;
// Add nonce to jQuery script handler
jQuery
.
ajaxSetup
({
converters
:
{
// eslint-disable-next-line @gitlab/require-i18n-strings, func-names
'
text script
'
:
function
(
text
)
{
jQuery
.
globalEval
(
text
,
{
nonce
:
getCspNonceValue
()
});
return
text
;
},
},
});
function
disableJQueryAnimations
()
{
$
.
fx
.
off
=
true
;
}
...
...
@@ -239,17 +223,6 @@ document.addEventListener('DOMContentLoaded', () => {
}
});
// eslint-disable-next-line no-jquery/no-ajax-events
$
(
document
).
ajaxError
((
e
,
xhrObj
)
=>
{
const
ref
=
xhrObj
.
status
;
if
(
ref
===
401
)
{
Flash
(
__
(
'
You need to be logged in.
'
));
}
else
if
(
ref
===
404
||
ref
===
500
)
{
Flash
(
__
(
'
Something went wrong on our end.
'
));
}
});
$
(
'
.navbar-toggler
'
).
on
(
'
click
'
,
()
=>
{
$
(
'
.header-content
'
).
toggleClass
(
'
menu-expanded
'
);
});
...
...
locale/gitlab.pot
View file @
c1de0d70
...
...
@@ -34910,9 +34910,6 @@ msgstr ""
msgid "You need permission."
msgstr ""
msgid "You need to be logged in."
msgstr ""
msgid "You need to register a two-factor authentication app before you can set up a device."
msgstr ""
...
...
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