Viewing File: /people/testlab/www/testlab.com.pl/inc/kategorie.js
function kategorie(e){
advAJAX.post
(
{
url: "panel/kategorie.php",
parameters :
{
"kategoria":e
},
onInitialization : function()
{
$("main").innerHTML = loading_html;
},
onSuccess : function(obj)
{
$("main").innerHTML =obj.responseText;
},
onError : function(obj)
{
alert("Error: " + obj.status);
},
onFinalization : function()
{
//var box = {};
//box = new MultiBox('mb', {descClassName: 'multiBoxDesc', useOverlay: true});
}
}
);
}
function show_menu(e)
{
advAJAX.post
(
{
url: "panel/kategorie.php",
parameters :
{
"method":'show',
"id":e
},
onInitialization : function()
{
$("main").innerHTML = loading_html;
},
onSuccess : function(obj)
{
//alert(obj.responseText);
kategorie();
},
onError : function(obj)
{
alert("Error: " + obj.status);
},
onFinalization : function()
{
}
}
);
}
function hide_menu(e)
{
advAJAX.post
(
{
url: "panel/kategorie.php",
parameters :
{
"method":'hide',
"id":e
},
onInitialization : function()
{
$("main").innerHTML = loading_html;
},
onSuccess : function(obj)
{
//alert(obj.responseText);
kategorie();
},
onError : function(obj)
{
alert("Error: " + obj.status);
},
onFinalization : function()
{
}
}
);
}
function add_kategoria(e)
{
advAJAX.post
(
{
url: "panel/kategorie.php",
parameters :
{
"method":'add',
"menu":e
},
onInitialization : function()
{
$("error").innerHTML = loading_html2;
},
onSuccess : function(obj)
{
$("error").innerHTML = obj.responseText;
kategorie();
},
onError : function(obj)
{
alert("Error: " + obj.status);
},
onFinalization : function()
{
}
}
);
}
function down_menu(e)
{
advAJAX.post
(
{
url: "panel/kategorie.php",
parameters :
{
"method":'down',
"menu":e
},
onInitialization : function()
{
$("main").innerHTML = loading_html;
},
onSuccess : function(obj)
{
kategorie();
},
onError : function(obj)
{
alert("Error: " + obj.status);
},
onFinalization : function()
{
}
}
);
}
function up_menu(e)
{
advAJAX.post
(
{
url: "panel/kategorie.php",
parameters :
{
"method":'up',
"menu":e
},
onInitialization : function()
{
$("main").innerHTML = loading_html;
},
onSuccess : function(obj)
{
kategorie();
},
onError : function(obj)
{
alert("Error: " + obj.status);
},
onFinalization : function()
{
}
}
);
}
function del_menu(e)
{
if (!this.confirm("Na pewno usunąć?")) return false;
advAJAX.post
(
{
url: "panel/kategorie.php",
parameters :
{
"method":'del',
"id":e
},
onInitialization : function()
{
$("main").innerHTML = loading_html;
},
onSuccess : function(obj)
{
kategorie();
},
onError : function(obj)
{
alert("Error: " + obj.status);
},
onFinalization : function()
{
}
}
);
}
function menuname(e)
{
$('temp').value=$('td_'+e).innerHTML;
//var tmp = $('a_'+e).innerHTML;
$('td_'+e).innerHTML="<table ><tr><td style='padding:0px'><input type=text id='edit_menu' value='"+$('temp').value+"'></td><td style='padding:0px'> <img src='img/accept.png' title='Zatwierdź' onclick=zatwierdz_zmiane_menu("+e+") style='cursor:hand'></td><td style='padding:0px'> <img src='img/remove.png' title='Anuluj zmiany' onclick=anuluj_zmiane_menu("+e+") style='cursor:hand'></td></tr></table>";
$('edit_menu').focus();
}
function anuluj_zmiane_menu(e)
{
$('td_'+e).innerHTML=$('temp').value;
}
function zatwierdz_zmiane_menu(e)
{
var tmp = $('edit_menu').value;
$('td_'+e).innerHTML=tmp;
advAJAX.post
(
{
url: "panel/kategorie.php",
parameters :
{
"method":'changeName',
"id":e,
"nazwa":tmp
},
onInitialization : function()
{
$("error").innerHTML = loading_html2;
},
onSuccess : function(obj)
{
$("error").innerHTML = '';
},
onError : function(obj)
{
alert("Error: " + obj.status);
},
onFinalization : function()
{
}
}
);
}
Back to Directory
File Manager