Your IP : 216.73.216.170


Current Path : /var/www/iplanru/data/old/www/i-plan.ru/media/zoo/assets/js/
Upload File :
Current File : /var/www/iplanru/data/old/www/i-plan.ru/media/zoo/assets/js/item.js

/* Copyright (C) YOOtheme GmbH, http://www.gnu.org/licenses/gpl.html GNU/GPL */

(function(b){var a=function(){};a.prototype=b.extend(a.prototype,{name:"BrowseItems",initialize:function(a){this.timer=null;this.delay=1500;a.find("td.priority").each(function(){var c=b(this).find("input.value:first");c.bind("change",function(){this.timer&&clearTimeout(this.timer);this.timer=setTimeout(function(){var c={},e=a.find("table.list:first");b.each(a.serializeArray(),function(b,a){c[a.name]=a.value});e.addClass("loader");b.ajax({url:a.attr("action"),type:"post",datatype:"json",data:b.extend(c,
{task:"savepriority",format:"raw"}),success:function(a){e.removeClass("loader");b.Message(a,true)}})},this.delay)});b(this).find("span.plus:first, span.minus:first").bind("click",function(){var a=b(this).is(".plus")?1:-1;c.attr("value",c.val().toInt()+a).trigger("change")})})}});b.fn[a.prototype.name]=function(){var f=arguments,c=f[0]?f[0]:null;return this.each(function(){var d=b(this);if(a.prototype[c]&&d.data(a.prototype.name)&&c!="initialize")d.data(a.prototype.name)[c].apply(d.data(a.prototype.name),
Array.prototype.slice.call(f,1));else if(!c||b.isPlainObject(c)){var e=new a;a.prototype.initialize&&e.initialize.apply(e,b.merge([d],f));d.data(a.prototype.name,e)}else b.error("Method "+c+" does not exist on jQuery."+a.name)})}})(jQuery);
(function(b){var a=function(){};a.prototype=b.extend(a.prototype,{name:"EditItem",initialize:function(a){b.each(["apply","save","saveandnew"],function(c,d){b("#toolbar-"+d+" a").bind("validate.adminForm",function(b){a.find('input[name="name"]').val()==""&&(a.find("span.message-name").css("display","block"),b.preventDefault())})});var c=b("#categories"),d=b("#paramsprimary_category");c.bind("change",function(){var a=b(this).val()?b(this).val():[],c=d.val();b.inArray(c,a)==-1&&d.val(a.length?a.shift():
"")});d.bind("change",function(){var a=c.val()?c.val():[],d=b(this).val();b.inArray(d,a)==-1&&(a.push(d),c.val(a))});a.find("div.element").each(function(){b(this).delegate("div.more-options div.trigger div.button","click",function(){var a=b(this).closest("div.more-options"),c="show-"+b(this).attr("class").split(" ").shift();a.hasClass(c)?a.attr("class","more-options"):a.attr("class","more-options "+c)}).find("div.row > input:text").placeholder()})}});b.fn[a.prototype.name]=function(){var f=arguments,
c=f[0]?f[0]:null;return this.each(function(){var d=b(this);if(a.prototype[c]&&d.data(a.prototype.name)&&c!="initialize")d.data(a.prototype.name)[c].apply(d.data(a.prototype.name),Array.prototype.slice.call(f,1));else if(!c||b.isPlainObject(c)){var e=new a;a.prototype.initialize&&e.initialize.apply(e,b.merge([d],f));d.data(a.prototype.name,e)}else b.error("Method "+c+" does not exist on jQuery."+a.name)})}})(jQuery);