Return-Path: X-Original-To: apmail-allura-commits-archive@www.apache.org Delivered-To: apmail-allura-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD8FD18881 for ; Fri, 30 Oct 2015 20:35:36 +0000 (UTC) Received: (qmail 21122 invoked by uid 500); 30 Oct 2015 20:35:36 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 21104 invoked by uid 500); 30 Oct 2015 20:35:36 -0000 Mailing-List: contact commits-help@allura.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@allura.apache.org Delivered-To: mailing list commits@allura.apache.org Received: (qmail 21093 invoked by uid 99); 30 Oct 2015 20:35:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2015 20:35:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 90C4ADFC3B; Fri, 30 Oct 2015 20:35:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: heiths@apache.org To: commits@allura.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: allura git commit: [#7919] Add top-level toggle for 'add-new-tool' menu Date: Fri, 30 Oct 2015 20:35:36 +0000 (UTC) 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 Authored: Fri Oct 30 16:13:44 2015 -0400 Committer: Heith Seewald 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 ; + } +}); + +/** * 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', ],