Файловый менеджер - Редактировать - /home/lmsyaran/public_html/pusher/js.tar
Назад
main.js 0000644 00000000733 15116721754 0006042 0 ustar 00 jQuery(document).ready(function($){ $('.owl-carousel').owlCarousel({ center: false, loop: true, margin:10, nav:true, autoplay:true, autoplayTimeout:2500, autoplayHoverPause:true, responsive:{ 0:{ items:1 }, 600:{ items:2 }, 1000:{ items:4 } } }); }); owl.carousel.min.js 0000644 00000126466 15116721754 0010331 0 ustar 00 /** * Owl Carousel v2.3.4 * Copyright 2013-2018 David Deutsch * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE */ !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn "+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1, animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">‹</span>','<span aria-label="Next">›</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document); admin_custom_tabs.js 0000644 00000000640 15116736747 0010616 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ admin_fields.js 0000644 00000000640 15116736747 0007541 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ admin_fields_conditions.js 0000644 00000002542 15116736747 0011775 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ function getFieldSelectOptions_server(fieldId){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json"); if(token.length > 0 && fieldId > 0){ var request = token+'=1&id='+fieldId; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'jsonp', data: request, jsonp: 'callback' }); } function getFieldSelectOptions(fieldKey){ // first check if the field is set if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field").length) { var fieldId = jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field option:selected").val(); getFieldSelectOptions_server(fieldId).done(function(result) { if(result){ jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val(result); } else { jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val(''); } }); } } admin_fields_relations.js 0000644 00000006460 15116736747 0011627 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ jQuery(document).ready(function() { // check and load all the customcode edit buttons getEditCustomCodeButtons(); }); // little script to set the value function getCodeGlueOptions(field) { // get the ID var id = jQuery(field).attr('id'); var target = id.split('__'); //set the subID var subID = target[0]+'__'+target[1]; // get listfield value var listfield = jQuery('#'+subID+'__listfield').val(); // get type value var type = jQuery('#'+subID+'__join_type').val(); // get area value var area = jQuery('#'+subID+'__area').val(); // check that values are set if (_isSet(listfield) && _isSet(type) && _isSet(area)) { // get joinfields values var joinfields = jQuery('#'+subID+'__joinfields').val(); // get codeGlueOptions getCodeGlueOptions_server(listfield, joinfields, type, area).done(function(result) { if(result){ jQuery('#'+subID+'__set').val(result); } else { jQuery('#'+subID+'__set').val(''); } }); } else { jQuery('#'+subID+'__set').val(''); } } function getCodeGlueOptions_server(listfield, joinfields, type, area){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getCodeGlueOptions&format=json"); // make sure the joinfields are set if (!_isSet(joinfields)) { joinfields = 'none'; } if(token.length > 0 && listfield > 0 && type > 0 && area > 0) { var request = token+'=1&listfield='+listfield+'&type='+type+'&area='+area+'&joinfields='+joinfields; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'jsonp', data: request, jsonp: 'callback' }); } // the isSet function function _isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } admin_view.js 0000644 00000100602 15116736747 0007244 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Some Global Values jform_vvvvvzvvwj_required = false; jform_vvvvvzwvwk_required = false; jform_vvvvwaavwl_required = false; jform_vvvvwaavwm_required = false; jform_vvvvwaavwn_required = false; jform_vvvvwaavwo_required = false; jform_vvvvwaavwp_required = false; jform_vvvvwaavwq_required = false; jform_vvvvwaavwr_required = false; // Initial Script jQuery(document).ready(function() { var add_css_view_vvvvvyv = jQuery("#jform_add_css_view input[type='radio']:checked").val(); vvvvvyv(add_css_view_vvvvvyv); var add_css_views_vvvvvyw = jQuery("#jform_add_css_views input[type='radio']:checked").val(); vvvvvyw(add_css_views_vvvvvyw); var add_javascript_view_file_vvvvvyx = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); vvvvvyx(add_javascript_view_file_vvvvvyx); var add_javascript_views_file_vvvvvyy = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); vvvvvyy(add_javascript_views_file_vvvvvyy); var add_javascript_view_footer_vvvvvyz = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); vvvvvyz(add_javascript_view_footer_vvvvvyz); var add_javascript_views_footer_vvvvvza = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); vvvvvza(add_javascript_views_footer_vvvvvza); var add_php_ajax_vvvvvzb = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); vvvvvzb(add_php_ajax_vvvvvzb); var add_php_getitem_vvvvvzc = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); vvvvvzc(add_php_getitem_vvvvvzc); var add_php_getitems_vvvvvzd = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); vvvvvzd(add_php_getitems_vvvvvzd); var add_php_getitems_after_all_vvvvvze = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); vvvvvze(add_php_getitems_after_all_vvvvvze); var add_php_getlistquery_vvvvvzf = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); vvvvvzf(add_php_getlistquery_vvvvvzf); var add_php_getform_vvvvvzg = jQuery("#jform_add_php_getform input[type='radio']:checked").val(); vvvvvzg(add_php_getform_vvvvvzg); var add_php_before_save_vvvvvzh = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); vvvvvzh(add_php_before_save_vvvvvzh); var add_php_save_vvvvvzi = jQuery("#jform_add_php_save input[type='radio']:checked").val(); vvvvvzi(add_php_save_vvvvvzi); var add_php_postsavehook_vvvvvzj = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); vvvvvzj(add_php_postsavehook_vvvvvzj); var add_php_allowadd_vvvvvzk = jQuery("#jform_add_php_allowadd input[type='radio']:checked").val(); vvvvvzk(add_php_allowadd_vvvvvzk); var add_php_allowedit_vvvvvzl = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); vvvvvzl(add_php_allowedit_vvvvvzl); var add_php_before_cancel_vvvvvzm = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); vvvvvzm(add_php_before_cancel_vvvvvzm); var add_php_after_cancel_vvvvvzn = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); vvvvvzn(add_php_after_cancel_vvvvvzn); var add_php_batchcopy_vvvvvzo = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); vvvvvzo(add_php_batchcopy_vvvvvzo); var add_php_batchmove_vvvvvzp = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); vvvvvzp(add_php_batchmove_vvvvvzp); var add_php_before_publish_vvvvvzq = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); vvvvvzq(add_php_before_publish_vvvvvzq); var add_php_after_publish_vvvvvzr = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); vvvvvzr(add_php_after_publish_vvvvvzr); var add_php_before_delete_vvvvvzs = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); vvvvvzs(add_php_before_delete_vvvvvzs); var add_php_after_delete_vvvvvzt = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); vvvvvzt(add_php_after_delete_vvvvvzt); var add_php_document_vvvvvzu = jQuery("#jform_add_php_document input[type='radio']:checked").val(); vvvvvzu(add_php_document_vvvvvzu); var add_sql_vvvvvzv = jQuery("#jform_add_sql input[type='radio']:checked").val(); vvvvvzv(add_sql_vvvvvzv); var source_vvvvvzw = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvzw = jQuery("#jform_add_sql input[type='radio']:checked").val(); vvvvvzw(source_vvvvvzw,add_sql_vvvvvzw); var source_vvvvvzy = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvzy = jQuery("#jform_add_sql input[type='radio']:checked").val(); vvvvvzy(source_vvvvvzy,add_sql_vvvvvzy); var add_custom_import_vvvvwaa = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); vvvvwaa(add_custom_import_vvvvwaa); var add_custom_import_vvvvwab = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); vvvvwab(add_custom_import_vvvvwab); var add_custom_button_vvvvwac = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); vvvvwac(add_custom_button_vvvvwac); }); // the vvvvvyv function function vvvvvyv(add_css_view_vvvvvyv) { // set the function logic if (add_css_view_vvvvvyv == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } else { jQuery('#jform_css_view-lbl').closest('.control-group').hide(); } } // the vvvvvyw function function vvvvvyw(add_css_views_vvvvvyw) { // set the function logic if (add_css_views_vvvvvyw == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } else { jQuery('#jform_css_views-lbl').closest('.control-group').hide(); } } // the vvvvvyx function function vvvvvyx(add_javascript_view_file_vvvvvyx) { // set the function logic if (add_javascript_view_file_vvvvvyx == 1) { jQuery('#jform_javascript_view_file-lbl').closest('.control-group').show(); } else { jQuery('#jform_javascript_view_file-lbl').closest('.control-group').hide(); } } // the vvvvvyy function function vvvvvyy(add_javascript_views_file_vvvvvyy) { // set the function logic if (add_javascript_views_file_vvvvvyy == 1) { jQuery('#jform_javascript_views_file-lbl').closest('.control-group').show(); } else { jQuery('#jform_javascript_views_file-lbl').closest('.control-group').hide(); } } // the vvvvvyz function function vvvvvyz(add_javascript_view_footer_vvvvvyz) { // set the function logic if (add_javascript_view_footer_vvvvvyz == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } else { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide(); } } // the vvvvvza function function vvvvvza(add_javascript_views_footer_vvvvvza) { // set the function logic if (add_javascript_views_footer_vvvvvza == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); } else { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide(); } } // the vvvvvzb function function vvvvvzb(add_php_ajax_vvvvvzb) { // set the function logic if (add_php_ajax_vvvvvzb == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); } else { jQuery('#jform_ajax_input-lbl').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide(); } } // the vvvvvzc function function vvvvvzc(add_php_getitem_vvvvvzc) { // set the function logic if (add_php_getitem_vvvvvzc == 1) { jQuery('#jform_php_getitem-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_getitem-lbl').closest('.control-group').hide(); } } // the vvvvvzd function function vvvvvzd(add_php_getitems_vvvvvzd) { // set the function logic if (add_php_getitems_vvvvvzd == 1) { jQuery('#jform_php_getitems-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_getitems-lbl').closest('.control-group').hide(); } } // the vvvvvze function function vvvvvze(add_php_getitems_after_all_vvvvvze) { // set the function logic if (add_php_getitems_after_all_vvvvvze == 1) { jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').hide(); } } // the vvvvvzf function function vvvvvzf(add_php_getlistquery_vvvvvzf) { // set the function logic if (add_php_getlistquery_vvvvvzf == 1) { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); } } // the vvvvvzg function function vvvvvzg(add_php_getform_vvvvvzg) { // set the function logic if (add_php_getform_vvvvvzg == 1) { jQuery('#jform_php_getform-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_getform-lbl').closest('.control-group').hide(); } } // the vvvvvzh function function vvvvvzh(add_php_before_save_vvvvvzh) { // set the function logic if (add_php_before_save_vvvvvzh == 1) { jQuery('#jform_php_before_save-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_before_save-lbl').closest('.control-group').hide(); } } // the vvvvvzi function function vvvvvzi(add_php_save_vvvvvzi) { // set the function logic if (add_php_save_vvvvvzi == 1) { jQuery('#jform_php_save-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_save-lbl').closest('.control-group').hide(); } } // the vvvvvzj function function vvvvvzj(add_php_postsavehook_vvvvvzj) { // set the function logic if (add_php_postsavehook_vvvvvzj == 1) { jQuery('#jform_php_postsavehook-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_postsavehook-lbl').closest('.control-group').hide(); } } // the vvvvvzk function function vvvvvzk(add_php_allowadd_vvvvvzk) { // set the function logic if (add_php_allowadd_vvvvvzk == 1) { jQuery('#jform_php_allowadd-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_allowadd-lbl').closest('.control-group').hide(); } } // the vvvvvzl function function vvvvvzl(add_php_allowedit_vvvvvzl) { // set the function logic if (add_php_allowedit_vvvvvzl == 1) { jQuery('#jform_php_allowedit-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_allowedit-lbl').closest('.control-group').hide(); } } // the vvvvvzm function function vvvvvzm(add_php_before_cancel_vvvvvzm) { // set the function logic if (add_php_before_cancel_vvvvvzm == 1) { jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_before_cancel-lbl').closest('.control-group').hide(); } } // the vvvvvzn function function vvvvvzn(add_php_after_cancel_vvvvvzn) { // set the function logic if (add_php_after_cancel_vvvvvzn == 1) { jQuery('#jform_php_after_cancel-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_after_cancel-lbl').closest('.control-group').hide(); } } // the vvvvvzo function function vvvvvzo(add_php_batchcopy_vvvvvzo) { // set the function logic if (add_php_batchcopy_vvvvvzo == 1) { jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide(); } } // the vvvvvzp function function vvvvvzp(add_php_batchmove_vvvvvzp) { // set the function logic if (add_php_batchmove_vvvvvzp == 1) { jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide(); } } // the vvvvvzq function function vvvvvzq(add_php_before_publish_vvvvvzq) { // set the function logic if (add_php_before_publish_vvvvvzq == 1) { jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide(); } } // the vvvvvzr function function vvvvvzr(add_php_after_publish_vvvvvzr) { // set the function logic if (add_php_after_publish_vvvvvzr == 1) { jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide(); } } // the vvvvvzs function function vvvvvzs(add_php_before_delete_vvvvvzs) { // set the function logic if (add_php_before_delete_vvvvvzs == 1) { jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide(); } } // the vvvvvzt function function vvvvvzt(add_php_after_delete_vvvvvzt) { // set the function logic if (add_php_after_delete_vvvvvzt == 1) { jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide(); } } // the vvvvvzu function function vvvvvzu(add_php_document_vvvvvzu) { // set the function logic if (add_php_document_vvvvvzu == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_document-lbl').closest('.control-group').hide(); } } // the vvvvvzv function function vvvvvzv(add_sql_vvvvvzv) { // set the function logic if (add_sql_vvvvvzv == 1) { jQuery('#jform_source').closest('.control-group').show(); // add required attribute to source field if (jform_vvvvvzvvwj_required) { updateFieldRequired('source',0); jQuery('#jform_source').prop('required','required'); jQuery('#jform_source').attr('aria-required',true); jQuery('#jform_source').addClass('required'); jform_vvvvvzvvwj_required = false; } } else { jQuery('#jform_source').closest('.control-group').hide(); // remove required attribute from source field if (!jform_vvvvvzvvwj_required) { updateFieldRequired('source',1); jQuery('#jform_source').removeAttr('required'); jQuery('#jform_source').removeAttr('aria-required'); jQuery('#jform_source').removeClass('required'); jform_vvvvvzvvwj_required = true; } } } // the vvvvvzw function function vvvvvzw(source_vvvvvzw,add_sql_vvvvvzw) { // set the function logic if (source_vvvvvzw == 2 && add_sql_vvvvvzw == 1) { jQuery('#jform_sql').closest('.control-group').show(); // add required attribute to sql field if (jform_vvvvvzwvwk_required) { updateFieldRequired('sql',0); jQuery('#jform_sql').prop('required','required'); jQuery('#jform_sql').attr('aria-required',true); jQuery('#jform_sql').addClass('required'); jform_vvvvvzwvwk_required = false; } } else { jQuery('#jform_sql').closest('.control-group').hide(); // remove required attribute from sql field if (!jform_vvvvvzwvwk_required) { updateFieldRequired('sql',1); jQuery('#jform_sql').removeAttr('required'); jQuery('#jform_sql').removeAttr('aria-required'); jQuery('#jform_sql').removeClass('required'); jform_vvvvvzwvwk_required = true; } } } // the vvvvvzy function function vvvvvzy(source_vvvvvzy,add_sql_vvvvvzy) { // set the function logic if (source_vvvvvzy == 1 && add_sql_vvvvvzy == 1) { jQuery('#jform_addtables-lbl').closest('.control-group').show(); } else { jQuery('#jform_addtables-lbl').closest('.control-group').hide(); } } // the vvvvwaa function function vvvvwaa(add_custom_import_vvvvwaa) { // set the function logic if (add_custom_import_vvvvwaa == 1) { jQuery('#jform_html_import_view').closest('.control-group').show(); // add required attribute to html_import_view field if (jform_vvvvwaavwl_required) { updateFieldRequired('html_import_view',0); jQuery('#jform_html_import_view').prop('required','required'); jQuery('#jform_html_import_view').attr('aria-required',true); jQuery('#jform_html_import_view').addClass('required'); jform_vvvvwaavwl_required = false; } jQuery('.note_advanced_import').closest('.control-group').show(); jQuery('#jform_php_import_display').closest('.control-group').show(); // add required attribute to php_import_display field if (jform_vvvvwaavwm_required) { updateFieldRequired('php_import_display',0); jQuery('#jform_php_import_display').prop('required','required'); jQuery('#jform_php_import_display').attr('aria-required',true); jQuery('#jform_php_import_display').addClass('required'); jform_vvvvwaavwm_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); // add required attribute to php_import_ext field if (jform_vvvvwaavwn_required) { updateFieldRequired('php_import_ext',0); jQuery('#jform_php_import_ext').prop('required','required'); jQuery('#jform_php_import_ext').attr('aria-required',true); jQuery('#jform_php_import_ext').addClass('required'); jform_vvvvwaavwn_required = false; } jQuery('#jform_php_import_headers').closest('.control-group').show(); // add required attribute to php_import_headers field if (jform_vvvvwaavwo_required) { updateFieldRequired('php_import_headers',0); jQuery('#jform_php_import_headers').prop('required','required'); jQuery('#jform_php_import_headers').attr('aria-required',true); jQuery('#jform_php_import_headers').addClass('required'); jform_vvvvwaavwo_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); // add required attribute to php_import field if (jform_vvvvwaavwp_required) { updateFieldRequired('php_import',0); jQuery('#jform_php_import').prop('required','required'); jQuery('#jform_php_import').attr('aria-required',true); jQuery('#jform_php_import').addClass('required'); jform_vvvvwaavwp_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); // add required attribute to php_import_save field if (jform_vvvvwaavwq_required) { updateFieldRequired('php_import_save',0); jQuery('#jform_php_import_save').prop('required','required'); jQuery('#jform_php_import_save').attr('aria-required',true); jQuery('#jform_php_import_save').addClass('required'); jform_vvvvwaavwq_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); // add required attribute to php_import_setdata field if (jform_vvvvwaavwr_required) { updateFieldRequired('php_import_setdata',0); jQuery('#jform_php_import_setdata').prop('required','required'); jQuery('#jform_php_import_setdata').attr('aria-required',true); jQuery('#jform_php_import_setdata').addClass('required'); jform_vvvvwaavwr_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); // remove required attribute from html_import_view field if (!jform_vvvvwaavwl_required) { updateFieldRequired('html_import_view',1); jQuery('#jform_html_import_view').removeAttr('required'); jQuery('#jform_html_import_view').removeAttr('aria-required'); jQuery('#jform_html_import_view').removeClass('required'); jform_vvvvwaavwl_required = true; } jQuery('.note_advanced_import').closest('.control-group').hide(); jQuery('#jform_php_import_display').closest('.control-group').hide(); // remove required attribute from php_import_display field if (!jform_vvvvwaavwm_required) { updateFieldRequired('php_import_display',1); jQuery('#jform_php_import_display').removeAttr('required'); jQuery('#jform_php_import_display').removeAttr('aria-required'); jQuery('#jform_php_import_display').removeClass('required'); jform_vvvvwaavwm_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); // remove required attribute from php_import_ext field if (!jform_vvvvwaavwn_required) { updateFieldRequired('php_import_ext',1); jQuery('#jform_php_import_ext').removeAttr('required'); jQuery('#jform_php_import_ext').removeAttr('aria-required'); jQuery('#jform_php_import_ext').removeClass('required'); jform_vvvvwaavwn_required = true; } jQuery('#jform_php_import_headers').closest('.control-group').hide(); // remove required attribute from php_import_headers field if (!jform_vvvvwaavwo_required) { updateFieldRequired('php_import_headers',1); jQuery('#jform_php_import_headers').removeAttr('required'); jQuery('#jform_php_import_headers').removeAttr('aria-required'); jQuery('#jform_php_import_headers').removeClass('required'); jform_vvvvwaavwo_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); // remove required attribute from php_import field if (!jform_vvvvwaavwp_required) { updateFieldRequired('php_import',1); jQuery('#jform_php_import').removeAttr('required'); jQuery('#jform_php_import').removeAttr('aria-required'); jQuery('#jform_php_import').removeClass('required'); jform_vvvvwaavwp_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); // remove required attribute from php_import_save field if (!jform_vvvvwaavwq_required) { updateFieldRequired('php_import_save',1); jQuery('#jform_php_import_save').removeAttr('required'); jQuery('#jform_php_import_save').removeAttr('aria-required'); jQuery('#jform_php_import_save').removeClass('required'); jform_vvvvwaavwq_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); // remove required attribute from php_import_setdata field if (!jform_vvvvwaavwr_required) { updateFieldRequired('php_import_setdata',1); jQuery('#jform_php_import_setdata').removeAttr('required'); jQuery('#jform_php_import_setdata').removeAttr('aria-required'); jQuery('#jform_php_import_setdata').removeClass('required'); jform_vvvvwaavwr_required = true; } } } // the vvvvwab function function vvvvwab(add_custom_import_vvvvwab) { // set the function logic if (add_custom_import_vvvvwab == 0) { jQuery('.note_beginner_import').closest('.control-group').show(); } else { jQuery('.note_beginner_import').closest('.control-group').hide(); } } // the vvvvwac function function vvvvwac(add_custom_button_vvvvwac) { // set the function logic if (add_custom_button_vvvvwac == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); jQuery('#jform_php_controller_list-lbl').closest('.control-group').show(); jQuery('#jform_php_model-lbl').closest('.control-group').show(); jQuery('#jform_php_model_list-lbl').closest('.control-group').show(); } else { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller_list-lbl').closest('.control-group').hide(); jQuery('#jform_php_model-lbl').closest('.control-group').hide(); jQuery('#jform_php_model_list-lbl').closest('.control-group').hide(); } } // update fields required function updateFieldRequired(name, status) { // check if not_required exist if (jQuery('#jform_not_required').length > 0) { var not_required = jQuery('#jform_not_required').val().split(","); if(status == 1) { not_required.push(name); } else { not_required = removeFieldFromNotRequired(not_required, name); } jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); } } // remove field from not_required function removeFieldFromNotRequired(array, what) { return array.filter(function(element){ return element !== what; }); } // fix not required array function fixNotRequiredArray(array) { var seen = {}; return removeEmptyFromNotRequiredArray(array).filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } // remove empty from not_required array function removeEmptyFromNotRequiredArray(array) { return array.filter(function (el) { // remove ( 一_一) as well - lol return (el.length > 0 && '一_一' !== el); }); } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } jQuery(document).ready(function() { // check if this view has alias field checkAliasField(); // check if this view has category field checkCategoryField(); // get the linked details getLinked(); // set button addButtonID('admin_fields','create_edit_buttons', 1); // <-- first var valueSwitch = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); getDynamicScripts(valueSwitch); // now load the fields getAjaxDisplay('admin_fields'); getAjaxDisplay('admin_fields_conditions'); getAjaxDisplay('admin_fields_relations'); // set button addButtonID('admin_fields_conditions','create_edit_buttons', 1); // <-- second // set button to create more fields addButton('field','create_edit_buttons'); // <-- third // set button addButtonID('admin_fields_relations','create_edit_buttons', 1); // <-- forth // set button addButtonID('admin_custom_tabs','addtabs-lbl', 1); // <-- fifth // check and load all the customcode edit buttons getEditCustomCodeButtons(); }); function checkAliasField() { getCodeFrom_server(1, 'type', 'type', 'checkAliasField').done(function(result) { if(result){ // remove the notice jQuery('.note_create_edit_notice_p').remove(); } else { // hide everything about alias management jQuery('#jform_alias_builder_type').closest('.control-group').remove(); jQuery('#jform_alias_builder').closest('.control-group').remove(); jQuery('.note_alias_builder_default').closest('.control-group').remove(); jQuery('.note_alias_builder_custom').closest('.control-group').remove(); } }); } function checkCategoryField() { getCodeFrom_server(1, 'type', 'type', 'checkCategoryField').done(function(result) { if(result){ // remove the notice jQuery('.note_create_edit_notice_p').remove(); } else { // hide everything about category management jQuery('#jform_add_category_submenu').closest('.control-group').remove(); jQuery('.note_category_menu_switch').closest('.control-group').remove(); } }); } function getAjaxDisplay(type){ getCodeFrom_server(1, type, 'type', 'getAjaxDisplay').done(function(result) { if(result){ jQuery('#display_'+type).html(result); } // set button addButtonID(type,'header_'+type+'_buttons', 2); // <-- little edit button }); } function addData(result,where){ jQuery(result).insertAfter(jQuery(where).closest('.control-group')); } function getTableColumns(fieldKey, table_, nr_){ // first check if the field is set if(jQuery("#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_table").length) { // get options var tableName = jQuery("#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_table option:selected").val(); getCodeFrom_server(1, tableName, 'table', 'tableColumns').done(function(result) { if(result){ jQuery("textarea#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_sourcemap").val(result); } else { jQuery("textarea#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_sourcemap").val(''); } }); } } function getDynamicScripts(id){ if (1 == id) { // get the current values var current_import_display = jQuery('textarea#jform_php_import_display').val(); var current_import = jQuery('textarea#jform_php_import').val(); var current_headers = jQuery('textarea#jform_php_import_headers').val(); var current_setdata = jQuery('textarea#jform_php_import_setdata').val(); var current_save = jQuery('textarea#jform_php_import_save').val(); var current_view = jQuery('textarea#jform_html_import_view').val(); var current_ext = jQuery('textarea#jform_php_import_ext').val(); // set the display method script if(current_import_display.length == 0){ getCodeFrom_server(1, 'display', 'type', 'getDynamicScripts').done(function(result) { if(result){ jQuery('textarea#jform_php_import_display').val(result); } }); } // set the import method script if(current_import.length == 0){ getCodeFrom_server(1, 'import', 'type', 'getDynamicScripts').done(function(result) { if(result){ jQuery('textarea#jform_php_import').val(result); } }); } // set the headers method script if(current_headers.length == 0){ getCodeFrom_server(1, 'headers', 'type', 'getDynamicScripts').done(function(result) { if(result){ jQuery('textarea#jform_php_import_headers').val(result); } }); } // set the setData method script if(current_setdata.length == 0){ getCodeFrom_server(1, 'setdata', 'type', 'getDynamicScripts').done(function(result) { if(result){ jQuery('textarea#jform_php_import_setdata').val(result); } }); } // set the save method script if(current_save.length == 0){ getCodeFrom_server(1, 'save', 'type', 'getDynamicScripts').done(function(result) { if(result){ jQuery('textarea#jform_php_import_save').val(result); } }); } // set the view script if(current_view.length == 0){ getCodeFrom_server(1, 'view', 'type', 'getDynamicScripts').done(function(result) { if(result){ jQuery('textarea#jform_html_import_view').val(result); } }); } // set the import ext script if(current_ext.length == 0){ getCodeFrom_server(1, 'ext', 'type', 'getDynamicScripts').done(function(result) { if(result){ jQuery('textarea#jform_php_import_ext').val(result); } }); } } } function getCodeFrom_server(id, type, type_name, callingName){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax." + callingName + "&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0 && type.length > 0) { var request = token + '=1&' + type_name + '=' + type + '&id=' + id; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } function addButtonID_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0 && size > 0){ var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function addButtonID(type, where, size){ addButtonID_server(type, size).done(function(result) { if(result){ if (2 == size) { jQuery('#'+where).html(result); } else { addData(result, '#jform_'+where); } } }); } function addButton_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function addButton(type, where, size){ // just to insure that default behaviour still works size = typeof size !== 'undefined' ? size : 1; addButton_server(type, size).done(function(result) { if(result){ if (2 == size) { jQuery('#'+where).html(result); } else { addData(result, '#jform_'+where); } } }) } function getLinked(){ getCodeFrom_server(1, 'type', 'type', 'getLinked').done(function(result) { if(result){ jQuery('#display_linked_to').html(result); } }); } class_extends.js 0000644 00000003421 15116736747 0007762 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ jQuery(document).ready(function() { // load the used in div // jQuery('#usedin').show(); // check and load all the customcode edit buttons setTimeout(getEditCustomCodeButtons, 300); }); function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } class_method.js 0000644 00000011445 15116736747 0007575 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Some Global Values jform_vvvvwcgvxk_required = false; // Initial Script jQuery(document).ready(function() { var extension_type_vvvvwcg = jQuery("#jform_extension_type").val(); vvvvwcg(extension_type_vvvvwcg); }); // the vvvvwcg function function vvvvwcg(extension_type_vvvvwcg) { if (isSet(extension_type_vvvvwcg) && extension_type_vvvvwcg.constructor !== Array) { var temp_vvvvwcg = extension_type_vvvvwcg; var extension_type_vvvvwcg = []; extension_type_vvvvwcg.push(temp_vvvvwcg); } else if (!isSet(extension_type_vvvvwcg)) { var extension_type_vvvvwcg = []; } var extension_type = extension_type_vvvvwcg.some(extension_type_vvvvwcg_SomeFunc); // set this function logic if (extension_type) { jQuery('#jform_joomla_plugin_group').closest('.control-group').show(); // add required attribute to joomla_plugin_group field if (jform_vvvvwcgvxk_required) { updateFieldRequired('joomla_plugin_group',0); jQuery('#jform_joomla_plugin_group').prop('required','required'); jQuery('#jform_joomla_plugin_group').attr('aria-required',true); jQuery('#jform_joomla_plugin_group').addClass('required'); jform_vvvvwcgvxk_required = false; } } else { jQuery('#jform_joomla_plugin_group').closest('.control-group').hide(); // remove required attribute from joomla_plugin_group field if (!jform_vvvvwcgvxk_required) { updateFieldRequired('joomla_plugin_group',1); jQuery('#jform_joomla_plugin_group').removeAttr('required'); jQuery('#jform_joomla_plugin_group').removeAttr('aria-required'); jQuery('#jform_joomla_plugin_group').removeClass('required'); jform_vvvvwcgvxk_required = true; } } } // the vvvvwcg Some function function extension_type_vvvvwcg_SomeFunc(extension_type_vvvvwcg) { // set the function logic if (extension_type_vvvvwcg == 'plugins' || extension_type_vvvvwcg == 'plugin') { return true; } return false; } // update fields required function updateFieldRequired(name, status) { // check if not_required exist if (jQuery('#jform_not_required').length > 0) { var not_required = jQuery('#jform_not_required').val().split(","); if(status == 1) { not_required.push(name); } else { not_required = removeFieldFromNotRequired(not_required, name); } jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); } } // remove field from not_required function removeFieldFromNotRequired(array, what) { return array.filter(function(element){ return element !== what; }); } // fix not required array function fixNotRequiredArray(array) { var seen = {}; return removeEmptyFromNotRequiredArray(array).filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } // remove empty from not_required array function removeEmptyFromNotRequiredArray(array) { return array.filter(function (el) { // remove ( 一_一) as well - lol return (el.length > 0 && '一_一' !== el); }); } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } jQuery(document).ready(function() { // load the used in div // jQuery('#usedin').show(); // check and load all the customcode edit buttons setTimeout(getEditCustomCodeButtons, 300); }); function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } class_property.js 0000644 00000011445 15116736747 0010201 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Some Global Values jform_vvvvwcfvxj_required = false; // Initial Script jQuery(document).ready(function() { var extension_type_vvvvwcf = jQuery("#jform_extension_type").val(); vvvvwcf(extension_type_vvvvwcf); }); // the vvvvwcf function function vvvvwcf(extension_type_vvvvwcf) { if (isSet(extension_type_vvvvwcf) && extension_type_vvvvwcf.constructor !== Array) { var temp_vvvvwcf = extension_type_vvvvwcf; var extension_type_vvvvwcf = []; extension_type_vvvvwcf.push(temp_vvvvwcf); } else if (!isSet(extension_type_vvvvwcf)) { var extension_type_vvvvwcf = []; } var extension_type = extension_type_vvvvwcf.some(extension_type_vvvvwcf_SomeFunc); // set this function logic if (extension_type) { jQuery('#jform_joomla_plugin_group').closest('.control-group').show(); // add required attribute to joomla_plugin_group field if (jform_vvvvwcfvxj_required) { updateFieldRequired('joomla_plugin_group',0); jQuery('#jform_joomla_plugin_group').prop('required','required'); jQuery('#jform_joomla_plugin_group').attr('aria-required',true); jQuery('#jform_joomla_plugin_group').addClass('required'); jform_vvvvwcfvxj_required = false; } } else { jQuery('#jform_joomla_plugin_group').closest('.control-group').hide(); // remove required attribute from joomla_plugin_group field if (!jform_vvvvwcfvxj_required) { updateFieldRequired('joomla_plugin_group',1); jQuery('#jform_joomla_plugin_group').removeAttr('required'); jQuery('#jform_joomla_plugin_group').removeAttr('aria-required'); jQuery('#jform_joomla_plugin_group').removeClass('required'); jform_vvvvwcfvxj_required = true; } } } // the vvvvwcf Some function function extension_type_vvvvwcf_SomeFunc(extension_type_vvvvwcf) { // set the function logic if (extension_type_vvvvwcf == 'plugins' || extension_type_vvvvwcf == 'plugin') { return true; } return false; } // update fields required function updateFieldRequired(name, status) { // check if not_required exist if (jQuery('#jform_not_required').length > 0) { var not_required = jQuery('#jform_not_required').val().split(","); if(status == 1) { not_required.push(name); } else { not_required = removeFieldFromNotRequired(not_required, name); } jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); } } // remove field from not_required function removeFieldFromNotRequired(array, what) { return array.filter(function(element){ return element !== what; }); } // fix not required array function fixNotRequiredArray(array) { var seen = {}; return removeEmptyFromNotRequiredArray(array).filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } // remove empty from not_required array function removeEmptyFromNotRequiredArray(array) { return array.filter(function (el) { // remove ( 一_一) as well - lol return (el.length > 0 && '一_一' !== el); }); } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } jQuery(document).ready(function() { // load the used in div // jQuery('#usedin').show(); // check and load all the customcode edit buttons setTimeout(getEditCustomCodeButtons, 300); }); function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } component_admin_views.js 0000644 00000000640 15116736747 0011512 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_config.js 0000644 00000000640 15116736747 0010452 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_custom_admin_menus.js 0000644 00000000640 15116736747 0013076 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_custom_admin_views.js 0000644 00000000640 15116736747 0013104 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_dashboard.js 0000644 00000003311 15116736747 0011132 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ jQuery(document).ready(function() { // check and load all the customcode edit buttons getEditCustomCodeButtons(); }); function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } component_files_folders.js 0000644 00000000640 15116736747 0012025 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_modules.js 0000644 00000000640 15116736747 0010655 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_mysql_tweaks.js 0000644 00000000640 15116736747 0011730 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_placeholders.js 0000644 00000000640 15116736750 0011644 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_plugins.js 0000644 00000000640 15116736750 0010660 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_site_views.js 0000644 00000000640 15116736750 0011360 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ component_updates.js 0000644 00000000640 15116736750 0010644 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ custom_admin_view.js 0000644 00000027256 15116736750 0010645 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Initial Script jQuery(document).ready(function() { var add_php_view_vvvvwad = jQuery("#jform_add_php_view input[type='radio']:checked").val(); vvvvwad(add_php_view_vvvvwad); var add_php_jview_display_vvvvwae = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); vvvvwae(add_php_jview_display_vvvvwae); var add_php_jview_vvvvwaf = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); vvvvwaf(add_php_jview_vvvvwaf); var add_php_document_vvvvwag = jQuery("#jform_add_php_document input[type='radio']:checked").val(); vvvvwag(add_php_document_vvvvwag); var add_css_document_vvvvwah = jQuery("#jform_add_css_document input[type='radio']:checked").val(); vvvvwah(add_css_document_vvvvwah); var add_javascript_file_vvvvwai = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); vvvvwai(add_javascript_file_vvvvwai); var add_js_document_vvvvwaj = jQuery("#jform_add_js_document input[type='radio']:checked").val(); vvvvwaj(add_js_document_vvvvwaj); var add_custom_button_vvvvwak = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); vvvvwak(add_custom_button_vvvvwak); var add_css_vvvvwal = jQuery("#jform_add_css input[type='radio']:checked").val(); vvvvwal(add_css_vvvvwal); var add_php_ajax_vvvvwam = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); vvvvwam(add_php_ajax_vvvvwam); }); // the vvvvwad function function vvvvwad(add_php_view_vvvvwad) { // set the function logic if (add_php_view_vvvvwad == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_view-lbl').closest('.control-group').hide(); } } // the vvvvwae function function vvvvwae(add_php_jview_display_vvvvwae) { // set the function logic if (add_php_jview_display_vvvvwae == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide(); } } // the vvvvwaf function function vvvvwaf(add_php_jview_vvvvwaf) { // set the function logic if (add_php_jview_vvvvwaf == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_jview-lbl').closest('.control-group').hide(); } } // the vvvvwag function function vvvvwag(add_php_document_vvvvwag) { // set the function logic if (add_php_document_vvvvwag == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_document-lbl').closest('.control-group').hide(); } } // the vvvvwah function function vvvvwah(add_css_document_vvvvwah) { // set the function logic if (add_css_document_vvvvwah == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); } else { jQuery('#jform_css_document-lbl').closest('.control-group').hide(); } } // the vvvvwai function function vvvvwai(add_javascript_file_vvvvwai) { // set the function logic if (add_javascript_file_vvvvwai == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); } else { jQuery('#jform_javascript_file-lbl').closest('.control-group').hide(); } } // the vvvvwaj function function vvvvwaj(add_js_document_vvvvwaj) { // set the function logic if (add_js_document_vvvvwaj == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); } else { jQuery('#jform_js_document-lbl').closest('.control-group').hide(); } } // the vvvvwak function function vvvvwak(add_custom_button_vvvvwak) { // set the function logic if (add_custom_button_vvvvwak == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); jQuery('#jform_php_model-lbl').closest('.control-group').show(); } else { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller-lbl').closest('.control-group').hide(); jQuery('#jform_php_model-lbl').closest('.control-group').hide(); } } // the vvvvwal function function vvvvwal(add_css_vvvvwal) { // set the function logic if (add_css_vvvvwal == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); } else { jQuery('#jform_css-lbl').closest('.control-group').hide(); } } // the vvvvwam function function vvvvwam(add_php_ajax_vvvvwam) { // set the function logic if (add_php_ajax_vvvvwam == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); } else { jQuery('#jform_ajax_input-lbl').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide(); } } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } jQuery(document).ready(function() { // get the linked details getLinked(); // check and load all the custom code edit buttons getEditCustomCodeButtons(); }); function getCodeFrom_server(id, type, type_name, callingName){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax." + callingName + "&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0 && type.length > 0) { var request = token + '=1&' + type_name + '=' + type + '&id=' + id; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getLinked(){ getCodeFrom_server(1, 'type', 'type', 'getLinked').done(function(result) { if(result){ jQuery('#display_linked_to').html(result); } }); } function getSnippetDetails(id){ getCodeFrom_server(id, '_type', '_type', 'snippetDetails').done(function(result) { if(result.snippet){ var description = ''; if (result.description.length > 0) { description = '<p>'+result.description+'</p>'; } var library = ''; if (result.library.length > 0) { library = ' <b>('+result.library+')</b>'; } var code = '<div id="snippet-code"><b>'+result.name+' ('+result.type+')</b> <a href="'+result.url+'" target="_blank" >see more details'+library+'</a><br /><em>'+result.heading+'</em><br /><textarea id="snippet" class="span12" rows="11">'+result.snippet+'</textarea></div>'; jQuery('#snippet-code').remove(); jQuery('.snippet-code').append(code); // make sure the code block is active jQuery("#snippet").focus(function() { var jQuerythis = jQuery(this); jQuerythis.select(); // Work around Chrome's little problem jQuerythis.mouseup(function() { // Prevent further mouseup intervention jQuerythis.unbind("mouseup"); return false; }); }); } if(result.usage){ var usage = '<div id="snippet-usage"><p>'+result.usage+'</p></div>'; jQuery('#snippet-usage').remove(); jQuery('.snippet-usage').append(usage); } }) } function getDynamicValues_server(dynamicId){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"); if(token.length > 0 && dynamicId > 0){ var request = token+'=1&view=custom_admin_view&id='+dynamicId; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'jsonp', data: request, jsonp: 'callback' }); } function getDynamicValues(id){ getDynamicValues_server(id).done(function(result) { if(result){ jQuery('#dynamic_values').remove(); jQuery('.dynamic_values').append('<div id="dynamic_values">'+result+'</div>'); // make sure the code bocks are active jQuery("code").click(function() { jQuery(this).selText().addClass("selected"); }); } }) } function getLayoutDetails_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'jsonp', data: request, jsonp: 'callback' }); } function getLayoutDetails(id){ getLayoutDetails_server(id).done(function(result) { if(result){ jQuery('#details').append(result); // make sure the code bocks are active jQuery("code").click(function() { jQuery(this).selText().addClass("selected"); }); } }) } function getTemplateDetails(id){ getCodeFrom_server(id, 'type', 'type', 'templateDetails').done(function(result) { if(result){ jQuery('#details').append(result); // make sure the code bocks are active jQuery("code").click(function() { jQuery(this).selText().addClass("selected"); }); } }) } // set snippets that are on the page var snippetIds = []; var snippets = {}; var snippet = 0; jQuery(document).ready(function($) { jQuery("#jform_snippet option").each(function() { var key = jQuery(this).val(); var text = jQuery(this).text(); snippets[key] = text; snippetIds.push(key); }); snippet = jQuery("#jform_snippet").val(); getSnippets(); }); function getSnippets(){ jQuery("#loading").show(); // clear the selection jQuery('#jform_snippet').find('option').remove().end(); jQuery('#jform_snippet').trigger('liszt:updated'); // get libraries value if set var libraries = jQuery("#jform_libraries").val(); if (libraries) { getCodeFrom_server(1, JSON.stringify(libraries), 'libraries', 'getSnippets').done(function(result) { setSnippets(result); jQuery("#loading").hide(); if (typeof snippetButton !== 'undefined') { // ensure button is correct var snippet = jQuery('#jform_snippet').val(); snippetButton(snippet); } }); } else { // load all snippets in none is selected setSnippets(snippetIds); jQuery("#loading").hide(); } } function setSnippets(array){ if (array) { jQuery('#jform_snippet').append('<option value="">'+select_a_snippet+'</option>'); jQuery.each( array, function( i, id ) { if (id in snippets) { jQuery('#jform_snippet').append('<option value="'+id+'">'+snippets[id]+'</option>'); } if (id == snippet) { jQuery('#jform_snippet').val(id); } }); } else { jQuery('#jform_snippet').append('<option value="">'+create_a_snippet+'</option>'); } jQuery('#jform_snippet').trigger('liszt:updated'); } function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } custom_code.js 0000644 00000032523 15116736750 0007426 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Some Global Values jform_vvvvwcbvxf_required = false; jform_vvvvwccvxg_required = false; jform_vvvvwccvxh_required = false; jform_vvvvwccvxi_required = false; // Initial Script jQuery(document).ready(function() { var target_vvvvwcb = jQuery("#jform_target input[type='radio']:checked").val(); vvvvwcb(target_vvvvwcb); var target_vvvvwcc = jQuery("#jform_target input[type='radio']:checked").val(); vvvvwcc(target_vvvvwcc); var target_vvvvwcd = jQuery("#jform_target input[type='radio']:checked").val(); var type_vvvvwcd = jQuery("#jform_type input[type='radio']:checked").val(); vvvvwcd(target_vvvvwcd,type_vvvvwcd); var type_vvvvwce = jQuery("#jform_type input[type='radio']:checked").val(); var target_vvvvwce = jQuery("#jform_target input[type='radio']:checked").val(); vvvvwce(type_vvvvwce,target_vvvvwce); }); // the vvvvwcb function function vvvvwcb(target_vvvvwcb) { // set the function logic if (target_vvvvwcb == 2) { jQuery('#jform_function_name').closest('.control-group').show(); // add required attribute to function_name field if (jform_vvvvwcbvxf_required) { updateFieldRequired('function_name',0); jQuery('#jform_function_name').prop('required','required'); jQuery('#jform_function_name').attr('aria-required',true); jQuery('#jform_function_name').addClass('required'); jform_vvvvwcbvxf_required = false; } jQuery('.note_jcb_placeholder').closest('.control-group').show(); jQuery('#jform_system_name').closest('.control-group').show(); } else { jQuery('#jform_function_name').closest('.control-group').hide(); // remove required attribute from function_name field if (!jform_vvvvwcbvxf_required) { updateFieldRequired('function_name',1); jQuery('#jform_function_name').removeAttr('required'); jQuery('#jform_function_name').removeAttr('aria-required'); jQuery('#jform_function_name').removeClass('required'); jform_vvvvwcbvxf_required = true; } jQuery('.note_jcb_placeholder').closest('.control-group').hide(); jQuery('#jform_system_name').closest('.control-group').hide(); } } // the vvvvwcc function function vvvvwcc(target_vvvvwcc) { // set the function logic if (target_vvvvwcc == 1) { jQuery('#jform_component').closest('.control-group').show(); // add required attribute to component field if (jform_vvvvwccvxg_required) { updateFieldRequired('component',0); jQuery('#jform_component').prop('required','required'); jQuery('#jform_component').attr('aria-required',true); jQuery('#jform_component').addClass('required'); jform_vvvvwccvxg_required = false; } jQuery('#jform_path').closest('.control-group').show(); // add required attribute to path field if (jform_vvvvwccvxh_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); jform_vvvvwccvxh_required = false; } jQuery('#jform_from_line').closest('.control-group').show(); jQuery('#jform_hashtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); jQuery('#jform_type').closest('.control-group').show(); // add required attribute to type field if (jform_vvvvwccvxi_required) { updateFieldRequired('type',0); jQuery('#jform_type').prop('required','required'); jQuery('#jform_type').attr('aria-required',true); jQuery('#jform_type').addClass('required'); jform_vvvvwccvxi_required = false; } } else { jQuery('#jform_component').closest('.control-group').hide(); // remove required attribute from component field if (!jform_vvvvwccvxg_required) { updateFieldRequired('component',1); jQuery('#jform_component').removeAttr('required'); jQuery('#jform_component').removeAttr('aria-required'); jQuery('#jform_component').removeClass('required'); jform_vvvvwccvxg_required = true; } jQuery('#jform_path').closest('.control-group').hide(); // remove required attribute from path field if (!jform_vvvvwccvxh_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); jform_vvvvwccvxh_required = true; } jQuery('#jform_from_line').closest('.control-group').hide(); jQuery('#jform_hashtarget').closest('.control-group').hide(); jQuery('#jform_to_line').closest('.control-group').hide(); jQuery('#jform_type').closest('.control-group').hide(); // remove required attribute from type field if (!jform_vvvvwccvxi_required) { updateFieldRequired('type',1); jQuery('#jform_type').removeAttr('required'); jQuery('#jform_type').removeAttr('aria-required'); jQuery('#jform_type').removeClass('required'); jform_vvvvwccvxi_required = true; } } } // the vvvvwcd function function vvvvwcd(target_vvvvwcd,type_vvvvwcd) { // set the function logic if (target_vvvvwcd == 1 && type_vvvvwcd == 1) { jQuery('#jform_hashendtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); } else { jQuery('#jform_hashendtarget').closest('.control-group').hide(); jQuery('#jform_to_line').closest('.control-group').hide(); } } // the vvvvwce function function vvvvwce(type_vvvvwce,target_vvvvwce) { // set the function logic if (type_vvvvwce == 1 && target_vvvvwce == 1) { jQuery('#jform_hashendtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); } else { jQuery('#jform_hashendtarget').closest('.control-group').hide(); jQuery('#jform_to_line').closest('.control-group').hide(); } } // update fields required function updateFieldRequired(name, status) { // check if not_required exist if (jQuery('#jform_not_required').length > 0) { var not_required = jQuery('#jform_not_required').val().split(","); if(status == 1) { not_required.push(name); } else { not_required = removeFieldFromNotRequired(not_required, name); } jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); } } // remove field from not_required function removeFieldFromNotRequired(array, what) { return array.filter(function(element){ return element !== what; }); } // fix not required array function fixNotRequiredArray(array) { var seen = {}; return removeEmptyFromNotRequiredArray(array).filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } // remove empty from not_required array function removeEmptyFromNotRequiredArray(array) { return array.filter(function (el) { // remove ( 一_一) as well - lol return (el.length > 0 && '一_一' !== el); }); } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } jQuery(document).ready(function() { var target = jQuery("#jform_target input[type='radio']:checked").val(); if (target == 2) { jQuery('#usedin').show(); var functioName = jQuery('#jform_function_name').val(); // check if this function name is taken checkFunctionName(functioName); } var type = jQuery("#jform_comment_type input[type='radio']:checked").val(); if (type == 2) { jQuery('#html-comment-info').show(); jQuery('#phpjs-comment-info').hide(); } else { jQuery('#html-comment-info').hide(); jQuery('#phpjs-comment-info').show(); } // check and load all the custom code edit buttons getEditCustomCodeButtons(); }); function setCustomCodePlaceholder() { var ide = jQuery('#jform_id').val(); var functioName = jQuery('#jform_function_name').val(); if (ide > 0 && functioName.length > 2) { jQuery('#jcb-placeholder').html('<code>[CUSTO'+'MCODE='+functioName+']</code>'); jQuery('#jcb-placeholder-arg').html('<code>[CUSTO'+'MCODE='+functioName+'+value1,value2]</code>'); } else if (ide > 0){ jQuery('#jcb-placeholder').html('<code>[not ready]</code>'); jQuery('#jcb-placeholder-arg').html('<code>[not ready]</code>'); } else if (functioName.length > 2) { jQuery('#jcb-placeholder').html('<code>[CUSTO'+'MCODE='+functioName+']</code>'); jQuery('#jcb-placeholder-arg').html('<code>[CUSTO'+'MCODE='+functioName+'+value1,value2]</code>'); } else { jQuery('#jcb-placeholder').html('<code>[save to see]</code>'); jQuery('#jcb-placeholder-arg').html('<code>[save to see]</code>'); } // update the notes if (ide > 0) { jQuery('.placeholder-key-id').text(ide); } } function checkFunctionName(functioName) { if (functioName.length > 2) { var ide = jQuery('#jform_id').val(); if (ide == 0) { ide = -1; } checkFunctionName_server(functioName, ide).done(function(result) { if(result.name && result.message){ // show notice that functioName is okay jQuery.UIkit.notify({message: result.message, timeout: 5000, status: result.status, pos: 'top-right'}); jQuery('#jform_function_name').val(result.name); // now start search for where the function is used usedin(result.name, ide); } else if(result.message){ // show notice that functioName is not okay jQuery.UIkit.notify({message: result.message, timeout: 5000, status: result.status, pos: 'top-right'}); jQuery('#jform_function_name').val(''); } else { // set an error that message was not send jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN'), timeout: 5000, status: 'danger', pos: 'top-right'}); jQuery('#jform_function_name').val(''); } // set custom code placeholder setCustomCodePlaceholder(); }); } else { // set an error that message was not send jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME'), timeout: 5000, status: 'danger', pos: 'top-right'}); jQuery('#jform_function_name').val(''); // set custom code placeholder setCustomCodePlaceholder(); } } // check Function name function checkFunctionName_server(functioName, ide){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkFunctionName&raw=true&format=json"; if(token.length > 0){ var request = 'token='+token+'&functioName='+functioName+'&id='+ide; } return jQuery.ajax({ type: 'POST', url: getUrl, dataType: 'json', data: request, jsonp: false }); } // check where this Function is used function usedin(functioName, ide) { var found = false; jQuery('#before-usedin').hide(); jQuery('#note-usedin-not').hide(); jQuery('#note-usedin-found').hide(); jQuery('#loading-usedin').show(); var targets = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u']; // if you update this, also update (below 20) & [customcode-codeUsedInHtmlNote]! var targetNumber = 20; var run = 0; var usedinChecker = setInterval(function(){ var target = targets[run]; usedin_server(functioName, ide, target).done(function(used) { if (used.in) { jQuery('#usedin-'+used.id).show(); jQuery('#area-'+used.id).html(used.in); jQuery.UIkit.notify({message: used.in, timeout: 5000, status: 'success', pos: 'top-right'}); found = true; } else { jQuery('#usedin-'+target).hide(); } if (run == targetNumber) { jQuery('#loading-usedin').hide(); if (found) { jQuery('#note-usedin-found').show(); } else { jQuery('#note-usedin-not').show(); } } }); if (run == targetNumber) { clearInterval(usedinChecker); } run++; }, 800); } function usedin_server(functioName, ide, target){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.usedin&format=json"; if(token.length > 0){ var request = token+'=1&functioName='+functioName+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } dynamic_get.js 0000644 00000134263 15116736750 0007411 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Some Global Values jform_vvvvwbavws_required = false; jform_vvvvwbcvwt_required = false; jform_vvvvwbdvwu_required = false; jform_vvvvwbevwv_required = false; jform_vvvvwbfvww_required = false; jform_vvvvwbqvwx_required = false; jform_vvvvwbqvwy_required = false; jform_vvvvwbvvwz_required = false; jform_vvvvwbvvxa_required = false; jform_vvvvwbvvxb_required = false; jform_vvvvwbwvxc_required = false; jform_vvvvwbxvxd_required = false; jform_vvvvwbyvxe_required = false; // Initial Script jQuery(document).ready(function() { var gettype_vvvvwba = jQuery("#jform_gettype").val(); vvvvwba(gettype_vvvvwba); var main_source_vvvvwbb = jQuery("#jform_main_source").val(); vvvvwbb(main_source_vvvvwbb); var main_source_vvvvwbc = jQuery("#jform_main_source").val(); vvvvwbc(main_source_vvvvwbc); var main_source_vvvvwbd = jQuery("#jform_main_source").val(); vvvvwbd(main_source_vvvvwbd); var main_source_vvvvwbe = jQuery("#jform_main_source").val(); vvvvwbe(main_source_vvvvwbe); var main_source_vvvvwbf = jQuery("#jform_main_source").val(); vvvvwbf(main_source_vvvvwbf); var addcalculation_vvvvwbg = jQuery("#jform_addcalculation input[type='radio']:checked").val(); vvvvwbg(addcalculation_vvvvwbg); var addcalculation_vvvvwbh = jQuery("#jform_addcalculation input[type='radio']:checked").val(); var gettype_vvvvwbh = jQuery("#jform_gettype").val(); vvvvwbh(addcalculation_vvvvwbh,gettype_vvvvwbh); var addcalculation_vvvvwbi = jQuery("#jform_addcalculation input[type='radio']:checked").val(); var gettype_vvvvwbi = jQuery("#jform_gettype").val(); vvvvwbi(addcalculation_vvvvwbi,gettype_vvvvwbi); var main_source_vvvvwbl = jQuery("#jform_main_source").val(); vvvvwbl(main_source_vvvvwbl); var main_source_vvvvwbm = jQuery("#jform_main_source").val(); vvvvwbm(main_source_vvvvwbm); var add_php_before_getitem_vvvvwbn = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); var gettype_vvvvwbn = jQuery("#jform_gettype").val(); vvvvwbn(add_php_before_getitem_vvvvwbn,gettype_vvvvwbn); var add_php_after_getitem_vvvvwbo = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); var gettype_vvvvwbo = jQuery("#jform_gettype").val(); vvvvwbo(add_php_after_getitem_vvvvwbo,gettype_vvvvwbo); var gettype_vvvvwbq = jQuery("#jform_gettype").val(); vvvvwbq(gettype_vvvvwbq); var add_php_getlistquery_vvvvwbr = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); var gettype_vvvvwbr = jQuery("#jform_gettype").val(); vvvvwbr(add_php_getlistquery_vvvvwbr,gettype_vvvvwbr); var add_php_before_getitems_vvvvwbs = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); var gettype_vvvvwbs = jQuery("#jform_gettype").val(); vvvvwbs(add_php_before_getitems_vvvvwbs,gettype_vvvvwbs); var add_php_after_getitems_vvvvwbt = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); var gettype_vvvvwbt = jQuery("#jform_gettype").val(); vvvvwbt(add_php_after_getitems_vvvvwbt,gettype_vvvvwbt); var gettype_vvvvwbv = jQuery("#jform_gettype").val(); vvvvwbv(gettype_vvvvwbv); var gettype_vvvvwbw = jQuery("#jform_gettype").val(); vvvvwbw(gettype_vvvvwbw); var gettype_vvvvwbx = jQuery("#jform_gettype").val(); vvvvwbx(gettype_vvvvwbx); var gettype_vvvvwby = jQuery("#jform_gettype").val(); var add_php_router_parse_vvvvwby = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); vvvvwby(gettype_vvvvwby,add_php_router_parse_vvvvwby); var gettype_vvvvwca = jQuery("#jform_gettype").val(); vvvvwca(gettype_vvvvwca); }); // the vvvvwba function function vvvvwba(gettype_vvvvwba) { if (isSet(gettype_vvvvwba) && gettype_vvvvwba.constructor !== Array) { var temp_vvvvwba = gettype_vvvvwba; var gettype_vvvvwba = []; gettype_vvvvwba.push(temp_vvvvwba); } else if (!isSet(gettype_vvvvwba)) { var gettype_vvvvwba = []; } var gettype = gettype_vvvvwba.some(gettype_vvvvwba_SomeFunc); // set this function logic if (gettype) { jQuery('#jform_getcustom').closest('.control-group').show(); // add required attribute to getcustom field if (jform_vvvvwbavws_required) { updateFieldRequired('getcustom',0); jQuery('#jform_getcustom').prop('required','required'); jQuery('#jform_getcustom').attr('aria-required',true); jQuery('#jform_getcustom').addClass('required'); jform_vvvvwbavws_required = false; } } else { jQuery('#jform_getcustom').closest('.control-group').hide(); // remove required attribute from getcustom field if (!jform_vvvvwbavws_required) { updateFieldRequired('getcustom',1); jQuery('#jform_getcustom').removeAttr('required'); jQuery('#jform_getcustom').removeAttr('aria-required'); jQuery('#jform_getcustom').removeClass('required'); jform_vvvvwbavws_required = true; } } } // the vvvvwba Some function function gettype_vvvvwba_SomeFunc(gettype_vvvvwba) { // set the function logic if (gettype_vvvvwba == 3 || gettype_vvvvwba == 4) { return true; } return false; } // the vvvvwbb function function vvvvwbb(main_source_vvvvwbb) { if (isSet(main_source_vvvvwbb) && main_source_vvvvwbb.constructor !== Array) { var temp_vvvvwbb = main_source_vvvvwbb; var main_source_vvvvwbb = []; main_source_vvvvwbb.push(temp_vvvvwbb); } else if (!isSet(main_source_vvvvwbb)) { var main_source_vvvvwbb = []; } var main_source = main_source_vvvvwbb.some(main_source_vvvvwbb_SomeFunc); // set this function logic if (main_source) { jQuery('#jform_select_all').closest('.control-group').show(); } else { jQuery('#jform_select_all').closest('.control-group').hide(); } } // the vvvvwbb Some function function main_source_vvvvwbb_SomeFunc(main_source_vvvvwbb) { // set the function logic if (main_source_vvvvwbb == 1 || main_source_vvvvwbb == 2) { return true; } return false; } // the vvvvwbc function function vvvvwbc(main_source_vvvvwbc) { if (isSet(main_source_vvvvwbc) && main_source_vvvvwbc.constructor !== Array) { var temp_vvvvwbc = main_source_vvvvwbc; var main_source_vvvvwbc = []; main_source_vvvvwbc.push(temp_vvvvwbc); } else if (!isSet(main_source_vvvvwbc)) { var main_source_vvvvwbc = []; } var main_source = main_source_vvvvwbc.some(main_source_vvvvwbc_SomeFunc); // set this function logic if (main_source) { jQuery('#jform_view_table_main').closest('.control-group').show(); // add required attribute to view_table_main field if (jform_vvvvwbcvwt_required) { updateFieldRequired('view_table_main',0); jQuery('#jform_view_table_main').prop('required','required'); jQuery('#jform_view_table_main').attr('aria-required',true); jQuery('#jform_view_table_main').addClass('required'); jform_vvvvwbcvwt_required = false; } } else { jQuery('#jform_view_table_main').closest('.control-group').hide(); // remove required attribute from view_table_main field if (!jform_vvvvwbcvwt_required) { updateFieldRequired('view_table_main',1); jQuery('#jform_view_table_main').removeAttr('required'); jQuery('#jform_view_table_main').removeAttr('aria-required'); jQuery('#jform_view_table_main').removeClass('required'); jform_vvvvwbcvwt_required = true; } } } // the vvvvwbc Some function function main_source_vvvvwbc_SomeFunc(main_source_vvvvwbc) { // set the function logic if (main_source_vvvvwbc == 1) { return true; } return false; } // the vvvvwbd function function vvvvwbd(main_source_vvvvwbd) { if (isSet(main_source_vvvvwbd) && main_source_vvvvwbd.constructor !== Array) { var temp_vvvvwbd = main_source_vvvvwbd; var main_source_vvvvwbd = []; main_source_vvvvwbd.push(temp_vvvvwbd); } else if (!isSet(main_source_vvvvwbd)) { var main_source_vvvvwbd = []; } var main_source = main_source_vvvvwbd.some(main_source_vvvvwbd_SomeFunc); // set this function logic if (main_source) { jQuery('#jform_view_selection').closest('.control-group').show(); // add required attribute to view_selection field if (jform_vvvvwbdvwu_required) { updateFieldRequired('view_selection',0); jQuery('#jform_view_selection').prop('required','required'); jQuery('#jform_view_selection').attr('aria-required',true); jQuery('#jform_view_selection').addClass('required'); jform_vvvvwbdvwu_required = false; } } else { jQuery('#jform_view_selection').closest('.control-group').hide(); // remove required attribute from view_selection field if (!jform_vvvvwbdvwu_required) { updateFieldRequired('view_selection',1); jQuery('#jform_view_selection').removeAttr('required'); jQuery('#jform_view_selection').removeAttr('aria-required'); jQuery('#jform_view_selection').removeClass('required'); jform_vvvvwbdvwu_required = true; } } } // the vvvvwbd Some function function main_source_vvvvwbd_SomeFunc(main_source_vvvvwbd) { // set the function logic if (main_source_vvvvwbd == 1) { return true; } return false; } // the vvvvwbe function function vvvvwbe(main_source_vvvvwbe) { if (isSet(main_source_vvvvwbe) && main_source_vvvvwbe.constructor !== Array) { var temp_vvvvwbe = main_source_vvvvwbe; var main_source_vvvvwbe = []; main_source_vvvvwbe.push(temp_vvvvwbe); } else if (!isSet(main_source_vvvvwbe)) { var main_source_vvvvwbe = []; } var main_source = main_source_vvvvwbe.some(main_source_vvvvwbe_SomeFunc); // set this function logic if (main_source) { jQuery('#jform_db_table_main').closest('.control-group').show(); // add required attribute to db_table_main field if (jform_vvvvwbevwv_required) { updateFieldRequired('db_table_main',0); jQuery('#jform_db_table_main').prop('required','required'); jQuery('#jform_db_table_main').attr('aria-required',true); jQuery('#jform_db_table_main').addClass('required'); jform_vvvvwbevwv_required = false; } } else { jQuery('#jform_db_table_main').closest('.control-group').hide(); // remove required attribute from db_table_main field if (!jform_vvvvwbevwv_required) { updateFieldRequired('db_table_main',1); jQuery('#jform_db_table_main').removeAttr('required'); jQuery('#jform_db_table_main').removeAttr('aria-required'); jQuery('#jform_db_table_main').removeClass('required'); jform_vvvvwbevwv_required = true; } } } // the vvvvwbe Some function function main_source_vvvvwbe_SomeFunc(main_source_vvvvwbe) { // set the function logic if (main_source_vvvvwbe == 2) { return true; } return false; } // the vvvvwbf function function vvvvwbf(main_source_vvvvwbf) { if (isSet(main_source_vvvvwbf) && main_source_vvvvwbf.constructor !== Array) { var temp_vvvvwbf = main_source_vvvvwbf; var main_source_vvvvwbf = []; main_source_vvvvwbf.push(temp_vvvvwbf); } else if (!isSet(main_source_vvvvwbf)) { var main_source_vvvvwbf = []; } var main_source = main_source_vvvvwbf.some(main_source_vvvvwbf_SomeFunc); // set this function logic if (main_source) { jQuery('#jform_db_selection').closest('.control-group').show(); // add required attribute to db_selection field if (jform_vvvvwbfvww_required) { updateFieldRequired('db_selection',0); jQuery('#jform_db_selection').prop('required','required'); jQuery('#jform_db_selection').attr('aria-required',true); jQuery('#jform_db_selection').addClass('required'); jform_vvvvwbfvww_required = false; } } else { jQuery('#jform_db_selection').closest('.control-group').hide(); // remove required attribute from db_selection field if (!jform_vvvvwbfvww_required) { updateFieldRequired('db_selection',1); jQuery('#jform_db_selection').removeAttr('required'); jQuery('#jform_db_selection').removeAttr('aria-required'); jQuery('#jform_db_selection').removeClass('required'); jform_vvvvwbfvww_required = true; } } } // the vvvvwbf Some function function main_source_vvvvwbf_SomeFunc(main_source_vvvvwbf) { // set the function logic if (main_source_vvvvwbf == 2) { return true; } return false; } // the vvvvwbg function function vvvvwbg(addcalculation_vvvvwbg) { // set the function logic if (addcalculation_vvvvwbg == 1) { jQuery('#jform_php_calculation-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_calculation-lbl').closest('.control-group').hide(); } } // the vvvvwbh function function vvvvwbh(addcalculation_vvvvwbh,gettype_vvvvwbh) { if (isSet(addcalculation_vvvvwbh) && addcalculation_vvvvwbh.constructor !== Array) { var temp_vvvvwbh = addcalculation_vvvvwbh; var addcalculation_vvvvwbh = []; addcalculation_vvvvwbh.push(temp_vvvvwbh); } else if (!isSet(addcalculation_vvvvwbh)) { var addcalculation_vvvvwbh = []; } var addcalculation = addcalculation_vvvvwbh.some(addcalculation_vvvvwbh_SomeFunc); if (isSet(gettype_vvvvwbh) && gettype_vvvvwbh.constructor !== Array) { var temp_vvvvwbh = gettype_vvvvwbh; var gettype_vvvvwbh = []; gettype_vvvvwbh.push(temp_vvvvwbh); } else if (!isSet(gettype_vvvvwbh)) { var gettype_vvvvwbh = []; } var gettype = gettype_vvvvwbh.some(gettype_vvvvwbh_SomeFunc); // set this function logic if (addcalculation && gettype) { jQuery('.note_calculation_item').closest('.control-group').show(); } else { jQuery('.note_calculation_item').closest('.control-group').hide(); } } // the vvvvwbh Some function function addcalculation_vvvvwbh_SomeFunc(addcalculation_vvvvwbh) { // set the function logic if (addcalculation_vvvvwbh == 1) { return true; } return false; } // the vvvvwbh Some function function gettype_vvvvwbh_SomeFunc(gettype_vvvvwbh) { // set the function logic if (gettype_vvvvwbh == 1 || gettype_vvvvwbh == 3) { return true; } return false; } // the vvvvwbi function function vvvvwbi(addcalculation_vvvvwbi,gettype_vvvvwbi) { if (isSet(addcalculation_vvvvwbi) && addcalculation_vvvvwbi.constructor !== Array) { var temp_vvvvwbi = addcalculation_vvvvwbi; var addcalculation_vvvvwbi = []; addcalculation_vvvvwbi.push(temp_vvvvwbi); } else if (!isSet(addcalculation_vvvvwbi)) { var addcalculation_vvvvwbi = []; } var addcalculation = addcalculation_vvvvwbi.some(addcalculation_vvvvwbi_SomeFunc); if (isSet(gettype_vvvvwbi) && gettype_vvvvwbi.constructor !== Array) { var temp_vvvvwbi = gettype_vvvvwbi; var gettype_vvvvwbi = []; gettype_vvvvwbi.push(temp_vvvvwbi); } else if (!isSet(gettype_vvvvwbi)) { var gettype_vvvvwbi = []; } var gettype = gettype_vvvvwbi.some(gettype_vvvvwbi_SomeFunc); // set this function logic if (addcalculation && gettype) { jQuery('.note_calculation_items').closest('.control-group').show(); } else { jQuery('.note_calculation_items').closest('.control-group').hide(); } } // the vvvvwbi Some function function addcalculation_vvvvwbi_SomeFunc(addcalculation_vvvvwbi) { // set the function logic if (addcalculation_vvvvwbi == 1) { return true; } return false; } // the vvvvwbi Some function function gettype_vvvvwbi_SomeFunc(gettype_vvvvwbi) { // set the function logic if (gettype_vvvvwbi == 2 || gettype_vvvvwbi == 4) { return true; } return false; } // the vvvvwbl function function vvvvwbl(main_source_vvvvwbl) { if (isSet(main_source_vvvvwbl) && main_source_vvvvwbl.constructor !== Array) { var temp_vvvvwbl = main_source_vvvvwbl; var main_source_vvvvwbl = []; main_source_vvvvwbl.push(temp_vvvvwbl); } else if (!isSet(main_source_vvvvwbl)) { var main_source_vvvvwbl = []; } var main_source = main_source_vvvvwbl.some(main_source_vvvvwbl_SomeFunc); // set this function logic if (main_source) { jQuery('#jform_php_custom_get-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_custom_get-lbl').closest('.control-group').hide(); } } // the vvvvwbl Some function function main_source_vvvvwbl_SomeFunc(main_source_vvvvwbl) { // set the function logic if (main_source_vvvvwbl == 3) { return true; } return false; } // the vvvvwbm function function vvvvwbm(main_source_vvvvwbm) { if (isSet(main_source_vvvvwbm) && main_source_vvvvwbm.constructor !== Array) { var temp_vvvvwbm = main_source_vvvvwbm; var main_source_vvvvwbm = []; main_source_vvvvwbm.push(temp_vvvvwbm); } else if (!isSet(main_source_vvvvwbm)) { var main_source_vvvvwbm = []; } var main_source = main_source_vvvvwbm.some(main_source_vvvvwbm_SomeFunc); // set this function logic if (main_source) { jQuery('#jform_filter-lbl').closest('.control-group').show(); jQuery('#jform_global-lbl').closest('.control-group').show(); jQuery('#jform_group-lbl').closest('.control-group').show(); jQuery('#jform_order-lbl').closest('.control-group').show(); jQuery('#jform_where-lbl').closest('.control-group').show(); jQuery('#jform_join_db_table-lbl').closest('.control-group').show(); jQuery('#jform_join_view_table-lbl').closest('.control-group').show(); } else { jQuery('#jform_filter-lbl').closest('.control-group').hide(); jQuery('#jform_global-lbl').closest('.control-group').hide(); jQuery('#jform_group-lbl').closest('.control-group').hide(); jQuery('#jform_order-lbl').closest('.control-group').hide(); jQuery('#jform_where-lbl').closest('.control-group').hide(); jQuery('#jform_join_db_table-lbl').closest('.control-group').hide(); jQuery('#jform_join_view_table-lbl').closest('.control-group').hide(); } } // the vvvvwbm Some function function main_source_vvvvwbm_SomeFunc(main_source_vvvvwbm) { // set the function logic if (main_source_vvvvwbm == 1 || main_source_vvvvwbm == 2) { return true; } return false; } // the vvvvwbn function function vvvvwbn(add_php_before_getitem_vvvvwbn,gettype_vvvvwbn) { if (isSet(add_php_before_getitem_vvvvwbn) && add_php_before_getitem_vvvvwbn.constructor !== Array) { var temp_vvvvwbn = add_php_before_getitem_vvvvwbn; var add_php_before_getitem_vvvvwbn = []; add_php_before_getitem_vvvvwbn.push(temp_vvvvwbn); } else if (!isSet(add_php_before_getitem_vvvvwbn)) { var add_php_before_getitem_vvvvwbn = []; } var add_php_before_getitem = add_php_before_getitem_vvvvwbn.some(add_php_before_getitem_vvvvwbn_SomeFunc); if (isSet(gettype_vvvvwbn) && gettype_vvvvwbn.constructor !== Array) { var temp_vvvvwbn = gettype_vvvvwbn; var gettype_vvvvwbn = []; gettype_vvvvwbn.push(temp_vvvvwbn); } else if (!isSet(gettype_vvvvwbn)) { var gettype_vvvvwbn = []; } var gettype = gettype_vvvvwbn.some(gettype_vvvvwbn_SomeFunc); // set this function logic if (add_php_before_getitem && gettype) { jQuery('#jform_php_before_getitem-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_before_getitem-lbl').closest('.control-group').hide(); } } // the vvvvwbn Some function function add_php_before_getitem_vvvvwbn_SomeFunc(add_php_before_getitem_vvvvwbn) { // set the function logic if (add_php_before_getitem_vvvvwbn == 1) { return true; } return false; } // the vvvvwbn Some function function gettype_vvvvwbn_SomeFunc(gettype_vvvvwbn) { // set the function logic if (gettype_vvvvwbn == 1 || gettype_vvvvwbn == 3) { return true; } return false; } // the vvvvwbo function function vvvvwbo(add_php_after_getitem_vvvvwbo,gettype_vvvvwbo) { if (isSet(add_php_after_getitem_vvvvwbo) && add_php_after_getitem_vvvvwbo.constructor !== Array) { var temp_vvvvwbo = add_php_after_getitem_vvvvwbo; var add_php_after_getitem_vvvvwbo = []; add_php_after_getitem_vvvvwbo.push(temp_vvvvwbo); } else if (!isSet(add_php_after_getitem_vvvvwbo)) { var add_php_after_getitem_vvvvwbo = []; } var add_php_after_getitem = add_php_after_getitem_vvvvwbo.some(add_php_after_getitem_vvvvwbo_SomeFunc); if (isSet(gettype_vvvvwbo) && gettype_vvvvwbo.constructor !== Array) { var temp_vvvvwbo = gettype_vvvvwbo; var gettype_vvvvwbo = []; gettype_vvvvwbo.push(temp_vvvvwbo); } else if (!isSet(gettype_vvvvwbo)) { var gettype_vvvvwbo = []; } var gettype = gettype_vvvvwbo.some(gettype_vvvvwbo_SomeFunc); // set this function logic if (add_php_after_getitem && gettype) { jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide(); } } // the vvvvwbo Some function function add_php_after_getitem_vvvvwbo_SomeFunc(add_php_after_getitem_vvvvwbo) { // set the function logic if (add_php_after_getitem_vvvvwbo == 1) { return true; } return false; } // the vvvvwbo Some function function gettype_vvvvwbo_SomeFunc(gettype_vvvvwbo) { // set the function logic if (gettype_vvvvwbo == 1 || gettype_vvvvwbo == 3) { return true; } return false; } // the vvvvwbq function function vvvvwbq(gettype_vvvvwbq) { if (isSet(gettype_vvvvwbq) && gettype_vvvvwbq.constructor !== Array) { var temp_vvvvwbq = gettype_vvvvwbq; var gettype_vvvvwbq = []; gettype_vvvvwbq.push(temp_vvvvwbq); } else if (!isSet(gettype_vvvvwbq)) { var gettype_vvvvwbq = []; } var gettype = gettype_vvvvwbq.some(gettype_vvvvwbq_SomeFunc); // set this function logic if (gettype) { jQuery('#jform_add_php_after_getitem').closest('.control-group').show(); // add required attribute to add_php_after_getitem field if (jform_vvvvwbqvwx_required) { updateFieldRequired('add_php_after_getitem',0); jQuery('#jform_add_php_after_getitem').prop('required','required'); jQuery('#jform_add_php_after_getitem').attr('aria-required',true); jQuery('#jform_add_php_after_getitem').addClass('required'); jform_vvvvwbqvwx_required = false; } jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); // add required attribute to add_php_before_getitem field if (jform_vvvvwbqvwy_required) { updateFieldRequired('add_php_before_getitem',0); jQuery('#jform_add_php_before_getitem').prop('required','required'); jQuery('#jform_add_php_before_getitem').attr('aria-required',true); jQuery('#jform_add_php_before_getitem').addClass('required'); jform_vvvvwbqvwy_required = false; } } else { jQuery('#jform_add_php_after_getitem').closest('.control-group').hide(); // remove required attribute from add_php_after_getitem field if (!jform_vvvvwbqvwx_required) { updateFieldRequired('add_php_after_getitem',1); jQuery('#jform_add_php_after_getitem').removeAttr('required'); jQuery('#jform_add_php_after_getitem').removeAttr('aria-required'); jQuery('#jform_add_php_after_getitem').removeClass('required'); jform_vvvvwbqvwx_required = true; } jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); // remove required attribute from add_php_before_getitem field if (!jform_vvvvwbqvwy_required) { updateFieldRequired('add_php_before_getitem',1); jQuery('#jform_add_php_before_getitem').removeAttr('required'); jQuery('#jform_add_php_before_getitem').removeAttr('aria-required'); jQuery('#jform_add_php_before_getitem').removeClass('required'); jform_vvvvwbqvwy_required = true; } } } // the vvvvwbq Some function function gettype_vvvvwbq_SomeFunc(gettype_vvvvwbq) { // set the function logic if (gettype_vvvvwbq == 1 || gettype_vvvvwbq == 3) { return true; } return false; } // the vvvvwbr function function vvvvwbr(add_php_getlistquery_vvvvwbr,gettype_vvvvwbr) { if (isSet(add_php_getlistquery_vvvvwbr) && add_php_getlistquery_vvvvwbr.constructor !== Array) { var temp_vvvvwbr = add_php_getlistquery_vvvvwbr; var add_php_getlistquery_vvvvwbr = []; add_php_getlistquery_vvvvwbr.push(temp_vvvvwbr); } else if (!isSet(add_php_getlistquery_vvvvwbr)) { var add_php_getlistquery_vvvvwbr = []; } var add_php_getlistquery = add_php_getlistquery_vvvvwbr.some(add_php_getlistquery_vvvvwbr_SomeFunc); if (isSet(gettype_vvvvwbr) && gettype_vvvvwbr.constructor !== Array) { var temp_vvvvwbr = gettype_vvvvwbr; var gettype_vvvvwbr = []; gettype_vvvvwbr.push(temp_vvvvwbr); } else if (!isSet(gettype_vvvvwbr)) { var gettype_vvvvwbr = []; } var gettype = gettype_vvvvwbr.some(gettype_vvvvwbr_SomeFunc); // set this function logic if (add_php_getlistquery && gettype) { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); } } // the vvvvwbr Some function function add_php_getlistquery_vvvvwbr_SomeFunc(add_php_getlistquery_vvvvwbr) { // set the function logic if (add_php_getlistquery_vvvvwbr == 1) { return true; } return false; } // the vvvvwbr Some function function gettype_vvvvwbr_SomeFunc(gettype_vvvvwbr) { // set the function logic if (gettype_vvvvwbr == 2 || gettype_vvvvwbr == 4) { return true; } return false; } // the vvvvwbs function function vvvvwbs(add_php_before_getitems_vvvvwbs,gettype_vvvvwbs) { if (isSet(add_php_before_getitems_vvvvwbs) && add_php_before_getitems_vvvvwbs.constructor !== Array) { var temp_vvvvwbs = add_php_before_getitems_vvvvwbs; var add_php_before_getitems_vvvvwbs = []; add_php_before_getitems_vvvvwbs.push(temp_vvvvwbs); } else if (!isSet(add_php_before_getitems_vvvvwbs)) { var add_php_before_getitems_vvvvwbs = []; } var add_php_before_getitems = add_php_before_getitems_vvvvwbs.some(add_php_before_getitems_vvvvwbs_SomeFunc); if (isSet(gettype_vvvvwbs) && gettype_vvvvwbs.constructor !== Array) { var temp_vvvvwbs = gettype_vvvvwbs; var gettype_vvvvwbs = []; gettype_vvvvwbs.push(temp_vvvvwbs); } else if (!isSet(gettype_vvvvwbs)) { var gettype_vvvvwbs = []; } var gettype = gettype_vvvvwbs.some(gettype_vvvvwbs_SomeFunc); // set this function logic if (add_php_before_getitems && gettype) { jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide(); } } // the vvvvwbs Some function function add_php_before_getitems_vvvvwbs_SomeFunc(add_php_before_getitems_vvvvwbs) { // set the function logic if (add_php_before_getitems_vvvvwbs == 1) { return true; } return false; } // the vvvvwbs Some function function gettype_vvvvwbs_SomeFunc(gettype_vvvvwbs) { // set the function logic if (gettype_vvvvwbs == 2 || gettype_vvvvwbs == 4) { return true; } return false; } // the vvvvwbt function function vvvvwbt(add_php_after_getitems_vvvvwbt,gettype_vvvvwbt) { if (isSet(add_php_after_getitems_vvvvwbt) && add_php_after_getitems_vvvvwbt.constructor !== Array) { var temp_vvvvwbt = add_php_after_getitems_vvvvwbt; var add_php_after_getitems_vvvvwbt = []; add_php_after_getitems_vvvvwbt.push(temp_vvvvwbt); } else if (!isSet(add_php_after_getitems_vvvvwbt)) { var add_php_after_getitems_vvvvwbt = []; } var add_php_after_getitems = add_php_after_getitems_vvvvwbt.some(add_php_after_getitems_vvvvwbt_SomeFunc); if (isSet(gettype_vvvvwbt) && gettype_vvvvwbt.constructor !== Array) { var temp_vvvvwbt = gettype_vvvvwbt; var gettype_vvvvwbt = []; gettype_vvvvwbt.push(temp_vvvvwbt); } else if (!isSet(gettype_vvvvwbt)) { var gettype_vvvvwbt = []; } var gettype = gettype_vvvvwbt.some(gettype_vvvvwbt_SomeFunc); // set this function logic if (add_php_after_getitems && gettype) { jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show(); } else { jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide(); } } // the vvvvwbt Some function function add_php_after_getitems_vvvvwbt_SomeFunc(add_php_after_getitems_vvvvwbt) { // set the function logic if (add_php_after_getitems_vvvvwbt == 1) { return true; } return false; } // the vvvvwbt Some function function gettype_vvvvwbt_SomeFunc(gettype_vvvvwbt) { // set the function logic if (gettype_vvvvwbt == 2 || gettype_vvvvwbt == 4) { return true; } return false; } // the vvvvwbv function function vvvvwbv(gettype_vvvvwbv) { if (isSet(gettype_vvvvwbv) && gettype_vvvvwbv.constructor !== Array) { var temp_vvvvwbv = gettype_vvvvwbv; var gettype_vvvvwbv = []; gettype_vvvvwbv.push(temp_vvvvwbv); } else if (!isSet(gettype_vvvvwbv)) { var gettype_vvvvwbv = []; } var gettype = gettype_vvvvwbv.some(gettype_vvvvwbv_SomeFunc); // set this function logic if (gettype) { jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); // add required attribute to add_php_after_getitems field if (jform_vvvvwbvvwz_required) { updateFieldRequired('add_php_after_getitems',0); jQuery('#jform_add_php_after_getitems').prop('required','required'); jQuery('#jform_add_php_after_getitems').attr('aria-required',true); jQuery('#jform_add_php_after_getitems').addClass('required'); jform_vvvvwbvvwz_required = false; } jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); // add required attribute to add_php_before_getitems field if (jform_vvvvwbvvxa_required) { updateFieldRequired('add_php_before_getitems',0); jQuery('#jform_add_php_before_getitems').prop('required','required'); jQuery('#jform_add_php_before_getitems').attr('aria-required',true); jQuery('#jform_add_php_before_getitems').addClass('required'); jform_vvvvwbvvxa_required = false; } jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); // add required attribute to add_php_getlistquery field if (jform_vvvvwbvvxb_required) { updateFieldRequired('add_php_getlistquery',0); jQuery('#jform_add_php_getlistquery').prop('required','required'); jQuery('#jform_add_php_getlistquery').attr('aria-required',true); jQuery('#jform_add_php_getlistquery').addClass('required'); jform_vvvvwbvvxb_required = false; } } else { jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); // remove required attribute from add_php_after_getitems field if (!jform_vvvvwbvvwz_required) { updateFieldRequired('add_php_after_getitems',1); jQuery('#jform_add_php_after_getitems').removeAttr('required'); jQuery('#jform_add_php_after_getitems').removeAttr('aria-required'); jQuery('#jform_add_php_after_getitems').removeClass('required'); jform_vvvvwbvvwz_required = true; } jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); // remove required attribute from add_php_before_getitems field if (!jform_vvvvwbvvxa_required) { updateFieldRequired('add_php_before_getitems',1); jQuery('#jform_add_php_before_getitems').removeAttr('required'); jQuery('#jform_add_php_before_getitems').removeAttr('aria-required'); jQuery('#jform_add_php_before_getitems').removeClass('required'); jform_vvvvwbvvxa_required = true; } jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); // remove required attribute from add_php_getlistquery field if (!jform_vvvvwbvvxb_required) { updateFieldRequired('add_php_getlistquery',1); jQuery('#jform_add_php_getlistquery').removeAttr('required'); jQuery('#jform_add_php_getlistquery').removeAttr('aria-required'); jQuery('#jform_add_php_getlistquery').removeClass('required'); jform_vvvvwbvvxb_required = true; } } } // the vvvvwbv Some function function gettype_vvvvwbv_SomeFunc(gettype_vvvvwbv) { // set the function logic if (gettype_vvvvwbv == 2 || gettype_vvvvwbv == 4) { return true; } return false; } // the vvvvwbw function function vvvvwbw(gettype_vvvvwbw) { if (isSet(gettype_vvvvwbw) && gettype_vvvvwbw.constructor !== Array) { var temp_vvvvwbw = gettype_vvvvwbw; var gettype_vvvvwbw = []; gettype_vvvvwbw.push(temp_vvvvwbw); } else if (!isSet(gettype_vvvvwbw)) { var gettype_vvvvwbw = []; } var gettype = gettype_vvvvwbw.some(gettype_vvvvwbw_SomeFunc); // set this function logic if (gettype) { jQuery('#jform_pagination').closest('.control-group').show(); // add required attribute to pagination field if (jform_vvvvwbwvxc_required) { updateFieldRequired('pagination',0); jQuery('#jform_pagination').prop('required','required'); jQuery('#jform_pagination').attr('aria-required',true); jQuery('#jform_pagination').addClass('required'); jform_vvvvwbwvxc_required = false; } } else { jQuery('#jform_pagination').closest('.control-group').hide(); // remove required attribute from pagination field if (!jform_vvvvwbwvxc_required) { updateFieldRequired('pagination',1); jQuery('#jform_pagination').removeAttr('required'); jQuery('#jform_pagination').removeAttr('aria-required'); jQuery('#jform_pagination').removeClass('required'); jform_vvvvwbwvxc_required = true; } } } // the vvvvwbw Some function function gettype_vvvvwbw_SomeFunc(gettype_vvvvwbw) { // set the function logic if (gettype_vvvvwbw == 2) { return true; } return false; } // the vvvvwbx function function vvvvwbx(gettype_vvvvwbx) { if (isSet(gettype_vvvvwbx) && gettype_vvvvwbx.constructor !== Array) { var temp_vvvvwbx = gettype_vvvvwbx; var gettype_vvvvwbx = []; gettype_vvvvwbx.push(temp_vvvvwbx); } else if (!isSet(gettype_vvvvwbx)) { var gettype_vvvvwbx = []; } var gettype = gettype_vvvvwbx.some(gettype_vvvvwbx_SomeFunc); // set this function logic if (gettype) { jQuery('#jform_add_php_router_parse').closest('.control-group').show(); // add required attribute to add_php_router_parse field if (jform_vvvvwbxvxd_required) { updateFieldRequired('add_php_router_parse',0); jQuery('#jform_add_php_router_parse').prop('required','required'); jQuery('#jform_add_php_router_parse').attr('aria-required',true); jQuery('#jform_add_php_router_parse').addClass('required'); jform_vvvvwbxvxd_required = false; } } else { jQuery('#jform_add_php_router_parse').closest('.control-group').hide(); // remove required attribute from add_php_router_parse field if (!jform_vvvvwbxvxd_required) { updateFieldRequired('add_php_router_parse',1); jQuery('#jform_add_php_router_parse').removeAttr('required'); jQuery('#jform_add_php_router_parse').removeAttr('aria-required'); jQuery('#jform_add_php_router_parse').removeClass('required'); jform_vvvvwbxvxd_required = true; } } } // the vvvvwbx Some function function gettype_vvvvwbx_SomeFunc(gettype_vvvvwbx) { // set the function logic if (gettype_vvvvwbx == 1 || gettype_vvvvwbx == 2) { return true; } return false; } // the vvvvwby function function vvvvwby(gettype_vvvvwby,add_php_router_parse_vvvvwby) { if (isSet(gettype_vvvvwby) && gettype_vvvvwby.constructor !== Array) { var temp_vvvvwby = gettype_vvvvwby; var gettype_vvvvwby = []; gettype_vvvvwby.push(temp_vvvvwby); } else if (!isSet(gettype_vvvvwby)) { var gettype_vvvvwby = []; } var gettype = gettype_vvvvwby.some(gettype_vvvvwby_SomeFunc); if (isSet(add_php_router_parse_vvvvwby) && add_php_router_parse_vvvvwby.constructor !== Array) { var temp_vvvvwby = add_php_router_parse_vvvvwby; var add_php_router_parse_vvvvwby = []; add_php_router_parse_vvvvwby.push(temp_vvvvwby); } else if (!isSet(add_php_router_parse_vvvvwby)) { var add_php_router_parse_vvvvwby = []; } var add_php_router_parse = add_php_router_parse_vvvvwby.some(add_php_router_parse_vvvvwby_SomeFunc); // set this function logic if (gettype && add_php_router_parse) { jQuery('#jform_php_router_parse').closest('.control-group').show(); // add required attribute to php_router_parse field if (jform_vvvvwbyvxe_required) { updateFieldRequired('php_router_parse',0); jQuery('#jform_php_router_parse').prop('required','required'); jQuery('#jform_php_router_parse').attr('aria-required',true); jQuery('#jform_php_router_parse').addClass('required'); jform_vvvvwbyvxe_required = false; } } else { jQuery('#jform_php_router_parse').closest('.control-group').hide(); // remove required attribute from php_router_parse field if (!jform_vvvvwbyvxe_required) { updateFieldRequired('php_router_parse',1); jQuery('#jform_php_router_parse').removeAttr('required'); jQuery('#jform_php_router_parse').removeAttr('aria-required'); jQuery('#jform_php_router_parse').removeClass('required'); jform_vvvvwbyvxe_required = true; } } } // the vvvvwby Some function function gettype_vvvvwby_SomeFunc(gettype_vvvvwby) { // set the function logic if (gettype_vvvvwby == 1 || gettype_vvvvwby == 2) { return true; } return false; } // the vvvvwby Some function function add_php_router_parse_vvvvwby_SomeFunc(add_php_router_parse_vvvvwby) { // set the function logic if (add_php_router_parse_vvvvwby == 1) { return true; } return false; } // the vvvvwca function function vvvvwca(gettype_vvvvwca) { if (isSet(gettype_vvvvwca) && gettype_vvvvwca.constructor !== Array) { var temp_vvvvwca = gettype_vvvvwca; var gettype_vvvvwca = []; gettype_vvvvwca.push(temp_vvvvwca); } else if (!isSet(gettype_vvvvwca)) { var gettype_vvvvwca = []; } var gettype = gettype_vvvvwca.some(gettype_vvvvwca_SomeFunc); // set this function logic if (gettype) { jQuery('#jform_plugin_events').closest('.control-group').show(); } else { jQuery('#jform_plugin_events').closest('.control-group').hide(); } } // the vvvvwca Some function function gettype_vvvvwca_SomeFunc(gettype_vvvvwca) { // set the function logic if (gettype_vvvvwca == 1) { return true; } return false; } // update fields required function updateFieldRequired(name, status) { // check if not_required exist if (jQuery('#jform_not_required').length > 0) { var not_required = jQuery('#jform_not_required').val().split(","); if(status == 1) { not_required.push(name); } else { not_required = removeFieldFromNotRequired(not_required, name); } jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); } } // remove field from not_required function removeFieldFromNotRequired(array, what) { return array.filter(function(element){ return element !== what; }); } // fix not required array function fixNotRequiredArray(array) { var seen = {}; return removeEmptyFromNotRequiredArray(array).filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } // remove empty from not_required array function removeEmptyFromNotRequiredArray(array) { return array.filter(function (el) { // remove ( 一_一) as well - lol return (el.length > 0 && '一_一' !== el); }); } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } jQuery(document).ready(function() { // get the linked details getLinked(); var valueSwitch = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); getDynamicScripts(valueSwitch); // check and load all the custom code edit buttons getEditCustomCodeButtons(); }); function setSelectAll(select_all){ // get source type var main_source = jQuery("#jform_main_source").val(); if (1 == main_source) { var key = 'view'; } else if (2 == main_source) { var key = 'db'; } else { return true; } // only continue if set if (select_all == 1) { // set default notice jQuery("#jform_"+key+"_selection").val('a.*'); // set the selection text area to read only jQuery("#jform_"+key+"_selection").prop("readonly", true); } else { // remove the read only from selection text area jQuery("#jform_"+key+"_selection").prop("readonly", false); // get selected options var value_main = jQuery("#jform_"+key+"_table_main option:selected").val(); // make sure that all fields are set as selected if (key === 'view') { getViewTableColumns(value_main, 'a', key, 3, true, '', ''); } else { getDbTableColumns(value_main, 'a', key, 3, true, '', ''); } } } function getViewTableColumns_server(viewId,asKey,rowType){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json&raw=true"); if (token.length > 0 && viewId > 0 && asKey.length > 0) { var request = token+'=1&as='+asKey+'&type='+rowType+'&id='+viewId; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getViewTableColumns(id, asKey, key, rowType, main, table_, nr_){ // check if this is the main view if (main){ var select_all = jQuery("#jform_select_all input[type='radio']:checked").val(); // do not continue if set if (select_all == 1){ setSelectAll(select_all); return true; } } getViewTableColumns_server(id, asKey, rowType).done(function(result) { if (result) { loadSelectionData(result, 'view', key, main, table_, nr_); } else { loadSelectionData(false, 'view', key, main, table_, nr_); } }) } function getDbTableColumns_server(name,asKey,rowType) { var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json&raw=true"); if (token.length > 0 && name.length > 0 && asKey.length > 0) { var request = token+'=1&as='+asKey+'&type='+rowType+'&name='+name; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getDbTableColumns(name, asKey, key, rowType, main, table_, nr_){ // check if this is the main view if (main){ var select_all = jQuery("#jform_select_all input[type='radio']:checked").val(); // do not continue if set if (select_all == 1){ setSelectAll(select_all); return true; } } getDbTableColumns_server(name,asKey,rowType).done(function(result) { if (result) { loadSelectionData(result, 'db', key, main, table_, nr_); } else { loadSelectionData(false, 'db', key, main, table_, nr_); } }) } function loadSelectionData(result, type, key, main, table_, nr_) { if (main) { var textArea = 'textarea#jform_'+key+'_selection'; } else { var textArea = 'textarea#jform_join_'+type+'_table'+table_+'_join_'+type+'_table'+key+nr_+'_selection'; } // no update the text area if (result) { jQuery(textArea).val(result); } else { jQuery(textArea).val(''); } } function updateSubItems(fieldName, fieldNr, table_, nr_) { if(jQuery('#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table').length) { jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table',function (e) { e.preventDefault(); // get options var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val(); var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val(); var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val(); if (fieldName === 'view') { getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_); } else { getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_); } }); jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_as',function (e) { e.preventDefault(); // get options var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val(); var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val(); var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val(); if (fieldName === 'view') { getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_); } else { getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_); } }); jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_row_type',function (e) { e.preventDefault(); // get options var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val(); var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val(); var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val(); if (fieldName === 'view') { getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_); } else { getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_); } }); } } function getDynamicScripts(id){ if (1 == id) { // get the current values var current_router_parse = jQuery('textarea#jform_php_router_parse').val(); // set the router parse method script if(current_router_parse.length == 0){ getCodeFrom_server(1, 'routerparse', 'type', 'getDynamicScripts').done(function(result) { if(result){ jQuery('textarea#jform_php_router_parse').val(result); } }); } } } function getCodeFrom_server(id, type, type_name, callingName){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax." + callingName + "&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0 && type.length > 0) { var request = token + '=1&' + type_name + '=' + type + '&id=' + id; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } function getLinked(){ getCodeFrom_server(1, 'type', 'type', 'getLinked').done(function(result) { if(result){ jQuery('#display_linked_to').html(result); } }); } field.js 0000644 00000071165 15116736750 0006212 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Some Global Values jform_vvvvwczvxo_required = false; jform_vvvvwdavxp_required = false; jform_vvvvwdbvxq_required = false; jform_vvvvwdcvxr_required = false; jform_vvvvwdfvxs_required = false; jform_vvvvwdfvxt_required = false; // Initial Script jQuery(document).ready(function() { var datalenght_vvvvwcz = jQuery("#jform_datalenght").val(); vvvvwcz(datalenght_vvvvwcz); var datadefault_vvvvwda = jQuery("#jform_datadefault").val(); vvvvwda(datadefault_vvvvwda); var datatype_vvvvwdb = jQuery("#jform_datatype").val(); vvvvwdb(datatype_vvvvwdb); var datatype_vvvvwdc = jQuery("#jform_datatype").val(); vvvvwdc(datatype_vvvvwdc); var store_vvvvwdd = jQuery("#jform_store").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val(); vvvvwdd(store_vvvvwdd,datatype_vvvvwdd); var store_vvvvwdf = jQuery("#jform_store").val(); vvvvwdf(store_vvvvwdf); var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); vvvvwdg(add_css_view_vvvvwdg); var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); vvvvwdh(add_css_views_vvvvwdh); var add_javascript_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); vvvvwdi(add_javascript_view_footer_vvvvwdi); var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); vvvvwdj(add_javascript_views_footer_vvvvwdj); }); // the vvvvwcz function function vvvvwcz(datalenght_vvvvwcz) { if (isSet(datalenght_vvvvwcz) && datalenght_vvvvwcz.constructor !== Array) { var temp_vvvvwcz = datalenght_vvvvwcz; var datalenght_vvvvwcz = []; datalenght_vvvvwcz.push(temp_vvvvwcz); } else if (!isSet(datalenght_vvvvwcz)) { var datalenght_vvvvwcz = []; } var datalenght = datalenght_vvvvwcz.some(datalenght_vvvvwcz_SomeFunc); // set this function logic if (datalenght) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field if (jform_vvvvwczvxo_required) { updateFieldRequired('datalenght_other',0); jQuery('#jform_datalenght_other').prop('required','required'); jQuery('#jform_datalenght_other').attr('aria-required',true); jQuery('#jform_datalenght_other').addClass('required'); jform_vvvvwczvxo_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field if (!jform_vvvvwczvxo_required) { updateFieldRequired('datalenght_other',1); jQuery('#jform_datalenght_other').removeAttr('required'); jQuery('#jform_datalenght_other').removeAttr('aria-required'); jQuery('#jform_datalenght_other').removeClass('required'); jform_vvvvwczvxo_required = true; } } } // the vvvvwcz Some function function datalenght_vvvvwcz_SomeFunc(datalenght_vvvvwcz) { // set the function logic if (datalenght_vvvvwcz == 'Other') { return true; } return false; } // the vvvvwda function function vvvvwda(datadefault_vvvvwda) { if (isSet(datadefault_vvvvwda) && datadefault_vvvvwda.constructor !== Array) { var temp_vvvvwda = datadefault_vvvvwda; var datadefault_vvvvwda = []; datadefault_vvvvwda.push(temp_vvvvwda); } else if (!isSet(datadefault_vvvvwda)) { var datadefault_vvvvwda = []; } var datadefault = datadefault_vvvvwda.some(datadefault_vvvvwda_SomeFunc); // set this function logic if (datadefault) { jQuery('#jform_datadefault_other').closest('.control-group').show(); // add required attribute to datadefault_other field if (jform_vvvvwdavxp_required) { updateFieldRequired('datadefault_other',0); jQuery('#jform_datadefault_other').prop('required','required'); jQuery('#jform_datadefault_other').attr('aria-required',true); jQuery('#jform_datadefault_other').addClass('required'); jform_vvvvwdavxp_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); // remove required attribute from datadefault_other field if (!jform_vvvvwdavxp_required) { updateFieldRequired('datadefault_other',1); jQuery('#jform_datadefault_other').removeAttr('required'); jQuery('#jform_datadefault_other').removeAttr('aria-required'); jQuery('#jform_datadefault_other').removeClass('required'); jform_vvvvwdavxp_required = true; } } } // the vvvvwda Some function function datadefault_vvvvwda_SomeFunc(datadefault_vvvvwda) { // set the function logic if (datadefault_vvvvwda == 'Other') { return true; } return false; } // the vvvvwdb function function vvvvwdb(datatype_vvvvwdb) { if (isSet(datatype_vvvvwdb) && datatype_vvvvwdb.constructor !== Array) { var temp_vvvvwdb = datatype_vvvvwdb; var datatype_vvvvwdb = []; datatype_vvvvwdb.push(temp_vvvvwdb); } else if (!isSet(datatype_vvvvwdb)) { var datatype_vvvvwdb = []; } var datatype = datatype_vvvvwdb.some(datatype_vvvvwdb_SomeFunc); // set this function logic if (datatype) { jQuery('#jform_datadefault').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field if (jform_vvvvwdbvxq_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); jform_vvvvwdbvxq_required = false; } } else { jQuery('#jform_datadefault').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field if (!jform_vvvvwdbvxq_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); jform_vvvvwdbvxq_required = true; } } } // the vvvvwdb Some function function datatype_vvvvwdb_SomeFunc(datatype_vvvvwdb) { // set the function logic if (datatype_vvvvwdb == 'CHAR' || datatype_vvvvwdb == 'VARCHAR' || datatype_vvvvwdb == 'DATETIME' || datatype_vvvvwdb == 'DATE' || datatype_vvvvwdb == 'TIME' || datatype_vvvvwdb == 'INT' || datatype_vvvvwdb == 'TINYINT' || datatype_vvvvwdb == 'BIGINT' || datatype_vvvvwdb == 'FLOAT' || datatype_vvvvwdb == 'DECIMAL' || datatype_vvvvwdb == 'DOUBLE') { return true; } return false; } // the vvvvwdc function function vvvvwdc(datatype_vvvvwdc) { if (isSet(datatype_vvvvwdc) && datatype_vvvvwdc.constructor !== Array) { var temp_vvvvwdc = datatype_vvvvwdc; var datatype_vvvvwdc = []; datatype_vvvvwdc.push(temp_vvvvwdc); } else if (!isSet(datatype_vvvvwdc)) { var datatype_vvvvwdc = []; } var datatype = datatype_vvvvwdc.some(datatype_vvvvwdc_SomeFunc); // set this function logic if (datatype) { jQuery('#jform_datalenght').closest('.control-group').show(); // add required attribute to datalenght field if (jform_vvvvwdcvxr_required) { updateFieldRequired('datalenght',0); jQuery('#jform_datalenght').prop('required','required'); jQuery('#jform_datalenght').attr('aria-required',true); jQuery('#jform_datalenght').addClass('required'); jform_vvvvwdcvxr_required = false; } } else { jQuery('#jform_datalenght').closest('.control-group').hide(); // remove required attribute from datalenght field if (!jform_vvvvwdcvxr_required) { updateFieldRequired('datalenght',1); jQuery('#jform_datalenght').removeAttr('required'); jQuery('#jform_datalenght').removeAttr('aria-required'); jQuery('#jform_datalenght').removeClass('required'); jform_vvvvwdcvxr_required = true; } } } // the vvvvwdc Some function function datatype_vvvvwdc_SomeFunc(datatype_vvvvwdc) { // set the function logic if (datatype_vvvvwdc == 'CHAR' || datatype_vvvvwdc == 'VARCHAR' || datatype_vvvvwdc == 'INT' || datatype_vvvvwdc == 'TINYINT' || datatype_vvvvwdc == 'BIGINT' || datatype_vvvvwdc == 'FLOAT' || datatype_vvvvwdc == 'DECIMAL' || datatype_vvvvwdc == 'DOUBLE') { return true; } return false; } // the vvvvwdd function function vvvvwdd(store_vvvvwdd,datatype_vvvvwdd) { if (isSet(store_vvvvwdd) && store_vvvvwdd.constructor !== Array) { var temp_vvvvwdd = store_vvvvwdd; var store_vvvvwdd = []; store_vvvvwdd.push(temp_vvvvwdd); } else if (!isSet(store_vvvvwdd)) { var store_vvvvwdd = []; } var store = store_vvvvwdd.some(store_vvvvwdd_SomeFunc); if (isSet(datatype_vvvvwdd) && datatype_vvvvwdd.constructor !== Array) { var temp_vvvvwdd = datatype_vvvvwdd; var datatype_vvvvwdd = []; datatype_vvvvwdd.push(temp_vvvvwdd); } else if (!isSet(datatype_vvvvwdd)) { var datatype_vvvvwdd = []; } var datatype = datatype_vvvvwdd.some(datatype_vvvvwdd_SomeFunc); // set this function logic if (store && datatype) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } else { jQuery('.note_whmcs_encryption').closest('.control-group').hide(); } } // the vvvvwdd Some function function store_vvvvwdd_SomeFunc(store_vvvvwdd) { // set the function logic if (store_vvvvwdd == 4) { return true; } return false; } // the vvvvwdd Some function function datatype_vvvvwdd_SomeFunc(datatype_vvvvwdd) { // set the function logic if (datatype_vvvvwdd == 'CHAR' || datatype_vvvvwdd == 'VARCHAR' || datatype_vvvvwdd == 'TEXT' || datatype_vvvvwdd == 'MEDIUMTEXT' || datatype_vvvvwdd == 'LONGTEXT' || datatype_vvvvwdd == 'BLOB' || datatype_vvvvwdd == 'TINYBLOB' || datatype_vvvvwdd == 'MEDIUMBLOB' || datatype_vvvvwdd == 'LONGBLOB') { return true; } return false; } // the vvvvwdf function function vvvvwdf(store_vvvvwdf) { if (isSet(store_vvvvwdf) && store_vvvvwdf.constructor !== Array) { var temp_vvvvwdf = store_vvvvwdf; var store_vvvvwdf = []; store_vvvvwdf.push(temp_vvvvwdf); } else if (!isSet(store_vvvvwdf)) { var store_vvvvwdf = []; } var store = store_vvvvwdf.some(store_vvvvwdf_SomeFunc); // set this function logic if (store) { jQuery('#jform_initiator_on_get_model').closest('.control-group').show(); jQuery('#jform_initiator_on_save_model').closest('.control-group').show(); jQuery('.note_expert_field_save_mode').closest('.control-group').show(); jQuery('#jform_on_get_model_field').closest('.control-group').show(); // add required attribute to on_get_model_field field if (jform_vvvvwdfvxs_required) { updateFieldRequired('on_get_model_field',0); jQuery('#jform_on_get_model_field').prop('required','required'); jQuery('#jform_on_get_model_field').attr('aria-required',true); jQuery('#jform_on_get_model_field').addClass('required'); jform_vvvvwdfvxs_required = false; } jQuery('#jform_on_save_model_field').closest('.control-group').show(); // add required attribute to on_save_model_field field if (jform_vvvvwdfvxt_required) { updateFieldRequired('on_save_model_field',0); jQuery('#jform_on_save_model_field').prop('required','required'); jQuery('#jform_on_save_model_field').attr('aria-required',true); jQuery('#jform_on_save_model_field').addClass('required'); jform_vvvvwdfvxt_required = false; } } else { jQuery('#jform_initiator_on_get_model').closest('.control-group').hide(); jQuery('#jform_initiator_on_save_model').closest('.control-group').hide(); jQuery('.note_expert_field_save_mode').closest('.control-group').hide(); jQuery('#jform_on_get_model_field').closest('.control-group').hide(); // remove required attribute from on_get_model_field field if (!jform_vvvvwdfvxs_required) { updateFieldRequired('on_get_model_field',1); jQuery('#jform_on_get_model_field').removeAttr('required'); jQuery('#jform_on_get_model_field').removeAttr('aria-required'); jQuery('#jform_on_get_model_field').removeClass('required'); jform_vvvvwdfvxs_required = true; } jQuery('#jform_on_save_model_field').closest('.control-group').hide(); // remove required attribute from on_save_model_field field if (!jform_vvvvwdfvxt_required) { updateFieldRequired('on_save_model_field',1); jQuery('#jform_on_save_model_field').removeAttr('required'); jQuery('#jform_on_save_model_field').removeAttr('aria-required'); jQuery('#jform_on_save_model_field').removeClass('required'); jform_vvvvwdfvxt_required = true; } } } // the vvvvwdf Some function function store_vvvvwdf_SomeFunc(store_vvvvwdf) { // set the function logic if (store_vvvvwdf == 6) { return true; } return false; } // the vvvvwdg function function vvvvwdg(add_css_view_vvvvwdg) { // set the function logic if (add_css_view_vvvvwdg == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } else { jQuery('#jform_css_view-lbl').closest('.control-group').hide(); } } // the vvvvwdh function function vvvvwdh(add_css_views_vvvvwdh) { // set the function logic if (add_css_views_vvvvwdh == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } else { jQuery('#jform_css_views-lbl').closest('.control-group').hide(); } } // the vvvvwdi function function vvvvwdi(add_javascript_view_footer_vvvvwdi) { // set the function logic if (add_javascript_view_footer_vvvvwdi == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } else { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide(); } } // the vvvvwdj function function vvvvwdj(add_javascript_views_footer_vvvvwdj) { // set the function logic if (add_javascript_views_footer_vvvvwdj == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); } else { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide(); } } // update fields required function updateFieldRequired(name, status) { // check if not_required exist if (jQuery('#jform_not_required').length > 0) { var not_required = jQuery('#jform_not_required').val().split(","); if(status == 1) { not_required.push(name); } else { not_required = removeFieldFromNotRequired(not_required, name); } jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); } } // remove field from not_required function removeFieldFromNotRequired(array, what) { return array.filter(function(element){ return element !== what; }); } // fix not required array function fixNotRequiredArray(array) { var seen = {}; return removeEmptyFromNotRequiredArray(array).filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } // remove empty from not_required array function removeEmptyFromNotRequiredArray(array) { return array.filter(function (el) { // remove ( 一_一) as well - lol return (el.length > 0 && '一_一' !== el); }); } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } jQuery(document).ready(function() { // get type value var fieldtype = jQuery("#jform_fieldtype option:selected").val(); getFieldTypeProperties(fieldtype, false); // get the linked details getLinked(); // get the validation rules getValidationRulesTable(); // set button to create more fields addButton('validation_rule', 'validation_rules_header', 2); // get the field type text var fieldText = jQuery("#jform_fieldtype option:selected").text().toLowerCase(); // now check if database input is needed dbChecker(fieldText); // check and load all the custom code edit buttons getEditCustomCodeButtons(); }); // the options row id key var rowIdKey = 'properties'; function getFieldTypeProperties(fieldtype, db){ getCodeFrom_server(fieldtype, 'type', 'type', 'fieldTypeProperties').done(function(result) { if(result.subform){ // load the list of properties propertiesArray = result.nameListOptions; // remove previous forms of exist jQuery('.prop_removal').remove(); // hide notice jQuery('.note_select_field_type').closest('.control-group').remove(); // append to note_filter_information class jQuery('.note_filter_information').closest('.control-group').prepend(result.extra); // append to note_filter_information class if(result.textarea){ jQuery.each( result.textarea, function( i, tField ) { // append to note_filter_information class jQuery('.note_filter_information').closest('.control-group').prepend(tField); }); } // append to note_filter_information class jQuery('.note_filter_information').closest('.control-group').prepend(result.subform); // add the watcher rowWatcher(); // initialize the new form jQuery('div.subform-repeatable').subformRepeatable(); // update all the list fields to only show items not selected already propertyDynamicSet(); // set the field type info jQuery('#help').remove(); jQuery('.helpNote').append('<div id="help">'+result.description+'<br />'+result.values_description+'</div>'); // load the database properties if not set and defaults were found if (db && result.database){ // update datatype jQuery('#jform_datatype').val(result.database.datatype); jQuery('#jform_datatype').trigger("liszt:updated"); jQuery('#jform_datatype').trigger("change"); // be sure to remove from no required updateFieldRequired('datatype', 0); // update datalenght jQuery('#jform_datalenght').val(result.database.datalenght); jQuery('#jform_datalenght').trigger("liszt:updated"); jQuery('#jform_datalenght').trigger("change"); // be sure to remove from no required updateFieldRequired('datalenght', 0); // load the datalenght_other if needed if ('Other' === result.database.datalenght){ jQuery('#jform_datalenght_other').val(result.database.datalenght_other); // be sure to remove from no required updateFieldRequired('datalenght_other', 0); } // update datadefault jQuery('#jform_datadefault').val(result.database.datadefault); jQuery('#jform_datadefault').trigger("liszt:updated"); jQuery('#jform_datadefault').trigger("change"); // load the datadefault_other if needed if ('Other' === result.database.datadefault){ jQuery('#jform_datadefault_other').val(result.database.datadefault_other); // be sure to remove from no required updateFieldRequired('datadefault_other', 0); } // update indexes jQuery('#jform_indexes').val(result.database.indexes); jQuery('#jform_indexes').trigger("liszt:updated"); jQuery('#jform_indexes').trigger("change"); // be sure to remove from no required updateFieldRequired('indexes', 0); // update store jQuery('#jform_store').val(result.database.store); jQuery('#jform_store').trigger("liszt:updated"); jQuery('#jform_store').trigger("change"); // be sure to remove from no required updateFieldRequired('store', 0); } } }) } function getFieldPropertyDesc(field, targetForm){ // get the ID var id = jQuery(field).attr('id'); // build the target array var target = id.split('__'); // get property value var property = jQuery(field).val(); // first check that there isn't any of this property type already set if (propertyIsSet(property, id, targetForm)) { // reset the selection jQuery('#'+id).val(''); jQuery('#'+id).trigger("liszt:updated"); // give out a notice jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER'), timeout: 5000, status: 'warning', pos: 'top-center'}); // update the values jQuery('#'+target[0]+'__desc').val(''); jQuery('#'+target[0]+'__value').val(''); } else { // do a dynamic update propertyDynamicSet(); // get type value if (targetForm === 'properties') { var fieldtype = jQuery("#jform_fieldtype option:selected").val(); } else { var fieldtype = 'extra'; } getFieldPropertyDesc_server(fieldtype, property).done(function(result) { if(result.desc || result.value){ // update the values jQuery('#'+target[0]+'__desc').val(result.desc); jQuery('#'+target[0]+'__value').val(result.value); } else { // update the values jQuery('#'+target[0]+'__desc').val(Joomla.JText._('COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND')); jQuery('#'+target[0]+'__value').val(''); } }); } } // set properties the options propertiesArray = {}; var propertyIdRemoved; function propertyDynamicSet() { propertiesAvailable = {}; propertiesSelectedArray = {}; propertiesTrackerArray = {}; var i; for (i = 0; i < 70; i++) { // for now this is the number of field we should check // build ID var id_check = rowIdKey+'_'+rowIdKey+i+'__name'; // first check if Id is on page as that not the same as the one currently calling if (jQuery("#"+id_check).length && propertyIdRemoved !== id_check) { // build the selected array var key = jQuery("#"+id_check+" option:selected").val(); var text = jQuery("#"+id_check+" option:selected").text(); propertiesSelectedArray[key] = text; // keep track of the value set propertiesTrackerArray[id_check] = key; // clear the options out jQuery("#"+id_check).find('option').remove().end(); } } // trigger chosen on the list fields jQuery('.field_list_name_options').chosen({"disable_search_threshold":10,"search_contains":true,"allow_single_deselect":true,"placeholder_text_multiple":Joomla.JText._("COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS"),"placeholder_text_single":Joomla.JText._("COM_COMPONENTBUILDER_SELECT_A_PROPERTY"),"no_results_text":Joomla.JText._("COM_COMPONENTBUILDER_NO_RESULTS_MATCH")}); // now build the list to keep jQuery.each( propertiesArray, function( prop, name ) { if (!propertiesSelectedArray.hasOwnProperty(prop)) { propertiesAvailable[prop] = name; } }); // now add the lists back jQuery.each( propertiesTrackerArray, function( tId, tKey ) { if (jQuery('#'+tId).length) { jQuery('#'+tId).append('<option value="'+tKey+'">'+propertiesSelectedArray[tKey]+'</option>'); jQuery.each( propertiesAvailable, function( aKey, aValue ) { jQuery('#'+tId).append('<option value="'+aKey+'">'+aValue+'</option>'); }); jQuery('#'+tId).val(tKey); jQuery('#'+tId).trigger('liszt:updated'); } }); } function rowWatcher() { jQuery(document).on('subform-row-remove', function(event, row){ propertyIdRemoved = jQuery(row.innerHTML).find('.field_list_name_options').attr('id'); propertyDynamicSet(); }); jQuery(document).on('subform-row-add', function(event, row){ propertyDynamicSet(); }); } function propertyIsSet(prop, id, targetForm) { var i; for (i = 0; i < 70; i++) { // for now this is the number of field we should check // build ID var id_check = targetForm+'_'+targetForm+i+'__name'; // first check if Id is on page as that not the same as the one currently calling if (jQuery("#"+id_check).length && id_check != id) { // get the property value var tmp = jQuery("#"+id_check+" option:selected").val(); // now validate if (tmp === prop) { return true; } } } return false; } function getFieldPropertyDesc_server(fieldtype, property){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && (fieldtype > 0 || fieldtype.length > 0) && property.length > 0){ var request = token+'=1&fieldtype='+fieldtype+'&property='+property; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getValidationRulesTable(){ getCodeFrom_server(1,'type','type', 'getValidationRulesTable').done(function(result) { if(result){ jQuery('#display_validation_rules').html(result); } }); } function dbChecker(type){ if ('note' === type || 'spacer' === type) { // update the datatype selection jQuery('#jform_datatype').val('').trigger('liszt:updated').change(); jQuery('#jform_datalenght').val('').trigger('liszt:updated').change(); jQuery('#jform_datadefault').val('').trigger('liszt:updated').change(); jQuery('#jform_datadefault').val('').trigger('liszt:updated').change(); jQuery('#jform_indexes').val(0).trigger('liszt:updated').change(); jQuery('#jform_store').val(0).trigger('liszt:updated').change(); // remove the datatype jQuery('#jform_datatype-lbl').closest('.control-group').hide(); jQuery('#jform_datatype').closest('.control-group').hide(); updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); // remove the null selection jQuery('#jform_null_switch-lbl').closest('.control-group').hide(); jQuery('#jform_null_switch').closest('.control-group').hide(); updateFieldRequired('null_switch',1); jQuery('#jform_null_switch').removeAttr('required'); jQuery('#jform_null_switch').removeAttr('aria-required'); jQuery('#jform_null_switch').removeClass('required'); // show notice jQuery('.note_no_database_settings_needed').closest('.control-group').show(); jQuery('.note_database_settings_needed').closest('.control-group').hide(); } else { // add the datatype jQuery('#jform_datatype-lbl').closest('.control-group').show(); jQuery('#jform_datatype').closest('.control-group').show(); updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); // add the null selection jQuery('#jform_null_switch-lbl').closest('.control-group').show(); jQuery('#jform_null_switch').closest('.control-group').show(); updateFieldRequired('null_switch',0); jQuery('#jform_null_switch').prop('required','required'); jQuery('#jform_null_switch').attr('aria-required',true); jQuery('#jform_null_switch').addClass('required'); // remove notice jQuery('.note_no_database_settings_needed').closest('.control-group').hide(); jQuery('.note_database_settings_needed').closest('.control-group').show(); } } function getCodeFrom_server(id, type, type_name, callingName){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax." + callingName + "&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0 && type.length > 0) { var request = token + '=1&' + type_name + '=' + type + '&id=' + id; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getLinked(){ getCodeFrom_server(1, 'type', 'type', 'getLinked').done(function(result) { if(result){ jQuery('#display_linked_to').html(result); } }); } function addButton_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function addButton(type, where, size){ // just to insure that default behaviour still works size = typeof size !== 'undefined' ? size : 1; addButton_server(type, size).done(function(result) { if(result){ if (2 == size) { jQuery('#'+where).html(result); } else { addData(result, '#jform_'+where); } } }) } function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } fieldtype.js 0000644 00000065071 15116736750 0007113 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Some Global Values jform_vvvvwdkvxu_required = false; jform_vvvvwdmvxv_required = false; jform_vvvvwdovxw_required = false; jform_vvvvwdqvxx_required = false; jform_vvvvwdrvxy_required = false; jform_vvvvwdsvxz_required = false; jform_vvvvwdxvya_required = false; jform_vvvvwdxvyb_required = false; // Initial Script jQuery(document).ready(function() { var datalenght_vvvvwdk = jQuery("#jform_datalenght").val(); var has_defaults_vvvvwdk = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk); var datadefault_vvvvwdm = jQuery("#jform_datadefault").val(); var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm); var datatype_vvvvwdo = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo); var datatype_vvvvwdq = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdq = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq); var has_defaults_vvvvwdr = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var datatype_vvvvwdr = jQuery("#jform_datatype").val(); vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr); var datatype_vvvvwds = jQuery("#jform_datatype").val(); var has_defaults_vvvvwds = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds); var store_vvvvwdu = jQuery("#jform_store").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu); var datatype_vvvvwdv = jQuery("#jform_datatype").val(); var store_vvvvwdv = jQuery("#jform_store").val(); var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv); var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var store_vvvvwdw = jQuery("#jform_store").val(); var datatype_vvvvwdw = jQuery("#jform_datatype").val(); vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw); var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdx(has_defaults_vvvvwdx); }); // the vvvvwdk function function vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk) { if (isSet(datalenght_vvvvwdk) && datalenght_vvvvwdk.constructor !== Array) { var temp_vvvvwdk = datalenght_vvvvwdk; var datalenght_vvvvwdk = []; datalenght_vvvvwdk.push(temp_vvvvwdk); } else if (!isSet(datalenght_vvvvwdk)) { var datalenght_vvvvwdk = []; } var datalenght = datalenght_vvvvwdk.some(datalenght_vvvvwdk_SomeFunc); if (isSet(has_defaults_vvvvwdk) && has_defaults_vvvvwdk.constructor !== Array) { var temp_vvvvwdk = has_defaults_vvvvwdk; var has_defaults_vvvvwdk = []; has_defaults_vvvvwdk.push(temp_vvvvwdk); } else if (!isSet(has_defaults_vvvvwdk)) { var has_defaults_vvvvwdk = []; } var has_defaults = has_defaults_vvvvwdk.some(has_defaults_vvvvwdk_SomeFunc); // set this function logic if (datalenght && has_defaults) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field if (jform_vvvvwdkvxu_required) { updateFieldRequired('datalenght_other',0); jQuery('#jform_datalenght_other').prop('required','required'); jQuery('#jform_datalenght_other').attr('aria-required',true); jQuery('#jform_datalenght_other').addClass('required'); jform_vvvvwdkvxu_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field if (!jform_vvvvwdkvxu_required) { updateFieldRequired('datalenght_other',1); jQuery('#jform_datalenght_other').removeAttr('required'); jQuery('#jform_datalenght_other').removeAttr('aria-required'); jQuery('#jform_datalenght_other').removeClass('required'); jform_vvvvwdkvxu_required = true; } } } // the vvvvwdk Some function function datalenght_vvvvwdk_SomeFunc(datalenght_vvvvwdk) { // set the function logic if (datalenght_vvvvwdk == 'Other') { return true; } return false; } // the vvvvwdk Some function function has_defaults_vvvvwdk_SomeFunc(has_defaults_vvvvwdk) { // set the function logic if (has_defaults_vvvvwdk == 1) { return true; } return false; } // the vvvvwdm function function vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm) { if (isSet(datadefault_vvvvwdm) && datadefault_vvvvwdm.constructor !== Array) { var temp_vvvvwdm = datadefault_vvvvwdm; var datadefault_vvvvwdm = []; datadefault_vvvvwdm.push(temp_vvvvwdm); } else if (!isSet(datadefault_vvvvwdm)) { var datadefault_vvvvwdm = []; } var datadefault = datadefault_vvvvwdm.some(datadefault_vvvvwdm_SomeFunc); if (isSet(has_defaults_vvvvwdm) && has_defaults_vvvvwdm.constructor !== Array) { var temp_vvvvwdm = has_defaults_vvvvwdm; var has_defaults_vvvvwdm = []; has_defaults_vvvvwdm.push(temp_vvvvwdm); } else if (!isSet(has_defaults_vvvvwdm)) { var has_defaults_vvvvwdm = []; } var has_defaults = has_defaults_vvvvwdm.some(has_defaults_vvvvwdm_SomeFunc); // set this function logic if (datadefault && has_defaults) { jQuery('#jform_datadefault_other').closest('.control-group').show(); // add required attribute to datadefault_other field if (jform_vvvvwdmvxv_required) { updateFieldRequired('datadefault_other',0); jQuery('#jform_datadefault_other').prop('required','required'); jQuery('#jform_datadefault_other').attr('aria-required',true); jQuery('#jform_datadefault_other').addClass('required'); jform_vvvvwdmvxv_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); // remove required attribute from datadefault_other field if (!jform_vvvvwdmvxv_required) { updateFieldRequired('datadefault_other',1); jQuery('#jform_datadefault_other').removeAttr('required'); jQuery('#jform_datadefault_other').removeAttr('aria-required'); jQuery('#jform_datadefault_other').removeClass('required'); jform_vvvvwdmvxv_required = true; } } } // the vvvvwdm Some function function datadefault_vvvvwdm_SomeFunc(datadefault_vvvvwdm) { // set the function logic if (datadefault_vvvvwdm == 'Other') { return true; } return false; } // the vvvvwdm Some function function has_defaults_vvvvwdm_SomeFunc(has_defaults_vvvvwdm) { // set the function logic if (has_defaults_vvvvwdm == 1) { return true; } return false; } // the vvvvwdo function function vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo) { if (isSet(datatype_vvvvwdo) && datatype_vvvvwdo.constructor !== Array) { var temp_vvvvwdo = datatype_vvvvwdo; var datatype_vvvvwdo = []; datatype_vvvvwdo.push(temp_vvvvwdo); } else if (!isSet(datatype_vvvvwdo)) { var datatype_vvvvwdo = []; } var datatype = datatype_vvvvwdo.some(datatype_vvvvwdo_SomeFunc); if (isSet(has_defaults_vvvvwdo) && has_defaults_vvvvwdo.constructor !== Array) { var temp_vvvvwdo = has_defaults_vvvvwdo; var has_defaults_vvvvwdo = []; has_defaults_vvvvwdo.push(temp_vvvvwdo); } else if (!isSet(has_defaults_vvvvwdo)) { var has_defaults_vvvvwdo = []; } var has_defaults = has_defaults_vvvvwdo.some(has_defaults_vvvvwdo_SomeFunc); // set this function logic if (datatype && has_defaults) { jQuery('#jform_datalenght').closest('.control-group').show(); // add required attribute to datalenght field if (jform_vvvvwdovxw_required) { updateFieldRequired('datalenght',0); jQuery('#jform_datalenght').prop('required','required'); jQuery('#jform_datalenght').attr('aria-required',true); jQuery('#jform_datalenght').addClass('required'); jform_vvvvwdovxw_required = false; } } else { jQuery('#jform_datalenght').closest('.control-group').hide(); // remove required attribute from datalenght field if (!jform_vvvvwdovxw_required) { updateFieldRequired('datalenght',1); jQuery('#jform_datalenght').removeAttr('required'); jQuery('#jform_datalenght').removeAttr('aria-required'); jQuery('#jform_datalenght').removeClass('required'); jform_vvvvwdovxw_required = true; } } } // the vvvvwdo Some function function datatype_vvvvwdo_SomeFunc(datatype_vvvvwdo) { // set the function logic if (datatype_vvvvwdo == 'CHAR' || datatype_vvvvwdo == 'VARCHAR' || datatype_vvvvwdo == 'INT' || datatype_vvvvwdo == 'TINYINT' || datatype_vvvvwdo == 'BIGINT' || datatype_vvvvwdo == 'FLOAT' || datatype_vvvvwdo == 'DECIMAL' || datatype_vvvvwdo == 'DOUBLE') { return true; } return false; } // the vvvvwdo Some function function has_defaults_vvvvwdo_SomeFunc(has_defaults_vvvvwdo) { // set the function logic if (has_defaults_vvvvwdo == 1) { return true; } return false; } // the vvvvwdq function function vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq) { if (isSet(datatype_vvvvwdq) && datatype_vvvvwdq.constructor !== Array) { var temp_vvvvwdq = datatype_vvvvwdq; var datatype_vvvvwdq = []; datatype_vvvvwdq.push(temp_vvvvwdq); } else if (!isSet(datatype_vvvvwdq)) { var datatype_vvvvwdq = []; } var datatype = datatype_vvvvwdq.some(datatype_vvvvwdq_SomeFunc); if (isSet(has_defaults_vvvvwdq) && has_defaults_vvvvwdq.constructor !== Array) { var temp_vvvvwdq = has_defaults_vvvvwdq; var has_defaults_vvvvwdq = []; has_defaults_vvvvwdq.push(temp_vvvvwdq); } else if (!isSet(has_defaults_vvvvwdq)) { var has_defaults_vvvvwdq = []; } var has_defaults = has_defaults_vvvvwdq.some(has_defaults_vvvvwdq_SomeFunc); // set this function logic if (datatype && has_defaults) { jQuery('#jform_datadefault').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field if (jform_vvvvwdqvxx_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); jform_vvvvwdqvxx_required = false; } } else { jQuery('#jform_datadefault').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field if (!jform_vvvvwdqvxx_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); jform_vvvvwdqvxx_required = true; } } } // the vvvvwdq Some function function datatype_vvvvwdq_SomeFunc(datatype_vvvvwdq) { // set the function logic if (datatype_vvvvwdq == 'CHAR' || datatype_vvvvwdq == 'VARCHAR' || datatype_vvvvwdq == 'DATETIME' || datatype_vvvvwdq == 'DATE' || datatype_vvvvwdq == 'TIME' || datatype_vvvvwdq == 'INT' || datatype_vvvvwdq == 'TINYINT' || datatype_vvvvwdq == 'BIGINT' || datatype_vvvvwdq == 'FLOAT' || datatype_vvvvwdq == 'DECIMAL' || datatype_vvvvwdq == 'DOUBLE') { return true; } return false; } // the vvvvwdq Some function function has_defaults_vvvvwdq_SomeFunc(has_defaults_vvvvwdq) { // set the function logic if (has_defaults_vvvvwdq == 1) { return true; } return false; } // the vvvvwdr function function vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr) { if (isSet(has_defaults_vvvvwdr) && has_defaults_vvvvwdr.constructor !== Array) { var temp_vvvvwdr = has_defaults_vvvvwdr; var has_defaults_vvvvwdr = []; has_defaults_vvvvwdr.push(temp_vvvvwdr); } else if (!isSet(has_defaults_vvvvwdr)) { var has_defaults_vvvvwdr = []; } var has_defaults = has_defaults_vvvvwdr.some(has_defaults_vvvvwdr_SomeFunc); if (isSet(datatype_vvvvwdr) && datatype_vvvvwdr.constructor !== Array) { var temp_vvvvwdr = datatype_vvvvwdr; var datatype_vvvvwdr = []; datatype_vvvvwdr.push(temp_vvvvwdr); } else if (!isSet(datatype_vvvvwdr)) { var datatype_vvvvwdr = []; } var datatype = datatype_vvvvwdr.some(datatype_vvvvwdr_SomeFunc); // set this function logic if (has_defaults && datatype) { jQuery('#jform_datadefault').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field if (jform_vvvvwdrvxy_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); jform_vvvvwdrvxy_required = false; } } else { jQuery('#jform_datadefault').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field if (!jform_vvvvwdrvxy_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); jform_vvvvwdrvxy_required = true; } } } // the vvvvwdr Some function function has_defaults_vvvvwdr_SomeFunc(has_defaults_vvvvwdr) { // set the function logic if (has_defaults_vvvvwdr == 1) { return true; } return false; } // the vvvvwdr Some function function datatype_vvvvwdr_SomeFunc(datatype_vvvvwdr) { // set the function logic if (datatype_vvvvwdr == 'CHAR' || datatype_vvvvwdr == 'VARCHAR' || datatype_vvvvwdr == 'DATETIME' || datatype_vvvvwdr == 'DATE' || datatype_vvvvwdr == 'TIME' || datatype_vvvvwdr == 'INT' || datatype_vvvvwdr == 'TINYINT' || datatype_vvvvwdr == 'BIGINT' || datatype_vvvvwdr == 'FLOAT' || datatype_vvvvwdr == 'DECIMAL' || datatype_vvvvwdr == 'DOUBLE') { return true; } return false; } // the vvvvwds function function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds) { if (isSet(datatype_vvvvwds) && datatype_vvvvwds.constructor !== Array) { var temp_vvvvwds = datatype_vvvvwds; var datatype_vvvvwds = []; datatype_vvvvwds.push(temp_vvvvwds); } else if (!isSet(datatype_vvvvwds)) { var datatype_vvvvwds = []; } var datatype = datatype_vvvvwds.some(datatype_vvvvwds_SomeFunc); if (isSet(has_defaults_vvvvwds) && has_defaults_vvvvwds.constructor !== Array) { var temp_vvvvwds = has_defaults_vvvvwds; var has_defaults_vvvvwds = []; has_defaults_vvvvwds.push(temp_vvvvwds); } else if (!isSet(has_defaults_vvvvwds)) { var has_defaults_vvvvwds = []; } var has_defaults = has_defaults_vvvvwds.some(has_defaults_vvvvwds_SomeFunc); // set this function logic if (datatype && has_defaults) { jQuery('#jform_store').closest('.control-group').show(); // add required attribute to store field if (jform_vvvvwdsvxz_required) { updateFieldRequired('store',0); jQuery('#jform_store').prop('required','required'); jQuery('#jform_store').attr('aria-required',true); jQuery('#jform_store').addClass('required'); jform_vvvvwdsvxz_required = false; } } else { jQuery('#jform_store').closest('.control-group').hide(); // remove required attribute from store field if (!jform_vvvvwdsvxz_required) { updateFieldRequired('store',1); jQuery('#jform_store').removeAttr('required'); jQuery('#jform_store').removeAttr('aria-required'); jQuery('#jform_store').removeClass('required'); jform_vvvvwdsvxz_required = true; } } } // the vvvvwds Some function function datatype_vvvvwds_SomeFunc(datatype_vvvvwds) { // set the function logic if (datatype_vvvvwds == 'CHAR' || datatype_vvvvwds == 'VARCHAR' || datatype_vvvvwds == 'TEXT' || datatype_vvvvwds == 'MEDIUMTEXT' || datatype_vvvvwds == 'LONGTEXT' || datatype_vvvvwds == 'BLOB' || datatype_vvvvwds == 'TINYBLOB' || datatype_vvvvwds == 'MEDIUMBLOB' || datatype_vvvvwds == 'LONGBLOB') { return true; } return false; } // the vvvvwds Some function function has_defaults_vvvvwds_SomeFunc(has_defaults_vvvvwds) { // set the function logic if (has_defaults_vvvvwds == 1) { return true; } return false; } // the vvvvwdu function function vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu) { if (isSet(store_vvvvwdu) && store_vvvvwdu.constructor !== Array) { var temp_vvvvwdu = store_vvvvwdu; var store_vvvvwdu = []; store_vvvvwdu.push(temp_vvvvwdu); } else if (!isSet(store_vvvvwdu)) { var store_vvvvwdu = []; } var store = store_vvvvwdu.some(store_vvvvwdu_SomeFunc); if (isSet(datatype_vvvvwdu) && datatype_vvvvwdu.constructor !== Array) { var temp_vvvvwdu = datatype_vvvvwdu; var datatype_vvvvwdu = []; datatype_vvvvwdu.push(temp_vvvvwdu); } else if (!isSet(datatype_vvvvwdu)) { var datatype_vvvvwdu = []; } var datatype = datatype_vvvvwdu.some(datatype_vvvvwdu_SomeFunc); if (isSet(has_defaults_vvvvwdu) && has_defaults_vvvvwdu.constructor !== Array) { var temp_vvvvwdu = has_defaults_vvvvwdu; var has_defaults_vvvvwdu = []; has_defaults_vvvvwdu.push(temp_vvvvwdu); } else if (!isSet(has_defaults_vvvvwdu)) { var has_defaults_vvvvwdu = []; } var has_defaults = has_defaults_vvvvwdu.some(has_defaults_vvvvwdu_SomeFunc); // set this function logic if (store && datatype && has_defaults) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } else { jQuery('.note_whmcs_encryption').closest('.control-group').hide(); } } // the vvvvwdu Some function function store_vvvvwdu_SomeFunc(store_vvvvwdu) { // set the function logic if (store_vvvvwdu == 4) { return true; } return false; } // the vvvvwdu Some function function datatype_vvvvwdu_SomeFunc(datatype_vvvvwdu) { // set the function logic if (datatype_vvvvwdu == 'CHAR' || datatype_vvvvwdu == 'VARCHAR' || datatype_vvvvwdu == 'TEXT' || datatype_vvvvwdu == 'MEDIUMTEXT' || datatype_vvvvwdu == 'LONGTEXT' || datatype_vvvvwdu == 'BLOB' || datatype_vvvvwdu == 'TINYBLOB' || datatype_vvvvwdu == 'MEDIUMBLOB' || datatype_vvvvwdu == 'LONGBLOB') { return true; } return false; } // the vvvvwdu Some function function has_defaults_vvvvwdu_SomeFunc(has_defaults_vvvvwdu) { // set the function logic if (has_defaults_vvvvwdu == 1) { return true; } return false; } // the vvvvwdv function function vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv) { if (isSet(datatype_vvvvwdv) && datatype_vvvvwdv.constructor !== Array) { var temp_vvvvwdv = datatype_vvvvwdv; var datatype_vvvvwdv = []; datatype_vvvvwdv.push(temp_vvvvwdv); } else if (!isSet(datatype_vvvvwdv)) { var datatype_vvvvwdv = []; } var datatype = datatype_vvvvwdv.some(datatype_vvvvwdv_SomeFunc); if (isSet(store_vvvvwdv) && store_vvvvwdv.constructor !== Array) { var temp_vvvvwdv = store_vvvvwdv; var store_vvvvwdv = []; store_vvvvwdv.push(temp_vvvvwdv); } else if (!isSet(store_vvvvwdv)) { var store_vvvvwdv = []; } var store = store_vvvvwdv.some(store_vvvvwdv_SomeFunc); if (isSet(has_defaults_vvvvwdv) && has_defaults_vvvvwdv.constructor !== Array) { var temp_vvvvwdv = has_defaults_vvvvwdv; var has_defaults_vvvvwdv = []; has_defaults_vvvvwdv.push(temp_vvvvwdv); } else if (!isSet(has_defaults_vvvvwdv)) { var has_defaults_vvvvwdv = []; } var has_defaults = has_defaults_vvvvwdv.some(has_defaults_vvvvwdv_SomeFunc); // set this function logic if (datatype && store && has_defaults) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } else { jQuery('.note_whmcs_encryption').closest('.control-group').hide(); } } // the vvvvwdv Some function function datatype_vvvvwdv_SomeFunc(datatype_vvvvwdv) { // set the function logic if (datatype_vvvvwdv == 'CHAR' || datatype_vvvvwdv == 'VARCHAR' || datatype_vvvvwdv == 'TEXT' || datatype_vvvvwdv == 'MEDIUMTEXT' || datatype_vvvvwdv == 'LONGTEXT' || datatype_vvvvwdv == 'BLOB' || datatype_vvvvwdv == 'TINYBLOB' || datatype_vvvvwdv == 'MEDIUMBLOB' || datatype_vvvvwdv == 'LONGBLOB') { return true; } return false; } // the vvvvwdv Some function function store_vvvvwdv_SomeFunc(store_vvvvwdv) { // set the function logic if (store_vvvvwdv == 4) { return true; } return false; } // the vvvvwdv Some function function has_defaults_vvvvwdv_SomeFunc(has_defaults_vvvvwdv) { // set the function logic if (has_defaults_vvvvwdv == 1) { return true; } return false; } // the vvvvwdw function function vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw) { if (isSet(has_defaults_vvvvwdw) && has_defaults_vvvvwdw.constructor !== Array) { var temp_vvvvwdw = has_defaults_vvvvwdw; var has_defaults_vvvvwdw = []; has_defaults_vvvvwdw.push(temp_vvvvwdw); } else if (!isSet(has_defaults_vvvvwdw)) { var has_defaults_vvvvwdw = []; } var has_defaults = has_defaults_vvvvwdw.some(has_defaults_vvvvwdw_SomeFunc); if (isSet(store_vvvvwdw) && store_vvvvwdw.constructor !== Array) { var temp_vvvvwdw = store_vvvvwdw; var store_vvvvwdw = []; store_vvvvwdw.push(temp_vvvvwdw); } else if (!isSet(store_vvvvwdw)) { var store_vvvvwdw = []; } var store = store_vvvvwdw.some(store_vvvvwdw_SomeFunc); if (isSet(datatype_vvvvwdw) && datatype_vvvvwdw.constructor !== Array) { var temp_vvvvwdw = datatype_vvvvwdw; var datatype_vvvvwdw = []; datatype_vvvvwdw.push(temp_vvvvwdw); } else if (!isSet(datatype_vvvvwdw)) { var datatype_vvvvwdw = []; } var datatype = datatype_vvvvwdw.some(datatype_vvvvwdw_SomeFunc); // set this function logic if (has_defaults && store && datatype) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } else { jQuery('.note_whmcs_encryption').closest('.control-group').hide(); } } // the vvvvwdw Some function function has_defaults_vvvvwdw_SomeFunc(has_defaults_vvvvwdw) { // set the function logic if (has_defaults_vvvvwdw == 1) { return true; } return false; } // the vvvvwdw Some function function store_vvvvwdw_SomeFunc(store_vvvvwdw) { // set the function logic if (store_vvvvwdw == 4) { return true; } return false; } // the vvvvwdw Some function function datatype_vvvvwdw_SomeFunc(datatype_vvvvwdw) { // set the function logic if (datatype_vvvvwdw == 'CHAR' || datatype_vvvvwdw == 'VARCHAR' || datatype_vvvvwdw == 'TEXT' || datatype_vvvvwdw == 'MEDIUMTEXT' || datatype_vvvvwdw == 'LONGTEXT' || datatype_vvvvwdw == 'BLOB' || datatype_vvvvwdw == 'TINYBLOB' || datatype_vvvvwdw == 'MEDIUMBLOB' || datatype_vvvvwdw == 'LONGBLOB') { return true; } return false; } // the vvvvwdx function function vvvvwdx(has_defaults_vvvvwdx) { // set the function logic if (has_defaults_vvvvwdx == 1) { jQuery('#jform_datatype').closest('.control-group').show(); // add required attribute to datatype field if (jform_vvvvwdxvya_required) { updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); jform_vvvvwdxvya_required = false; } jQuery('#jform_null_switch').closest('.control-group').show(); // add required attribute to null_switch field if (jform_vvvvwdxvyb_required) { updateFieldRequired('null_switch',0); jQuery('#jform_null_switch').prop('required','required'); jQuery('#jform_null_switch').attr('aria-required',true); jQuery('#jform_null_switch').addClass('required'); jform_vvvvwdxvyb_required = false; } } else { jQuery('#jform_datatype').closest('.control-group').hide(); // remove required attribute from datatype field if (!jform_vvvvwdxvya_required) { updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); jform_vvvvwdxvya_required = true; } jQuery('#jform_null_switch').closest('.control-group').hide(); // remove required attribute from null_switch field if (!jform_vvvvwdxvyb_required) { updateFieldRequired('null_switch',1); jQuery('#jform_null_switch').removeAttr('required'); jQuery('#jform_null_switch').removeAttr('aria-required'); jQuery('#jform_null_switch').removeClass('required'); jform_vvvvwdxvyb_required = true; } } } // update fields required function updateFieldRequired(name, status) { // check if not_required exist if (jQuery('#jform_not_required').length > 0) { var not_required = jQuery('#jform_not_required').val().split(","); if(status == 1) { not_required.push(name); } else { not_required = removeFieldFromNotRequired(not_required, name); } jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); } } // remove field from not_required function removeFieldFromNotRequired(array, what) { return array.filter(function(element){ return element !== what; }); } // fix not required array function fixNotRequiredArray(array) { var seen = {}; return removeEmptyFromNotRequiredArray(array).filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } // remove empty from not_required array function removeEmptyFromNotRequiredArray(array) { return array.filter(function (el) { // remove ( 一_一) as well - lol return (el.length > 0 && '一_一' !== el); }); } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } jQuery(document).ready(function($) { // check and load all the custom code edit buttons getEditCustomCodeButtons(); }); function getEditCustomCodeButtons_server(id){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', url: getUrl, dataType: 'json', data: request, jsonp: false }); } function getEditCustomCodeButtons(){ // get the id id = jQuery("#jform_id").val(); getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); }); } }) } // check object is not empty function isObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return true; } } return false; } help_document.js 0000644 00000020521 15116736750 0007743 0 ustar 00 /** * @package Joomla.Component.Builder * * @created 30th April, 2015 * @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com> * @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder> * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Some Global Values jform_vvvvweivyn_required = false; jform_vvvvwejvyo_required = false; jform_vvvvwekvyp_required = false; jform_vvvvwelvyq_required = false; jform_vvvvwenvyr_required = false; // Initial Script jQuery(document).ready(function() { var location_vvvvwei = jQuery("#jform_location input[type='radio']:checked").val(); vvvvwei(location_vvvvwei); var location_vvvvwej = jQuery("#jform_location input[type='radio']:checked").val(); vvvvwej(location_vvvvwej); var type_vvvvwek = jQuery("#jform_type").val(); vvvvwek(type_vvvvwek); var type_vvvvwel = jQuery("#jform_type").val(); vvvvwel(type_vvvvwel); var type_vvvvwem = jQuery("#jform_type").val(); vvvvwem(type_vvvvwem); var target_vvvvwen = jQuery("#jform_target input[type='radio']:checked").val(); vvvvwen(target_vvvvwen); }); // the vvvvwei function function vvvvwei(location_vvvvwei) { // set the function logic if (location_vvvvwei == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); // add required attribute to admin_view field if (jform_vvvvweivyn_required) { updateFieldRequired('admin_view',0); jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').addClass('required'); jform_vvvvweivyn_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); // remove required attribute from admin_view field if (!jform_vvvvweivyn_required) { updateFieldRequired('admin_view',1); jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeClass('required'); jform_vvvvweivyn_required = true; } } } // the vvvvwej function function vvvvwej(location_vvvvwej) { // set the function logic if (location_vvvvwej == 2) { jQuery('#jform_site_view').closest('.control-group').show(); // add required attribute to site_view field if (jform_vvvvwejvyo_required) { updateFieldRequired('site_view',0); jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').addClass('required'); jform_vvvvwejvyo_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); // remove required attribute from site_view field if (!jform_vvvvwejvyo_required) { updateFieldRequired('site_view',1); jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('aria-required'); jQuery('#jform_site_view').removeClass('required'); jform_vvvvwejvyo_required = true; } } } // the vvvvwek function function vvvvwek(type_vvvvwek) { if (isSet(type_vvvvwek) && type_vvvvwek.constructor !== Array) { var temp_vvvvwek = type_vvvvwek; var type_vvvvwek = []; type_vvvvwek.push(temp_vvvvwek); } else if (!isSet(type_vvvvwek)) { var type_vvvvwek = []; } var type = type_vvvvwek.some(type_vvvvwek_SomeFunc); // set this function logic if (type) { jQuery('#jform_url').closest('.control-group').show(); // add required attribute to url field if (jform_vvvvwekvyp_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); jform_vvvvwekvyp_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); // remove required attribute from url field if (!jform_vvvvwekvyp_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); jform_vvvvwekvyp_required = true; } } } // the vvvvwek Some function function type_vvvvwek_SomeFunc(type_vvvvwek) { // set the function logic if (type_vvvvwek == 3) { return true; } return false; } // the vvvvwel function function vvvvwel(type_vvvvwel) { if (isSet(type_vvvvwel) && type_vvvvwel.constructor !== Array) { var temp_vvvvwel = type_vvvvwel; var type_vvvvwel = []; type_vvvvwel.push(temp_vvvvwel); } else if (!isSet(type_vvvvwel)) { var type_vvvvwel = []; } var type = type_vvvvwel.some(type_vvvvwel_SomeFunc); // set this function logic if (type) { jQuery('#jform_article').closest('.control-group').show(); // add required attribute to article field if (jform_vvvvwelvyq_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); jform_vvvvwelvyq_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); // remove required attribute from article field if (!jform_vvvvwelvyq_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); jform_vvvvwelvyq_required = true; } } } // the vvvvwel Some function function type_vvvvwel_SomeFunc(type_vvvvwel) { // set the function logic if (type_vvvvwel == 1) { return true; } return false; } // the vvvvwem function function vvvvwem(type_vvvvwem) { if (isSet(type_vvvvwem) && type_vvvvwem.constructor !== Array) { var temp_vvvvwem = type_vvvvwem; var type_vvvvwem = []; type_vvvvwem.push(temp_vvvvwem); } else if (!isSet(type_vvvvwem)) { var type_vvvvwem = []; } var type = type_vvvvwem.some(type_vvvvwem_SomeFunc); // set this function logic if (type) { jQuery('#jform_content-lbl').closest('.control-group').show(); } else { jQuery('#jform_content-lbl').closest('.control-group').hide(); } } // the vvvvwem Some function function type_vvvvwem_SomeFunc(type_vvvvwem) { // set the function logic if (type_vvvvwem == 2) { return true; } return false; } // the vvvvwen function function vvvvwen(target_vvvvwen) { // set the function logic if (target_vvvvwen == 1) { jQuery('#jform_groups').closest('.control-group').show(); // add required attribute to groups field if (jform_vvvvwenvyr_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); jform_vvvvwenvyr_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); // remove required attribute from groups field if (!jform_vvvvwenvyr_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); jform_vvvvwenvyr_required = true; } } } // update fields required function updateFieldRequired(name, status) { // check if not_required exist if (jQuery('#jform_not_required').length > 0) { var not_required = jQuery('#jform_not_required').val().split(","); if(status == 1) { not_required.push(name); } else { not_required = removeFieldFromNotRequired(not_required, name); } jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); } } // remove field from not_required function removeFieldFromNotRequired(array, what) { return array.filter(function(element){ return element !== what; }); } // fix not required array function fixNotRequiredArray(array) { var seen = {}; return removeEmptyFromNotRequiredArray(array).filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } // remove empty from not_required array function removeEmptyFromNotRequiredArray(array) { return array.filter(function (el) { // remove ( 一_一) as well - lol return (el.length > 0 && '一_一' !== el); }); } // the isSet function function isSet(val) { if ((val != undefined) && (val != null) && 0 !== val.length){ return true; } return false; } index.html 0000644 00000000054 15116736750 0006553 0 ustar 00 <html><body bgcolor="#FFFFFF"></body></html>