allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [09/50] [abbrv] allura git commit: [#7919] Fix overflow display issue for context menu
Date Thu, 17 Dec 2015 19:21:56 GMT
[#7919]  Fix overflow display issue for context menu


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

Branch: refs/heads/db/8034
Commit: 280157d75912cf793a4e4bc0c9d5de3ed1b29a44
Parents: 82a1b2a
Author: Heith Seewald <heiths@gmail.com>
Authored: Thu Dec 3 15:22:51 2015 -0500
Committer: Heith Seewald <heiths@gmail.com>
Committed: Wed Dec 16 13:54:31 2015 -0600

----------------------------------------------------------------------
 Allura/allura/public/nf/css/navbar.css         |  1 -
 Allura/allura/public/nf/js/context-menu.es6.js |  7 ++++---
 Allura/allura/public/nf/js/navbar.es6.js       | 11 +++++++----
 3 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/280157d7/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 c46b513..f2f7b54 100644
--- a/Allura/allura/public/nf/css/navbar.css
+++ b/Allura/allura/public/nf/css/navbar.css
@@ -272,7 +272,6 @@
     background: #f0f0f0;
     border: 1px solid #999;
     box-shadow: -2px 2px 6px #555;
-    overflow: auto;
     position: absolute;
     margin-top: 20px;
     margin-left: 5px;

http://git-wip-us.apache.org/repos/asf/allura/blob/280157d7/Allura/allura/public/nf/js/context-menu.es6.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/context-menu.es6.js b/Allura/allura/public/nf/js/context-menu.es6.js
index d0db2e5..349b522 100644
--- a/Allura/allura/public/nf/js/context-menu.es6.js
+++ b/Allura/allura/public/nf/js/context-menu.es6.js
@@ -25,13 +25,13 @@ class ContextMenu extends React.Component {
     }
 
     static propTypes = {
-        classes: React.PropTypes.array,
+        classes: React.PropTypes.array.isRequired,
         items: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
         onOptionClick: React.PropTypes.func.isRequired
     };
 
     static defaultOptions = {
-        classes: []
+        classes: ['context-link']
     };
 
     componentWillMount() {
@@ -61,6 +61,7 @@ class ContextMenu extends React.Component {
     }
 
     render() {
+        let _this = this;
         return (
             <div className="contextMenu">
                 <ul>{
@@ -68,7 +69,7 @@ class ContextMenu extends React.Component {
                         return (<li key={i}>
                             <ToolTipLink
                                 href={o.href}
-                                classes={['context-link', o.className]}
+                                classes={_this.props.classes.concat([o.className])}
                                 toolTip={o.tooltip}
                                 text={o.text}/>
                         </li>)

http://git-wip-us.apache.org/repos/asf/allura/blob/280157d7/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 324ba60..96ec8eb 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -122,6 +122,7 @@ var NavBarItem = React.createClass({
                 {this.props.currentOptionMenu.tool && this.props.currentOptionMenu.tool
=== this.props.mount_point &&
                     <ContextMenu
                         {...this.props}
+                        classes={['tool-options']}
                         items={this.props.options}
                         onOptionClick={this.props.onOptionClick}
                     />}
@@ -212,10 +213,11 @@ var ToggleAddNewTool = React.createClass({
             visible: !this.state.visible
         });
     },
-
-    onOptionClick: function(e) {
-        console.log("e", e);
+        handleOptionClick: function(event) {
+            console.log('event', event);
+        //this.props.onOptionClick(this.props.mount_point);
     },
+
     render: function () {
         return (
             <div>
@@ -225,7 +227,8 @@ var ToggleAddNewTool = React.createClass({
                 {this.state.visible &&
                 <ContextMenu
                     {...this.props}
-                    onOptionClick={this.onOptionClick}
+                    classes={['alt-context']}
+                    onOptionClick={this.handleOptionClick}
                     items={this.props.installableTools} />
                 }
             </div>


Mime
View raw message