allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [32/50] [abbrv] allura git commit: [#7919] anchored tools: remove not-allowed cursor, add tooltip
Date Thu, 17 Dec 2015 19:22:19 GMT
[#7919] anchored tools: remove not-allowed cursor, add tooltip


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/f9b08a8d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f9b08a8d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f9b08a8d

Branch: refs/heads/db/8034
Commit: f9b08a8dce0dfa78e666a0091ac759ab75039990
Parents: 68b44f0
Author: Dave Brondsema <dave@brondsema.net>
Authored: Wed Dec 9 16:12:47 2015 -0500
Committer: Heith Seewald <heiths@gmail.com>
Committed: Wed Dec 16 13:55:38 2015 -0600

----------------------------------------------------------------------
 Allura/allura/public/nf/css/navbar.css   |  7 +------
 Allura/allura/public/nf/js/navbar.es6.js | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/f9b08a8d/Allura/allura/public/nf/css/navbar.css
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/css/navbar.css b/Allura/allura/public/nf/css/navbar.css
index a29bcaf..71e625b 100644
--- a/Allura/allura/public/nf/css/navbar.css
+++ b/Allura/allura/public/nf/css/navbar.css
@@ -71,14 +71,9 @@
     cursor: move;
 }
 
-#top_nav .anchored {
-    cursor: not-allowed;
-    color: gray;
-}
-
 .anchored .draggable-handle,
 .anchored .draggable-handle-sub {
-    cursor: not-allowed;
+    cursor: default;
     color: gray;
 }
 

http://git-wip-us.apache.org/repos/asf/allura/blob/f9b08a8d/Allura/allura/public/nf/js/navbar.es6.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/navbar.es6.js b/Allura/allura/public/nf/js/navbar.es6.js
index 0f35a0c..e7262d1 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -113,11 +113,8 @@ var NavBarItem = React.createClass({
         url: React.PropTypes.string.isRequired,
         currentOptionMenu: React.PropTypes.object,
         onOptionClick: React.PropTypes.func.isRequired,
-        options: React.PropTypes.array
-    },
-
-    isAnchored: function() {
-        return this.props.is_anchored !== null;
+        options: React.PropTypes.array,
+        is_anchored: React.PropTypes.bool
     },
 
     render: function() {
@@ -127,17 +124,23 @@ var NavBarItem = React.createClass({
         }
         var spanClasses = this.props.handleType + " ordinal-item";
         if (this.props.isGrouper) {
-            spanClasses += " toolbar-grouper"
+            spanClasses += " toolbar-grouper";
         }
 
         return (
             <div className={ divClasses }>
+                <ToolTip targetSelector=".anchored .draggable-handle" position="top"
+                         theme="tooltipster-default" delay={250}/>
+                <ToolTip targetSelector=".anchored .draggable-handle-sub" position="right"
+                         theme="tooltipster-default" delay={250}/>
                 <a>
                     {!_.isEmpty(this.props.options) && <i className='config-tool
fa fa-cog'
                                                           onClick={this.handleOptionClick}>
</i>}
                     <span
                         className={spanClasses}
-                        data-mount-point={this.props.mount_point}>
+                        data-mount-point={this.props.mount_point}
+                        title={this.props.is_anchored ? 'This item cannot be moved.' : ''}
+                        >
                         {this.props.name}
                     </span>
                 </a>


Mime
View raw message