Moving new modules to their own styles
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 6 Jun 2013 13:08:23 +0000 (15:08 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 6 Jun 2013 13:08:23 +0000 (15:08 +0200)
modules/documentCanvas/documentCanvas.js
modules/documentCanvas/documentCanvas.less
modules/documentCanvas/wlxml.less [new file with mode: 0644]
modules/nodeFamilyTree/nodeFamilyTree.js
styles/common.less [new file with mode: 0644]
styles/main.less

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