|
|
|
@ -1,25 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Put paginator in middle
|
|
|
|
|
var paginator_width = $('div.paginate').width();
|
|
|
|
|
$('div.paginate').css('margin-left', ((626-paginator_width)/2) +'px');
|
|
|
|
|
$('div.paginate').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('a.close').click(function(ev){
|
|
|
|
|
ev.stopPropagation();
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
$('div.requests_info').fadeOut();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('ul.your_tables li.last').hover(function(){
|
|
|
|
|
$('div.tables_list div.left div.bottom_white_medium').css('background-position','0 -11px');
|
|
|
|
|
}, function(){
|
|
|
|
|
$('div.tables_list div.left div.bottom_white_medium').css('background-position','0 0');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('a.new_table').click(function(ev){
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
ev.stopPropagation();
|
|
|
|
@ -27,8 +27,8 @@
|
|
|
|
|
$('div.mamufas').fadeIn();
|
|
|
|
|
bindESC();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('input#create_table').click(function(ev){
|
|
|
|
|
ev.stopPropagation();
|
|
|
|
|
ev.preventDefault();
|
|
|
|
@ -39,8 +39,8 @@
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: '/api/json/tables/',
|
|
|
|
|
success: function(data) {
|
|
|
|
|
window.location.href = window.location;
|
|
|
|
|
success: function(data, textStatus, XMLHttpRequest) {
|
|
|
|
|
window.location.href = XMLHttpRequest.getResponseHeader("Location");
|
|
|
|
|
},
|
|
|
|
|
error: function(e) {
|
|
|
|
|
console.debug(e);
|
|
|
|
@ -48,10 +48,10 @@
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(function(){$('div.create_window a.close_create').addClass('last');},250);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('a.delete').click(function(ev){
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
ev.stopPropagation();
|
|
|
|
@ -61,8 +61,8 @@
|
|
|
|
|
$('div.mamufas').fadeIn('fast');
|
|
|
|
|
bindESC();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('div.mamufas a.cancel, div.mamufas a.close_delete, div.mamufas a.close_settings, div.mamufas a.close_create').click(function(ev){
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
ev.stopPropagation();
|
|
|
|
@ -73,9 +73,9 @@
|
|
|
|
|
});
|
|
|
|
|
unbindESC();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('a.confirm_delete').click(function(ev){
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
ev.stopPropagation();
|
|
|
|
@ -83,16 +83,16 @@
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "DELETE",
|
|
|
|
|
url: '/api/json/tables/'+table_id,
|
|
|
|
|
success: function(data) {
|
|
|
|
|
window.location.href=window.location.href;
|
|
|
|
|
success: function(data, textStatus, XMLHttpRequest) {
|
|
|
|
|
window.location.href = XMLHttpRequest.getResponseHeader("Location");
|
|
|
|
|
},
|
|
|
|
|
error: function(e) {
|
|
|
|
|
console.debug(e);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('a.settings').click(function(ev){
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
ev.stopPropagation();
|
|
|
|
@ -100,10 +100,10 @@
|
|
|
|
|
$('div.mamufas').fadeIn('fast');
|
|
|
|
|
bindESC();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function bindESC() {
|
|
|
|
|
$(document).keydown(function(){
|
|
|
|
|
if (event.which == '27') {
|
|
|
|
@ -119,4 +119,3 @@
|
|
|
|
|
function unbindESC() {
|
|
|
|
|
$(document).unbind('keydown');
|
|
|
|
|
}
|
|
|
|
|
|