From: Aleksander Ɓukasz Date: Thu, 6 Jun 2013 13:08:23 +0000 (+0200) Subject: Moving new modules to their own styles X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/eebb24ef74a635e06c6bc8f074302996ca5936ec?ds=sidebyside Moving new modules to their own styles --- diff --git a/modules/documentCanvas/documentCanvas.js b/modules/documentCanvas/documentCanvas.js index ac978f2..f9a8b7a 100644 --- a/modules/documentCanvas/documentCanvas.js +++ b/modules/documentCanvas/documentCanvas.js @@ -157,9 +157,9 @@ return function(sandbox) { _markSelected: function(node) { this.dimNode(node); - this.node.find('.rng-current').removeClass('rng-current'); + this.node.find('.rng-module-documentCanvas-currentNode').removeClass('rng-module-documentCanvas-currentNode'); - node.addClass('rng-current'); + node.addClass('rng-module-documentCanvas-currentNode'); this.currentNode = node; sandbox.publish('nodeSelected', node); diff --git a/modules/documentCanvas/documentCanvas.less b/modules/documentCanvas/documentCanvas.less index c03ede4..c0eca1e 100644 --- a/modules/documentCanvas/documentCanvas.less +++ b/modules/documentCanvas/documentCanvas.less @@ -1,3 +1,5 @@ +@import 'wlxml.less'; + #rng-module-documentCanvas-contentWrapper { border-color: #ddd; border-style: solid; @@ -20,4 +22,11 @@ &::-webkit-scrollbar-thumb:window-inactive { .rng-mixin-scrollbar-thumb-window-inactive; } +} + +.rng-module-documentCanvas-currentNode { + background: #fffacd; + border-color: grey; + border-style:dashed; + border-width:1px; } \ No newline at end of file diff --git a/modules/documentCanvas/wlxml.less b/modules/documentCanvas/wlxml.less new file mode 100644 index 0000000..41b3365 --- /dev/null +++ b/modules/documentCanvas/wlxml.less @@ -0,0 +1,66 @@ +[wlxml-tag] { + float: none !important; /* temporaty workaround for Bootstrap's influence via [class*="span"] { float: left; } */ + border-color: white; + border-style:solid; + border-width:1px; + min-height:20px; + position:relative; + text-indent: 0; +} + +span[wlxml-tag] { + display:inline-block; + min-width: 10px; +} + +[wlxml-tag=header] { + font-size: 13px; + font-weight: bold; + margin: 10px 0; +} + +[wlxml-tag=section] { + margin-top: 10px; + margin-bottom: 10px; +} + +[wlxml-tag=section] [wlxml-tag=section] { + margin-left:10px; +} + +[wlxml-class|="cite"] { + font-style: italic; +} + +[wlxml-class|="cite-code"] { + font-family: monospace; +} + +[wlxml-class|="cite-code-xml"] { + color: blue; +} + +[wlxml-tag=header] > [wlxml-class=author] { + font-size: 14px; +} + +[wlxml-tag=header] > [wlxml-class=title] { + font-size:18px; +} + +[wlxml-class|="uri"] { + color: blue; + text-decoration: underline; +} + +[wlxml-class|="p"] { + text-indent: 1.5em; +} + +[wlxml-class|="emph-tech"] { + font-style: italic; +} + +[wlxml-tag] metadata { + display:none; +} \ No newline at end of file diff --git a/modules/nodeFamilyTree/nodeFamilyTree.js b/modules/nodeFamilyTree/nodeFamilyTree.js index bd9c42c..e061277 100644 --- a/modules/nodeFamilyTree/nodeFamilyTree.js +++ b/modules/nodeFamilyTree/nodeFamilyTree.js @@ -57,10 +57,10 @@ return function(sandbox) { return view.dom; }, highlightNode: function(id) { - view.dom.find('a[data-id="'+id+'"]').addClass('rng-hover'); + view.dom.find('a[data-id="'+id+'"]').addClass('rng-common-hoveredNode'); }, dimNode: function(id) { - view.dom.find('a[data-id="'+id+'"]').removeClass('rng-hover'); + view.dom.find('a[data-id="'+id+'"]').removeClass('rng-common-hoveredNode'); } }; }; diff --git a/styles/common.less b/styles/common.less new file mode 100644 index 0000000..1b9ef18 --- /dev/null +++ b/styles/common.less @@ -0,0 +1,6 @@ +.rng-common-hoveredNode { + border-color: red; + border-style:solid; + border-width:1px; +} + diff --git a/styles/main.less b/styles/main.less index 1c13f7a..6d44f45 100644 --- a/styles/main.less +++ b/styles/main.less @@ -1,4 +1,5 @@ @import 'mixins.less'; +@import 'common.less'; @import '../modules/rng/rng.less'; @import '../modules/documentCanvas/documentCanvas.less';