Interactive interface for browsing global, full-resolution satellite imagery
Updated third party library list, removed unused libraries
Mike McGannbe7884dd3b5d
diff --git a/web/ext/date/jquery.mousewheel-3.1.12/jquery.mousewheel.min.js b/web/ext/date/jquery.mousewheel-3.1.12/jquery.mousewheel.min.jsdeleted file mode 100644index df494ab6d..000000000--- a/web/ext/date/jquery.mousewheel-3.1.12/jquery.mousewheel.min.js+++ /dev/null@@ -1,8 +0,0 @@-/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)- * Licensed under the MIT License (LICENSE.txt).- *- * Version: 3.1.12- *- * Requires: jQuery 1.2.2+- */-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});diff --git a/web/ext/main/yepnope-1.5.4/yepnope.js b/web/ext/main/yepnope-1.5.4/yepnope.jsdeleted file mode 100644index fab179010..000000000--- a/web/ext/main/yepnope-1.5.4/yepnope.js+++ /dev/null@@ -1,562 +0,0 @@-// yepnope.js-// Version - 1.5.4pre-//-// by-// Alex Sexton - @SlexAxton - AlexSexton[at]gmail.com-// Ralph Holzmann - @ralphholzmann - ralphholzmann[at]gmail.com-//-// http://yepnopejs.com/-// https://github.com/SlexAxton/yepnope.js/-//-// Tri-license - WTFPL | MIT | BSD-//-// Please minify before use.-// Also available as Modernizr.load via the Modernizr Project-//-( function ( window, doc, undef ) {--var docElement = doc.documentElement,- sTimeout = window.setTimeout,- firstScript = doc.getElementsByTagName( "script" )[ 0 ],- toString = {}.toString,- execStack = [],- started = 0,- noop = function () {},- // Before you get mad about browser sniffs, please read:- // https://github.com/Modernizr/Modernizr/wiki/Undetectables- // If you have a better solution, we are actively looking to solve the problem- isGecko = ( "MozAppearance" in docElement.style ),- isGeckoLTE18 = isGecko && !! doc.createRange().compareNode,- insBeforeObj = isGeckoLTE18 ? docElement : firstScript.parentNode,- // Thanks to @jdalton for showing us this opera detection (by way of @kangax) (and probably @miketaylr too, or whatever...)- isOpera = window.opera && toString.call( window.opera ) == "[object Opera]",- isIE = !! doc.attachEvent && !isOpera,- strJsElem = isGecko ? "object" : isIE ? "script" : "img",- strCssElem = isIE ? "script" : strJsElem,- isArray = Array.isArray || function ( obj ) {- return toString.call( obj ) == "[object Array]";- },- isObject = function ( obj ) {- return Object(obj) === obj;- },- isString = function ( s ) {- return typeof s == "string";- },- isFunction = function ( fn ) {- return toString.call( fn ) == "[object Function]";- },- globalFilters = [],- scriptCache = {},- prefixes = {- // key value pair timeout options- timeout : function( resourceObj, prefix_parts ) {- if ( prefix_parts.length ) {- resourceObj['timeout'] = prefix_parts[ 0 ];- }- return resourceObj;- }- },- handler,- yepnope;-- /* Loader helper functions */- function isFileReady ( readyState ) {- // Check to see if any of the ways a file can be ready are available as properties on the file's element- return ( ! readyState || readyState == "loaded" || readyState == "complete" || readyState == "uninitialized" );- }--- // Takes a preloaded js obj (changes in different browsers) and injects it into the head- // in the appropriate order- function injectJs ( src, cb, attrs, timeout, /* internal use */ err, internal ) {- var script = doc.createElement( "script" ),- done, i;-- timeout = timeout || yepnope['errorTimeout'];-- script.src = src;-- // Add our extra attributes to the script element- for ( i in attrs ) {- script.setAttribute( i, attrs[ i ] );- }-- cb = internal ? executeStack : ( cb || noop );-- // Bind to load events- script.onreadystatechange = script.onload = function () {-- if ( ! done && isFileReady( script.readyState ) ) {-- // Set done to prevent this function from being called twice.- done = 1;- cb();-- // Handle memory leak in IE- script.onload = script.onreadystatechange = null;- }- };-- // 404 Fallback- sTimeout(function () {- if ( ! done ) {- done = 1;- // Might as well pass in an error-state if we fire the 404 fallback- cb(1);- }- }, timeout );-- // Inject script into to document- // or immediately callback if we know there- // was previously a timeout error- err ? script.onload() : firstScript.parentNode.insertBefore( script, firstScript );- }-- // Takes a preloaded css obj (changes in different browsers) and injects it into the head- function injectCss ( href, cb, attrs, timeout, /* Internal use */ err, internal ) {-- // Create stylesheet link- var link = doc.createElement( "link" ),- done, i;-- timeout = timeout || yepnope['errorTimeout'];-- cb = internal ? executeStack : ( cb || noop );-- // Add attributes- link.href = href;- link.rel = "stylesheet";- link.type = "text/css";-- // Add our extra attributes to the link element- for ( i in attrs ) {- link.setAttribute( i, attrs[ i ] );- }-- if ( ! err ) {- firstScript.parentNode.insertBefore( link, firstScript );- sTimeout(cb, 0);- }- }-- function executeStack ( ) {- // shift an element off of the stack- var i = execStack.shift();- started = 1;-- // if a is truthy and the first item in the stack has an src- if ( i ) {- // if it's a script, inject it into the head with no type attribute- if ( i['t'] ) {- // Inject after a timeout so FF has time to be a jerk about it and- // not double load (ignore the cache)- sTimeout( function () {- (i['t'] == "c" ? yepnope['injectCss'] : yepnope['injectJs'])( i['s'], 0, i['a'], i['x'], i['e'], 1 );- }, 0 );- }- // Otherwise, just call the function and potentially run the stack- else {- i();- executeStack();- }- }- else {- // just reset out of recursive mode- started = 0;- }- }-- function preloadFile ( elem, url, type, splicePoint, dontExec, attrObj, timeout ) {-- timeout = timeout || yepnope['errorTimeout'];-- // Create appropriate element for browser and type- var preloadElem = doc.createElement( elem ),- done = 0,- firstFlag = 0,- stackObject = {- "t": type, // type- "s": url, // src- //r: 0, // ready- "e": dontExec,// set to true if we don't want to reinject- "a": attrObj,- "x": timeout- };-- // The first time (common-case)- if ( scriptCache[ url ] === 1 ) {- firstFlag = 1;- scriptCache[ url ] = [];- }-- function onload ( first ) {- // If the script/css file is loaded- if ( ! done && isFileReady( preloadElem.readyState ) ) {-- // Set done to prevent this function from being called twice.- stackObject['r'] = done = 1;-- ! started && executeStack();-- // Handle memory leak in IE- preloadElem.onload = preloadElem.onreadystatechange = null;- if ( first ) {- if ( elem != "img" ) {- sTimeout(function(){ insBeforeObj.removeChild( preloadElem ) }, 50);- }-- for ( var i in scriptCache[ url ] ) {- if ( scriptCache[ url ].hasOwnProperty( i ) ) {- scriptCache[ url ][ i ].onload();- }- }- }- }- }--- // Setting url to data for objects or src for img/scripts- if ( elem == "object" ) {- preloadElem.data = url;- } else {- preloadElem.src = url;-- // Setting bogus script type to allow the script to be cached- preloadElem.type = elem;- }-- // Don't let it show up visually- preloadElem.width = preloadElem.height = "0";-- // Attach handlers for all browsers- preloadElem.onerror = preloadElem.onload = preloadElem.onreadystatechange = function(){- onload.call(this, firstFlag);- };- // inject the element into the stack depending on if it's- // in the middle of other scripts or not- execStack.splice( splicePoint, 0, stackObject );-- // The only place these can't go is in the <head> element, since objects won't load in there- // so we have two options - insert before the head element (which is hard to assume) - or- // insertBefore technically takes null/undefined as a second param and it will insert the element into- // the parent last. We try the head, and it automatically falls back to undefined.- if ( elem != "img" ) {- // If it's the first time, or we've already loaded it all the way through- if ( firstFlag || scriptCache[ url ] === 2 ) {- insBeforeObj.insertBefore( preloadElem, isGeckoLTE18 ? null : firstScript );-- // If something fails, and onerror doesn't fire,- // continue after a timeout.- sTimeout( onload, timeout );- }- else {- // instead of injecting, just hold on to it- scriptCache[ url ].push( preloadElem );- }- }- }-- function load ( resource, type, dontExec, attrObj, timeout ) {- // If this method gets hit multiple times, we should flag- // that the execution of other threads should halt.- started = 0;-- // We'll do 'j' for js and 'c' for css, yay for unreadable minification tactics- type = type || "j";- if ( isString( resource ) ) {- // if the resource passed in here is a string, preload the file- preloadFile( type == "c" ? strCssElem : strJsElem, resource, type, this['i']++, dontExec, attrObj, timeout );- } else {- // Otherwise it's a callback function and we can splice it into the stack to run- execStack.splice( this['i']++, 0, resource );- execStack.length == 1 && executeStack();- }-- // OMG is this jQueries? For chaining...- return this;- }-- // return the yepnope object with a fresh loader attached- function getYepnope () {- var y = yepnope;- y['loader'] = {- "load": load,- "i" : 0- };- return y;- }-- /* End loader helper functions */- // Yepnope Function- yepnope = function ( needs ) {-- var i,- need,- // start the chain as a plain instance- chain = this['yepnope']['loader'];-- function satisfyPrefixes ( url ) {- // split all prefixes out- var parts = url.split( "!" ),- gLen = globalFilters.length,- origUrl = parts.pop(),- pLen = parts.length,- res = {- "url" : origUrl,- // keep this one static for callback variable consistency- "origUrl" : origUrl,- "prefixes" : parts- },- mFunc,- j,- prefix_parts;-- // loop through prefixes- // if there are none, this automatically gets skipped- for ( j = 0; j < pLen; j++ ) {- prefix_parts = parts[ j ].split( '=' );- mFunc = prefixes[ prefix_parts.shift() ];- if ( mFunc ) {- res = mFunc( res, prefix_parts );- }- }-- // Go through our global filters- for ( j = 0; j < gLen; j++ ) {- res = globalFilters[ j ]( res );- }-- // return the final url- return res;- }-- function getExtension ( url ) {- return url.split(".").pop().split("?").shift();- }-- function loadScriptOrStyle ( input, callback, chain, index, testResult ) {- // run through our set of prefixes- var resource = satisfyPrefixes( input ),- autoCallback = resource['autoCallback'],- extension = getExtension( resource['url'] );-- // if no object is returned or the url is empty/0 just exit the load- if ( resource['bypass'] ) {- return;- }-- // Determine callback, if any- if ( callback ) {- callback = isFunction( callback ) ?- callback :- callback[ input ] ||- callback[ index ] ||- callback[ ( input.split( "/" ).pop().split( "?" )[ 0 ] ) ];- }-- // if someone is overriding all normal functionality- if ( resource['instead'] ) {- return resource['instead']( input, callback, chain, index, testResult );- }- else {- // Handle if we've already had this url and it's completed loaded already- if ( scriptCache[ resource['url'] ] ) {- // don't let this execute again- resource['noexec'] = true;- }- else {- scriptCache[ resource['url'] ] = 1;- }-- // Throw this into the queue- chain.load( resource['url'], ( ( resource['forceCSS'] || ( ! resource['forceJS'] && "css" == getExtension( resource['url'] ) ) ) ) ? "c" : undef, resource['noexec'], resource['attrs'], resource['timeout'] );-- // If we have a callback, we'll start the chain over- if ( isFunction( callback ) || isFunction( autoCallback ) ) {- // Call getJS with our current stack of things- chain['load']( function () {- // Hijack yepnope and restart index counter- getYepnope();- // Call our callbacks with this set of data- callback && callback( resource['origUrl'], testResult, index );- autoCallback && autoCallback( resource['origUrl'], testResult, index );-- // Override this to just a boolean positive- scriptCache[ resource['url'] ] = 2;- } );- }- }- }-- function loadFromTestObject ( testObject, chain ) {- var testResult = !! testObject['test'],- group = testResult ? testObject['yep'] : testObject['nope'],- always = testObject['load'] || testObject['both'],- callback = testObject['callback'] || noop,- cbRef = callback,- complete = testObject['complete'] || noop,- needGroupSize,- callbackKey;-- // Reusable function for dealing with the different input types- // NOTE:: relies on closures to keep 'chain' up to date, a bit confusing, but- // much smaller than the functional equivalent in this case.- function handleGroup ( needGroup, moreToCome ) {- if ( ! needGroup ) {- // Call the complete callback when there's nothing to load.- ! moreToCome && complete();- }- // If it's a string- else if ( isString( needGroup ) ) {- // if it's a string, it's the last- if ( !moreToCome ) {- // Add in the complete callback to go at the end- callback = function () {- var args = [].slice.call( arguments );- cbRef.apply( this, args );- complete();- };- }- // Just load the script of style- loadScriptOrStyle( needGroup, callback, chain, 0, testResult );- }- // See if we have an object. Doesn't matter if it's an array or a key/val hash- // Note:: order cannot be guaranteed on an key value object with multiple elements- // since the for-in does not preserve order. Arrays _should_ go in order though.- else if ( isObject( needGroup ) ) {- // I hate this, but idk another way for objects.- needGroupSize = (function(){- var count = 0, i- for (i in needGroup ) {- if ( needGroup.hasOwnProperty( i ) ) {- count++;- }- }- return count;- })();-- for ( callbackKey in needGroup ) {- // Safari 2 does not have hasOwnProperty, but not worth the bytes for a shim- // patch if needed. Kangax has a nice shim for it. Or just remove the check- // and promise not to extend the object prototype.- if ( needGroup.hasOwnProperty( callbackKey ) ) {- // Find the last added resource, and append to it's callback.- if ( ! moreToCome && ! ( --needGroupSize ) ) {- // If this is an object full of callbacks- if ( ! isFunction( callback ) ) {- // Add in the complete callback to go at the end- callback[ callbackKey ] = (function( innerCb ) {- return function () {- var args = [].slice.call( arguments );- innerCb && innerCb.apply( this, args );- complete();- };- })( cbRef[ callbackKey ] );- }- // If this is just a single callback- else {- callback = function () {- var args = [].slice.call( arguments );- cbRef.apply( this, args );- complete();- };- }- }- loadScriptOrStyle( needGroup[ callbackKey ], callback, chain, callbackKey, testResult );- }- }- }- }-- // figure out what this group should do- handleGroup( group, !!always );-- // Run our loader on the load/both group too- // the always stuff always loads second.- always && handleGroup( always );- }-- // Someone just decides to load a single script or css file as a string- if ( isString( needs ) ) {- loadScriptOrStyle( needs, 0, chain, 0 );- }- // Normal case is likely an array of different types of loading options- else if ( isArray( needs ) ) {- // go through the list of needs- for( i = 0; i < needs.length; i++ ) {- need = needs[ i ];-- // if it's a string, just load it- if ( isString( need ) ) {- loadScriptOrStyle( need, 0, chain, 0 );- }- // if it's an array, call our function recursively- else if ( isArray( need ) ) {- yepnope( need );- }- // if it's an object, use our modernizr logic to win- else if ( isObject( need ) ) {- loadFromTestObject( need, chain );- }- }- }- // Allow a single object to be passed in- else if ( isObject( needs ) ) {- loadFromTestObject( needs, chain );- }- };-- // This publicly exposed function is for allowing- // you to add functionality based on prefixes on the- // string files you add. 'css!' is a builtin prefix- //- // The arguments are the prefix (not including the !) as a string- // and- // A callback function. This function is passed a resource object- // that can be manipulated and then returned. (like middleware. har.)- //- // Examples of this can be seen in the officially supported ie prefix- yepnope['addPrefix'] = function ( prefix, callback ) {- prefixes[ prefix ] = callback;- };-- // A filter is a global function that every resource- // object that passes through yepnope will see. You can- // of course conditionally choose to modify the resource objects- // or just pass them along. The filter function takes the resource- // object and is expected to return one.- //- // The best example of a filter is the 'autoprotocol' officially- // supported filter- yepnope['addFilter'] = function ( filter ) {- globalFilters.push( filter );- };-- // Default error timeout to 10sec - modify to alter- yepnope['errorTimeout'] = 1e4;-- // Webreflection readystate hack- // safe for jQuery 1.4+ ( i.e. don't use yepnope with jQuery 1.3.2 )- // if the readyState is null and we have a listener- if ( doc.readyState == null && doc.addEventListener ) {- // set the ready state to loading- doc.readyState = "loading";- // call the listener- doc.addEventListener( "DOMContentLoaded", handler = function () {- // Remove the listener- doc.removeEventListener( "DOMContentLoaded", handler, 0 );- // Set it to ready- doc.readyState = "complete";- }, 0 );- }-- // Attach loader &- // Leak it- window['yepnope'] = getYepnope();-- // Exposing executeStack to better facilitate plugins- window['yepnope']['executeStack'] = executeStack;- window['yepnope']['injectJs'] = injectJs;- window['yepnope']['injectCss'] = injectCss;--})( this, document );diff --git a/web/ext/main/yepnope-1.5.4/yepnope.min.js b/web/ext/main/yepnope-1.5.4/yepnope.min.jsdeleted file mode 100644index 73655a5b2..000000000--- a/web/ext/main/yepnope-1.5.4/yepnope.min.js+++ /dev/null@@ -1,2 +0,0 @@-/*yepnope1.5.x|WTFPL*/-(function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}})(this,document);\ No newline at end of filediff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/1273404841_tick_16.png b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/1273404841_tick_16.pngdeleted file mode 100644index 6bd8724f6..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/1273404841_tick_16.png and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/blank.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/blank.gifdeleted file mode 100644index b14e32679..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/blank.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/button-large.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/button-large.gifdeleted file mode 100644index 2d1d8c42f..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/button-large.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/enabled.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/enabled.gifdeleted file mode 100644index 5f3c6e571..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/enabled.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/flagssprite_small.png b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/flagssprite_small.pngdeleted file mode 100644index 5da7b5f85..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/flagssprite_small.png and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/sprite.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/sprite.gifdeleted file mode 100644index 8dd49e68a..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/sprite.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/sprite.jpg b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/sprite.jpgdeleted file mode 100644index b5d692bef..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/sprite.jpg and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/tick.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/tick.gifdeleted file mode 100644index 5865c2246..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/icons/tick.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin1/dd_arrow.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin1/dd_arrow.gifdeleted file mode 100644index b069f4782..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin1/dd_arrow.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin1/title-bg.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin1/title-bg.gifdeleted file mode 100644index 7533667ec..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin1/title-bg.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/dd_arrow.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/dd_arrow.gifdeleted file mode 100644index a7619f99d..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/dd_arrow.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/icon-ok.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/icon-ok.gifdeleted file mode 100644index 8323baaa6..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/icon-ok.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/title-bg.gif b/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/title-bg.gifdeleted file mode 100644index ac143954f..000000000Binary files a/web/ext/palettes/jquery.dd-3.3/images/jquery.dd-3.3/skin2/title-bg.gif and /dev/null differdiff --git a/web/ext/palettes/jquery.dd-3.3/jquery.dd.css b/web/ext/palettes/jquery.dd-3.3/jquery.dd.cssdeleted file mode 100644index 0ad814afc..000000000--- a/web/ext/palettes/jquery.dd-3.3/jquery.dd.css+++ /dev/null@@ -1,85 +0,0 @@-.borderRadius{-moz-border-radius:5px; border-radius:5px; }-.borderRadiusTp{-moz-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0;}-.borderRadiusBtm{-moz-border-radius:0 0 5px 5px ; border-radius:0 0 5px 5px;}--.ddcommon {position:relative;display:-moz-inline-stack; zoom:1; display:inline-block; *display:inline; cursor:default;}-.ddcommon ul{padding:0;margin:0;}-.ddcommon ul li{list-style-type:none;}-.borderRadiusTp ul li:last-child{-moz-border-radius:0 0 5px 5px ; border-radius:0 0 5px 5px;border-bottom:0 none #c3c3c3; }-.borderRadiusBtm ul li:first-child{-moz-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0 ;border-bottom:1 solid #c3c3c3; }--.ddcommon .disabled img, .ddcommon .disabled span, .ddcommon.disabledAll{-opacity: .5; /* standard: ff gt 1.5, opera, safari */--ms-filter:"alpha(opacity=50)"; /* ie 8 */-filter:alpha(opacity=50); /* ie lt 7 */--khtml-opacity:.5; /* safari 1.x */--moz-opacity:.5; /* ff lt 1.5, netscape */-color:#999999;-}-.ddcommon .clear{clear:both}-.ddcommon .shadow{-moz-box-shadow:5px 5px 5px -5px #888888;-webkit-box-shadow:5px 5px 5px -5px #888888;box-shadow: 5px 5px 5px -5px #888888;}-.ddcommon input.text{color:#7e7e7e;padding:0 0 0 0; position:absolute; background:#fff; display:block; width:98%; height:98%; left:2px; top:0; border:none;}-.ddOutOfVision{position:relative; display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline;}-.borderRadius .shadow{-moz-box-shadow:5px 5px 5px -5px #888888;-webkit-box-shadow:5px 5px 5px -5px #888888;box-shadow: 5px 5px 5px -5px #888888;}-.borderRadiusBtm .shadow{-moz-box-shadow:-5px -5px 5px -5px #888888;-webkit-box-shadow:-5px -5px 5px -5px #888888;box-shadow: -5px -5px 5px -5px #888888}-.borderRadiusTp .border, .borderRadius .border{-moz-border-radius:0 0 5px 5px ; border-radius:0 0 5px 5px;}-.borderRadiusBtm .border{-moz-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0;}-img.fnone{float:none !important}-.ddcommon .divider{width:0; height:100%; position:absolute;}-.ddcommon .arrow{display:inline-block; position:absolute; top:50%; right:4px;}-.ddcommon .arrow:hover{background-position:0 100%;}-.ddcommon .ddTitle{padding:0; position:relative; display:inline-block; width:100%}-.ddcommon .ddTitle .ddTitleText{display:block;}-.ddcommon .ddTitle .ddTitleText .ddTitleText{padding:0;}-.ddcommon .ddTitle .description{display:block;}-.ddcommon .ddTitle .ddTitleText img{position:relative; vertical-align:middle; float:left}-.ddcommon .ddChild{position:absolute;display:none;width:100%;overflow-y:auto; overflow-x:hidden; zoom:1; z-index:9999}-.ddcommon .ddChild li{clear:both;}-.ddcommon .ddChild li .description{display:block;}-.ddcommon .ddChild li img{border:0 none; position:relative;vertical-align:middle;float:left}-.ddcommon .ddChild li.optgroup{padding:0;}-.ddcommon .ddChild li.optgroup .optgroupTitle{padding:0 5px; font-weight:bold; font-style:italic}-.ddcommon .ddChild li.optgroup ul li{padding:5px 5px 5px 15px}-.ddcommon .noBorderTop{border-top:none 0 !important; padding:0; margin:0;}--/*************** default theme **********************/-.dd{border:1px solid #c3c3c3;}-.dd .divider{border-left:1px solid #c3c3c3; border-right:1px solid #fff;; right:24px;}-.dd .arrow{width:16px;height:16px; margin-top:-8px; background:url(images/jquery.dd-3.3/skin1/dd_arrow.gif) no-repeat;}-.dd .arrow:hover{background-position:0 100%;}-.dd .ddTitle{color:#000;background:#e2e2e4 url(images/jquery.dd-3.3/skin1/title-bg.gif) repeat-x left top;}-.dd .ddTitle .ddTitleText{padding:5px 20px 5px 5px;}-.dd .ddTitle .ddTitleText .ddTitleText{padding:0;}-.dd .ddTitle .description{font-size:12px; color:#666}-.dd .ddTitle .ddTitleText img{padding-right:5px;}-.dd .ddChild{border:1px solid #c3c3c3; background-color:#fff; left:-1px;}-.dd .ddChild li{padding:5px; background-color:#fff; border-bottom:1px solid #c3c3c3;}-.dd .ddChild li .description{color:#666;}-.dd .ddChild li .ddlabel{color:#333;}-.dd .ddChild li.hover{background-color:#f2f2f2}-.dd .ddChild li img{padding:0 6px 0 0;}-.dd .ddChild li.optgroup{padding:0;}-.dd .ddChild li.optgroup .optgroupTitle{padding:0 5px; font-weight:bold; font-style:italic}-.dd .ddChild li.optgroup ul li{padding:5px 5px 5px 15px}-.dd .ddChild li.selected{background-color:#d5d5d5; color:#000;}--.blue{border:1px solid #ddd;}-.blue .divider{display:none}-.blue .arrow{width:27px;height:27px; margin-top:-14px; background:url(../../../images/jquery.dd/skin2/dd_arrow.gif) no-repeat;}-.blue .arrow:hover{background-position:0 100%;}-.blue .ddTitle{color:#fff;background:#10bbe6 url(../../../images/jquery.dd/skin2/title-bg.gif) repeat-x left top;}-.blue .ddTitle .ddTitleText{padding:10px 20px 10px 5px; font-weight:bold; font-size:16px;}-.blue .ddTitle .ddTitleText .ddTitleText{padding:0;}-.blue .ddTitle .description{font-size:12px; color:#666}-.blue .ddTitle .ddTitleText img{padding-right:5px;}-.blue .ddChild{border:1px solid #c3c3c3; background-color:#fff; left:-1px;}-.blue .ddChild li{padding:5px; background-color:#fff; border-bottom:1px solid #c3c3c3;}-.blue .ddChild li .description{color:#666;}-.blue .ddChild li .ddlabel{color:#333;}-.blue .ddChild li.hover{background-color:#66CCFF;}-.blue .ddChild li img{padding:0 6px 0 0;}-.blue .ddChild li.optgroup{padding:0;}-.blue .ddChild li.optgroup .optgroupTitle{padding:0 5px; font-weight:bold; font-style:italic}-.blue .ddChild li.optgroup ul li{padding:5px 5px 5px 15px}-.blue .ddChild li.selected{background-color:#0d97ba;}-.blue .ddChild li.selected .ddlabel{color:#fff;}diff --git a/web/ext/palettes/jquery.dd-3.3/jquery.dd.js b/web/ext/palettes/jquery.dd-3.3/jquery.dd.jsdeleted file mode 100644index 8448ad96b..000000000--- a/web/ext/palettes/jquery.dd-3.3/jquery.dd.js+++ /dev/null@@ -1,1482 +0,0 @@-// MSDropDown - jquery.dd.js-// author: Marghoob Suleman - http://www.marghoobsuleman.com/-// Date: 10 Nov, 2012-// Version: 3.3-// Revision: 22-// web: www.marghoobsuleman.com-/*-// msDropDown is free jQuery Plugin: you can redistribute it and/or modify-// it under the terms of the either the MIT License or the Gnu General Public License (GPL) Version 2-*/-var msBeautify = msBeautify || {};-(function ($) {-msBeautify = {- version: {msDropdown:'3.3'},- author: "Marghoob Suleman",- counter: 20,- debug: function (v) {- if (v !== false) {- $(".ddOutOfVision").css({height: 'auto', position: 'relative'});- } else {- $(".ddOutOfVision").css({height: '0px', position: 'absolute'});- }- },- oldDiv: '',- create: function (id, settings, type) {- type = type || "dropdown";- var data;- switch (type.toLowerCase()) {- case "dropdown":- case "select":- data = $(id).msDropdown(settings).data("dd");- break;- }- return data;- }-};--$.msDropDown = {};-$.msDropdown = {};-$.extend(true, $.msDropDown, msBeautify);-$.extend(true, $.msDropdown, msBeautify);-// make compatibiliy with old and new jquery-if ($.fn.prop === undefined) {$.fn.prop = $.fn.attr;}-if ($.fn.on === undefined) {$.fn.on = $.fn.bind;$.fn.off = $.fn.unbind;}-if (typeof $.expr.createPseudo === 'function') {- //jQuery 1.8 or greater- $.expr[':'].Contains = $.expr.createPseudo(function (arg) {return function (elem) { return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; }; });-} else {- //lower version- $.expr[':'].Contains = function (a, i, m) {return $(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0; };-}-//dropdown class-function dd(element, settings) {- var _settings = $.extend(true,{byJson: {data: null, selectedIndex: 0, name: null, size: 0, multiple: false, width: 250},- mainCSS: 'dd',- height: 120, //not using currently- visibleRows: 7,- rowHeight: 0,- showIcon: true,- zIndex: 9999,- useSprite: false,- animStyle: 'slideDown',- event:'click',- openDirection: 'auto', //auto || alwaysUp- jsonTitle: true,- style: '',- disabledOpacity: 0.7,- disabledOptionEvents: true,- childWidth:0,- enableCheckbox:false, //this needs to multiple or it will set element to multiple- checkboxNameSuffix:'_mscheck',- append:'',- prepend:'',- on: {create: null,open: null,close: null,add: null,remove: null,change: null,blur: null,click: null,dblclick: null,mousemove: null,mouseover: null,mouseout: null,focus: null,mousedown: null,mouseup: null}- }, settings);- var _this = this; //this class- var _holderId = {postElementHolder: '_msddHolder', postID: '_msdd', postTitleID: '_title',postTitleTextID: '_titleText', postChildID: '_child'};- var _styles = {dd:_settings.mainCSS, ddTitle: 'ddTitle', arrow: 'arrow arrowoff', ddChild: 'ddChild', ddTitleText: 'ddTitleText',disabled: 'disabled', enabled: 'enabled', ddOutOfVision: 'ddOutOfVision', borderTop: 'borderTop', noBorderTop: 'noBorderTop', selected: 'selected', divider: 'divider', optgroup: "optgroup", optgroupTitle: "optgroupTitle", description: "description", label: "ddlabel",hover: 'hover',disabledAll: 'disabledAll'};- var _styles_i = {li: '_msddli_',borderRadiusTp: 'borderRadiusTp',ddChildMore: 'border shadow',fnone: "fnone"};- var _isList = false, _isMultiple=false,_isDisabled=false, _cacheElement = {}, _element, _orginial = {}, _isOpen=false;- var DOWN_ARROW = 40, UP_ARROW = 38, LEFT_ARROW=37, RIGHT_ARROW=39, ESCAPE = 27, ENTER = 13, ALPHABETS_START = 47, SHIFT=16 , CONTROL = 17;- var _shiftHolded=false, _controlHolded=false,_lastTarget=null,_forcedTrigger=false, _oldSelected, _isCreated = false;- var _doc = document, _ua = window.navigator.userAgent, _isIE = _ua.match(/msie/i);- var msieversion = function()- {- var msie = _ua.indexOf("MSIE");- if ( msie > 0 ) { // If Internet Explorer, return version number- return parseInt (_ua.substring (msie+5, _ua.indexOf (".", msie)));- } else { // If another browser, return 0- return 0;- };- };- var _checkDataSetting = function() {- _settings.mainCSS = $("#"+_element).data("maincss") || _settings.mainCSS;- _settings.visibleRows = $("#"+_element).data("visiblerows") || _settings.visibleRows;- if($("#"+_element).data("showicon")==false) {_settings.showIcon = $("#"+_element).data("showicon");};- _settings.useSprite = $("#"+_element).data("usesprite") || _settings.useSprite;- _settings.animStyle = $("#"+_element).data("animstyle") || _settings.animStyle;- _settings.event = $("#"+_element).data("event") || _settings.event;- _settings.openDirection = $("#"+_element).data("opendirection") || _settings.openDirection;- _settings.jsonTitle = $("#"+_element).data("jsontitle") || _settings.jsonTitle;- _settings.disabledOpacity = $("#"+_element).data("disabledopacity") || _settings.disabledOpacity;- _settings.childWidth = $("#"+_element).data("childwidth") || _settings.childWidth;- _settings.enableCheckbox = $("#"+_element).data("enablecheckbox") || _settings.enableCheckbox;- _settings.checkboxNameSuffix = $("#"+_element).data("checkboxnamesuffix") || _settings.checkboxNameSuffix;- _settings.append = $("#"+_element).data("append") || _settings.append;- _settings.prepend = $("#"+_element).data("prepend") || _settings.prepend;- };- var getElement = function(ele) {- if (_cacheElement[ele] === undefined) {- _cacheElement[ele] = _doc.getElementById(ele);- }- return _cacheElement[ele];- };- var _getIndex = function(opt) {- var childid = _getPostID("postChildID");- return $("#"+childid + " li."+_styles_i.li).index(opt);- };- var _createByJson = function() {- if (_settings.byJson.data) {- var validData = ["description","image", "title"];- try {- if (!element.id) {- element.id = "dropdown"+msBeautify.counter;- };- _settings.byJson.data = eval(_settings.byJson.data);- //change element- var id = "msdropdown"+(msBeautify.counter++);- var obj = {};- obj.id = id;- obj.name = _settings.byJson.name || element.id; //its name- if (_settings.byJson.size>0) {- obj.size = _settings.byJson.size;- };- obj.multiple = _settings.byJson.multiple;- var oSelect = _createElement("select", obj);- for(var i=0;i<_settings.byJson.data.length;i++) {- var current = _settings.byJson.data[i];- var opt = new Option(current.text, current.value);- for(var p in current) {- if (p.toLowerCase() != 'text') {- var key = ($.inArray(p.toLowerCase(), validData)!=-1) ? "data-" : "";- opt.setAttribute(key+p, current[p]);- };- };- oSelect.options[i] = opt;- };- getElement(element.id).appendChild(oSelect);- oSelect.selectedIndex = _settings.byJson.selectedIndex;- $(oSelect).css({width: _settings.byJson.width+'px'});- //now change element for access other things- element = oSelect;- } catch(e) {- throw "There is an error in json data.";- };- };- };- var _construct = function() {- //set properties- _createByJson();- if (!element.id) {- element.id = "msdrpdd"+(msBeautify.counter++);- };- _element = element.id;- _this._element = _element;- _checkDataSetting();- _isDisabled = getElement(_element).disabled;- var useCheckbox = _settings.enableCheckbox;- if(Boolean(useCheckbox)===true) {- getElement(_element).multiple = true;- _settings.enableCheckbox = true;- };- _isList = (getElement(_element).size>1 || getElement(_element).multiple==true) ? true : false;- //trace("_isList "+_isList);- if (_isList) {_isMultiple = getElement(_element).multiple;};- _mergeAllProp();- //create layout- _createLayout();- //set ui prop- _updateProp("uiData", _getDataAndUI());- _updateProp("selectedOptions", $("#"+_element +" option:selected"));- var childid = _getPostID("postChildID");- _oldSelected = $("#" + childid + " li." + _styles.selected);-- };- /********************************************************************************************/- var _getPostID = function (id) {- return _element+_holderId[id];- };- var _getInternalStyle = function(ele) {- var s = (ele.style === undefined) ? "" : ele.style.cssText;- return s;- };- var _parseOption = function(opt) {- var imagePath = '', title ='', description='', value=-1, text='', className='', imagecss = '';- if (opt !== undefined) {- var attrTitle = opt.title || "";- //data-title- if (attrTitle!="") {- var reg = /^\{.*\}$/;- var isJson = reg.test(attrTitle);- if (isJson && _settings.jsonTitle) {- var obj = eval("["+attrTitle+"]");- };- title = (isJson && _settings.jsonTitle) ? obj[0].title : title;- description = (isJson && _settings.jsonTitle) ? obj[0].description : description;- imagePath = (isJson && _settings.jsonTitle) ? obj[0].image : attrTitle;- imagecss = (isJson && _settings.jsonTitle) ? obj[0].imagecss : imagecss;- };-- text = opt.text || '';- value = opt.value || '';- className = opt.className || "";- //ignore title attribute if playing with data tags- title = $(opt).prop("data-title") || $(opt).data("title") || (title || "");- description = $(opt).prop("data-description") || $(opt).data("description") || (description || "");- imagePath = $(opt).prop("data-image") || $(opt).data("image") || (imagePath || "");- imagecss = $(opt).prop("data-imagecss") || $(opt).data("imagecss") || (imagecss || "");-- };- var o = {image: imagePath, title: title, description: description, value: value, text: text, className: className, imagecss:imagecss};- return o;- };- var _createElement = function(nm, attr, html) {- var tag = _doc.createElement(nm);- if (attr) {- for(var i in attr) {- switch(i) {- case "style":- tag.style.cssText = attr[i];- break;- default:- tag[i] = attr[i];- break;- };- };- };- if (html) {- tag.innerHTML = html;- };- return tag;- };- /********************************************************************************************/- /*********************** <layout> *************************************/- var _hideOriginal = function() {- var hidid = _getPostID("postElementHolder");- if ($("#"+hidid).length==0) {- var obj = {style: 'height: 0px;overflow: hidden;position: absolute;',className: _styles.ddOutOfVision};- obj.id = hidid;- var oDiv = _createElement("div", obj);- $("#"+_element).after(oDiv);- $("#"+_element).appendTo($("#"+hidid));- } else {- $("#"+hidid).css({height: 0,overflow: 'hidden',position: 'absolute'});- };- };- var _createWrapper = function () {- var obj = {- className: _styles.dd + " ddcommon borderRadius"- };- var styles = _getInternalStyle(getElement(_element));- var w = $("#" + _element).outerWidth();- obj.style = "width: " + w + "px;";- if (styles.length > 0) {- obj.style = obj.style + "" + styles;- };- obj.id = _getPostID("postID");- var oDiv = _createElement("div", obj);- return oDiv;- };- var _createTitle = function () {- var selectedOption;- if(getElement(_element).selectedIndex>=0) {- selectedOption = getElement(_element).options[getElement(_element).selectedIndex];- } else {- selectedOption = {value:'', text:''};- }- var spriteClass = "", selectedClass = "";- //check sprite- var useSprite = $("#"+_element).data("usesprite");- if(useSprite) { _settings.useSprite = useSprite; };- if (_settings.useSprite != false) {- spriteClass = " " + _settings.useSprite;- selectedClass = " " + selectedOption.className;- };- var oTitle = _createElement("div", {className: _styles.ddTitle + spriteClass + " " + _styles_i.borderRadiusTp});- //divider- var oDivider = _createElement("span", {className: _styles.divider});- //arrow- var oArrow = _createElement("span", {className: _styles.arrow});- //title Text- var titleid = _getPostID("postTitleID");- var oTitleText = _createElement("span", {className: _styles.ddTitleText + selectedClass, id: titleid});-- var parsed = _parseOption(selectedOption);- var arrowPath = parsed.image;- var sText = parsed.text || "";- if (arrowPath != "" && _settings.showIcon) {- var oIcon = _createElement("img");- oIcon.src = arrowPath;- if(parsed.imagecss!="") {- oIcon.className = parsed.imagecss+" ";- };- };- var oTitleText_in = _createElement("span", {className: _styles.label}, sText);- oTitle.appendChild(oDivider);- oTitle.appendChild(oArrow);- if (oIcon) {- oTitleText.appendChild(oIcon);- };- oTitleText.appendChild(oTitleText_in);- oTitle.appendChild(oTitleText);- var oDescription = _createElement("span", {className: _styles.description}, parsed.description);- oTitleText.appendChild(oDescription);- return oTitle;- };- var _createFilterBox = function () {- var tid = _getPostID("postTitleTextID");- var sText = _createElement("input", {id: tid, type: 'text', value: '', autocomplete: 'off', className: 'text shadow borderRadius', style: 'display: none'});- return sText;- };- var _createChild = function (opt) {- var obj = {};- var styles = _getInternalStyle(opt);- if (styles.length > 0) {obj.style = styles; };- var css = (opt.disabled) ? _styles.disabled : _styles.enabled;- css = (opt.selected) ? (css + " " + _styles.selected) : css;- css = css + " " + _styles_i.li;- obj.className = css;- if (_settings.useSprite != false) {- obj.className = css + " " + opt.className;- };- var li = _createElement("li", obj);- var parsed = _parseOption(opt);- if (parsed.title != "") {- li.title = parsed.title;- };- var arrowPath = parsed.image;- if (arrowPath != "" && _settings.showIcon) {- var oIcon = _createElement("img");- oIcon.src = arrowPath;- if(parsed.imagecss!="") {- oIcon.className = parsed.imagecss+" ";- };- };- if (parsed.description != "") {- var oDescription = _createElement("span", {- className: _styles.description- }, parsed.description);- };- var sText = opt.text || "";- var oTitleText = _createElement("span", {- className: _styles.label- }, sText);- //checkbox- if(_settings.enableCheckbox===true) {- var chkbox = _createElement("input", {- type: 'checkbox', name:_element+_settings.checkboxNameSuffix+'[]', value:opt.value||""}); //this can be used for future- li.appendChild(chkbox);- if(_settings.enableCheckbox===true) {- chkbox.checked = (opt.selected) ? true : false;- };- };- if (oIcon) {- li.appendChild(oIcon);- };- li.appendChild(oTitleText);- if (oDescription) {- li.appendChild(oDescription);- } else {- if (oIcon) {- oIcon.className = oIcon.className+_styles_i.fnone;- };- };- var oClear = _createElement("div", {className: 'clear'});- li.appendChild(oClear);- return li;- };- var _createChildren = function () {- var childid = _getPostID("postChildID");- var obj = {className: _styles.ddChild + " ddchild_ " + _styles_i.ddChildMore, id: childid};- if (_isList == false) {- obj.style = "z-index: " + _settings.zIndex;- } else {- obj.style = "z-index:1";- };- var childWidth = $("#"+_element).data("childwidth") || _settings.childWidth;- if(childWidth) {- obj.style = (obj.style || "") + ";width:"+childWidth;- };- var oDiv = _createElement("div", obj);- var ul = _createElement("ul");- if (_settings.useSprite != false) {- ul.className = _settings.useSprite;- };- var allOptions = getElement(_element).children;- for (var i = 0; i < allOptions.length; i++) {- var current = allOptions[i];- var li;- if (current.nodeName.toLowerCase() == "optgroup") {- //create ul- li = _createElement("li", {className: _styles.optgroup});- var span = _createElement("span", {className: _styles.optgroupTitle}, current.label);- li.appendChild(span);- var optChildren = current.children;- var optul = _createElement("ul");- for (var j = 0; j < optChildren.length; j++) {- var opt_li = _createChild(optChildren[j]);- optul.appendChild(opt_li);- };- li.appendChild(optul);- } else {- li = _createChild(current);- };- ul.appendChild(li);- };- oDiv.appendChild(ul);- return oDiv;- };- var _childHeight = function (val) {- var childid = _getPostID("postChildID");- if (val) {- if (val == -1) { //auto- $("#"+childid).css({height: "auto", overflow: "auto"});- } else {- $("#"+childid).css("height", val+"px");- };- return false;- };- //else return height- var iHeight;- if (getElement(_element).options.length > _settings.visibleRows) {- var margin = parseInt($("#" + childid + " li:first").css("padding-bottom")) + parseInt($("#" + childid + " li:first").css("padding-top"));- if(_settings.rowHeight===0) {- $("#" + childid).css({visibility:'hidden',display:'block'}); //hack for first child- _settings.rowHeight = Math.round($("#" + childid + " li:first").height());- $("#" + childid).css({visibility:'visible'});- if(!_isList || _settings.enableCheckbox===true) {- $("#" + childid).css({display:'none'});- };- };- iHeight = ((_settings.rowHeight + margin) * _settings.visibleRows);- } else if (_isList) {- iHeight = $("#" + _element).height(); //get height from original element- };- return iHeight;- };- var _applyChildEvents = function () {- var childid = _getPostID("postChildID");- $("#" + childid).on("click", function (e) {- if (_isDisabled === true) return false;- //prevent body click- e.preventDefault();- e.stopPropagation();- if (_isList) {- _bind_on_events();- };- });- $("#" + childid + " li." + _styles.enabled).on("click", function (e) {- if(e.target.nodeName.toLowerCase() !== "input") {- _close(this);- };- });- $("#" + childid + " li." + _styles.enabled).on("mousedown", function (e) {- if (_isDisabled === true) return false;- _oldSelected = $("#" + childid + " li." + _styles.selected);- _lastTarget = this;- e.preventDefault();- e.stopPropagation();- //select current input- if(_settings.enableCheckbox===true) {- if(e.target.nodeName.toLowerCase() === "input") {- _controlHolded = true;- };- };- if (_isList === true) {- if (_isMultiple) {- if (_shiftHolded === true) {- $(this).addClass(_styles.selected);- var selected = $("#" + childid + " li." + _styles.selected);- var lastIndex = _getIndex(this);- if (selected.length > 1) {- var items = $("#" + childid + " li." + _styles_i.li);- var ind1 = _getIndex(selected[0]);- var ind2 = _getIndex(selected[1]);- if (lastIndex > ind2) {- ind1 = (lastIndex);- ind2 = ind2 + 1;- };- for (var i = Math.min(ind1, ind2); i <= Math.max(ind1, ind2); i++) {- var current = items[i];- if ($(current).hasClass(_styles.enabled)) {- $(current).addClass(_styles.selected);- };- };- };- } else if (_controlHolded === true) {- $(this).toggleClass(_styles.selected); //toggle- if(_settings.enableCheckbox===true) {- var checkbox = this.childNodes[0];- checkbox.checked = !checkbox.checked; //toggle- };- } else {- $("#" + childid + " li." + _styles.selected).removeClass(_styles.selected);- $("#" + childid + " input:checkbox").prop("checked", false);- $(this).addClass(_styles.selected);- if(_settings.enableCheckbox===true) {- this.childNodes[0].checked = true;- };- };- } else {- $("#" + childid + " li." + _styles.selected).removeClass(_styles.selected);- $(this).addClass(_styles.selected);- };- //fire event on mouseup- } else {- $("#" + childid + " li." + _styles.selected).removeClass(_styles.selected);- $(this).addClass(_styles.selected);- };- });- $("#" + childid + " li." + _styles.enabled).on("mouseenter", function (e) {- if (_isDisabled === true) return false;- e.preventDefault();- e.stopPropagation();- if (_lastTarget != null) {- if (_isMultiple) {- $(this).addClass(_styles.selected);- if(_settings.enableCheckbox===true) {- this.childNodes[0].checked = true;- };- };- };- });-- $("#" + childid + " li." + _styles.enabled).on("mouseover", function (e) {- if (_isDisabled === true) return false;- $(this).addClass(_styles.hover);- });- $("#" + childid + " li." + _styles.enabled).on("mouseout", function (e) {- if (_isDisabled === true) return false;- $("#" + childid + " li." + _styles.hover).removeClass(_styles.hover);- });-- $("#" + childid + " li." + _styles.enabled).on("mouseup", function (e) {- if (_isDisabled === true) return false;- e.preventDefault();- e.stopPropagation();- if(_settings.enableCheckbox===true) {- _controlHolded = false;- };- var selected = $("#" + childid + " li." + _styles.selected).length;- _forcedTrigger = (_oldSelected.length != selected || selected == 0) ? true : false;- _fireAfterItemClicked();- _unbind_on_events(); //remove old one- _bind_on_events();- _lastTarget = null;- });-- /* options events */- if (_settings.disabledOptionEvents == false) {- $("#" + childid + " li." + _styles_i.li).on("click", function (e) {- if (_isDisabled === true) return false;- fireOptionEventIfExist(this, "click");- });- $("#" + childid + " li." + _styles_i.li).on("mouseenter", function (e) {- if (_isDisabled === true) return false;- fireOptionEventIfExist(this, "mouseenter");- });- $("#" + childid + " li." + _styles_i.li).on("mouseover", function (e) {- if (_isDisabled === true) return false;- fireOptionEventIfExist(this, "mouseover");- });- $("#" + childid + " li." + _styles_i.li).on("mouseout", function (e) {- if (_isDisabled === true) return false;- fireOptionEventIfExist(this, "mouseout");- });- $("#" + childid + " li." + _styles_i.li).on("mousedown", function (e) {- if (_isDisabled === true) return false;- fireOptionEventIfExist(this, "mousedown");- });- $("#" + childid + " li." + _styles_i.li).on("mouseup", function (e) {- if (_isDisabled === true) return false;- fireOptionEventIfExist(this, "mouseup");- });- };- };- var _removeChildEvents = function () {- var childid = _getPostID("postChildID");- $("#" + childid).off("click");- $("#" + childid + " li." + _styles.enabled).off("mouseenter");- $("#" + childid + " li." + _styles.enabled).off("click");- $("#" + childid + " li." + _styles.enabled).off("mouseover");- $("#" + childid + " li." + _styles.enabled).off("mouseout");- $("#" + childid + " li." + _styles.enabled).off("mousedown");- $("#" + childid + " li." + _styles.enabled).off("mouseup");- };- var _applyEvents = function () {- var id = _getPostID("postID");- var childid = _getPostID("postChildID");- $("#" + id).on(_settings.event, function (e) {- if (_isDisabled === true) return false;- fireEventIfExist("click");- //prevent body click- e.preventDefault();- e.stopPropagation();- _open(e);- });- _applyChildEvents();- $("#" + id).on("dblclick", on_dblclick);- $("#" + id).on("mousemove", on_mousemove);- $("#" + id).on("mouseenter", on_mouseover);- $("#" + id).on("mouseleave", on_mouseout);- $("#" + id).on("mousedown", on_mousedown);- $("#" + id).on("mouseup", on_mouseup);- };- //after create- var _fixedForList = function () {- var id = _getPostID("postID");- var childid = _getPostID("postChildID");- if (_isList === true && _settings.enableCheckbox===false) {- $("#" + id + " ." + _styles.ddTitle).hide();- $("#" + childid).css({display: 'block', position: 'relative'});- //_open();- } else {- if(_settings.enableCheckbox===false) {- _isMultiple = false; //set multiple off if this is not a list- };- $("#" + id + " ." + _styles.ddTitle).show();- $("#" + childid).css({display: 'none', position: 'absolute'});- //set value- var first = $("#" + childid + " li." + _styles.selected)[0];- $("#" + childid + " li." + _styles.selected).removeClass(_styles.selected);- var index = _getIndex($(first).addClass(_styles.selected));- _setValue(index);- };- _childHeight(_childHeight()); //get and set height- };- var _fixedForDisabled = function () {- var id = _getPostID("postID");- var opc = (_isDisabled == true) ? _settings.disabledOpacity : 1;- if (_isDisabled === true) {- $("#" + id).addClass(_styles.disabledAll);- } else {- $("#" + id).removeClass(_styles.disabledAll);- };- };- var _fixedSomeUI = function () {- //auto filter- var tid = _getPostID("postTitleTextID");- $("#" + tid).on("keyup", _applyFilters);- //if is list- _fixedForList();- _fixedForDisabled();- };- var _createLayout = function () {- var oDiv = _createWrapper();- var oTitle = _createTitle();- oDiv.appendChild(oTitle);- //auto filter box- var oFilterBox = _createFilterBox();- oDiv.appendChild(oFilterBox);-- var oChildren = _createChildren();- oDiv.appendChild(oChildren);- $("#" + _element).after(oDiv);- _hideOriginal(); //hideOriginal- _fixedSomeUI();- _applyEvents();-- var childid = _getPostID("postChildID");- //append- if(_settings.append!='') {- $("#" + childid).append(_settings.append);- };- //prepend- if(_settings.prepend!='') {- $("#" + childid).prepend(_settings.prepend);- };- if (typeof _settings.on.create == "function") {- _settings.on.create.apply(_this, arguments);- };- };- var _selectMutipleOptions = function (bySelected) {- var childid = _getPostID("postChildID");- var selected = bySelected || $("#" + childid + " li." + _styles.selected); //bySelected or by argument- for (var i = 0; i < selected.length; i++) {- var ind = _getIndex(selected[i]);- getElement(_element).options[ind].selected = "selected";- };- _setValue(selected);- };- var _fireAfterItemClicked = function () {- //console.log("_fireAfterItemClicked")- var childid = _getPostID("postChildID");- var selected = $("#" + childid + " li." + _styles.selected);- if (_isMultiple && (_shiftHolded || _controlHolded) || _forcedTrigger) {- getElement(_element).selectedIndex = -1; //reset old- };- var index;- if (selected.length == 0) {- index = -1;- } else if (selected.length > 1) {- //selected multiple- _selectMutipleOptions(selected);- //index = $("#" + childid + " li." + _styles.selected);-- } else {- //if one selected- index = _getIndex($("#" + childid + " li." + _styles.selected));- };- if ((getElement(_element).selectedIndex != index || _forcedTrigger) && selected.length<=1) {- _forcedTrigger = false;- var evt = has_handler("change");- getElement(_element).selectedIndex = index;- _setValue(index);- //local- if (typeof _settings.on.change == "function") {- var d = _getDataAndUI();- _settings.on.change(d.data, d.ui);- };- $("#" + _element).trigger("change");- };- };- var _setValue = function (index, byvalue) {- if (index !== undefined) {- var selectedIndex, value, selectedText;- if (index == -1) {- selectedIndex = -1;- value = "";- selectedText = "";- _updateTitleUI(-1);- } else {- //by index or byvalue- if (typeof index != "object") {- var opt = getElement(_element).options[index];- getElement(_element).selectedIndex = index;- selectedIndex = index;- value = _parseOption(opt);- selectedText = (index >= 0) ? getElement(_element).options[index].text : "";- _updateTitleUI(undefined, value);- value = value.value; //for bottom- } else {- //this is multiple or by option- selectedIndex = (byvalue && byvalue.index) || getElement(_element).selectedIndex;- value = (byvalue && byvalue.value) || getElement(_element).value;- selectedText = (byvalue && byvalue.text) || getElement(_element).options[getElement(_element).selectedIndex].text || "";- _updateTitleUI(selectedIndex);- };- };- _updateProp("selectedIndex", selectedIndex);- _updateProp("value", value);- _updateProp("selectedText", selectedText);- _updateProp("children", getElement(_element).children);- _updateProp("uiData", _getDataAndUI());- _updateProp("selectedOptions", $("#" + _element + " option:selected"));- };- };- var has_handler = function (name) {- //True if a handler has been added in the html.- var evt = {byElement: false, byJQuery: false, hasEvent: false};- var obj = $("#" + _element);- //console.log(name)- try {- //console.log(obj.prop("on" + name) + " "+name);- if (obj.prop("on" + name) !== null) {- evt.hasEvent = true;- evt.byElement = true;- };- } catch(e) {- //console.log(e.message);- }- // True if a handler has been added using jQuery.- var evs;- if (typeof $._data == "function") { //1.8- evs = $._data(obj[0], "events");- } else {- evs = obj.data("events");- };- if (evs && evs[name]) {- evt.hasEvent = true;- evt.byJQuery = true;- };- return evt;- };- var _bind_on_events = function () {- _unbind_on_events();- $("body").on("click", _close);- //bind more events- $(document).on("keydown", on_keydown);- $(document).on("keyup", on_keyup);- //focus will work on this- };- var _unbind_on_events = function () {- $("body").off("click", _close);- //bind more events- $(document).off("keydown", on_keydown);- $(document).off("keyup", on_keyup);- };- var _applyFilters = function () {- var childid = _getPostID("postChildID");- var tid = _getPostID("postTitleTextID");- var sText = getElement(tid).value;- if (sText.length == 0) {- $("#" + childid + " li:hidden").show(); //show if hidden- _childHeight(_childHeight());- } else {- $("#" + childid + " li").hide();- $("#" + childid + " li:Contains('" + sText + "')").show();- if ($("#" + childid + " li:visible").length <= _settings.visibleRows) {- _childHeight(-1); //set autoheight- };- };- };- var _showFilterBox = function () {- var tid = _getPostID("postTitleTextID");- if ($("#" + tid + ":hidden").length > 0 && _controlHolded == false) {- $("#" + tid + ":hidden").show().val("");- getElement(tid).focus();- };- };- var _hideFilterBox = function () {- var tid = _getPostID("postTitleTextID");- if ($("#" + tid + ":visible").length > 0) {- $("#" + tid + ":visible").hide();- getElement(tid).blur();- };- };- var on_keydown = function (evt) {- var tid = _getPostID("postTitleTextID");- var childid = _getPostID("postChildID");- switch (evt.keyCode) {- case DOWN_ARROW:- case RIGHT_ARROW:- evt.preventDefault();- evt.stopPropagation();- //_hideFilterBox();- _next();- break;- case UP_ARROW:- case LEFT_ARROW:- evt.preventDefault();- evt.stopPropagation();- //_hideFilterBox();- _previous();- break;- case ESCAPE:- case ENTER:- evt.preventDefault();- evt.stopPropagation();- _close();- var selected = $("#" + childid + " li." + _styles.selected).length;- _forcedTrigger = (_oldSelected.length != selected || selected == 0) ? true : false;- _fireAfterItemClicked();- _unbind_on_events(); //remove old one- _lastTarget = null;- break;- case SHIFT:- _shiftHolded = true;- break;- case CONTROL:- _controlHolded = true;- break;- default:- if (evt.keyCode >= ALPHABETS_START && _isList === false) {- _showFilterBox();- };- break;- };- if (_isDisabled === true) return false;- fireEventIfExist("keydown");- };- var on_keyup = function (evt) {- switch (evt.keyCode) {- case SHIFT:- _shiftHolded = false;- break;- case CONTROL:- _controlHolded = false;- break;- };- if (_isDisabled === true) return false;- fireEventIfExist("keyup");- };- var on_dblclick = function (evt) {- if (_isDisabled === true) return false;- fireEventIfExist("dblclick");- };- var on_mousemove = function (evt) {- if (_isDisabled === true) return false;- fireEventIfExist("mousemove");- };-- var on_mouseover = function (evt) {- if (_isDisabled === true) return false;- evt.preventDefault();- fireEventIfExist("mouseover");- };- var on_mouseout = function (evt) {- if (_isDisabled === true) return false;- evt.preventDefault();- fireEventIfExist("mouseout");- };- var on_mousedown = function (evt) {- if (_isDisabled === true) return false;- fireEventIfExist("mousedown");- };- var on_mouseup = function (evt) {- if (_isDisabled === true) return false;- fireEventIfExist("mouseup");- };- var option_has_handler = function (opt, name) {- //True if a handler has been added in the html.- var evt = {byElement: false, byJQuery: false, hasEvent: false};- if ($(opt).prop("on" + name) != undefined) {- evt.hasEvent = true;- evt.byElement = true;- };- // True if a handler has been added using jQuery.- var evs = $(opt).data("events");- if (evs && evs[name]) {- evt.hasEvent = true;- evt.byJQuery = true;- };- return evt;- };- var fireOptionEventIfExist = function (li, evt_n) {- if (_settings.disabledOptionEvents == false) {- var opt = getElement(_element).options[_getIndex(li)];- //check if original has some- if (option_has_handler(opt, evt_n).hasEvent === true) {- if (option_has_handler(opt, evt_n).byElement === true) {- opt["on" + evt_n]();- };- if (option_has_handler(opt, evt_n).byJQuery === true) {- switch (evt_n) {- case "keydown":- case "keyup":- //key down/up will check later- break;- default:- $(opt).trigger(evt_n);- break;- };- };- return false;- };- };- };- var fireEventIfExist = function (evt_n) {- //local- if (typeof _settings.on[evt_n] == "function") {- _settings.on[evt_n].apply(this, arguments);- };- //check if original has some- if (has_handler(evt_n).hasEvent === true) {- if (has_handler(evt_n).byElement === true) {- getElement(_element)["on" + evt_n]();- };- if (has_handler(evt_n).byJQuery === true) {- switch (evt_n) {- case "keydown":- case "keyup":- //key down/up will check later- break;- default:- $("#" + _element).trigger(evt_n);- break;- };- };- return false;- };- };- /******************************* navigation **********************************************/- var _scrollToIfNeeded = function (opt) {- var childid = _getPostID("postChildID");- //if scroll is needed- opt = (opt !== undefined) ? opt : $("#" + childid + " li." + _styles.selected);- if (opt.length > 0) {- var pos = parseInt(($(opt).position().top));- var ch = parseInt($("#" + childid).height());- if (pos > ch) {- var top = pos + $("#" + childid).scrollTop() - (ch/2);- $("#" + childid).animate({scrollTop:top}, 500);- };- };- };- var _next = function () {- var childid = _getPostID("postChildID");- var items = $("#" + childid + " li:visible." + _styles_i.li);- var selected = $("#" + childid + " li:visible." + _styles.selected);- selected = (selected.length==0) ? items[0] : selected;- var index = $("#" + childid + " li:visible." + _styles_i.li).index(selected);- if ((index < items.length - 1)) {- index = getNext(index);- if (index < items.length) { //check again - hack for last disabled- if (!_shiftHolded || !_isList || !_isMultiple) {- $("#" + childid + " ." + _styles.selected).removeClass(_styles.selected);- };- $(items[index]).addClass(_styles.selected);- _updateTitleUI(index);- if (_isList == true) {- _fireAfterItemClicked();- };- _scrollToIfNeeded($(items[index]));- };- if (!_isList) {- _adjustOpen();- };- };- function getNext(ind) {- ind = ind + 1;- if (ind > items.length) {- return ind;- };- if ($(items[ind]).hasClass(_styles.enabled) === true) {- return ind;- };- return ind = getNext(ind);- };- };- var _previous = function () {- var childid = _getPostID("postChildID");- var selected = $("#" + childid + " li:visible." + _styles.selected);- var items = $("#" + childid + " li:visible." + _styles_i.li);- var index = $("#" + childid + " li:visible." + _styles_i.li).index(selected[0]);- if (index >= 0) {- index = getPrev(index);- if (index >= 0) { //check again - hack for disabled- if (!_shiftHolded || !_isList || !_isMultiple) {- $("#" + childid + " ." + _styles.selected).removeClass(_styles.selected);- };- $(items[index]).addClass(_styles.selected);- _updateTitleUI(index);- if (_isList == true) {- _fireAfterItemClicked();- };- if (parseInt(($(items[index]).position().top + $(items[index]).height())) <= 0) {- var top = ($("#" + childid).scrollTop() - $("#" + childid).height()) - $(items[index]).height();- $("#" + childid).animate({scrollTop: top}, 500);- };- };- if (!_isList) {- _adjustOpen();- };- };-- function getPrev(ind) {- ind = ind - 1;- if (ind < 0) {- return ind;- };- if ($(items[ind]).hasClass(_styles.enabled) === true) {- return ind;- };- return ind = getPrev(ind);- };- };- var _adjustOpen = function () {- var id = _getPostID("postID");- var childid = _getPostID("postChildID");- var pos = $("#" + id).offset();- var mH = $("#" + id).height();- var wH = $(window).height();- var st = $(window).scrollTop();- var cH = $("#" + childid).height();- var top = $("#" + id).height(); //this close so its title height- if ((wH + st) < Math.floor(cH + mH + pos.top) || _settings.openDirection.toLowerCase() == 'alwaysup') {- top = cH;- $("#" + childid).css({top: "-" + top + "px", display: 'block', zIndex: _settings.zIndex});- $("#" + id).removeClass("borderRadius borderRadiusTp").addClass("borderRadiusBtm");- var top = $("#" + childid).offset().top;- if (top < -10) {- $("#" + childid).css({top: (parseInt($("#" + childid).css("top")) - top + 20 + st) + "px", zIndex: _settings.zIndex});- $("#" + id).removeClass("borderRadiusBtm borderRadiusTp").addClass("borderRadius");- };- } else {- $("#" + childid).css({top: top + "px", zIndex: _settings.zIndex});- $("#" + id).removeClass("borderRadius borderRadiusBtm").addClass("borderRadiusTp");- };- //hack for ie zindex- //i hate ie :D- if(_isIE) {- if(msieversion()<=7) {- $('div.ddcommon').css("zIndex", _settings.zIndex-10);- $("#" + id).css("zIndex", _settings.zIndex+5);- };- };- };- var _open = function (e) {- if (_isDisabled === true) return false;- var id = _getPostID("postID");- var childid = _getPostID("postChildID");- if (!_isOpen) {- _isOpen = true;- if (msBeautify.oldDiv != '') {- $("#" + msBeautify.oldDiv).css({display: "none"}); //hide all- };- msBeautify.oldDiv = childid;- $("#" + childid + " li:hidden").show(); //show if hidden- _adjustOpen();- var animStyle = _settings.animStyle;- if(animStyle=="" || animStyle=="none") {- $("#" + childid).css({display:"block"});- _scrollToIfNeeded();- if (typeof _settings.on.open == "function") {- var d = _getDataAndUI();- _settings.on.open(d.data, d.ui);- };- } else {- $("#" + childid)[animStyle]("fast", function () {- _scrollToIfNeeded();- if (typeof _settings.on.open == "function") {- var d = _getDataAndUI();- _settings.on.open(d.data, d.ui);- };- });- };- _bind_on_events();- } else {- if(_settings.event!=='mouseover') {- _close();- };- };- };- var _close = function (e) {- _isOpen = false;- var id = _getPostID("postID");- var childid = _getPostID("postChildID");- if (_isList === false || _settings.enableCheckbox===true) {- $("#" + childid).css({display: "none"});- $("#" + id).removeClass("borderRadiusTp borderRadiusBtm").addClass("borderRadius");- };- _unbind_on_events();- if (typeof _settings.on.close == "function") {- var d = _getDataAndUI();- _settings.on.close(d.data, d.ui);- };- //rest some old stuff- _hideFilterBox();- _childHeight(_childHeight()); //its needed after filter applied- $("#" + childid).css({zIndex:1})- };- /*********************** </layout> *************************************/- var _mergeAllProp = function () {- try {- _orginial = $.extend(true, {}, getElement(_element));- for (var i in _orginial) {- if (typeof _orginial[i] != "function") {- _this[i] = _orginial[i]; //properties- };- };- } catch(e) {- //silent- };- _this.selectedText = (getElement(_element).selectedIndex >= 0) ? getElement(_element).options[getElement(_element).selectedIndex].text : "";- _this.version = msBeautify.version.msDropdown;- _this.author = msBeautify.author;- };- var _getDataAndUIByOption = function (opt) {- if (opt != null && typeof opt != "undefined") {- var childid = _getPostID("postChildID");- var data = _parseOption(opt);- var ui = $("#" + childid + " li." + _styles_i.li + ":eq(" + (opt.index) + ")");- return {data: data, ui: ui, option: opt, index: opt.index};- };- return null;- };- var _getDataAndUI = function () {- var childid = _getPostID("postChildID");- var ele = getElement(_element);- var data, ui, option, index;- if (ele.selectedIndex == -1) {- data = null;- ui = null;- option = null;- index = -1;- } else {- ui = $("#" + childid + " li." + _styles.selected);- if (ui.length > 1) {- var d = [], op = [], ind = [];- for (var i = 0; i < ui.length; i++) {- var pd = _getIndex(ui[i]);- d.push(pd);- op.push(ele.options[pd]);- };- data = d;- option = op;- index = d;- } else {- option = ele.options[ele.selectedIndex];- data = _parseOption(option);- index = ele.selectedIndex;- };- };- return {data: data, ui: ui, index: index, option: option};- };- var _updateTitleUI = function (index, byvalue) {- var titleid = _getPostID("postTitleID");- var value = {};- if (index == -1) {- value.text = " ";- value.className = "";- value.description = "";- value.image = "";- } else if (typeof index != "undefined") {- var opt = getElement(_element).options[index];- value = _parseOption(opt);- } else {- value = byvalue;- };- //update title and current- $("#" + titleid).find("." + _styles.label).html(value.text);- getElement(titleid).className = _styles.ddTitleText + " " + value.className;- //update desction- if (value.description != "") {- $("#" + titleid).find("." + _styles.description).html(value.description).show();- } else {- $("#" + titleid).find("." + _styles.description).html("").hide();- };- //update icon- var img = $("#" + titleid).find("img");- if (img.length > 0) {- $(img).remove();- };- if (value.image != "" && _settings.showIcon) {- img = _createElement("img", {src: value.image});- $("#" + titleid).prepend(img);- if(value.imagecss!="") {- img.className = value.imagecss+" ";- };- if (value.description == "") {- img.className = img.className+_styles_i.fnone;- };- };- };- var _updateProp = function (p, v) {- _this[p] = v;- };- var _updateUI = function (a, opt, i) { //action, index, opt- var childid = _getPostID("postChildID");- var wasSelected = false;- switch (a) {- case "add":- var li = _createChild(opt || getElement(_element).options[i]);- var index;- if (arguments.length == 3) {- index = i;- } else {- index = $("#" + childid + " li." + _styles_i.li).length - 1;- };- if (index < 0 || !index) {- $("#" + childid + " ul").append(li);- } else {- var at = $("#" + childid + " li." + _styles_i.li)[index];- $(at).before(li);- };- _removeChildEvents();- _applyChildEvents();- if (_settings.on.add != null) {- _settings.on.add.apply(this, arguments);- };- break;- case "remove":- wasSelected = $($("#" + childid + " li." + _styles_i.li)[i]).hasClass(_styles.selected);- $("#" + childid + " li." + _styles_i.li + ":eq(" + i + ")").remove();- var items = $("#" + childid + " li." + _styles.enabled);- if (wasSelected == true) {- if (items.length > 0) {- $(items[0]).addClass(_styles.selected);- var ind = $("#" + childid + " li." + _styles_i.li).index(items[0]);- _setValue(ind);- };- };- if (items.length == 0) {- _setValue(-1);- };- if ($("#" + childid + " li." + _styles_i.li).length < _settings.visibleRows && !_isList) {- _childHeight(-1); //set autoheight- };- if (_settings.on.remove != null) {- _settings.on.remove.apply(this, arguments);- };- break;- };- };- /************************** public methods/events **********************/- this.act = function () {- var action = arguments[0];- Array.prototype.shift.call(arguments);- switch (action) {- case "add":- _this.add.apply(this, arguments);- break;- case "remove":- _this.remove.apply(this, arguments);- break;- default:- try {- getElement(_element)[action].apply(getElement(_element), arguments);- } catch (e) {- //there is some error.- };- break;- };- };-- this.add = function () {- var text, value, title, image, description;- var obj = arguments[0];- if (typeof obj == "string") {- text = obj;- value = text;- opt = new Option(text, value);- } else {- text = obj.text || '';- value = obj.value || text;- title = obj.title || '';- image = obj.image || '';- description = obj.description || '';- //image:imagePath, title:title, description:description, value:opt.value, text:opt.text, className:opt.className||""- opt = new Option(text, value);- $(opt).data("description", description);- $(opt).data("image", image);- $(opt).data("title", title);- };- arguments[0] = opt; //this option- getElement(_element).add.apply(getElement(_element), arguments);- _updateProp("children", getElement(_element)["children"]);- _updateProp("length", getElement(_element).length);- _updateUI("add", opt, arguments[1]);- };- this.remove = function (i) {- getElement(_element).remove(i);- _updateProp("children", getElement(_element)["children"]);- _updateProp("length", getElement(_element).length);- _updateUI("remove", undefined, i);- };- this.set = function (prop, val) {- if (typeof prop == "undefined" || typeof val == "undefined") return false;- prop = prop.toString();- try {- _updateProp(prop, val);- } catch (e) {/*this is ready only */};-- switch (prop) {- case "size":- getElement(_element)[prop] = val;- if (val == 0) {- getElement(_element).multiple = false; //if size is zero multiple should be false- };- _isList = (getElement(_element).size > 1 || getElement(_element).multiple == true) ? true : false;- _fixedForList();- break;- case "multiple":- getElement(_element)[prop] = val;- _isList = (getElement(_element).size > 1 || getElement(_element).multiple == true) ? true : false;- _isMultiple = getElement(_element).multiple;- _fixedForList();- _updateProp(prop, val);- break;- case "disabled":- getElement(_element)[prop] = val;- _isDisabled = val;- _fixedForDisabled();- break;- case "selectedIndex":- case "value":- getElement(_element)[prop] = val;- var childid = _getPostID("postChildID");- $("#" + childid + " li." + _styles_i.li).removeClass(_styles.selected);- $($("#" + childid + " li." + _styles_i.li)[getElement(_element).selectedIndex]).addClass(_styles.selected);- _setValue(getElement(_element).selectedIndex);- break;- case "length":- var childid = _getPostID("postChildID");- if (val < getElement(_element).length) {- getElement(_element)[prop] = val;- if (val == 0) {- $("#" + childid + " li." + _styles_i.li).remove();- _setValue(-1);- } else {- $("#" + childid + " li." + _styles_i.li + ":gt(" + (val - 1) + ")").remove();- if ($("#" + childid + " li." + _styles.selected).length == 0) {- $("#" + childid + " li." + _styles.enabled + ":eq(0)").addClass(_styles.selected);- };- };- _updateProp(prop, val);- _updateProp("children", getElement(_element)["children"]);- };- break;- case "id":- //please i need this. so preventing to change it. will work on this later- break;- default:- //check if this is not a readonly properties- try {- getElement(_element)[prop] = val;- _updateProp(prop, val);- } catch (e) {- //silent- };- break;- }- };- this.get = function (prop) {- return _this[prop] || getElement(_element)[prop]; //return if local else from original- };- this.visible = function (val) {- var id = _getPostID("postID");- if (val === true) {- $("#" + id).show();- } else if (val === false) {- $("#" + id).hide();- } else {- return ($("#" + id).css("display")=="none") ? false : true;- };- };- this.debug = function (v) {- msBeautify.debug(v);- };- this.close = function () {- _close();- };- this.open = function () {- _open();- };- this.showRows = function (r) {- if (typeof r == "undefined" || r == 0) {- return false;- };- _settings.visibleRows = r;- _childHeight(_childHeight());- };- this.visibleRows = this.showRows;- this.on = function (type, fn) {- $("#" + _element).on(type, fn);- };- this.off = function (type, fn) {- $("#" + _element).off(type, fn);- };- this.addMyEvent = this.on;- this.getData = function () {- return _getDataAndUI()- };- this.namedItem = function () {- var opt = getElement(_element).namedItem.apply(getElement(_element), arguments);- return _getDataAndUIByOption(opt);- };- this.item = function () {- var opt = getElement(_element).item.apply(getElement(_element), arguments);- return _getDataAndUIByOption(opt);- };- //v 3.2- this.setIndexByValue = function(val) {- this.set("value", val);- };- this.destroy = function () {- var hidid = _getPostID("postElementHolder");- var id = _getPostID("postID");- $("#" + id + ", #" + id + " *").off();- $("#" + id).remove();- $("#" + _element).parent().replaceWith($("#" + _element));- $("#" + _element).data("dd", null);- };- //Create msDropDown- _construct();-};-//bind in jquery-$.fn.extend({- msDropDown: function(settings)- {- return this.each(function()- {- if (!$(this).data('dd')){- var mydropdown = new dd(this, settings);- $(this).data('dd', mydropdown);- };- });- }-});-$.fn.msDropdown = $.fn.msDropDown; //make a copy-})(jQuery);\ No newline at end of filediff --git a/web/ext/palettes/jquery.dd-3.3/jquery.dd.min.css b/web/ext/palettes/jquery.dd-3.3/jquery.dd.min.cssdeleted file mode 100644index 1c075e1b6..000000000--- a/web/ext/palettes/jquery.dd-3.3/jquery.dd.min.css+++ /dev/null@@ -1 +0,0 @@-.borderRadius{-moz-border-radius:5px;border-radius:5px}.borderRadiusTp{-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.borderRadiusBtm{-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px}.ddcommon{position:relative;zoom:1;display:inline-block;*display:inline;cursor:default}.ddcommon ul{padding:0;margin:0}.ddcommon ul li{list-style-type:none}.borderRadiusTp ul li:last-child{-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;border-bottom:0 none #c3c3c3}.borderRadiusBtm ul li:first-child{-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;border-bottom:1 solid #c3c3c3}.ddcommon .disabled img,.ddcommon .disabled span,.ddcommon.disabledAll{opacity:.5;-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50);-khtml-opacity:.5;-moz-opacity:.5;color:#999}.ddcommon .clear{clear:both}.ddcommon .shadow{-moz-box-shadow:5px 5px 5px -5px #888;-webkit-box-shadow:5px 5px 5px -5px #888;box-shadow:5px 5px 5px -5px #888}.ddcommon input.text{color:#7e7e7e;padding:0;position:absolute;background:#fff;display:block;width:98%;height:98%;left:2px;top:0;border:0}.ddOutOfVision{position:relative;display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline}.borderRadius .shadow{-moz-box-shadow:5px 5px 5px -5px #888;-webkit-box-shadow:5px 5px 5px -5px #888;box-shadow:5px 5px 5px -5px #888}.borderRadiusBtm .shadow{-moz-box-shadow:-5px -5px 5px -5px #888;-webkit-box-shadow:-5px -5px 5px -5px #888;box-shadow:-5px -5px 5px -5px #888}.borderRadius .border,.borderRadiusTp .border{-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px}.borderRadiusBtm .border{-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}img.fnone{float:none!important}.ddcommon .divider{width:0;height:100%;position:absolute}.ddcommon .arrow{display:inline-block;position:absolute;top:50%;right:4px}.ddcommon .arrow:hover{background-position:0 100%}.ddcommon .ddTitle{padding:0;position:relative;display:inline-block;width:100%}.ddcommon .ddTitle .ddTitleText{display:block}.ddcommon .ddTitle .ddTitleText .ddTitleText{padding:0}.ddcommon .ddTitle .description{display:block}.ddcommon .ddTitle .ddTitleText img{position:relative;vertical-align:middle;float:left}.ddcommon .ddChild{position:absolute;display:none;width:100%;overflow-y:auto;overflow-x:hidden;zoom:1;z-index:9999}.ddcommon .ddChild li{clear:both}.ddcommon .ddChild li .description{display:block}.ddcommon .ddChild li img{border:0 none;position:relative;vertical-align:middle;float:left}.ddcommon .ddChild li.optgroup{padding:0}.ddcommon .ddChild li.optgroup .optgroupTitle{padding:0 5px;font-weight:700;font-style:italic}.ddcommon .ddChild li.optgroup ul li{padding:5px 5px 5px 15px}.ddcommon .noBorderTop{border-top:0 0!important;padding:0;margin:0}.dd{border:1px solid #c3c3c3}.dd .divider{border-left:1px solid #c3c3c3;border-right:1px solid #fff;right:24px}.dd .arrow{width:16px;height:16px;margin-top:-8px;background:url(images/jquery.dd-3.3/skin1/dd_arrow.gif) no-repeat}.dd .arrow:hover{background-position:0 100%}.dd .ddTitle{color:#000;background:#e2e2e4 url(images/jquery.dd-3.3/skin1/title-bg.gif) repeat-x left top}.dd .ddTitle .ddTitleText{padding:5px 20px 5px 5px}.dd .ddTitle .ddTitleText .ddTitleText{padding:0}.dd .ddTitle .description{font-size:12px;color:#666}.dd .ddTitle .ddTitleText img{padding-right:5px}.dd .ddChild{border:1px solid #c3c3c3;background-color:#fff;left:-1px}.dd .ddChild li{padding:5px;background-color:#fff;border-bottom:1px solid #c3c3c3}.dd .ddChild li .description{color:#666}.dd .ddChild li .ddlabel{color:#333}.dd .ddChild li.hover{background-color:#f2f2f2}.dd .ddChild li img{padding:0 6px 0 0}.dd .ddChild li.optgroup{padding:0}.dd .ddChild li.optgroup .optgroupTitle{padding:0 5px;font-weight:700;font-style:italic}.dd .ddChild li.optgroup ul li{padding:5px 5px 5px 15px}.dd .ddChild li.selected{background-color:#d5d5d5;color:#000}.blue{border:1px solid #ddd}.blue .divider{display:none}.blue .arrow{width:27px;height:27px;margin-top:-14px;background:url(../../../images/jquery.dd/skin2/dd_arrow.gif) no-repeat}.blue .arrow:hover{background-position:0 100%}.blue .ddTitle{color:#fff;background:#10bbe6 url(../../../images/jquery.dd/skin2/title-bg.gif) repeat-x left top}.blue .ddTitle .ddTitleText{padding:10px 20px 10px 5px;font-weight:700;font-size:16px}.blue .ddTitle .ddTitleText .ddTitleText{padding:0}.blue .ddTitle .description{font-size:12px;color:#666}.blue .ddTitle .ddTitleText img{padding-right:5px}.blue .ddChild{border:1px solid #c3c3c3;background-color:#fff;left:-1px}.blue .ddChild li{padding:5px;background-color:#fff;border-bottom:1px solid #c3c3c3}.blue .ddChild li .description{color:#666}.blue .ddChild li .ddlabel{color:#333}.blue .ddChild li.hover{background-color:#6CF}.blue .ddChild li img{padding:0 6px 0 0}.blue .ddChild li.optgroup{padding:0}.blue .ddChild li.optgroup .optgroupTitle{padding:0 5px;font-weight:700;font-style:italic}.blue .ddChild li.optgroup ul li{padding:5px 5px 5px 15px}.blue .ddChild li.selected{background-color:#0d97ba}.blue .ddChild li.selected .ddlabel{color:#fff}\ No newline at end of filediff --git a/web/ext/palettes/jquery.dd-3.3/jquery.dd.min.js b/web/ext/palettes/jquery.dd-3.3/jquery.dd.min.jsdeleted file mode 100644index 5282ba16b..000000000--- a/web/ext/palettes/jquery.dd-3.3/jquery.dd.min.js+++ /dev/null@@ -1 +0,0 @@-var msBeautify=msBeautify||{};!function($){function dd(element,settings){var _settings=$.extend(!0,{byJson:{data:null,selectedIndex:0,name:null,size:0,multiple:!1,width:250},mainCSS:"dd",height:120,visibleRows:7,rowHeight:0,showIcon:!0,zIndex:9999,useSprite:!1,animStyle:"slideDown",event:"click",openDirection:"auto",jsonTitle:!0,style:"",disabledOpacity:.7,disabledOptionEvents:!0,childWidth:0,enableCheckbox:!1,checkboxNameSuffix:"_mscheck",append:"",prepend:"",on:{create:null,open:null,close:null,add:null,remove:null,change:null,blur:null,click:null,dblclick:null,mousemove:null,mouseover:null,mouseout:null,focus:null,mousedown:null,mouseup:null}},settings),_this=this,_holderId={postElementHolder:"_msddHolder",postID:"_msdd",postTitleID:"_title",postTitleTextID:"_titleText",postChildID:"_child"},_styles={dd:_settings.mainCSS,ddTitle:"ddTitle",arrow:"arrow arrowoff",ddChild:"ddChild",ddTitleText:"ddTitleText",disabled:"disabled",enabled:"enabled",ddOutOfVision:"ddOutOfVision",borderTop:"borderTop",noBorderTop:"noBorderTop",selected:"selected",divider:"divider",optgroup:"optgroup",optgroupTitle:"optgroupTitle",description:"description",label:"ddlabel",hover:"hover",disabledAll:"disabledAll"},_styles_i={li:"_msddli_",borderRadiusTp:"borderRadiusTp",ddChildMore:"border shadow",fnone:"fnone"},_isList=!1,_isMultiple=!1,_isDisabled=!1,_cacheElement={},_element,_orginial={},_isOpen=!1,DOWN_ARROW=40,UP_ARROW=38,LEFT_ARROW=37,RIGHT_ARROW=39,ESCAPE=27,ENTER=13,ALPHABETS_START=47,SHIFT=16,CONTROL=17,_shiftHolded=!1,_controlHolded=!1,_lastTarget=null,_forcedTrigger=!1,_oldSelected,_isCreated=!1,_doc=document,_ua=window.navigator.userAgent,_isIE=_ua.match(/msie/i),msieversion=function(){var a=_ua.indexOf("MSIE");return a>0?parseInt(_ua.substring(a+5,_ua.indexOf(".",a))):0},_checkDataSetting=function(){_settings.mainCSS=$("#"+_element).data("maincss")||_settings.mainCSS,_settings.visibleRows=$("#"+_element).data("visiblerows")||_settings.visibleRows,0==$("#"+_element).data("showicon")&&(_settings.showIcon=$("#"+_element).data("showicon")),_settings.useSprite=$("#"+_element).data("usesprite")||_settings.useSprite,_settings.animStyle=$("#"+_element).data("animstyle")||_settings.animStyle,_settings.event=$("#"+_element).data("event")||_settings.event,_settings.openDirection=$("#"+_element).data("opendirection")||_settings.openDirection,_settings.jsonTitle=$("#"+_element).data("jsontitle")||_settings.jsonTitle,_settings.disabledOpacity=$("#"+_element).data("disabledopacity")||_settings.disabledOpacity,_settings.childWidth=$("#"+_element).data("childwidth")||_settings.childWidth,_settings.enableCheckbox=$("#"+_element).data("enablecheckbox")||_settings.enableCheckbox,_settings.checkboxNameSuffix=$("#"+_element).data("checkboxnamesuffix")||_settings.checkboxNameSuffix,_settings.append=$("#"+_element).data("append")||_settings.append,_settings.prepend=$("#"+_element).data("prepend")||_settings.prepend},getElement=function(a){return void 0===_cacheElement[a]&&(_cacheElement[a]=_doc.getElementById(a)),_cacheElement[a]},_getIndex=function(a){var b=_getPostID("postChildID");return $("#"+b+" li."+_styles_i.li).index(a)},_createByJson=function(){if(_settings.byJson.data){var validData=["description","image","title"];try{element.id||(element.id="dropdown"+msBeautify.counter),_settings.byJson.data=eval(_settings.byJson.data);var id="msdropdown"+msBeautify.counter++,obj={};obj.id=id,obj.name=_settings.byJson.name||element.id,_settings.byJson.size>0&&(obj.size=_settings.byJson.size),obj.multiple=_settings.byJson.multiple;for(var oSelect=_createElement("select",obj),i=0;i<_settings.byJson.data.length;i++){var current=_settings.byJson.data[i],opt=new Option(current.text,current.value);for(var p in current)if("text"!=p.toLowerCase()){var key=-1!=$.inArray(p.toLowerCase(),validData)?"data-":"";opt.setAttribute(key+p,current[p])}oSelect.options[i]=opt}getElement(element.id).appendChild(oSelect),oSelect.selectedIndex=_settings.byJson.selectedIndex,$(oSelect).css({width:_settings.byJson.width+"px"}),element=oSelect}catch(e){throw"There is an error in json data."}}},_construct=function(){_createByJson(),element.id||(element.id="msdrpdd"+msBeautify.counter++),_element=element.id,_this._element=_element,_checkDataSetting(),_isDisabled=getElement(_element).disabled;var a=_settings.enableCheckbox;Boolean(a)===!0&&(getElement(_element).multiple=!0,_settings.enableCheckbox=!0),_isList=getElement(_element).size>1||1==getElement(_element).multiple?!0:!1,_isList&&(_isMultiple=getElement(_element).multiple),_mergeAllProp(),_createLayout(),_updateProp("uiData",_getDataAndUI()),_updateProp("selectedOptions",$("#"+_element+" option:selected"));var b=_getPostID("postChildID");_oldSelected=$("#"+b+" li."+_styles.selected)},_getPostID=function(a){return _element+_holderId[a]},_getInternalStyle=function(a){var b=void 0===a.style?"":a.style.cssText;return b},_parseOption=function(opt){var imagePath="",title="",description="",value=-1,text="",className="",imagecss="";if(void 0!==opt){var attrTitle=opt.title||"";if(""!=attrTitle){var reg=/^\{.*\}$/,isJson=reg.test(attrTitle);if(isJson&&_settings.jsonTitle)var obj=eval("["+attrTitle+"]");title=isJson&&_settings.jsonTitle?obj[0].title:title,description=isJson&&_settings.jsonTitle?obj[0].description:description,imagePath=isJson&&_settings.jsonTitle?obj[0].image:attrTitle,imagecss=isJson&&_settings.jsonTitle?obj[0].imagecss:imagecss}text=opt.text||"",value=opt.value||"",className=opt.className||"",title=$(opt).prop("data-title")||$(opt).data("title")||title||"",description=$(opt).prop("data-description")||$(opt).data("description")||description||"",imagePath=$(opt).prop("data-image")||$(opt).data("image")||imagePath||"",imagecss=$(opt).prop("data-imagecss")||$(opt).data("imagecss")||imagecss||""}var o={image:imagePath,title:title,description:description,value:value,text:text,className:className,imagecss:imagecss};return o},_createElement=function(a,b,c){var d=_doc.createElement(a);if(b)for(var e in b)switch(e){case"style":d.style.cssText=b[e];break;default:d[e]=b[e]}return c&&(d.innerHTML=c),d},_hideOriginal=function(){var a=_getPostID("postElementHolder");if(0==$("#"+a).length){var b={style:"height: 0px;overflow: hidden;position: absolute;",className:_styles.ddOutOfVision};b.id=a;var c=_createElement("div",b);$("#"+_element).after(c),$("#"+_element).appendTo($("#"+a))}else $("#"+a).css({height:0,overflow:"hidden",position:"absolute"})},_createWrapper=function(){var a={className:_styles.dd+" ddcommon borderRadius"},b=_getInternalStyle(getElement(_element)),c=$("#"+_element).outerWidth();a.style="width: "+c+"px;",b.length>0&&(a.style=a.style+""+b),a.id=_getPostID("postID");var d=_createElement("div",a);return d},_createTitle=function(){var a;a=getElement(_element).selectedIndex>=0?getElement(_element).options[getElement(_element).selectedIndex]:{value:"",text:""};var b="",c="",d=$("#"+_element).data("usesprite");d&&(_settings.useSprite=d),0!=_settings.useSprite&&(b=" "+_settings.useSprite,c=" "+a.className);var e=_createElement("div",{className:_styles.ddTitle+b+" "+_styles_i.borderRadiusTp}),f=_createElement("span",{className:_styles.divider}),g=_createElement("span",{className:_styles.arrow}),h=_getPostID("postTitleID"),i=_createElement("span",{className:_styles.ddTitleText+c,id:h}),j=_parseOption(a),k=j.image,l=j.text||"";if(""!=k&&_settings.showIcon){var m=_createElement("img");m.src=k,""!=j.imagecss&&(m.className=j.imagecss+" ")}var n=_createElement("span",{className:_styles.label},l);e.appendChild(f),e.appendChild(g),m&&i.appendChild(m),i.appendChild(n),e.appendChild(i);var o=_createElement("span",{className:_styles.description},j.description);return i.appendChild(o),e},_createFilterBox=function(){var a=_getPostID("postTitleTextID"),b=_createElement("input",{id:a,type:"text",value:"",autocomplete:"off",className:"text shadow borderRadius",style:"display: none"});return b},_createChild=function(a){var b={},c=_getInternalStyle(a);c.length>0&&(b.style=c);var d=a.disabled?_styles.disabled:_styles.enabled;d=a.selected?d+" "+_styles.selected:d,d=d+" "+_styles_i.li,b.className=d,0!=_settings.useSprite&&(b.className=d+" "+a.className);var e=_createElement("li",b),f=_parseOption(a);""!=f.title&&(e.title=f.title);var g=f.image;if(""!=g&&_settings.showIcon){var h=_createElement("img");h.src=g,""!=f.imagecss&&(h.className=f.imagecss+" ")}if(""!=f.description)var i=_createElement("span",{className:_styles.description},f.description);var j=a.text||"",k=_createElement("span",{className:_styles.label},j);if(_settings.enableCheckbox===!0){var l=_createElement("input",{type:"checkbox",name:_element+_settings.checkboxNameSuffix+"[]",value:a.value||""});e.appendChild(l),_settings.enableCheckbox===!0&&(l.checked=a.selected?!0:!1)}h&&e.appendChild(h),e.appendChild(k),i?e.appendChild(i):h&&(h.className=h.className+_styles_i.fnone);var m=_createElement("div",{className:"clear"});return e.appendChild(m),e},_createChildren=function(){var a=_getPostID("postChildID"),b={className:_styles.ddChild+" ddchild_ "+_styles_i.ddChildMore,id:a};b.style=0==_isList?"z-index: "+_settings.zIndex:"z-index:1";var c=$("#"+_element).data("childwidth")||_settings.childWidth;c&&(b.style=(b.style||"")+";width:"+c);var d=_createElement("div",b),e=_createElement("ul");0!=_settings.useSprite&&(e.className=_settings.useSprite);for(var f=getElement(_element).children,g=0;g<f.length;g++){var h,i=f[g];if("optgroup"==i.nodeName.toLowerCase()){h=_createElement("li",{className:_styles.optgroup});var j=_createElement("span",{className:_styles.optgroupTitle},i.label);h.appendChild(j);for(var k=i.children,l=_createElement("ul"),m=0;m<k.length;m++){var n=_createChild(k[m]);l.appendChild(n)}h.appendChild(l)}else h=_createChild(i);e.appendChild(h)}return d.appendChild(e),d},_childHeight=function(a){var b=_getPostID("postChildID");if(a)return-1==a?$("#"+b).css({height:"auto",overflow:"auto"}):$("#"+b).css("height",a+"px"),!1;var c;if(getElement(_element).options.length>_settings.visibleRows){var d=parseInt($("#"+b+" li:first").css("padding-bottom"))+parseInt($("#"+b+" li:first").css("padding-top"));0===_settings.rowHeight&&($("#"+b).css({visibility:"hidden",display:"block"}),_settings.rowHeight=Math.round($("#"+b+" li:first").height()),$("#"+b).css({visibility:"visible"}),_isList&&_settings.enableCheckbox!==!0||$("#"+b).css({display:"none"})),c=(_settings.rowHeight+d)*_settings.visibleRows}else _isList&&(c=$("#"+_element).height());return c},_applyChildEvents=function(){var a=_getPostID("postChildID");$("#"+a).on("click",function(a){return _isDisabled===!0?!1:(a.preventDefault(),a.stopPropagation(),_isList&&_bind_on_events(),void 0)}),$("#"+a+" li."+_styles.enabled).on("click",function(a){"input"!==a.target.nodeName.toLowerCase()&&_close(this)}),$("#"+a+" li."+_styles.enabled).on("mousedown",function(b){if(_isDisabled===!0)return!1;if(_oldSelected=$("#"+a+" li."+_styles.selected),_lastTarget=this,b.preventDefault(),b.stopPropagation(),_settings.enableCheckbox===!0&&"input"===b.target.nodeName.toLowerCase()&&(_controlHolded=!0),_isList===!0)if(_isMultiple)if(_shiftHolded===!0){$(this).addClass(_styles.selected);var c=$("#"+a+" li."+_styles.selected),d=_getIndex(this);if(c.length>1){var e=$("#"+a+" li."+_styles_i.li),f=_getIndex(c[0]),g=_getIndex(c[1]);d>g&&(f=d,g+=1);for(var h=Math.min(f,g);h<=Math.max(f,g);h++){var i=e[h];$(i).hasClass(_styles.enabled)&&$(i).addClass(_styles.selected)}}}else if(_controlHolded===!0){if($(this).toggleClass(_styles.selected),_settings.enableCheckbox===!0){var j=this.childNodes[0];j.checked=!j.checked}}else $("#"+a+" li."+_styles.selected).removeClass(_styles.selected),$("#"+a+" input:checkbox").prop("checked",!1),$(this).addClass(_styles.selected),_settings.enableCheckbox===!0&&(this.childNodes[0].checked=!0);else $("#"+a+" li."+_styles.selected).removeClass(_styles.selected),$(this).addClass(_styles.selected);else $("#"+a+" li."+_styles.selected).removeClass(_styles.selected),$(this).addClass(_styles.selected)}),$("#"+a+" li."+_styles.enabled).on("mouseenter",function(a){return _isDisabled===!0?!1:(a.preventDefault(),a.stopPropagation(),null!=_lastTarget&&_isMultiple&&($(this).addClass(_styles.selected),_settings.enableCheckbox===!0&&(this.childNodes[0].checked=!0)),void 0)}),$("#"+a+" li."+_styles.enabled).on("mouseover",function(){return _isDisabled===!0?!1:($(this).addClass(_styles.hover),void 0)}),$("#"+a+" li."+_styles.enabled).on("mouseout",function(){return _isDisabled===!0?!1:($("#"+a+" li."+_styles.hover).removeClass(_styles.hover),void 0)}),$("#"+a+" li."+_styles.enabled).on("mouseup",function(b){if(_isDisabled===!0)return!1;b.preventDefault(),b.stopPropagation(),_settings.enableCheckbox===!0&&(_controlHolded=!1);var c=$("#"+a+" li."+_styles.selected).length;_forcedTrigger=_oldSelected.length!=c||0==c?!0:!1,_fireAfterItemClicked(),_unbind_on_events(),_bind_on_events(),_lastTarget=null}),0==_settings.disabledOptionEvents&&($("#"+a+" li."+_styles_i.li).on("click",function(){return _isDisabled===!0?!1:(fireOptionEventIfExist(this,"click"),void 0)}),$("#"+a+" li."+_styles_i.li).on("mouseenter",function(){return _isDisabled===!0?!1:(fireOptionEventIfExist(this,"mouseenter"),void 0)}),$("#"+a+" li."+_styles_i.li).on("mouseover",function(){return _isDisabled===!0?!1:(fireOptionEventIfExist(this,"mouseover"),void 0)}),$("#"+a+" li."+_styles_i.li).on("mouseout",function(){return _isDisabled===!0?!1:(fireOptionEventIfExist(this,"mouseout"),void 0)}),$("#"+a+" li."+_styles_i.li).on("mousedown",function(){return _isDisabled===!0?!1:(fireOptionEventIfExist(this,"mousedown"),void 0)}),$("#"+a+" li."+_styles_i.li).on("mouseup",function(){return _isDisabled===!0?!1:(fireOptionEventIfExist(this,"mouseup"),void 0)}))},_removeChildEvents=function(){var a=_getPostID("postChildID");$("#"+a).off("click"),$("#"+a+" li."+_styles.enabled).off("mouseenter"),$("#"+a+" li."+_styles.enabled).off("click"),$("#"+a+" li."+_styles.enabled).off("mouseover"),$("#"+a+" li."+_styles.enabled).off("mouseout"),$("#"+a+" li."+_styles.enabled).off("mousedown"),$("#"+a+" li."+_styles.enabled).off("mouseup")},_applyEvents=function(){{var a=_getPostID("postID");_getPostID("postChildID")}$("#"+a).on(_settings.event,function(a){return _isDisabled===!0?!1:(fireEventIfExist("click"),a.preventDefault(),a.stopPropagation(),_open(a),void 0)}),_applyChildEvents(),$("#"+a).on("dblclick",on_dblclick),$("#"+a).on("mousemove",on_mousemove),$("#"+a).on("mouseenter",on_mouseover),$("#"+a).on("mouseleave",on_mouseout),$("#"+a).on("mousedown",on_mousedown),$("#"+a).on("mouseup",on_mouseup)},_fixedForList=function(){var a=_getPostID("postID"),b=_getPostID("postChildID");if(_isList===!0&&_settings.enableCheckbox===!1)$("#"+a+" ."+_styles.ddTitle).hide(),$("#"+b).css({display:"block",position:"relative"});else{_settings.enableCheckbox===!1&&(_isMultiple=!1),$("#"+a+" ."+_styles.ddTitle).show(),$("#"+b).css({display:"none",position:"absolute"});var c=$("#"+b+" li."+_styles.selected)[0];$("#"+b+" li."+_styles.selected).removeClass(_styles.selected);var d=_getIndex($(c).addClass(_styles.selected));_setValue(d)}_childHeight(_childHeight())},_fixedForDisabled=function(){{var a=_getPostID("postID");1==_isDisabled?_settings.disabledOpacity:1}_isDisabled===!0?$("#"+a).addClass(_styles.disabledAll):$("#"+a).removeClass(_styles.disabledAll)},_fixedSomeUI=function(){var a=_getPostID("postTitleTextID");$("#"+a).on("keyup",_applyFilters),_fixedForList(),_fixedForDisabled()},_createLayout=function(){var a=_createWrapper(),b=_createTitle();a.appendChild(b);var c=_createFilterBox();a.appendChild(c);var d=_createChildren();a.appendChild(d),$("#"+_element).after(a),_hideOriginal(),_fixedSomeUI(),_applyEvents();var e=_getPostID("postChildID");""!=_settings.append&&$("#"+e).append(_settings.append),""!=_settings.prepend&&$("#"+e).prepend(_settings.prepend),"function"==typeof _settings.on.create&&_settings.on.create.apply(_this,arguments)},_selectMutipleOptions=function(a){for(var b=_getPostID("postChildID"),c=a||$("#"+b+" li."+_styles.selected),d=0;d<c.length;d++){var e=_getIndex(c[d]);getElement(_element).options[e].selected="selected"}_setValue(c)},_fireAfterItemClicked=function(){var a=_getPostID("postChildID"),b=$("#"+a+" li."+_styles.selected);(_isMultiple&&(_shiftHolded||_controlHolded)||_forcedTrigger)&&(getElement(_element).selectedIndex=-1);var c;if(0==b.length?c=-1:b.length>1?_selectMutipleOptions(b):c=_getIndex($("#"+a+" li."+_styles.selected)),(getElement(_element).selectedIndex!=c||_forcedTrigger)&&b.length<=1){_forcedTrigger=!1;{has_handler("change")}if(getElement(_element).selectedIndex=c,_setValue(c),"function"==typeof _settings.on.change){var d=_getDataAndUI();_settings.on.change(d.data,d.ui)}$("#"+_element).trigger("change")}},_setValue=function(a,b){if(void 0!==a){var c,d,e;if(-1==a)c=-1,d="",e="",_updateTitleUI(-1);else if("object"!=typeof a){var f=getElement(_element).options[a];getElement(_element).selectedIndex=a,c=a,d=_parseOption(f),e=a>=0?getElement(_element).options[a].text:"",_updateTitleUI(void 0,d),d=d.value}else c=b&&b.index||getElement(_element).selectedIndex,d=b&&b.value||getElement(_element).value,e=b&&b.text||getElement(_element).options[getElement(_element).selectedIndex].text||"",_updateTitleUI(c);_updateProp("selectedIndex",c),_updateProp("value",d),_updateProp("selectedText",e),_updateProp("children",getElement(_element).children),_updateProp("uiData",_getDataAndUI()),_updateProp("selectedOptions",$("#"+_element+" option:selected"))}},has_handler=function(a){var b={byElement:!1,byJQuery:!1,hasEvent:!1},c=$("#"+_element);try{null!==c.prop("on"+a)&&(b.hasEvent=!0,b.byElement=!0)}catch(d){}var e;return e="function"==typeof $._data?$._data(c[0],"events"):c.data("events"),e&&e[a]&&(b.hasEvent=!0,b.byJQuery=!0),b},_bind_on_events=function(){_unbind_on_events(),$("body").on("click",_close),$(document).on("keydown",on_keydown),$(document).on("keyup",on_keyup)},_unbind_on_events=function(){$("body").off("click",_close),$(document).off("keydown",on_keydown),$(document).off("keyup",on_keyup)},_applyFilters=function(){var a=_getPostID("postChildID"),b=_getPostID("postTitleTextID"),c=getElement(b).value;0==c.length?($("#"+a+" li:hidden").show(),_childHeight(_childHeight())):($("#"+a+" li").hide(),$("#"+a+" li:Contains('"+c+"')").show(),$("#"+a+" li:visible").length<=_settings.visibleRows&&_childHeight(-1))},_showFilterBox=function(){var a=_getPostID("postTitleTextID");$("#"+a+":hidden").length>0&&0==_controlHolded&&($("#"+a+":hidden").show().val(""),getElement(a).focus())},_hideFilterBox=function(){var a=_getPostID("postTitleTextID");$("#"+a+":visible").length>0&&($("#"+a+":visible").hide(),getElement(a).blur())},on_keydown=function(a){var b=(_getPostID("postTitleTextID"),_getPostID("postChildID"));switch(a.keyCode){case DOWN_ARROW:case RIGHT_ARROW:a.preventDefault(),a.stopPropagation(),_next();break;case UP_ARROW:case LEFT_ARROW:a.preventDefault(),a.stopPropagation(),_previous();break;case ESCAPE:case ENTER:a.preventDefault(),a.stopPropagation(),_close();var c=$("#"+b+" li."+_styles.selected).length;_forcedTrigger=_oldSelected.length!=c||0==c?!0:!1,_fireAfterItemClicked(),_unbind_on_events(),_lastTarget=null;break;case SHIFT:_shiftHolded=!0;break;case CONTROL:_controlHolded=!0;break;default:a.keyCode>=ALPHABETS_START&&_isList===!1&&_showFilterBox()}return _isDisabled===!0?!1:(fireEventIfExist("keydown"),void 0)},on_keyup=function(a){switch(a.keyCode){case SHIFT:_shiftHolded=!1;break;case CONTROL:_controlHolded=!1}return _isDisabled===!0?!1:(fireEventIfExist("keyup"),void 0)},on_dblclick=function(){return _isDisabled===!0?!1:(fireEventIfExist("dblclick"),void 0)},on_mousemove=function(){return _isDisabled===!0?!1:(fireEventIfExist("mousemove"),void 0)},on_mouseover=function(a){return _isDisabled===!0?!1:(a.preventDefault(),fireEventIfExist("mouseover"),void 0)},on_mouseout=function(a){return _isDisabled===!0?!1:(a.preventDefault(),fireEventIfExist("mouseout"),void 0)},on_mousedown=function(){return _isDisabled===!0?!1:(fireEventIfExist("mousedown"),void 0)},on_mouseup=function(){return _isDisabled===!0?!1:(fireEventIfExist("mouseup"),void 0)},option_has_handler=function(a,b){var c={byElement:!1,byJQuery:!1,hasEvent:!1};void 0!=$(a).prop("on"+b)&&(c.hasEvent=!0,c.byElement=!0);var d=$(a).data("events");return d&&d[b]&&(c.hasEvent=!0,c.byJQuery=!0),c},fireOptionEventIfExist=function(a,b){if(0==_settings.disabledOptionEvents){var c=getElement(_element).options[_getIndex(a)];if(option_has_handler(c,b).hasEvent===!0){if(option_has_handler(c,b).byElement===!0&&c["on"+b](),option_has_handler(c,b).byJQuery===!0)switch(b){case"keydown":case"keyup":break;default:$(c).trigger(b)}return!1}}},fireEventIfExist=function(a){if("function"==typeof _settings.on[a]&&_settings.on[a].apply(this,arguments),has_handler(a).hasEvent===!0){if(has_handler(a).byElement===!0&&getElement(_element)["on"+a](),has_handler(a).byJQuery===!0)switch(a){case"keydown":case"keyup":break;default:$("#"+_element).trigger(a)}return!1}},_scrollToIfNeeded=function(a){var b=_getPostID("postChildID");if(a=void 0!==a?a:$("#"+b+" li."+_styles.selected),a.length>0){var c=parseInt($(a).position().top),d=parseInt($("#"+b).height());if(c>d){var e=c+$("#"+b).scrollTop()-d/2;$("#"+b).animate({scrollTop:e},500)}}},_next=function(){function a(b){return b+=1,b>c.length?b:$(c[b]).hasClass(_styles.enabled)===!0?b:b=a(b)}var b=_getPostID("postChildID"),c=$("#"+b+" li:visible."+_styles_i.li),d=$("#"+b+" li:visible."+_styles.selected);d=0==d.length?c[0]:d;var e=$("#"+b+" li:visible."+_styles_i.li).index(d);e<c.length-1&&(e=a(e),e<c.length&&(_shiftHolded&&_isList&&_isMultiple||$("#"+b+" ."+_styles.selected).removeClass(_styles.selected),$(c[e]).addClass(_styles.selected),_updateTitleUI(e),1==_isList&&_fireAfterItemClicked(),_scrollToIfNeeded($(c[e]))),_isList||_adjustOpen())},_previous=function(){function a(b){return b-=1,0>b?b:$(d[b]).hasClass(_styles.enabled)===!0?b:b=a(b)}var b=_getPostID("postChildID"),c=$("#"+b+" li:visible."+_styles.selected),d=$("#"+b+" li:visible."+_styles_i.li),e=$("#"+b+" li:visible."+_styles_i.li).index(c[0]);if(e>=0){if(e=a(e),e>=0&&(_shiftHolded&&_isList&&_isMultiple||$("#"+b+" ."+_styles.selected).removeClass(_styles.selected),$(d[e]).addClass(_styles.selected),_updateTitleUI(e),1==_isList&&_fireAfterItemClicked(),parseInt($(d[e]).position().top+$(d[e]).height())<=0)){var f=$("#"+b).scrollTop()-$("#"+b).height()-$(d[e]).height();$("#"+b).animate({scrollTop:f},500)}_isList||_adjustOpen()}},_adjustOpen=function(){var a=_getPostID("postID"),b=_getPostID("postChildID"),c=$("#"+a).offset(),d=$("#"+a).height(),e=$(window).height(),f=$(window).scrollTop(),g=$("#"+b).height(),h=$("#"+a).height();if(e+f<Math.floor(g+d+c.top)||"alwaysup"==_settings.openDirection.toLowerCase()){h=g,$("#"+b).css({top:"-"+h+"px",display:"block",zIndex:_settings.zIndex}),$("#"+a).removeClass("borderRadius borderRadiusTp").addClass("borderRadiusBtm");var h=$("#"+b).offset().top;-10>h&&($("#"+b).css({top:parseInt($("#"+b).css("top"))-h+20+f+"px",zIndex:_settings.zIndex}),$("#"+a).removeClass("borderRadiusBtm borderRadiusTp").addClass("borderRadius"))}else $("#"+b).css({top:h+"px",zIndex:_settings.zIndex}),$("#"+a).removeClass("borderRadius borderRadiusBtm").addClass("borderRadiusTp");_isIE&&msieversion()<=7&&($("div.ddcommon").css("zIndex",_settings.zIndex-10),$("#"+a).css("zIndex",_settings.zIndex+5))},_open=function(){if(_isDisabled===!0)return!1;var a=(_getPostID("postID"),_getPostID("postChildID"));if(_isOpen)"mouseover"!==_settings.event&&_close();else{_isOpen=!0,""!=msBeautify.oldDiv&&$("#"+msBeautify.oldDiv).css({display:"none"}),msBeautify.oldDiv=a,$("#"+a+" li:hidden").show(),_adjustOpen();var b=_settings.animStyle;if(""==b||"none"==b){if($("#"+a).css({display:"block"}),_scrollToIfNeeded(),"function"==typeof _settings.on.open){var c=_getDataAndUI();_settings.on.open(c.data,c.ui)}}else $("#"+a)[b]("fast",function(){if(_scrollToIfNeeded(),"function"==typeof _settings.on.open){var a=_getDataAndUI();_settings.on.open(a.data,a.ui)}});_bind_on_events()}},_close=function(){_isOpen=!1;var a=_getPostID("postID"),b=_getPostID("postChildID");if((_isList===!1||_settings.enableCheckbox===!0)&&($("#"+b).css({display:"none"}),$("#"+a).removeClass("borderRadiusTp borderRadiusBtm").addClass("borderRadius")),_unbind_on_events(),"function"==typeof _settings.on.close){var c=_getDataAndUI();_settings.on.close(c.data,c.ui)}_hideFilterBox(),_childHeight(_childHeight()),$("#"+b).css({zIndex:1})},_mergeAllProp=function(){try{_orginial=$.extend(!0,{},getElement(_element));for(var a in _orginial)"function"!=typeof _orginial[a]&&(_this[a]=_orginial[a])}catch(b){}_this.selectedText=getElement(_element).selectedIndex>=0?getElement(_element).options[getElement(_element).selectedIndex].text:"",_this.version=msBeautify.version.msDropdown,_this.author=msBeautify.author},_getDataAndUIByOption=function(a){if(null!=a&&"undefined"!=typeof a){var b=_getPostID("postChildID"),c=_parseOption(a),d=$("#"+b+" li."+_styles_i.li+":eq("+a.index+")");return{data:c,ui:d,option:a,index:a.index}}return null},_getDataAndUI=function(){var a,b,c,d,e=_getPostID("postChildID"),f=getElement(_element);if(-1==f.selectedIndex)a=null,b=null,c=null,d=-1;else if(b=$("#"+e+" li."+_styles.selected),b.length>1){for(var g=[],h=[],i=0;i<b.length;i++){var j=_getIndex(b[i]);g.push(j),h.push(f.options[j])}a=g,c=h,d=g}else c=f.options[f.selectedIndex],a=_parseOption(c),d=f.selectedIndex;return{data:a,ui:b,index:d,option:c}},_updateTitleUI=function(a,b){var c=_getPostID("postTitleID"),d={};if(-1==a)d.text=" ",d.className="",d.description="",d.image="";else if("undefined"!=typeof a){var e=getElement(_element).options[a];d=_parseOption(e)}else d=b;$("#"+c).find("."+_styles.label).html(d.text),getElement(c).className=_styles.ddTitleText+" "+d.className,""!=d.description?$("#"+c).find("."+_styles.description).html(d.description).show():$("#"+c).find("."+_styles.description).html("").hide();var f=$("#"+c).find("img");f.length>0&&$(f).remove(),""!=d.image&&_settings.showIcon&&(f=_createElement("img",{src:d.image}),$("#"+c).prepend(f),""!=d.imagecss&&(f.className=d.imagecss+" "),""==d.description&&(f.className=f.className+_styles_i.fnone))},_updateProp=function(a,b){_this[a]=b},_updateUI=function(a,b,c){var d=_getPostID("postChildID"),e=!1;switch(a){case"add":var f,g=_createChild(b||getElement(_element).options[c]);if(f=3==arguments.length?c:$("#"+d+" li."+_styles_i.li).length-1,0>f||!f)$("#"+d+" ul").append(g);else{var h=$("#"+d+" li."+_styles_i.li)[f];$(h).before(g)}_removeChildEvents(),_applyChildEvents(),null!=_settings.on.add&&_settings.on.add.apply(this,arguments);break;case"remove":e=$($("#"+d+" li."+_styles_i.li)[c]).hasClass(_styles.selected),$("#"+d+" li."+_styles_i.li+":eq("+c+")").remove();var i=$("#"+d+" li."+_styles.enabled);if(1==e&&i.length>0){$(i[0]).addClass(_styles.selected);var j=$("#"+d+" li."+_styles_i.li).index(i[0]);_setValue(j)}0==i.length&&_setValue(-1),$("#"+d+" li."+_styles_i.li).length<_settings.visibleRows&&!_isList&&_childHeight(-1),null!=_settings.on.remove&&_settings.on.remove.apply(this,arguments)}};this.act=function(){var a=arguments[0];switch(Array.prototype.shift.call(arguments),a){case"add":_this.add.apply(this,arguments);break;case"remove":_this.remove.apply(this,arguments);break;default:try{getElement(_element)[a].apply(getElement(_element),arguments)}catch(b){}}},this.add=function(){var a,b,c,d,e,f=arguments[0];"string"==typeof f?(a=f,b=a,opt=new Option(a,b)):(a=f.text||"",b=f.value||a,c=f.title||"",d=f.image||"",e=f.description||"",opt=new Option(a,b),$(opt).data("description",e),$(opt).data("image",d),$(opt).data("title",c)),arguments[0]=opt,getElement(_element).add.apply(getElement(_element),arguments),_updateProp("children",getElement(_element).children),_updateProp("length",getElement(_element).length),_updateUI("add",opt,arguments[1])},this.remove=function(a){getElement(_element).remove(a),_updateProp("children",getElement(_element).children),_updateProp("length",getElement(_element).length),_updateUI("remove",void 0,a)},this.set=function(a,b){if("undefined"==typeof a||"undefined"==typeof b)return!1;a=a.toString();try{_updateProp(a,b)}catch(c){}switch(a){case"size":getElement(_element)[a]=b,0==b&&(getElement(_element).multiple=!1),_isList=getElement(_element).size>1||1==getElement(_element).multiple?!0:!1,_fixedForList();break;case"multiple":getElement(_element)[a]=b,_isList=getElement(_element).size>1||1==getElement(_element).multiple?!0:!1,_isMultiple=getElement(_element).multiple,_fixedForList(),_updateProp(a,b);break;case"disabled":getElement(_element)[a]=b,_isDisabled=b,_fixedForDisabled();break;case"selectedIndex":case"value":getElement(_element)[a]=b;var d=_getPostID("postChildID");$("#"+d+" li."+_styles_i.li).removeClass(_styles.selected),$($("#"+d+" li."+_styles_i.li)[getElement(_element).selectedIndex]).addClass(_styles.selected),_setValue(getElement(_element).selectedIndex);break;case"length":var d=_getPostID("postChildID");b<getElement(_element).length&&(getElement(_element)[a]=b,0==b?($("#"+d+" li."+_styles_i.li).remove(),_setValue(-1)):($("#"+d+" li."+_styles_i.li+":gt("+(b-1)+")").remove(),0==$("#"+d+" li."+_styles.selected).length&&$("#"+d+" li."+_styles.enabled+":eq(0)").addClass(_styles.selected)),_updateProp(a,b),_updateProp("children",getElement(_element).children));break;case"id":break;default:try{getElement(_element)[a]=b,_updateProp(a,b)}catch(c){}}},this.get=function(a){return _this[a]||getElement(_element)[a]},this.visible=function(a){var b=_getPostID("postID");if(a===!0)$("#"+b).show();else{if(a!==!1)return"none"==$("#"+b).css("display")?!1:!0;$("#"+b).hide()}},this.debug=function(a){msBeautify.debug(a)},this.close=function(){_close()},this.open=function(){_open()},this.showRows=function(a){return"undefined"==typeof a||0==a?!1:(_settings.visibleRows=a,_childHeight(_childHeight()),void 0)},this.visibleRows=this.showRows,this.on=function(a,b){$("#"+_element).on(a,b)},this.off=function(a,b){$("#"+_element).off(a,b)},this.addMyEvent=this.on,this.getData=function(){return _getDataAndUI()},this.namedItem=function(){var a=getElement(_element).namedItem.apply(getElement(_element),arguments);return _getDataAndUIByOption(a)},this.item=function(){var a=getElement(_element).item.apply(getElement(_element),arguments);return _getDataAndUIByOption(a)},this.setIndexByValue=function(a){this.set("value",a)},this.destroy=function(){var a=(_getPostID("postElementHolder"),_getPostID("postID"));$("#"+a+", #"+a+" *").off(),$("#"+a).remove(),$("#"+_element).parent().replaceWith($("#"+_element)),$("#"+_element).data("dd",null)},_construct()}msBeautify={version:{msDropdown:"3.3"},author:"Marghoob Suleman",counter:20,debug:function(a){a!==!1?$(".ddOutOfVision").css({height:"auto",position:"relative"}):$(".ddOutOfVision").css({height:"0px",position:"absolute"})},oldDiv:"",create:function(a,b,c){c=c||"dropdown";var d;switch(c.toLowerCase()){case"dropdown":case"select":d=$(a).msDropdown(b).data("dd")}return d}},$.msDropDown={},$.msDropdown={},$.extend(!0,$.msDropDown,msBeautify),$.extend(!0,$.msDropdown,msBeautify),void 0===$.fn.prop&&($.fn.prop=$.fn.attr),void 0===$.fn.on&&($.fn.on=$.fn.bind,$.fn.off=$.fn.unbind),$.expr[":"].Contains="function"==typeof $.expr.createPseudo?$.expr.createPseudo(function(a){return function(b){return $(b).text().toUpperCase().indexOf(a.toUpperCase())>=0}}):function(a,b,c){return $(a).text().toUpperCase().indexOf(c[3].toUpperCase())>=0},$.fn.extend({msDropDown:function(a){return this.each(function(){if(!$(this).data("dd")){var b=new dd(this,a);$(this).data("dd",b)}})}}),$.fn.msDropdown=$.fn.msDropDown}(jQuery);\ No newline at end of filediff --git a/web/index.html b/web/index.htmlindex 98e2d13ee..5df49092f 100644--- a/web/index.html+++ b/web/index.html@@ -53,9 +53,6 @@<!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/date/mobiscroll-2.6.0/mobiscroll.css"><!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/date/mobiscroll-2.6.0/mobiscroll.min.css"> -->- <!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/palettes/jquery.dd-3.3/jquery.dd.css">- <!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/palettes/jquery.dd-3.3/jquery.dd.min.css"> -->-<!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/tour/joyride-2.0.3-3/joyride.css"><!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/tour/joyride-2.0.3-3/joyride.min.css"> -->@@ -95,9 +92,6 @@<!-- External libraries =============================================== -->- <!-- link.dev --> <!-- <script type="text/javascript" src="ext/main/yepnope-1.5.4/yepnope.js"></script> -->- <!-- link.dev --> <!-- <script type="text/javascript" src="ext/main/yepnope-1.5.4/yepnope.min.js"></script> -->-<!-- link.dev --> <script type="text/javascript" src="ext/main/lodash-2.4.1/lodash.js"></script><!-- link.prod --> <!-- <script type="text/javascript" src="ext/main/lodash-2.4.1/lodash.min.js"></script> -->@@ -121,9 +115,6 @@<!-- link.dev --> <script type="text/javascript" src="ext/date/mobiscroll-2.6.0/mobiscroll.js"></script><!-- link.prod --> <!-- <script type="text/javascript" src="ext/date/mobiscroll-2.6.0/mobiscroll.min.js"></script> -->- <!-- link.dev --> <script type="text/javascript" src="ext/palettes/jquery.dd-3.3/jquery.dd.js"></script>- <!-- link.prod --> <!-- <script type="text/javascript" src="ext/palettes/jquery.dd-3.3/jquery.dd.min.js"></script> -->-<!-- link.dev --> <script type="text/javascript" src="ext/tour/joyride-2.0.3-3/joyride.js"></script><!-- link.prod --> <!-- <script type="text/javascript" src="ext/tour/joyride-2.0.3-3/joyride.min.js"></script> -->diff --git a/web/pages/worldview-opensourcelibs.html b/web/pages/worldview-opensourcelibs.htmlindex d0cd77fd2..ee27e733b 100644--- a/web/pages/worldview-opensourcelibs.html+++ b/web/pages/worldview-opensourcelibs.html@@ -12,6 +12,26 @@<h1>@LONG_NAME@</h1><h2>Acknowledgement of Open Source Libraries</h2>+ <hr/>+ <h4>Lo-Dash</h4>+ <p>+ <a href="http://lodash.com/">+ http://lodash.com+ </a>+ <br/>+ <a href="https://github.com/lodash/lodash">+ https://github.com/lodash/lodash+ </a>+ </p>+ <p>+ Licensed under the MIT license+ <br/>+ Copyright © 2012-2014 The Dojo Foundation+ <a href="http://dojofoundation.org">+ <http://dojofoundation.org>+ </a>+ </p>+<hr/><h4>jQuery: A fast, small, and feature-rich JavaScript library></h4><p>@@ -80,6 +100,52 @@</p><hr/>+ <h4>Font Awesome: The iconic font and CSS toolkit</h4>+ <p>+ <a href="http://fortawesome.github.io/Font-Awesome/">+ http://fortawesome.github.io/Font-Awesome+ </a>+ <br/>+ <a href="https://github.com/FortAwesome/Font-Awesome">+ https://github.com/FortAwesome/Font-Awesome+ </a>+ </p>+ <p>+ Fonts licensed under the SIL Open Font+ <a href="http://scripts.sil.org/OFL">+ license+ </a>+ <br/>+ Code licensed under the MIT license+ <br/>+ Font Awesome by Dave Gandy -+ <a href='http://fontawesome.io'>+ http://fontawesome.io+ </a>+ </p>++ <hr/>+ <h4>d3: A JavaScript visualization library for HTML and SVG</h4>+ <p>+ <a href="http://d3js.org">+ http://d3js.org/+ </a>+ <br/>+ <a href="https://github.com/mbostock/d3">+ https://github.com/mbostock/d3+ </a>+ </p>+ <p>+ Licensed under the BSD+ <a href="https://github.com/mbostock/d3/blob/master/LICENSE">+ license+ </a>+ <br/>+ Copyright © 2010 - 2014 Michael Bostock+ </p>++ <hr/>+<h4>MobiScroll: the date scroller on mobile</h4><p><a href="http://mobiscroll.com">http://mobiscroll.com</a>@@ -128,6 +194,38 @@to use as they want to."</p>+ <hr/>+ <h4>iCheck: Highly customizable checkboxes and radio buttons</h4>+ <p>+ <a href="http://fronteed.com/iCheck/">+ http://fronteed.com/iCheck+ </a>+ <br/>+ <a href="https://github.com/fronteed/iCheck/">+ https://github.com/fronteed/iCheck+ </a>+ </p>+ <p>+ Licensed under the MIT license+ <br/>+ Copyright © 2013 Damir Sultanov+ </p>++ <hr/>+ <h4>noUiSlider: Lightweight jQuery range slider plugin</h4>+ <p>+ <a href="http://refreshless.com/nouislider/">+ http://refreshless.com/nouislider+ </a>+ <br/>+ <a href="https://github.com/leongersen/noUiSlider/">+ https://github.com/leongersen/noUiSlider/+ </a>+ </p>+ <p>+ Visit the links above for license information.+ </p>+<hr/><h4>JoyRide: Create jQuery Feature Tours in a Breeze</h4><p>@@ -156,26 +254,6 @@non-commercial AND for commercial use."</p>- <hr/>- <h4>Lo-Dash</h4>- <p>- <a href="http://lodash.com/">- http://lodash.com- </a>- <br/>- <a href="https://github.com/lodash/lodash">- https://github.com/lodash/lodash- </a>- </p>- <p>- Licensed under the MIT license- <br/>- Copyright © 2012-2014 The Dojo Foundation- <a href="http://dojofoundation.org">- <http://dojofoundation.org>- </a>- </p>-<hr/><h4>JavaScript LRU Cache</h4><p>@@ -259,5 +337,150 @@interpreted as representing official policies, either expressed orimplied, of OpenLayers Contributors.</p>++ <hr/>+ <h4>SIL Open Font License</h4>+ <p>+ Version 1.1 - 26 February 2007+ </p>++ <h5>PREAMBLE</h5>+ <p>+ The goals of the Open Font License (OFL) are to stimulate worldwide+ development of collaborative font projects, to support the font creation+ efforts of academic and linguistic communities, and to provide a free and+ open framework in which fonts may be shared and improved in partnership+ with others.+ </p>+ <p>+ The OFL allows the licensed fonts to be used, studied, modified and+ redistributed freely as long as they are not sold by themselves. The+ fonts, including any derivative works, can be bundled, embedded,+ redistributed and/or sold with any software provided that any reserved+ names are not used by derivative works. The fonts and derivatives,+ however, cannot be released under any other type of license. The+ requirement for fonts to remain under this license does not apply+ to any document created using the fonts or their derivatives.+ </p>+ <h5>DEFINITIONS</h5>+ <p>+ "Font Software" refers to the set of files released by the Copyright+ Holder(s) under this license and clearly marked as such. This may+ include source files, build scripts and documentation.+ </p>+ <p>+ "Reserved Font Name" refers to any names specified as such after the+ copyright statement(s).+ </p>+ <p>+ "Original Version" refers to the collection of Font Software components as+ distributed by the Copyright Holder(s).+ </p>+ <p>+ "Modified Version" refers to any derivative made by adding to, deleting,+ or substituting — in part or in whole — any of the components of the+ Original Version, by changing formats or by porting the Font Software to a+ new environment.+ </p>+ <p>+ "Author" refers to any designer, engineer, programmer, technical+ writer or other person who contributed to the Font Software.+ </p>+ <h5>PERMISSION & CONDITIONS</h5>+ <p>+ Permission is hereby granted, free of charge, to any person obtaining+ a copy of the Font Software, to use, study, copy, merge, embed, modify,+ redistribute, and sell modified and unmodified copies of the Font+ Software, subject to the following conditions:+ </p>+ <p>+ 1) Neither the Font Software nor any of its individual components,+ in Original or Modified Versions, may be sold by itself.+ </p>+ <p>+ 2) Original or Modified Versions of the Font Software may be bundled,+ redistributed and/or sold with any software, provided that each copy+ contains the above copyright notice and this license. These can be+ included either as stand-alone text files, human-readable headers or+ in the appropriate machine-readable metadata fields within text or+ binary files as long as those fields can be easily viewed by the user.+ </p>+ <p>+ 3) No Modified Version of the Font Software may use the Reserved Font+ Name(s) unless explicit written permission is granted by the corresponding+ Copyright Holder. This restriction only applies to the primary font name as+ presented to the users.+ </p>+ <p>+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+ Software shall not be used to promote, endorse or advertise any+ Modified Version, except to acknowledge the contribution(s) of the+ Copyright Holder(s) and the Author(s) or with their explicit written+ permission.+ </p>+ <p>+ 5) The Font Software, modified or unmodified, in part or in whole,+ must be distributed entirely under this license, and must not be+ distributed under any other license. The requirement for fonts to+ remain under this license does not apply to any document created+ using the Font Software.+ </p>+ <h5>TERMINATION</h5>+ <p>+ This license becomes null and void if any of the above conditions are+ not met.+ </p>+ <h5>DISCLAIMER</h5>+ <p>+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+ OTHER DEALINGS IN THE FONT SOFTWARE.+ </p>+ <hr/>++ <h4>d3 BSD License</h4>+ <p>+ Copyright © 2010-2014, Michael Bostock+ All rights reserved.+ </p>+ <p>+ Redistribution and use in source and binary forms, with or without+ modification, are permitted provided that the following conditions+ are met:+ <p>+ <p>+ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.+ </p>+ <p>+ * Redistributions in binary form must reproduce the above copyright+ notice, this list of conditions and the following disclaimer in the+ documentation and/or other materials provided with the distribution.+ </p>+ <p>+ * The name Michael Bostock may not be used to endorse or promote+ products derived from this software without specific prior written+ permission.+ </p>+ <p>+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MICHAEL+ BOSTOCK BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH+ DAMAGE.+ </p></div></body>