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
fc1301db
Commit
fc1301db
authored
Oct 30, 2019
by
Marvin Karegyeya
Committed by
Mike Greiling
Oct 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove IIFE from jira_connect.js
parent
3cd7f380
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
38 deletions
+42
-38
ee/app/assets/javascripts/jira_connect.js
ee/app/assets/javascripts/jira_connect.js
+37
-38
ee/changelogs/unreleased/remove-IIFEs-from-jira_connect-js.yml
...angelogs/unreleased/remove-IIFEs-from-jira_connect-js.yml
+5
-0
No files found.
ee/app/assets/javascripts/jira_connect.js
View file @
fc1301db
...
...
@@ -9,49 +9,48 @@
* hence any code written here needs to be IE11+ compatible (no fully ES6)
*/
(
function
()
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
function
()
{
var
reqComplete
=
function
()
{
AP
.
navigator
.
reload
();
};
function
onLoaded
()
{
var
reqComplete
=
function
()
{
AP
.
navigator
.
reload
();
};
var
reqFailed
=
function
(
res
)
{
alert
(
res
.
responseJSON
.
error
);
};
var
reqFailed
=
function
(
res
)
{
alert
(
res
.
responseJSON
.
error
);
};
$
(
'
#add-subscription-form
'
).
on
(
'
submit
'
,
function
(
e
)
{
var
actionUrl
=
$
(
this
).
attr
(
'
action
'
);
e
.
preventDefault
();
$
(
'
#add-subscription-form
'
).
on
(
'
submit
'
,
function
(
e
)
{
var
actionUrl
=
$
(
this
).
attr
(
'
action
'
);
e
.
preventDefault
();
AP
.
context
.
getToken
(
function
(
token
)
{
// eslint-disable-next-line no-jquery/no-ajax
$
.
post
(
actionUrl
,
{
jwt
:
token
,
namespace_path
:
$
(
'
#namespace-input
'
).
val
(),
format
:
'
json
'
,
})
.
done
(
reqComplete
)
.
fail
(
reqFailed
);
});
AP
.
context
.
getToken
(
function
(
token
)
{
// eslint-disable-next-line no-jquery/no-ajax
$
.
post
(
actionUrl
,
{
jwt
:
token
,
namespace_path
:
$
(
'
#namespace-input
'
).
val
(),
format
:
'
json
'
,
})
.
done
(
reqComplete
)
.
fail
(
reqFailed
);
});
});
$
(
'
.remove-subscription
'
).
on
(
'
click
'
,
function
(
e
)
{
var
href
=
$
(
this
).
attr
(
'
href
'
);
e
.
preventDefault
();
$
(
'
.remove-subscription
'
).
on
(
'
click
'
,
function
(
e
)
{
var
href
=
$
(
this
).
attr
(
'
href
'
);
e
.
preventDefault
();
AP
.
context
.
getToken
(
function
(
token
)
{
// eslint-disable-next-line no-jquery/no-ajax
$
.
ajax
({
url
:
href
,
method
:
'
DELETE
'
,
data
:
{
jwt
:
token
,
format
:
'
json
'
,
},
})
.
done
(
reqComplete
)
.
fail
(
reqFailed
);
});
AP
.
context
.
getToken
(
function
(
token
)
{
// eslint-disable-next-line no-jquery/no-ajax
$
.
ajax
({
url
:
href
,
method
:
'
DELETE
'
,
data
:
{
jwt
:
token
,
format
:
'
json
'
,
},
})
.
done
(
reqComplete
)
.
fail
(
reqFailed
);
});
});
})();
}
document
.
addEventListener
(
'
DOMContentLoaded
'
,
onLoaded
);
ee/changelogs/unreleased/remove-IIFEs-from-jira_connect-js.yml
0 → 100644
View file @
fc1301db
---
title
:
Remove IIFEs from jira_connect.js file
merge_request
:
19248
author
:
nuwe1
type
:
other
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