Skip to content
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

Merged
merged 5 commits into from
Feb 15, 2017
Merged

Conversation

trickreich
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets fixes #66
Related issues/PRs --
License MIT
Documentation PR --

What's in this PR?

Implemented copy locale feature in list and edit form.

Why?

Cause I had to.. :/

@@ -170,6 +184,9 @@ define([
this.bindCustomEvents();
this.showDraftLabel();
this.setHeaderBar(true);
this.loadLocalizations();

this.options.language = this.options.locale;
Copy link
Member

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);
Copy link
Member

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) {
Copy link
Member

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) {
Copy link
Member

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

@trickreich
Copy link
Contributor Author

@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);
Copy link
Member

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format this file

@wachterjohannes wachterjohannes merged commit 1114755 into develop Feb 15, 2017
@wachterjohannes wachterjohannes deleted the feature/copy-locale branch February 15, 2017 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Language copy locale overlay
2 participants