| Current Path : /var/www/iplanru/data/www/i-plan.ru/administrator/components/com_zoo/helpers/fields/ |
| Current File : /var/www/iplanru/data/www/i-plan.ru/administrator/components/com_zoo/helpers/fields/zooitemorder.js |
/* Copyright (C) YOOtheme GmbH, http://www.gnu.org/licenses/gpl.html GNU/GPL */
(function(t){var e=function(){};t.extend(e.prototype,{name:"ZooItemOrder",initialize:function(e){var i=this;this.input=e;this.application=t("body").find(".zoo-application select.application");if(this.application.length){e.find("select.element, input:checkbox").each(function(){t(this).data("_name",t(this).attr("name"))});this.application.bind("change",function(){i.refresh()});this.refresh()}},refresh:function(){var e=this.application.val();e?this.input.find(".select-message").hide().nextAll().show():this.input.find(".select-message").show().nextAll().hide();this.input.find(".apps .app").each(function(){var i=t(this);i.find("select.element, input:checkbox").attr("name",function(){return e&&i.hasClass(e)?t(this).data("_name"):""});e&&i.hasClass(e)?i.show():i.hide()})}});t.fn[e.prototype.name]=function(){var i=arguments;var n=i[0]?i[0]:null;return this.each(function(){var a=t(this);if(e.prototype[n]&&a.data(e.prototype.name)&&n!="initialize"){a.data(e.prototype.name)[n].apply(a.data(e.prototype.name),Array.prototype.slice.call(i,1))}else if(!n||t.isPlainObject(n)){var o=new e;if(e.prototype["initialize"]){o.initialize.apply(o,t.merge([a],i))}a.data(e.prototype.name,o)}else{t.error("Method "+n+" does not exist on jQuery."+e.name)}})}})(jQuery);