Файловый менеджер - Редактировать - /var/www/iplanru/data/old/www/i-plan.ru/administrator/components/com_zoo/assets/js/import.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:"ImportExport",options:{msgImportWarning:"Please choose a file first!"},initialize:function(c,d){this.options=b.extend({},this.options,d);var a=this;c.find("div.uploadbox").each(function(){var c=b(this).find("input.filename");b(this).find('input[name^="import-"]').bind("change",function(){c.val(this.value)});b(this).find("button.upload").bind("click",function(){c.val()==""?alert(a.options.msgImportWarning):submitbutton("import")})}); c.find("a.exporter-link").each(function(){var a=b(this);a.bind("click",function(){c.find('input[name="exporter"]').val(a.attr("id"));submitbutton("importfrom")})});c.find("button.export").bind("click",function(){var a=c.find('input[name="format"]');a.val("raw");c.find('input[name="exporter"]').val("zoo2");submitbutton(b(this).data("task"));a.val("html")})}});b.fn[a.prototype.name]=function(){var c=arguments,d=c[0]?c[0]:null;return this.each(function(){var e=b(this);if(a.prototype[d]&&e.data(a.prototype.name)&& d!="initialize")e.data(a.prototype.name)[d].apply(e.data(a.prototype.name),Array.prototype.slice.call(c,1));else if(!d||b.isPlainObject(d)){var f=new a;a.prototype.initialize&&f.initialize.apply(f,b.merge([e],c));e.data(a.prototype.name,f)}else b.error("Method "+d+" does not exist on jQuery."+a.name)})}})(jQuery); (function(b){var a=function(){};a.prototype=b.extend(a.prototype,{name:"Import",options:{msgSelectWarning:"You didn't assign all item types. Items of these types will not be imported. Do you want to proceed anyway?",msgWarningDuplicate:"There are duplicate assignments.",msgNameWarning:"Please choose a name column.",task:"doimport"},initialize:function(c,a){this.options=b.extend({},this.options,a);var e=this;this.form=c;c.find("fieldset.frontpage, fieldset.categories").each(function(){var a=b(this); a.find('input[name^="import-"]').bind("change",function(){b(this).is(":checked")?a.find("div.assign-group").show():a.find("div.assign-group").hide()})});c.find("fieldset.items").each(function(){var a=b(this);a.find("select.type").bind("change",function(){var c=b(this),d=RegExp("\\["+c.val()+"\\]$");a.find("li.assign select.assign").each(function(){var a=b(this);if(a.attr("name").match(d)){var c=a.nextAll(".name").text()+" "+a.nextAll(".type").text();a.show().find("option").each(function(){b(this).text()== c&&a.val(b(this).val())})}else a.hide()})})});b("#submit-button").bind("click",function(){e.options.task!="doimportcsv"&&e.hasDuplicateSelectedAssignments()?alert(e.options.msgWarningDuplicate):e.options.task=="doimportcsv"&&!e.hasNameAssigned()?alert(e.options.msgNameWarning):(!e.hasUnassignedTypes()||confirm(e.options.msgSelectWarning))&&submitbutton(e.options.task)})},hasNameAssigned:function(){var a=false;this.form.find("div.assign-group").each(function(){var d=RegExp("\\["+b(this).find("select.type").val()+ "\\]$");b(this).find("select.assign").each(function(){b(this).attr("name").match(d)&&b(this).val()=="_name"&&(a=true)})});return a},hasUnassignedTypes:function(){var a=false;this.form.find("select.type").each(function(){b(this).val()==""&&(a=true)});return a},hasDuplicateSelectedAssignments:function(){var a=false;this.form.find("div.assign-group").each(function(){var d=b(this).find("select.assign");for(i=0;i<d.length;i++)for(j=i+1;j<d.length;j++)if(value_a=b(d.get(i)).val(),value_b=b(d.get(j)).val(), value_a!=""&&value_a!="_category"&&value_a==value_b){a=true;return}});return a}});b.fn[a.prototype.name]=function(){var c=arguments,d=c[0]?c[0]:null;return this.each(function(){var e=b(this);if(a.prototype[d]&&e.data(a.prototype.name)&&d!="initialize")e.data(a.prototype.name)[d].apply(e.data(a.prototype.name),Array.prototype.slice.call(c,1));else if(!d||b.isPlainObject(d)){var f=new a;a.prototype.initialize&&f.initialize.apply(f,b.merge([e],c));e.data(a.prototype.name,f)}else b.error("Method "+d+ " does not exist on jQuery."+a.name)})}})(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 5.4.45-1~dotdeb+6.1 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка