allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [05/50] [abbrv] allura git commit: [#7919] move getNavJson into success handler of threshold update. Cleanup unnecessary code
Date Fri, 08 Jan 2016 19:30:10 GMT
[#7919] move getNavJson into success handler of threshold update.  Cleanup unnecessary code


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

Branch: refs/heads/master
Commit: 7b316337f403126679e6f282be3270eab7a602f4
Parents: d88abf7
Author: Dave Brondsema <dave@brondsema.net>
Authored: Mon Dec 7 10:35:26 2015 -0500
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Fri Jan 8 14:06:14 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/7b316337/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 70b7d65..cb5a5c1 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -474,7 +474,6 @@ var Main = React.createClass({
      * @param {object} event
      */
     onUpdateThreshold: function(event) {
-        var _this = this;
         var thres = event.target.value;
         var url = `${_getProjectUrl()}/admin/configure_tool_grouping`;
         var csrf = $.cookie('_session_id');
@@ -482,22 +481,7 @@ var Main = React.createClass({
             _session_id: csrf,
             grouping_threshold: thres
         };
-        var _data = this.state.data;
-        _data.grouping_threshold = thres;
-        this.setState({
-            data: _data
-        });
-        this.setState({
-            in_progress: true
-        });
-        $.post(url, data, function() {
-        }.bind(this)).always(function() {
-            _this.setState({
-                in_progress: false
-            });
-        });
-
-        _this.getNavJson();
+        $.post(url, data, () => this.getNavJson());
         return false;
     },
 


Mime
View raw message