allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [19/50] [abbrv] allura git commit: [#7919] move getNavJson into success handler of threshold update. Cleanup unnecessary code
Date Thu, 17 Dec 2015 19:22:06 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/ce6c6312
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/ce6c6312
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/ce6c6312

Branch: refs/heads/db/8034
Commit: ce6c6312d32d2581431230a19e234e553cc86355
Parents: b09f4bf
Author: Dave Brondsema <dave@brondsema.net>
Authored: Mon Dec 7 10:35:26 2015 -0500
Committer: Heith Seewald <heiths@gmail.com>
Committed: Wed Dec 16 13:55:36 2015 -0600

----------------------------------------------------------------------
 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/ce6c6312/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