allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject allura git commit: [#7919] Add top-level toggle for 'add-new-tool' menu
Date Fri, 30 Oct 2015 20:35:36 GMT
Repository: allura
Updated Branches:
  refs/heads/hs/7919 7046abbe8 -> be4f20a4d (forced update)


[#7919] Add top-level toggle for 'add-new-tool' menu


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

Branch: refs/heads/hs/7919
Commit: be4f20a4d800a7f829bcc1783fa08f100dc9bada
Parents: 0b884ad
Author: Heith Seewald <hseewald@hsmb.local>
Authored: Fri Oct 30 16:13:44 2015 -0400
Committer: Heith Seewald <hseewald@hsmb.local>
Committed: Fri Oct 30 16:34:43 2015 -0400

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 24 ++++++++++++++++++++++--
 Brocfile.js                              |  1 +
 2 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/be4f20a4/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 8c4ae96..1cb0923 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -177,6 +177,27 @@ var NormalNavItem = React.createClass({
 });
 
 /**
+ * Toggle Button
+
+ * @constructor
+ */
+var ToggleButton = React.createClass({
+    getInitialState: function() {
+        return {
+            visible: false
+        };
+    },
+    handleOnPush: function() {
+        this.setState({
+            visible: !this.state.visible
+        });
+    },
+    render: function() {
+        return <ToggleAddNewTool showAddToolMenu={this.state.visible} />;
+    }
+});
+
+/**
  * The NavBar when in "Normal" mode.
 
  * @constructor
@@ -248,8 +269,7 @@ var AdminNav = React.createClass({
         for (let item of items) {
             var subMenu;
             if (item.children) {
-
-                    subMenu.push(this.buildMenu(item.children, true));
+                this.buildMenu(item.children, true);
             }
 
             var _handle = subMenu ? ".draggable-handle-sub" : '.draggable-handle';

http://git-wip-us.apache.org/repos/asf/allura/blob/be4f20a4/Brocfile.js
----------------------------------------------------------------------
diff --git a/Brocfile.js b/Brocfile.js
index b78dd67..9c593e2 100644
--- a/Brocfile.js
+++ b/Brocfile.js
@@ -40,6 +40,7 @@ var react_file = 'react-with-addons' + (production ? '.min' : '') + '.js';
 var navbar_deps = funnel('Allura/allura/public/nf/js', {
     include: ['underscore-min.js',
               react_file,
+              'react-dom.js',
               'react-drag.js',
               'react-reorderable.js',
     ],


Mime
View raw message