diff -r 033898178630 -r 37f1a08315f3 www/jqwidgets/jqxtagcloud.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/jqxtagcloud.js Sun Aug 05 11:32:13 2018 +0200 @@ -0,0 +1,9 @@ +/* +jQWidgets v6.0.5 (2018-July) +Copyright (c) 2011-2018 jQWidgets. +License: https://jqwidgets.com/license/ +*/ +/* eslint-disable */ + +(function(a){a.jqx.jqxWidget("jqxTagCloud","",{});a.extend(a.jqx._jqxTagCloud.prototype,{defineInstance:function(){var b={width:null,height:null,source:null,disabled:false,rtl:false,valueMember:"value",displayMember:"label",urlMember:"url",urlBase:"",autoBind:true,takeTopWeightedItems:false,displayLimit:null,minValueToDisplay:0,maxValueToDisplay:0,minFontSize:10,maxFontSize:24,fontSizeUnit:"px",displayValue:false,sortBy:"none",alterTextCase:"none",sortOrder:"ascending",textColor:null,minColor:null,maxColor:null,tagRenderer:null};if(this===a.jqx._jqxTagCloud.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){var b=this;b.render();b.dataBind(b.source,true)},dataBind:function(b,c){var h=this;h.records=[];var e=b._source?true:false;var i;if(e){i=b;b=b._source}else{b.datafields=[{name:h.displayMember},{name:h.valueMember},{name:h.urlMember}];i=new a.jqx.dataAdapter(b,{autoBind:true})}var j=function(){if(b.type!==undefined){i._options.type=b.type}if(b.formatdata!==undefined){i._options.formatData=b.formatdata}if(b.contenttype!==undefined){i._options.contentType=b.contenttype}if(b.async!==undefined){i._options.async=b.async}};var f=function(k){k._setSourceData(i);k._raiseEvent(1,{records:k.records});k._renderTags()};j(this);switch(b.datatype){case"local":case"array":default:if(b.localdata!=null||a.isArray(b)){i.unbindBindingUpdate(h.element.id);if(h.autoBind||(!h.autoBind&&!c)){i.dataBind()}f(h);i.bindBindingUpdate(h.element.id,function(k){f(h,k)})}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":case"csv":case"tab":if(b.localdata!=null){i.unbindBindingUpdate(h.element.id);if(h.autoBind||(!h.autoBind&&!c)){i.dataBind()}f(h);i.bindBindingUpdate(h.element.id,function(){f(h)});return}var d={};if(i._options.data){a.extend(i._options.data,d)}else{if(b.data){a.extend(d,b.data)}i._options.data=d}var g=function(){f(h)};i.unbindDownloadComplete(h.element.id);i.bindDownloadComplete(h.element.id,g);if(h.autoBind||(!h.autoBind&&!c)){i.dataBind()}}h._raiseEvent(2,{records:h.records})},destroy:function(){var b=this;b.removeHandler(b._el,"keydown");b.removeHandler(b._el,"click");b.host.empty();b.host.remove()},findTagIndex:function(c){var d=this;for(var b=0;b=b){d.hiddenList[g]++}}d._renderTags()}})}else{d.records.splice(b,0,e);for(var c=b+1;c=b){d.hiddenList[c]++}}d._renderTags()}},updateAt:function(b,d){var c=this;if(d[this.displayMember]===undefined){throw new Error("jqxTagCloud: Update tag requires a valid displayMember field to be supplied in the parameter")}d.index=b;d.uid=c.records[b].uid;if(c.source.updateTag&&typeof(c.source.updateTag)==="function"){c.source.updateTag(b,d,function(e){if(e){a.each(d,function(f,g){c.records[b][f]=g});c._renderTags()}})}else{a.each(d,function(e,f){c.records[b][e]=f});c._renderTags()}},removeAt:function(b){var d=this;if(d.source.deleteTag&&typeof(d.source.deleteTag)==="function"){d.source.deleteTag(b,function(f){if(f){d.records.splice(b,1);for(var e=b;eb){d.hiddenList[e]--}else{if(d.hiddenList[e]===b){d.hiddentList.splice(b,1)}}}}})}else{d.records.splice(b,1);for(var c=b;cb){d.hiddenList[c]--}else{if(d.hiddenList[c]===b){d.hiddentList.splice(b,1)}}}}d._renderTags()},hideItem:function(b){var d=this;if(!(typeof(b)!=="number"||d.hiddenList.indexOf(b)!==-1)){d.hiddenList.push(b);var e=-1;for(var c=0;c");b.host.addClass(b.toThemeProperty("jqx-widget jqx-tag-cloud"));b._setRtl();b.host.append(b._el);b.focusedItem=null;b.minColor=b._parseColor(b.minColor);b.maxColor=b._parseColor(b.maxColor);b.displayLimit=parseInt(b.displayLimit);if(b.disabled){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}b.addHandler(b._el,"click",function(d){if(a(document.activeElement).parents("#"+b._el[0].parentElement.id).length){}else{if(b.focusedItem!=null){a(b.focusedItem).focus()}else{a(b._el).find("a")[0].focus();b.focusedItem=document.activeElement}}if(b.disabled){d.preventDefault()}if(d.target.tagName.toLowerCase()==="a"){d.target.focus();b.focusedItem=document.activeElement}if(d.target.tagName.toLowerCase()==="li"){a(d.target).find("a").focus();b.focusedItem=document.activeElement}var c=a(d.target).closest("li").index();if(c!==-1){b._raiseEvent(0,{label:b.renderedData[c][b.displayMember],url:b.renderedData[c][b.urlMember],value:b.renderedData[c][b.valueMember],visibleIndex:c,index:b.renderedData[c].index,target:a(d.target).closest("li")[0],originalEvent:d})}});b._addKeyboardSupport()},resize:function(c,b){var d=this;d.width=c;d.height=b;d._updateSize()},propertyChangedHandler:function(b,c,f,e){var d=this;if(c==="source"){d.dataBind(b.source)}if(c==="displayLimit"){d[c]=parseInt(e)}if(c==="minColor"||c==="maxColor"){d[c]=d._parseColor(e)}if(c==="rtl"){d._setRtl();return}if(c==="width"||c==="height"){d._updateSize();return}if(c==="textColor"){if(!(d.minColor&&d.maxColor)){d._updateColor();return}}d._renderTags()},_alterCase:function(d){var c=this;function e(f){return f.replace(/\w\S*/g,function(g){return g.charAt(0).toUpperCase()+g.substr(1).toLowerCase()})}if(c.alterTextCase!=="none"){switch(c.alterTextCase){case"allLower":for(var b=0;b");var l="";if(null!==m.tagRenderer&&typeof(m.tagRenderer)==="function"){l=m.tagRenderer.apply(m,arguments)}else{l=k[m.displayMember]+(m.displayValue?"("+k[m.valueMember]+")":"")}l=a('