Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cydrobolt/polr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorChaoyi Zha <summermontreal@gmail.com>2017-05-06 19:41:23 +0300
committerChaoyi Zha <summermontreal@gmail.com>2017-05-06 19:41:23 +0300
commit4c08c49c54692810c893af1686da5ce763285c5e (patch)
treeb539196336bef10e2324966dee0aa317f9028a81 /public
parent39ed9e23c3e2e5d3fff4673657a24661e2b73601 (diff)
Accept modalType argument in cleanModal to clean correct modal
Diffstat (limited to 'public')
-rw-r--r--public/js/AdminCtrl.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/public/js/AdminCtrl.js b/public/js/AdminCtrl.js
index 274e7d9..bd0a2af 100644
--- a/public/js/AdminCtrl.js
+++ b/public/js/AdminCtrl.js
@@ -12,7 +12,7 @@ polr.directive('editLongLinkModal', function () {
// Destroy directive and clean modal on close
$element.find('.modal').on("hidden.bs.modal", function () {
$scope.$destroy();
- $scope.cleanModals();
+ $scope.cleanModals('editLongLink');
});
}
@@ -50,7 +50,7 @@ polr.directive('editUserApiInfoModal', function () {
// Destroy directive and clean modal on close
$element.find('.modal').on("hidden.bs.modal", function () {
$scope.$destroy();
- $scope.cleanModals();
+ $scope.cleanModals('editUserApiInfo');
});
$scope.apiActive = res_value_to_text($scope.apiActive);
@@ -113,9 +113,9 @@ polr.controller('AdminCtrl', function($scope, $compile, $timeout) {
}
};
- $scope.cleanModals = function() {
+ $scope.cleanModals = function(modalType) {
$timeout(function () {
- $scope.modals.editLongLink.shift();
+ $scope.modals[modalType].shift();
});
$scope.reloadLinkTables();