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
7b389c86
Commit
7b389c86
authored
Apr 30, 2019
by
John T Skarbek
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
b1e7c4c6
168cd1ec
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
7 deletions
+28
-7
app/assets/javascripts/integrations/integration_settings_form.js
...ets/javascripts/integrations/integration_settings_form.js
+5
-4
app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js
...vascripts/protected_tags/protected_tag_access_dropdown.js
+3
-1
app/assets/javascripts/protected_tags/protected_tag_create.js
...assets/javascripts/protected_tags/protected_tag_create.js
+2
-1
app/assets/javascripts/protected_tags/protected_tag_edit.js
app/assets/javascripts/protected_tags/protected_tag_edit.js
+6
-1
locale/gitlab.pot
locale/gitlab.pot
+12
-0
No files found.
app/assets/javascripts/integrations/integration_settings_form.js
View file @
7b389c86
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
axios
from
'
../lib/utils/axios_utils
'
;
import
axios
from
'
../lib/utils/axios_utils
'
;
import
flash
from
'
../flash
'
;
import
flash
from
'
../flash
'
;
import
{
__
}
from
'
~/locale
'
;
export
default
class
IntegrationSettingsForm
{
export
default
class
IntegrationSettingsForm
{
constructor
(
formSelector
)
{
constructor
(
formSelector
)
{
...
@@ -65,10 +66,10 @@ export default class IntegrationSettingsForm {
...
@@ -65,10 +66,10 @@ export default class IntegrationSettingsForm {
* Toggle Submit button label based on Integration status and ability to test service
* Toggle Submit button label based on Integration status and ability to test service
*/
*/
toggleSubmitBtnLabel
(
serviceActive
)
{
toggleSubmitBtnLabel
(
serviceActive
)
{
let
btnLabel
=
'
Save changes
'
;
let
btnLabel
=
__
(
'
Save changes
'
)
;
if
(
serviceActive
&&
this
.
canTestService
)
{
if
(
serviceActive
&&
this
.
canTestService
)
{
btnLabel
=
'
Test settings and save changes
'
;
btnLabel
=
__
(
'
Test settings and save changes
'
)
;
}
}
this
.
$submitBtnLabel
.
text
(
btnLabel
);
this
.
$submitBtnLabel
.
text
(
btnLabel
);
...
@@ -105,7 +106,7 @@ export default class IntegrationSettingsForm {
...
@@ -105,7 +106,7 @@ export default class IntegrationSettingsForm {
if
(
data
.
test_failed
)
{
if
(
data
.
test_failed
)
{
flashActions
=
{
flashActions
=
{
title
:
'
Save anyway
'
,
title
:
__
(
'
Save anyway
'
)
,
clickHandler
:
e
=>
{
clickHandler
:
e
=>
{
e
.
preventDefault
();
e
.
preventDefault
();
this
.
$form
.
submit
();
this
.
$form
.
submit
();
...
@@ -121,7 +122,7 @@ export default class IntegrationSettingsForm {
...
@@ -121,7 +122,7 @@ export default class IntegrationSettingsForm {
this
.
toggleSubmitBtnState
(
false
);
this
.
toggleSubmitBtnState
(
false
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
flash
(
'
Something went wrong on our end.
'
);
flash
(
__
(
'
Something went wrong on our end.
'
)
);
this
.
toggleSubmitBtnState
(
false
);
this
.
toggleSubmitBtnState
(
false
);
});
});
}
}
...
...
app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js
View file @
7b389c86
import
{
__
}
from
'
~/locale
'
;
export
default
class
ProtectedTagAccessDropdown
{
export
default
class
ProtectedTagAccessDropdown
{
constructor
(
options
)
{
constructor
(
options
)
{
this
.
options
=
options
;
this
.
options
=
options
;
...
@@ -15,7 +17,7 @@ export default class ProtectedTagAccessDropdown {
...
@@ -15,7 +17,7 @@ export default class ProtectedTagAccessDropdown {
if
(
$el
.
is
(
'
.is-active
'
))
{
if
(
$el
.
is
(
'
.is-active
'
))
{
return
item
.
text
;
return
item
.
text
;
}
}
return
'
Select
'
;
return
__
(
'
Select
'
)
;
},
},
clicked
(
options
)
{
clicked
(
options
)
{
options
.
e
.
preventDefault
();
options
.
e
.
preventDefault
();
...
...
app/assets/javascripts/protected_tags/protected_tag_create.js
View file @
7b389c86
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
ProtectedTagAccessDropdown
from
'
./protected_tag_access_dropdown
'
;
import
ProtectedTagAccessDropdown
from
'
./protected_tag_access_dropdown
'
;
import
CreateItemDropdown
from
'
../create_item_dropdown
'
;
import
CreateItemDropdown
from
'
../create_item_dropdown
'
;
import
{
__
}
from
'
~/locale
'
;
export
default
class
ProtectedTagCreate
{
export
default
class
ProtectedTagCreate
{
constructor
()
{
constructor
()
{
...
@@ -27,7 +28,7 @@ export default class ProtectedTagCreate {
...
@@ -27,7 +28,7 @@ export default class ProtectedTagCreate {
// Protected tag dropdown
// Protected tag dropdown
this
.
createItemDropdown
=
new
CreateItemDropdown
({
this
.
createItemDropdown
=
new
CreateItemDropdown
({
$dropdown
:
this
.
$form
.
find
(
'
.js-protected-tag-select
'
),
$dropdown
:
this
.
$form
.
find
(
'
.js-protected-tag-select
'
),
defaultToggleLabel
:
'
Protected Tag
'
,
defaultToggleLabel
:
__
(
'
Protected Tag
'
)
,
fieldName
:
'
protected_tag[name]
'
,
fieldName
:
'
protected_tag[name]
'
,
onSelect
:
this
.
onSelectCallback
,
onSelect
:
this
.
onSelectCallback
,
getData
:
ProtectedTagCreate
.
getProtectedTags
,
getData
:
ProtectedTagCreate
.
getProtectedTags
,
...
...
app/assets/javascripts/protected_tags/protected_tag_edit.js
View file @
7b389c86
import
flash
from
'
../flash
'
;
import
flash
from
'
../flash
'
;
import
axios
from
'
../lib/utils/axios_utils
'
;
import
axios
from
'
../lib/utils/axios_utils
'
;
import
ProtectedTagAccessDropdown
from
'
./protected_tag_access_dropdown
'
;
import
ProtectedTagAccessDropdown
from
'
./protected_tag_access_dropdown
'
;
import
{
__
}
from
'
~/locale
'
;
export
default
class
ProtectedTagEdit
{
export
default
class
ProtectedTagEdit
{
constructor
(
options
)
{
constructor
(
options
)
{
...
@@ -47,7 +48,11 @@ export default class ProtectedTagEdit {
...
@@ -47,7 +48,11 @@ export default class ProtectedTagEdit {
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$allowedToCreateDropdownButton
.
enable
();
this
.
$allowedToCreateDropdownButton
.
enable
();
flash
(
'
Failed to update tag!
'
,
'
alert
'
,
document
.
querySelector
(
'
.js-protected-tags-list
'
));
flash
(
__
(
'
Failed to update tag!
'
),
'
alert
'
,
document
.
querySelector
(
'
.js-protected-tags-list
'
),
);
});
});
}
}
}
}
locale/gitlab.pot
View file @
7b389c86
...
@@ -4036,6 +4036,9 @@ msgstr ""
...
@@ -4036,6 +4036,9 @@ msgstr ""
msgid "Failed to update issues, please try again."
msgid "Failed to update issues, please try again."
msgstr ""
msgstr ""
msgid "Failed to update tag!"
msgstr ""
msgid "Failed to update."
msgid "Failed to update."
msgstr ""
msgstr ""
...
@@ -7402,6 +7405,9 @@ msgstr ""
...
@@ -7402,6 +7405,9 @@ msgstr ""
msgid "Protected"
msgid "Protected"
msgstr ""
msgstr ""
msgid "Protected Tag"
msgstr ""
msgid "Protip:"
msgid "Protip:"
msgstr ""
msgstr ""
...
@@ -7925,6 +7931,9 @@ msgstr ""
...
@@ -7925,6 +7931,9 @@ msgstr ""
msgid "Save Changes"
msgid "Save Changes"
msgstr ""
msgstr ""
msgid "Save anyway"
msgstr ""
msgid "Save application"
msgid "Save application"
msgstr ""
msgstr ""
...
@@ -8956,6 +8965,9 @@ msgstr ""
...
@@ -8956,6 +8965,9 @@ msgstr ""
msgid "Test failed."
msgid "Test failed."
msgstr ""
msgstr ""
msgid "Test settings and save changes"
msgstr ""
msgid "TestHooks|Ensure one of your projects has merge requests."
msgid "TestHooks|Ensure one of your projects has merge requests."
msgstr ""
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