From: Aleksander Ɓukasz Date: Tue, 27 May 2014 14:39:30 +0000 (+0200) Subject: editor: bring back summary view, this time in a main bar X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/ab30b4d5d52bca4de5a3b29468e09bffd7f76466?ds=sidebyside editor: bring back summary view, this time in a main bar --- diff --git a/src/editor/modules/mainBar/mainBar.js b/src/editor/modules/mainBar/mainBar.js index 256111f..e5cf522 100644 --- a/src/editor/modules/mainBar/mainBar.js +++ b/src/editor/modules/mainBar/mainBar.js @@ -40,6 +40,9 @@ return function(sandbox) { trigger.data('originalContent', trigger.html()); trigger.text(disabledText); } + }, + setSummaryView: function(summaryView) { + view.find('.bottom').prepend(summaryView); } }; diff --git a/src/editor/modules/mainBar/mainBar.less b/src/editor/modules/mainBar/mainBar.less index 8fb99a5..7a2e49b 100644 --- a/src/editor/modules/mainBar/mainBar.less +++ b/src/editor/modules/mainBar/mainBar.less @@ -13,14 +13,20 @@ border-style: solid; margin: 0 5px 0 0; padding: 0 5px 0 0; - &:last-child { - margin-right: 0; - padding-right: 0; - } + } ul { list-style-type: none; + display: inline-block; + color: #8F8A8A; + margin: 0; + &:last-child { + li:last-child { + margin-right: 0; + padding-right: 0; + } + } } .top { diff --git a/src/editor/modules/mainBar/template.html b/src/editor/modules/mainBar/template.html index 5320525..59f0708 100644 --- a/src/editor/modules/mainBar/template.html +++ b/src/editor/modules/mainBar/template.html @@ -3,8 +3,10 @@ <%= userName %> (<%= gettext('Exit') %>)
- +
+ +
\ No newline at end of file diff --git a/src/editor/modules/rng/documentSummary.html b/src/editor/modules/rng/documentSummary.html index 95c7552..8d5fcbd 100644 --- a/src/editor/modules/rng/documentSummary.html +++ b/src/editor/modules/rng/documentSummary.html @@ -1,14 +1,6 @@ -
-

<%= title %>

- - <% properties.forEach(function(propertyDesc) { %> - - - - <% }); %> - - - - -
<%= propertyDesc.label %><%= propertyValues[propertyDesc.name] %>
<%= gettext('Draft Saved') %>
-
\ No newline at end of file +
  • <%= gettext('Draft Saved') %>:
  • +<% properties.forEach(function(propertyDesc) { %> +
  • + <%= propertyDesc.label %>: <%= propertyValues[propertyDesc.name] %> +
  • +<% }); %> diff --git a/src/editor/modules/rng/documentSummary.js b/src/editor/modules/rng/documentSummary.js index fe593c3..8e6927d 100644 --- a/src/editor/modules/rng/documentSummary.js +++ b/src/editor/modules/rng/documentSummary.js @@ -8,7 +8,7 @@ var $ = require('libs/jquery'), var view = { - dom: $('
    '), + dom: $(''), init: function(config, doc) { this.config = config; this.doc = doc; diff --git a/src/editor/modules/rng/rng.js b/src/editor/modules/rng/rng.js index 3274067..8fb27ed 100644 --- a/src/editor/modules/rng/rng.js +++ b/src/editor/modules/rng/rng.js @@ -84,7 +84,7 @@ return function(sandbox) { documentSummary.init(sandbox.getConfig().documentSummaryView, wlxmlDocument); documentSummary.render(); documentSummary.setDraftField(usingDraft ? (draftTimestamp || '???') : '-'); - views.currentNodePaneLayout.appendView(documentSummary.dom); + sandbox.getModule('mainBar').setSummaryView(documentSummary.dom); sandbox.getModule('mainBar').setCommandEnabled('drop-draft', usingDraft); sandbox.getModule('mainBar').setCommandEnabled('save', usingDraft);