Commit a34d2837 by Bence Dányi

firewall_gui: visual feedback after successful save

parent 10562300
...@@ -45,6 +45,7 @@ $.ajaxSetup({ ...@@ -45,6 +45,7 @@ $.ajaxSetup({
* @param String name Object name, add{name} and remove{name} methods will be generated * @param String name Object name, add{name} and remove{name} methods will be generated
* @param Object model Model name (the collections name) in the entity * @param Object model Model name (the collections name) in the entity
*/ */
function makeAddRemove($scope, name, model) { function makeAddRemove($scope, name, model) {
/** /**
* Add entity to collection * Add entity to collection
...@@ -264,6 +265,7 @@ function ListController(url) { ...@@ -264,6 +265,7 @@ function ListController(url) {
/** /**
* Reloads the entities * Reloads the entities
*/ */
function reloadList() { function reloadList() {
$http.get(url).success(function success(data) { $http.get(url).success(function success(data) {
rules = data; rules = data;
...@@ -318,8 +320,12 @@ function EntityController(url, init) { ...@@ -318,8 +320,12 @@ function EntityController(url, init) {
success: function(data) { success: function(data) {
console.log(data); console.log(data);
var audio = new Audio(); var audio = new Audio();
audio.src='/static/img/yeah.mp3'; audio.src = '/static/img/yeah.mp3';
audio.play(); audio.play();
$('button[type=submit]').addClass('btn-success');
setTimeout(function(){
$('button[type=submit]').removeClass('btn-success');
}, 4000);
$scope.$apply(function() { $scope.$apply(function() {
$scope.errors = {}; $scope.errors = {};
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment