editor: styling gutter comments
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 27 May 2014 12:41:32 +0000 (14:41 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 28 May 2014 12:45:59 +0000 (14:45 +0200)
src/editor/modules/documentCanvas/canvas/comments/comment.html
src/editor/modules/documentCanvas/canvas/comments/comments.js
src/editor/modules/documentCanvas/canvas/comments/comments.less
src/editor/modules/documentCanvas/canvas/gutter.less

index 47af2ce..68c14c1 100644 (file)
@@ -16,7 +16,7 @@
         </div>
     </div>
     <div class="toolbox">
-        <a href="#" class="edit-start-btn"><%= gettext('edit') %></a>
+        <a href="#" class="edit-start-btn"><%= gettext('edit') %></a> -
         <a href="#" class="remove-btn"><%= gettext('remove') %></a>
     </div>
 </div>
index 41ed973..692c0b7 100644 (file)
@@ -142,6 +142,11 @@ var CommentView = function(commentNode) {
     
     metaData.some(function(row) {
         date = row.getValue();
+        if(/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]$/g.test(date)) {
+            date = date.split(':');
+            date.pop();
+            date = date.join(':');
+        }
         return true;
     }, 'date');
 
index 7476123..140e836 100644 (file)
@@ -1,5 +1,5 @@
 .comments {
-    @borderColor: darken(#FFFCB7, 15%);
+    @borderColor: darken(#FFFCB7, 45%);
 
     font-size: 12px;
 
@@ -7,11 +7,15 @@
         
         border-color: @borderColor;
         border-style: solid;
-        border-width: 1px;
-        margin-top: 10px;
+        border-width: 1px 0;
+        margin-top: -1px;
+        padding-bottom: 10px;
+
+        &:first-child {
+            margin-top:0;
+        }
 
         .header {
-            border-bottom: 1px solid @borderColor;
             padding: 0 3px;
             font-size: 10px;
             
     .newComment {
         margin-top: 10px;
 
-        textarea {
-            display: block;
-            width: 95%;
-            padding: 2px 2px;
-            margin: 0 0 10px 0;
-            font-size: 12px;
-            resize: vertical;
-            outline: none !important;
-            box-shadow: none;
 
-        }
     }
 
+    textarea {
+        display: block;
+        width: calc(~'100% - 4px');
+        padding: 2px 2px;
+        margin: 0 0 10px 0;
+        font-size: 12px;
+        resize: vertical;
+        outline: none !important;
+        box-shadow: none;
+
+    }
 
 }
\ No newline at end of file
index b6747a2..b41179b 100644 (file)
@@ -2,6 +2,7 @@
     display: table-cell;
     width: calc(~'100% - 800px');
     min-width: 250px;
+    padding-left: 45px;
 }
 
 .gutter-box {