PageSourceSearch

https://knightbenedikt.com.au/webstore/js/jquery.dform-1.1.0.min.js

js knightbenedikt.com.au collected 2026-10-08 12:13:23 UTC 9,319 bytes, 1 lines download raw bytes

1($=>{function addToObject(obj){function result(data,fn,condition){"object"==typeof data?$.each(data,function(name,val){result(name,val,condition)}):void 0!==condition&&!0!==condition||(obj[data]||(obj[data]=[]),obj[data].push(fn))}return result}var _subscriptions={},_types={},each=$.each,isArray=$.isArray;$.extend($,{keyset:function(object){return $.map(object,function(val,key){return key})},withKeys:function(object,keys){var result={};return each(keys,function(index,value){object[value]&&(result[value]=object[value])}),result},withoutKeys:function(object,keys){var result={};return each(object,function(index,value){~$.inArray(index,keys)||(result[index]=value)}),result},dform:{options:{prefix:"ui-dform-"},defaultType:function(options){return $("<"+options.type+">").dform("attr",options)},types:function(name){return name?_types[name]:_types},addType:addToObject(_types),subscribers:function(name){return name?_subscriptions[name]:_subscriptions},subscribe:addToObject(_subscriptions),hasSubscription:function(name){return!!_subscriptions[name]},createElement:function(options){var type,element,opts;if(options.type)return type=options.type,element=null,opts=$.withoutKeys(options,["type"]),_types[type]?each(_types[type],function(i,sfn){element=sfn.call(element,opts)}):element=$.dform.defaultType(options),$(element);throw"No element type given! Must always exist."},methods:{run:function(name,options,type){return"string"!=typeof name?function(options){var type=options.type,self=this;return this.dform("run","[pre]",options,type),each(options,function(name,sopts){self.dform("run",name,sopts,type)}),this.dform("run","[post]",options,type),this}.call(this,name):function(name,options,type){return $.dform.hasSubscription(name)&&this.each(function(){var element=$(this);each(_subscriptions[name],function(i,sfn){sfn.call(element,options,type)})}),this}.call(this,name,options,type)},append:function(options,converter){converter&&$.dform.converters&&$.isFunction($.dform.converters[converter])&&(options=$.dform.converters[converter](options));converter=$.dform.createElement(options);this.append(converter),converter.dform("run",options)},attr:function(object,excludes){var ignores=$.keyset(_subscriptions);isArray(excludes)&&$.merge(ignores,excludes),this.attr($.withoutKeys(object,ignores))},ajax:function(params,success,error){var error={error:error,url:params},self=this;"string"!=typeof params&&$.extend(error,params),error.success=function(data){var callback=success||params.success;self.dform(data),callback&&callback.call(self,data)},$.ajax(error)},init:function(options,converter){options=options.type?options:$.extend({type:"form"},options);converter&&$.dform.converters&&$.isFunction($.dform.converters[converter])&&(options=$.dform.converters[converter](options)),this.is(options.type)?(this.dform("attr",options),this.dform("run",options)):this.dform("append",options)}}}}),$.fn.dform=function(options,converter,error){var self=$(this);return $.dform.methods[options]?$.dform.methods[options].apply(self,Array.prototype.slice.call(arguments,1)):"string"==typeof options?$.dform.methods.ajax.call(self,{url:options,dataType:"json"},converter,error):$.dform.methods.init.apply(self,arguments),this}})(jQuery),($=>{function _element(tag,excludes){return function(ops){return $(tag).dform("attr",ops,excludes)}}function _html(options,type){var self=this;$.isPlainObject(options)?self.dform("append",options):$.isArray(options)?each(options,function(index,nested){self.dform("append",nested)}):self.html(options)}var each=$.each;$.dform.addType({container:_element("<div>"),text:_element('<input type="text" />'),password:_element('<input type="password" />'),submit:_element('<input type="submit" />'),reset:_element('<input type="reset" />'),hidden:_element('<input type="hidden" />'),radio:_element('<input type="radio" />'),checkbox:_element('<input type="checkbox" />'),file:_element('<input type="file" />'),number:_element('<input type="number" />'),url:_element('<input type="url" />'),tel:_element('<input type="tel" />'),email:_element('<input type="email" />'),checkboxes:_element("<div>",["name"]),radiobuttons:_element("<div>",["name"])}),$.dform.subscribe({class:function(options,type){this.addClass(options)},html:_html,elements:_html,value:function(options){this.val(options)},css:function(options){this.css(options)},options:function(options,type){var self=this;"select"!==type&&"optgroup"!==type||"string"==typeof options?"checkboxes"!==type&&"radiobuttons"!==type||each(options,function(value,content){var boxoptions="radiobuttons"===type?{type:"radio"}:{type:"checkbox"};"string"==typeof content?boxoptions.caption=content:$.extend(boxoptions,content),boxoptions.value=value,self.dform("append",boxoptions)}):each(options,function(value,content){value={type:"option",value:value};"string"==typeof content&&(value.html=content),"object"==typeof content&&(value=$.extend(value,content)),self.dform("append",value)})},caption:function(options,type){var ops={};"string"==typeof options?ops.html=options:$.extend(ops,options),"fieldset"==type?(ops.type="legend",this.dform("append",ops)):(ops.type="label",this.attr("id")&&(ops.for=this.attr("id")),options=$($.dform.createElement(ops)),"checkbox"===type||"radio"===type?this.parent().append($(options)):options.insertBefore(this),options.dform("run",ops))},type:function(options,type){$.dform.options.prefix&&this.addClass($.dform.options.prefix+type)}
1,url:function(options){this.dform("ajax",options)},"[post]":function(options,type){"checkboxes"!==type&&"radiobuttons"!==type||this.children("[type="+("checkboxes"===type?"checkbox":"radio")+"]").each(function(){$(this).attr("name",options.name)})}})})(jQuery),($=>{function _getOptions(type,options){return $.withKeys(options,$.keyset($.ui[type].prototype.options))}function _get(keys,obj){for(var item=obj,i=0;i<keys.length;i++)if(!(item=item[keys[i]]))return null;return item}$.dform.addType("progressbar",function(options){return $("<div>").dform("attr",options).progressbar(_getOptions("progressbar",options))},$.isFunction($.fn.progressbar)),$.dform.addType("slider",function(options){return $("<div>").dform("attr",options).slider(_getOptions("slider",options))},$.isFunction($.fn.slider)),$.dform.addType("accordion",function(options){return $("<div>").dform("attr",options)},$.isFunction($.fn.accordion)),$.dform.addType("tabs",function(options){return $("<div>").dform("attr",options)},$.isFunction($.fn.tabs)),$.dform.subscribe("entries",function(options,type){var scoper;"accordion"==type&&(scoper=this,$.each(options,function(index,options){var el=$.extend({type:"div"},options);
1$(scoper).dform("append",el),options.caption&&(el=$(scoper).children("div:last").prev()).replaceWith('<h3><a href="#">'+el.html()+"</a></h3>")}))},$.isFunction($.fn.accordion)),$.dform.subscribe("entries",function(options,type){var scoper,ul;"tabs"==type&&((scoper=this).append("<ul>"),ul=$(scoper).children("ul:first"),$.each(options,function(index,options){index=options.id||index,$.extend(options,{type:"container",id:index}),$(scoper).dform("append",options),options=$(scoper).children("div:last").prev();$(options).wrapInner($("<a>").attr("href","#"+index)),$(ul).append($("<li>").wrapInner(options))}))},$.isFunction($.fn.tabs)),$.dform.subscribe("dialog",function(options){this.dialog(options)},$.isFunction($.fn.dialog)),$.dform.subscribe("resizable",function(options){this.resizable(options)},$.isFunction($.fn.resizable)),$.dform.subscribe("datepicker",function(options,type){"text"==type&&this.datepicker(options)},$.isFunction($.fn.datepicker)),$.dform.subscribe("autocomplete",function(options,type){"text"==type&&this.autocomplete(options)},$.isFunction($.fn.autocomplete)),$.dform.subscribe("[post]",function(options,type){this.parents("form").hasClass("ui-widget")&&("button"!==type&&"submit"!==type||!$.isFunction($.fn.button)||this.button(),~$.inArray(type,["text","textarea","password","fieldset"]))&&this.addClass("ui-widget-content ui-corner-all"),"accordion"!==type&&"tabs"!==type||this[type](_getOptions(type,options))}),$.dform.subscribe("[pre]",function(options,type){"form"==type&&(type={},this.hasClass("ui-widget")&&(type={highlight:function(input){$(input).addClass("ui-state-highlight")},unhighlight:function(input){$(input).removeClass("ui-state-highlight")}}),"object"==typeof options.validate&&$.extend(type,options.validate),this.validate(type))},$.isFunction($.fn.validate)),$.dform.subscribe("validate",function(options,type){"form"!=type&&this.rules("add",options)},$.isFunction($.fn.validate)),$.dform.subscribe("ajax",function(options,type){"form"===type&&this.ajaxForm(options)},$.isFunction($.fn.ajaxForm)),$.dform.subscribe("html",function(options,type){var translated;"string"==typeof options&&(options=options.split("."),translated=Globalize.localize(options.shift()),translated=_get(options,translated))&&$(this).html(translated)},"undefined"!=typeof Globalize&&$.isFunction(Globalize.localize)),$.dform.subscribe("options",function(options,type){var optlist;"select"===type&&"string"==typeof options&&($(this).html(""),options=options.split("."),optlist=Globalize.localize(options.shift()),optlist=_get(options,optlist))&&$(this).dform("run","options",optlist,type)},"undefined"!=typeof Globalize&&$.isFunction(Globalize.localize))})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.