[editor] Do not load twice the editor the first time
@@ -771,6 +771,14 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
{ url: '/editor', app: function () {
// Defer to allow window.location param update
_.defer(function () {
+ if (typeof self.embeddable_cache['editor'] === 'undefined'){
+ if (window.location.getParameter('editor') !== '') {
+ self.extraEmbeddableURLParams('&editor=' + window.location.getParameter('editor'));
+ } else if (window.location.getParameter('type') !== '') {
+ self.extraEmbeddableURLParams('&type=' + window.location.getParameter('type'));
+ }
+ self.loadApp('editor');
+ } else {
self.loadApp('editor');
if (window.location.getParameter('editor') !== '') {
self.getActiveAppViewModel(function (viewModel) {
@@ -779,6 +787,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
} else if (window.location.getParameter('type') !== '') {
self.changeEditorType(window.location.getParameter('type'));
}
+ }
});
}},
{ url: '/notebook/editor', app: function (ctx) {
