Author: sevein
Date: Thu Aug  9 17:33:09 2012
New Revision: 12068

Log:
Add grip detail to sortable nodes, fixes issue 2396

Added:
   trunk/images/grip.png   (contents, props changed)
Modified:
   trunk/css/graphic.css
   trunk/js/treeView.js

Modified: trunk/css/graphic.css
==============================================================================
--- trunk/css/graphic.css       Thu Aug  9 15:47:33 2012        (r12067)
+++ trunk/css/graphic.css       Thu Aug  9 17:33:09 2012        (r12068)
@@ -384,17 +384,36 @@
   left: 0px;
 }
 
-#treeview strong {
-
+#treeview strong
+{
   margin-right: 4px;
+}
 
+#treeview strong.publicationStatus
+{
+  color: #bbb;
+}
+
+#treeview small.grip
+{
+  float: right;
+  width: 9px;
+  height: 11px;
+  margin-right: 4px;
+  margin-top: 4px;
+  display: inline-block;
+  vertical-align: middle;
+  background-color: transparent;
+  background-image: url(../images/grip.png);
+  background-repeat: no-repeat;
 }
 
 /*********************************************************
              POPOVER
 **********************************************************/
 
-.popover {
+.popover
+{
   position: absolute;
   top: 0;
   left: 0;
@@ -403,23 +422,28 @@
   padding: 5px;
 }
 
-.popover.top {
+.popover.top
+{
   margin-top: -5px;
 }
 
-.popover.right {
+.popover.right
+{
   margin-left: 5px;
 }
 
-.popover.bottom {
+.popover.bottom
+{
   margin-top: 5px;
 }
 
-.popover.left {
+.popover.left
+{
   margin-left: -5px;
 }
 
-.popover.top .arrow {
+.popover.top .arrow
+{
   bottom: 0;
   left: 50%;
   margin-left: -5px;
@@ -428,7 +452,8 @@
   border-left: 5px solid transparent;
 }
 
-.popover.right .arrow {
+.popover.right .arrow
+{
   top: 50%;
   left: 0;
   margin-top: -5px;
@@ -437,7 +462,8 @@
   border-bottom: 5px solid transparent;
 }
 
-.popover.bottom .arrow {
+.popover.bottom .arrow
+{
   top: 0;
   left: 50%;
   margin-left: -5px;
@@ -446,7 +472,8 @@
   border-left: 5px solid transparent;
 }
 
-.popover.left .arrow {
+.popover.left .arrow
+{
   top: 50%;
   right: 0;
   margin-top: -5px;
@@ -455,13 +482,15 @@
   border-left: 5px solid #000000;
 }
 
-.popover .arrow {
+.popover .arrow
+{
   position: absolute;
   width: 0;
   height: 0;
 }
 
-.popover-inner {
+.popover-inner
+{
   width: 280px;
   padding: 3px;
   overflow: hidden;
@@ -475,7 +504,8 @@
           box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
 }
 
-.popover-title {
+.popover-title
+{
   padding: 9px 15px;
   line-height: 1;
   background-color: #f5f5f5;
@@ -485,7 +515,8 @@
           border-radius: 3px 3px 0 0;
 }
 
-.popover-content {
+.popover-content
+{
   padding: 14px;
   background-color: #ffffff;
   -webkit-border-radius: 0 0 3px 3px;
@@ -498,6 +529,7 @@
 
 .popover-content p,
 .popover-content ul,
-.popover-content ol {
+.popover-content ol
+{
   margin-bottom: 0;
 }

Added: trunk/images/grip.png
==============================================================================
Binary file. No diff available.

Modified: trunk/js/treeView.js
==============================================================================
--- trunk/js/treeView.js        Thu Aug  9 15:47:33 2012        (r12067)
+++ trunk/js/treeView.js        Thu Aug  9 17:33:09 2012        (r12068)
@@ -176,6 +176,8 @@
           });
 
         this.$element.disableSelection();
+
+        this.showGrip();
       },
 
     refreshSortableBehavior: function ()
@@ -187,6 +189,17 @@
           nodes.sortable('refresh');
         }
 
+        this.showGrip();
+
+        return this;
+      },
+
+    showGrip: function ()
+      {
+        this.$element
+          .find('.grip').remove().end()
+          .find(this.nodesSelector).prepend('<small class="grip"></small>');
+
         return this;
       },
 

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to