Permalink
Browse files

Navigate back to home after save.

  • Loading branch information...
1 parent a23ce74 commit 633910fa0b680524c5e77570d0205558b94a19ce @panozzaj panozzaj committed Sep 24, 2013
Showing with 6 additions and 2 deletions.
  1. +2 −0 lib/flipper/ui/assets/javascripts/application.coffee
  2. +4 −2 lib/flipper/ui/public/js/application.js
View
2 lib/flipper/ui/assets/javascripts/application.coffee
@@ -219,6 +219,7 @@ class App.Gate.Boolean extends App.Gate
event.preventDefault()
@gate.value = @input.is(':checked')
@gate.save()
+ @navigate Flipper.Config.url
class App.Gate.Set extends App.Gate
elements:
@@ -279,6 +280,7 @@ class App.Gate.Percentage extends App.Gate
@gate.value = @input.val()
return unless @validate()
@gate.save()
+ @navigate Flipper.Config.url
class App.Gate.PercentageOfActors extends App.Gate.Percentage
constructor: ->
View
6 lib/flipper/ui/public/js/application.js
@@ -357,7 +357,8 @@
Boolean.prototype.submit = function(event) {
event.preventDefault();
this.gate.value = this.input.is(':checked');
- return this.gate.save();
+ this.gate.save();
+ return this.navigate(Flipper.Config.url);
};
return Boolean;
@@ -467,7 +468,8 @@
if (!this.validate()) {
return;
}
- return this.gate.save();
+ this.gate.save();
+ return this.navigate(Flipper.Config.url);
};
return Percentage;

0 comments on commit 633910f

Please sign in to comment.