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

frame.js « js - github.com/erikdubbelboer/phpRedisAdmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1a77e34b342b772ac9119de90b05aa107ea94c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$(function() {
  if (history.replaceState) {
    window.parent.history.replaceState({}, '', document.location.href.replace('?', '&').replace(/\/([a-z]*)\.php/, '/?$1'));
  }


  $('#type').change(function(e) {
    $('#hkeyp' ).css('display', e.target.value == 'hash' ? 'block' : 'none');
    $('#indexp').css('display', e.target.value == 'list' ? 'block' : 'none');
    $('#scorep').css('display', e.target.value == 'zset' ? 'block' : 'none');
  }).change();


  $('.delkey, .delval').click(function(e) {
    e.preventDefault();

    if (confirm($(this).hasClass('delkey') ? 'Are you sure you want to delete this key and all it\'s values?' : 'Are you sure you want to delete this value?')) {
      $.ajax({
        type: "POST",
        url: this.href,
        data: 'post=1&csrf=' + phpRedisAdmin_csrfToken,
        success: function(url) {
          top.location.href = top.location.pathname+url;
        }
      });
    }
  });
});