Prechádzať zdrojové kódy

close forms after crud

David 9 rokov pred
rodič
commit
dc97c82c66
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      front/js/app.js

+ 3 - 0
front/js/app.js

@@ -226,6 +226,7 @@ app.controller('keywords', function($scope, $http) {
         $http.post("/pymnts/keywords/", {'kw': keyword, 'weight': parseInt(weight) }).then(
             function(data) {
                 $scope.keywords = data.data.keywords;
+                $scope.creating = false;
             });
     };
 
@@ -233,6 +234,7 @@ app.controller('keywords', function($scope, $http) {
         $http.put("/pymnts/keywords/", {'kw': {'oldkw': old, 'newkw': newkw, 'weight': parseInt(weight)}}).then(
             function(data) {
                 $scope.keywords = data.data.keywords;
+                $scope.editing = false;
             },
             function(err){
             }
@@ -243,6 +245,7 @@ app.controller('keywords', function($scope, $http) {
         var h = { 'Content-type': 'application/json;charset=utf-8' };
         $http.delete("/pymnts/keywords/", {data: {'kw': kw}, headers: h}).then(
             function(data){
+                $scope.deleting = false;
                 $scope.keywords = data.data.keywords;
             }
         );