diff --git a/Resources/public/dist/main.js b/Resources/public/dist/main.js index 7a0b09574..2d15a258d 100644 --- a/Resources/public/dist/main.js +++ b/Resources/public/dist/main.js @@ -1 +1 @@ -require.config({paths:{suluarticle:"../../suluarticle/dist",suluarticlecss:"../../suluarticle/css","type/article-selection":"../../suluarticle/dist/validation/types/article-selection","type/page-tree-route":"../../suluarticle/dist/validation/types/page-tree-route","services/suluarticle/article-manager":"../../suluarticle/dist/services/manager","services/suluarticle/article-router":"../../suluarticle/dist/services/router","services/suluarticle/property-configuration":"../../suluarticle/dist/services/property-configuration","services/suluarticle/list-helper":"../../suluarticle/dist/services/list-helper","services/suluarticle/overlay-filter-helper":"../../suluarticle/dist/services/overlay-filter-helper"}}),define(["underscore","config","css!suluarticlecss/main"],function(a,b){"use strict";var c=function(){var c=b.get("sulu-content").locales,d=[];return a.each(c,function(b){d=a.union(d,Object.keys(b))}),d};return{name:"Sulu Article Bundle",initialize:function(d){function e(c){var d={};return a.each(c,function(a,c){var e=b.get("sulu_security.contexts")["sulu.modules.articles_"+c];e&&e.view!==!1&&(d[c]=a)}),d}d.components.addSource("suluarticle","/bundles/suluarticle/dist/components"),d.sandbox.urlManager.setUrl("article","articles/<%= locale %>/edit:<%= id %>/details");var f=c(),g=b.get("sulu_article"),h={defaultLocale:f[0],locales:f,languageChanger:a.map(f,function(a){return{id:a,title:a}}),settingsKey:"articleLanguage",typeNames:Object.keys(e(g.types)),types:e(g.types),templates:g.templates,displayTabAll:g.displayTabAll,defaultAuthor:g.defaultAuthor,pageTreeEnabled:g.pageTreeEnabled,classes:g.classes,showWebspaceSettings:g.showWebspaceSettings,webspaceSettings:g.webspaceSettings,webspaces:g.webspaces};b.set("sulu_article",h);var i=function(){return d.sandbox.sulu.getUserSetting(h.settingsKey)||h.defaultLocale};d.sandbox.mvc.routes.push({route:"articles",callback:function(){return d.sandbox.emit("sulu.router.navigate","articles/"+i())}}),1===h.typeNames.length?(d.sandbox.mvc.routes.push({route:"articles/:locale",callback:function(a){return'
"}}),d.sandbox.mvc.routes.push({route:"articles/:locale/add",callback:function(a,b){return'
"}})):(h.displayTabAll||d.sandbox.mvc.routes.push({route:"articles(/:locale)",callback:function(){return d.sandbox.emit("sulu.router.navigate","articles:"+h.typeNames[0]+"/"+i())}}),h.displayTabAll===!0&&d.sandbox.mvc.routes.push({route:"articles/:locale",callback:function(a){return'
"}}),d.sandbox.mvc.routes.push({route:"articles::type",callback:function(a){return d.sandbox.emit("sulu.router.navigate","articles:"+a+"/"+i())}}),d.sandbox.mvc.routes.push({route:"articles::type/:locale",callback:function(a,b){return'
'}}),d.sandbox.mvc.routes.push({route:"articles/:locale/add::type",callback:function(a,b){return'
'}})),d.sandbox.mvc.routes.push({route:"articles/:locale/edit::id/add-page/:content",callback:function(a,b,c){return'
"}}),d.sandbox.mvc.routes.push({route:"articles/:locale/edit::id/page::page/:content",callback:function(a,b,c,d){return'
"}}),d.sandbox.mvc.routes.push({route:"articles/:locale/edit::id/:content",callback:function(a,b,c){return'
"}})}}}); \ No newline at end of file +require.config({paths:{suluarticle:"../../suluarticle/dist",suluarticlecss:"../../suluarticle/css","type/article-selection":"../../suluarticle/dist/validation/types/article-selection","type/page-tree-route":"../../suluarticle/dist/validation/types/page-tree-route","services/suluarticle/article-manager":"../../suluarticle/dist/services/manager","services/suluarticle/article-router":"../../suluarticle/dist/services/router","services/suluarticle/property-configuration":"../../suluarticle/dist/services/property-configuration","services/suluarticle/list-helper":"../../suluarticle/dist/services/list-helper","services/suluarticle/overlay-filter-helper":"../../suluarticle/dist/services/overlay-filter-helper"}}),define(["underscore","config","css!suluarticlecss/main"],function(a,b){"use strict";var c=function(){var c=b.get("sulu-content").locales,d=[];return a.each(c,function(b){d=a.union(d,Object.keys(b))}),d};return{name:"Sulu Article Bundle",initialize:function(d){function e(c){var d={};return a.each(c,function(a,c){var e=b.get("sulu_security.contexts")["sulu.modules.articles_"+c];e&&e.view!==!1&&(d[c]=a)}),d}d.components.addSource("suluarticle","/bundles/suluarticle/dist/components"),d.sandbox.urlManager.setUrl("article","articles/<%= locale %>/edit:<%= id %>/details");var f=c(),g=b.get("sulu_article"),h={defaultLocale:f[0],locales:f,languageChanger:a.map(f,function(a){return{id:a,title:a}}),settingsKey:"articleLanguage",typeNames:Object.keys(e(g.types)),types:e(g.types),templates:g.templates,displayTabAll:g.displayTabAll,defaultAuthor:g.defaultAuthor,pageTreeEnabled:g.pageTreeEnabled,classes:g.classes,showWebspaceSettings:g.showWebspaceSettings,webspaceSettings:g.webspaceSettings,webspaces:g.webspaces};b.set("sulu_article",h);var i=function(){return d.sandbox.sulu.getUserSetting(h.settingsKey)||h.defaultLocale};d.sandbox.mvc.routes.push({route:"articles",callback:function(){return d.sandbox.emit("sulu.router.navigate","articles/"+i())}}),1===h.typeNames.length?(d.sandbox.mvc.routes.push({route:"articles/:locale",callback:function(a){return'
"}}),d.sandbox.mvc.routes.push({route:"articles/:locale/add",callback:function(a,b){return'
"}})):(h.displayTabAll||d.sandbox.mvc.routes.push({route:"articles(/:locale)",callback:function(){return d.sandbox.emit("sulu.router.navigate","articles:"+h.typeNames[0]+"/"+i())}}),h.displayTabAll===!0&&d.sandbox.mvc.routes.push({route:"articles/:locale",callback:function(a){return'
"}}),d.sandbox.mvc.routes.push({route:"articles::type",callback:function(a){return d.sandbox.emit("sulu.router.navigate","articles:"+a+"/"+i())}}),d.sandbox.mvc.routes.push({route:"articles::type/:locale",callback:function(a,b){return'
'}}),d.sandbox.mvc.routes.push({route:"articles/:locale/add::type",callback:function(a,b){return'
'}})),d.sandbox.mvc.routes.push({route:"articles/:locale/edit::id/add-page/:content",callback:function(a,b,c){return'
"}}),d.sandbox.mvc.routes.push({route:"articles/:locale/edit::id/page::page/:content",callback:function(a,b,c,d){return'
"}}),d.sandbox.mvc.routes.push({route:"articles/:locale/edit::id/:content",callback:function(a,b,c){return'
"}})}}}); \ No newline at end of file diff --git a/Resources/public/js/main.js b/Resources/public/js/main.js index cee1f8d07..3463537b6 100644 --- a/Resources/public/js/main.js +++ b/Resources/public/js/main.js @@ -143,7 +143,7 @@ define(['underscore', 'config', 'css!suluarticlecss/main'], function(_, Config) app.sandbox.mvc.routes.push({ route: 'articles::type/:locale', callback: function(type, locale) { - return '
'; + return '
'; } }); @@ -165,14 +165,14 @@ define(['underscore', 'config', 'css!suluarticlecss/main'], function(_, Config) app.sandbox.mvc.routes.push({ route: 'articles/:locale/edit::id/page::page/:content', callback: function(locale, id, page, content) { - return '
'; + return '
'; } }); app.sandbox.mvc.routes.push({ route: 'articles/:locale/edit::id/:content', callback: function(locale, id, content) { - return '
'; + return '
'; } }); }