-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented copy locale feature #73
Conversation
360cff2
to
6f88c49
Compare
@@ -170,6 +184,9 @@ define([ | |||
this.bindCustomEvents(); | |||
this.showDraftLabel(); | |||
this.setHeaderBar(true); | |||
this.loadLocalizations(); | |||
|
|||
this.options.language = this.options.locale; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment why we add this option
@@ -182,7 +199,30 @@ define([ | |||
|
|||
this.sandbox.on('sulu.header.language-changed', function(item) { | |||
this.sandbox.sulu.saveUserSetting(this.options.config.settingsKey, item.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing should be done for the same locale
* | ||
* @returns {string} | ||
*/ | ||
getCopyLocaleUrl: function(id, src, dest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to service?
@@ -182,7 +199,30 @@ define([ | |||
|
|||
this.sandbox.on('sulu.header.language-changed', function(item) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract this to own function
@wachterjohannes Have a look once more, thx :) |
return [ | ||
'/admin/api/articles/', id, '?locale=', src, '&dest=', dest, '&action=copy-locale' | ||
].join(''); | ||
return ArticleManager.getCopyLocaleUrl(id,src,dest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format this file
return [ | ||
'/admin/api/articles/', id, '?locale=', src, '&dest=', dest, '&action=copy-locale' | ||
].join(''); | ||
return ArticleManager.getCopyLocaleUrl(id,src,dest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format this file
What's in this PR?
Implemented copy locale feature in list and edit form.
Why?
Cause I had to.. :/