From: Aleksander Ɓukasz Date: Thu, 29 May 2014 07:33:03 +0000 (+0200) Subject: editor: remove code supporting main editing area sidebar as it's not used anymore X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/0e100dced6c5982e02aaa0bda87238418976adde?ds=inline;hp=8a96e73cb2bfaf1bb973281e1c3033f3ecc5309f editor: remove code supporting main editing area sidebar as it's not used anymore This also hides metadata editor from the ui for now - it must be moved somewhere else. --- diff --git a/src/editor/modules/rng/editingLayout.less b/src/editor/modules/rng/editingLayout.less index 40082a6..eefd222 100644 --- a/src/editor/modules/rng/editingLayout.less +++ b/src/editor/modules/rng/editingLayout.less @@ -3,54 +3,6 @@ width: 600px;*/ } -.rng-module-rng2-right { - /*float: right; - position: relative; - width: 258px; - margin-left: 50px;*/ - - border-width: 1px 1px 1px 1px; - border-style: solid; - border-color: #ddd; - padding: 5px 15px; - - p, td, label, input, select { - font-size: 11px; - line-height:13px; - } - - select { - -webkit-appearance: button; - -moz-appearance: button; - appearance: button; - height: auto; - line-height: 14px; - } - - legend { - font-size:11px; - height:30px; - } - - - .rng-view-tabs-tabBar { - position:absolute; - top:-1px; - right:-50px; - border-width: 1px 1px 1px 0px; - border-style: solid; - border-color: #ddd; - padding: 5px; - background: #ededed; - } - - label + select { - position:relative; - top: 5px; - } - -} - .rng-module-rng2-statusBar { margin: 10px 5px; font-size:0.9em; @@ -67,22 +19,11 @@ } - [fnpjs-place="leftColumn"], [fnpjs-place="rightColumn"] { + [fnpjs-place="leftColumn"] { position: absolute; top: 30px; // bottom: 50px; // - } - - [fnpjs-place="leftColumn"] { left:0; right: 0; } - - [fnpjs-place="rightColumn"] { - right: 0px; - width: 290px; - - } - - } \ No newline at end of file diff --git a/src/editor/modules/rng/rng.js b/src/editor/modules/rng/rng.js index 8fb27ed..459dcc1 100644 --- a/src/editor/modules/rng/rng.js +++ b/src/editor/modules/rng/rng.js @@ -2,13 +2,12 @@ define([ './documentSummary', 'libs/underscore', 'fnpjs/layout', -'fnpjs/vbox', 'fnpjs/logging/logging', 'views/tabs/tabs', 'libs/text!./mainLayout.html', 'libs/text!./editingLayout.html', 'libs/text!./diffLayout.html', -], function(documentSummary, _, layout, vbox, logging, tabs, mainLayoutTemplate, visualEditingLayoutTemplate, diffLayoutTemplate) { +], function(documentSummary, _, layout, logging, tabs, mainLayoutTemplate, visualEditingLayoutTemplate, diffLayoutTemplate) { 'use strict'; @@ -35,10 +34,8 @@ return function(sandbox) { if(fragment && fragment.node) { elementParent = fragment.node.getNearestElementNode(); sandbox.getModule('nodeBreadCrumbs').setNodeElement(elementParent); - sandbox.getModule('metadataEditor').setNodeElement(elementParent); } else { sandbox.getModule('nodeBreadCrumbs').setNodeElement(null); - sandbox.getModule('metadataEditor').setNodeElement(null); } }, }; @@ -48,20 +45,15 @@ return function(sandbox) { mainLayout: new layout.Layout(mainLayoutTemplate), mainTabs: (new tabs.View()).render(), visualEditing: new layout.Layout(visualEditingLayoutTemplate), - visualEditingSidebar: (new tabs.View({stacked: true})).render(), - currentNodePaneLayout: new vbox.VBox(), diffLayout: new layout.Layout(diffLayoutTemplate) }; - views.visualEditing.setView('rightColumn', views.visualEditingSidebar.getAsView()); addMainTab(gettext('Editor'), 'editor', views.visualEditing.getAsView()); addMainTab(gettext('Source'), 'sourceEditor', ''); addMainTab(gettext('History'), 'history', views.diffLayout.getAsView()); sandbox.getDOM().append(views.mainLayout.getAsView()); - views.visualEditingSidebar.addTab({icon: 'pencil'}, 'edit', views.currentNodePaneLayout.getAsView()); - var wlxmlDocument, documentIsDirty; /* Events handling */ @@ -89,7 +81,7 @@ return function(sandbox) { sandbox.getModule('mainBar').setCommandEnabled('drop-draft', usingDraft); sandbox.getModule('mainBar').setCommandEnabled('save', usingDraft); - _.each(['sourceEditor', 'documentCanvas', 'documentToolbar', 'metadataEditor', 'nodeBreadCrumbs', 'mainBar', 'indicator', 'documentHistory', 'diffViewer', 'statusBar'], function(moduleName) { + _.each(['sourceEditor', 'documentCanvas', 'documentToolbar', 'nodeBreadCrumbs', 'mainBar', 'indicator', 'documentHistory', 'diffViewer', 'statusBar'], function(moduleName) { sandbox.getModule(moduleName).start(); }); @@ -195,13 +187,6 @@ return function(sandbox) { } }; - eventHandlers.metadataEditor = { - ready: function() { - sandbox.getModule('metadataEditor').setDocument(sandbox.getModule('data').getDocument()); - views.visualEditingSidebar.addTab({icon: 'info-sign'}, 'metadataEditor', sandbox.getModule('metadataEditor').getView()); - } - }; - eventHandlers.documentToolbar = { ready: function() { views.visualEditing.setView('toolbar', sandbox.getModule('documentToolbar').getView());