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

github.com/erikdubbelboer/phpRedisAdmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorErik Dubbelboer <erik@dubbelboer.com>2013-11-20 19:26:56 +0400
committerErik Dubbelboer <erik@dubbelboer.com>2013-11-20 19:26:56 +0400
commit0b8d3b74c961e37a06069344b7cf1c64e71f4866 (patch)
tree8705402479b148bcd25c64cc1846a4a8db7f6642 /js
parent8459eb161fa708c0bc4ab0465952c33922c4b4b4 (diff)
Flush button that can be enabled per server (#34)
Diffstat (limited to 'js')
-rw-r--r--js/index.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/js/index.js b/js/index.js
index 58f374e..9886aa6 100644
--- a/js/index.js
+++ b/js/index.js
@@ -20,8 +20,21 @@ $(function() {
href += '.php';
}
}
-
- $('#iframe').attr('src', href);
+
+ if (href.indexOf('flush.php') == 0) {
+ if (confirm('Are you sure you want to delete this key and all it\'s values?')) {
+ $.ajax({
+ type: "POST",
+ url: href,
+ data: 'post=1',
+ success: function() {
+ window.location.reload();
+ }
+ });
+ }
+ } else {
+ $('#iframe').attr('src', href);
+ }
});
@@ -98,5 +111,6 @@ $(function() {
});
}
});
+
});