editor: remove code supporting main editing area sidebar as it's not used anymore
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 29 May 2014 07:33:03 +0000 (09:33 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 29 May 2014 07:37:55 +0000 (09:37 +0200)
This also hides metadata editor from the ui for now - it must be
moved somewhere else.

src/editor/modules/rng/editingLayout.less
src/editor/modules/rng/rng.js

index 40082a6..eefd222 100644 (file)
@@ -3,54 +3,6 @@
     width: 600px;*/
 }
 
     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;
 .rng-module-rng2-statusBar {
     margin: 10px 5px;
     font-size:0.9em;
         
     }
     
         
     }
     
-    [fnpjs-place="leftColumn"], [fnpjs-place="rightColumn"] {
+    [fnpjs-place="leftColumn"] {
         position: absolute;
         top: 30px; //
         bottom: 50px; //
         position: absolute;
         top: 30px; //
         bottom: 50px; //
-    }
-    
-    [fnpjs-place="leftColumn"] {
         left:0;
         right: 0;
     }
         left:0;
         right: 0;
     }
-    
-    [fnpjs-place="rightColumn"] {
-        right: 0px;
-        width: 290px;
-        
-    }
-
-
 }
\ No newline at end of file
 }
\ No newline at end of file
index 8fb27ed..459dcc1 100644 (file)
@@ -2,13 +2,12 @@ define([
 './documentSummary',
 'libs/underscore',
 'fnpjs/layout',
 './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',
 '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';
 
 
 'use strict';
 
@@ -35,10 +34,8 @@ return function(sandbox) {
             if(fragment && fragment.node) {
                 elementParent = fragment.node.getNearestElementNode();
                 sandbox.getModule('nodeBreadCrumbs').setNodeElement(elementParent);
             if(fragment && fragment.node) {
                 elementParent = fragment.node.getNearestElementNode();
                 sandbox.getModule('nodeBreadCrumbs').setNodeElement(elementParent);
-                sandbox.getModule('metadataEditor').setNodeElement(elementParent);
             } else {
                 sandbox.getModule('nodeBreadCrumbs').setNodeElement(null);
             } 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),
         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)
     };
     
         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());
     
     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 */
     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);
 
             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();
             });
             
                 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());
     eventHandlers.documentToolbar = {
         ready: function() {
             views.visualEditing.setView('toolbar', sandbox.getModule('documentToolbar').getView());