You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/10/30 21:13:49 UTC
allura git commit: [#7919] Add top-level toggle for 'add-new-tool'
menu
Repository: allura
Updated Branches:
refs/heads/hs/7919 0b884ade7 -> c945919b5
[#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/c945919b
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/c945919b
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/c945919b
Branch: refs/heads/hs/7919
Commit: c945919b5ebd7a1b820345f8ea2c17b0d84b836d
Parents: 0b884ad
Author: Heith Seewald <hs...@hsmb.local>
Authored: Fri Oct 30 16:13:44 2015 -0400
Committer: Heith Seewald <hs...@hsmb.local>
Committed: Fri Oct 30 16:13:44 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/c945919b/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/c945919b/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',
],