diff --git a/README.md b/README.md index a12afd2..fbc2b9e 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,11 @@ KCFinder is free open-source replacement of CKFinder web file manager. It can be * Ajax engine with JSON responses * Multiple files upload * Upload files using HTML5 drag and drop from local file manager -* Drag and drop images from external HTML pages. Multiple images can be dropped using selection (Firefox only) * Download multiple files or a folder as single ZIP file -* Select multiple files with the Ctrl/Command key * Clipboard for copying, moving and downloading multiple files * Easy to integrate and configure in web applications * Option to select and return several files. For custom applications only -* Resize uploaded images. Configurable maximum image resolution +* Auto resize uploaded images. Configurable maximum image resolution * PNG watermark support * Configurable thumbnail resolution * Automaticaly rotate and/or flip uploaded images depending on the orientation info EXIF tag if it exist @@ -28,10 +26,11 @@ KCFinder is free open-source replacement of CKFinder web file manager. It can be * Preview images in full size ## Compatibility -* KCFinder is officialy tested on Apache 2 web server only, but probably it will work on other web servers. +* KCFinder is officialy tested on Apache 2 web server only. Probably it will works on other web servers. If your web server does not support .htaccess files, you should take care turning off script execution in the upload directory. * PHP 5.3 or better is required. Safe mode should be off. * At least one of these PHP extensions is required: GD, ImageMagick or GraphicsMagick. * To work with client-side HTTP cache, the PHP must be installed as Apache module. -* KCFinder supports MIME type recognition for the uploaded files. If you plan to use this feature, you should to load Fileinfo PHP extension. +* KCFinder supports Fileinfo PHP extension for MIME type detection for uploaded files. If you plan to use this feature, you should to load Fileinfo extension. * PHP ZIP extension should be loaded in order to have an option to download multiple files and directories as single ZIP file. * Automatic rotating and flipping images requires PHP EXIF extension. +* Browser side code requires modern browser. KCFinder does not work in Internet Explorer 6, 7 and 8, but you can use Google Chrome Frame ActiveX plugin to get it working. diff --git a/browse.php b/browse.php index 7f1f815..b04e04f 100644 --- a/browse.php +++ b/browse.php @@ -1,18 +1,20 @@ - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ + * + * @desc Browser calling script + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ require "core/bootstrap.php"; $browser = "kcfinder\\browser"; // To execute core/bootstrap.php on older -$browser = new $browser(); // PHP versions (even PHP 4) +$browser = new $browser(); // PHP versions (even PHP 4) $browser->action(); + +?> \ No newline at end of file diff --git a/cache/base.css b/cache/base.css index 52b2dbd..fac4794 100644 --- a/cache/base.css +++ b/cache/base.css @@ -1 +1,207 @@ -html,body{overflow:hidden}body,form,th,td{margin:0;padding:0}a{cursor:pointer}*{font-family:Tahoma,Verdana,Arial,sans-serif;font-size:11px}table{border-collapse:collapse}#left{float:left;display:block;width:25%}#right{float:left;display:block;width:75%}#settings{display:none;padding:0;float:left;width:100%}#settings>div{float:left}#folders{padding:5px;overflow:auto}#toolbar{padding:5px}#files{padding:5px;overflow:auto}#status{padding:5px;float:left;overflow:hidden}#fileinfo{float:left}#clipboard div{width:16px;height:16px}.folders{margin-left:16px}div.file{overflow-x:hidden;float:left;text-align:center;cursor:default;white-space:nowrap}div.file .thumb{background:no-repeat center center}#files table{width:100%}tr.file{cursor:default}tr.file>td{white-space:nowrap}tr.file>td.name{background-repeat:no-repeat;background-position:left center;padding-left:20px;width:100%}tr.file>td.time,tr.file>td.size{text-align:right}#toolbar{cursor:default;white-space:nowrap}#toolbar a{padding-left:20px;text-decoration:none;background:no-repeat left center}#toolbar a:hover,a[href="#upload"].uploadHover{color:#000}#upload{position:absolute;overflow:hidden;opacity:0;filter:alpha(opacity=0)}#upload input,#upload input::-webkit-file-upload-button{cursor:pointer}span.brace{padding-left:11px;cursor:default}span.brace.opened,span.brace.closed{cursor:pointer}#menu,#clipboard{position:absolute;display:none;z-index:101;cursor:default}#menu .box,#alert{max-width:350px}#clipboard{z-index:99}#loading{display:none;float:right}.menu{background:#888;white-space:nowrap}.menu a{display:block}.menu .list{max-height:0;overflow-y:auto;overflow-x:hidden;white-space:nowrap}#uploadResponse,.file .access,.file .hasThumb{display:none}#resizer{position:absolute;z-index:98;top:0;background:#000;opacity:0;filter:alpha(opacity=0)}#lang{opacity:0;filter:alpha(opacity=0)}.tf-select,.tf-multiple,.tf-file,.tf-radio,.tf-checkbox,.tf-button{cursor:default;overflow:auto;display:-moz-inline-box;display:inline-block;zoom:1;vertical-align:middle}.tf-select .tf-selected{float:left;white-space:nowrap}.tf-select .tf-menu{display:none;position:absolute;max-height:173px;overflow-x:hidden;overflow-y:auto}.tf-select.tf-opened .tf-menu{display:block}.tf-select .tf-button{float:right}.tf-select select,.tf-multiple select{position:absolute;left:-1000000px;opacity:0;filter:alpha(opacity=0)}.tf-select .tf-menu ul,.tf-multiple ul{padding:0;margin:0;list-style-type:none}.tf-select .tf-menu li,.tf-multiple li{padding:0;margin:0}.tf-multiple span,.tf-select .tf-button span{white-space:nowrap}.tf-textarea{resize:none;overflow:auto}.tf-multiple{max-height:118px}.tf-file input,.tf-radio input,.tf-checkbox input,.tf-button input,.tf-button button{position:absolute;opacity:0;filter:alpha(opacity=0);outline:0;margin:0;padding:0}.tf-file{overflow:hidden}.tf-file .tf-info{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:right}.tf-file .tf-button{float:right}body.mobile{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none}body.firefox #files>div{overflow:auto;margin-bottom:5px} \ No newline at end of file +html, body { + overflow: hidden; +} + +body, form, th, td { + margin: 0; + padding: 0; +} + +a { + cursor: pointer; +} + +* { + font-family: Tahoma, Verdana, Arial, sans-serif; + font-size: 11px; +} + +table { + border-collapse: collapse; +} + +#left { + float: left; + display: block; + width: 25%; +} + +#right { + float: left; + display: block; + width: 75%; +} + +#settings { + display: none; + padding: 0; + float: left; + width: 100%; +} + +#settings > div { + float: left; +} + +#folders { + padding: 5px; + overflow: auto; +} + +#toolbar { + padding: 5px; +} + +#files { + padding: 5px; + overflow: auto; +} + +#status { + padding: 5px; + float: left; + overflow: hidden; +} + +#fileinfo { + float: left; +} + +#clipboard div { + width: 16px; + height: 16px; +} + +.folders { + margin-left: 16px; +} + +div.file { + overflow-x: hidden; + float: left; + text-align: center; + cursor: default; + white-space: nowrap; +} + +div.file .thumb { + background: no-repeat center center; +} + +#files table { + width: 100%; +} + +tr.file { + cursor: default; +} + +tr.file > td { + white-space: nowrap; +} + +tr.file > td.name { + background-repeat: no-repeat; + background-position: left center; + padding-left: 20px; + width: 100%; +} + +tr.file > td.time, +tr.file > td.size { + text-align: right; +} + +#toolbar { + cursor: default; + white-space: nowrap; +} + +#toolbar a { + padding-left: 20px; + text-decoration: none; + background: no-repeat left center; +} + +#toolbar a:hover, a[href="#upload"].uploadHover { + color: #000; +} + +#upload { + position: absolute; + overflow: hidden; + opacity: 0; + filter: alpha(opacity=0); +} +#upload input, #upload input::-webkit-file-upload-button { + cursor: pointer; +} + +span.brace { + padding-left: 11px; + cursor: default; +} + +span.brace.opened, span.brace.closed { + cursor: pointer; +} + +#menu, #clipboard { + position: absolute; + display: none; + z-index: 101; + cursor: default; +} + +#menu .box, #alert { + max-width: 350px; +} + +#clipboard { + z-index: 99; +} + +#loading { + display: none; + float: right; +} + +.menu { + background: #888; + white-space: nowrap; +} + +.menu a { + display: block; +} + +.menu .list { + max-height: 0; + overflow-y: auto; + overflow-x: hidden; + white-space: nowrap; +} + +#uploadResponse, +.file .access, +.file .hasThumb { + display: none; +} + +#resizer { + position: absolute; + z-index: 98; + top: 0; + background: #000; + opacity: 0; + filter: alpha(opacity=0); +}body.mobile { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; +} + +body.firefox #files > div { + overflow: auto; + margin-bottom: 5px; +} \ No newline at end of file diff --git a/cache/base.js b/cache/base.js index 1a77eda..6875956 100644 --- a/cache/base.js +++ b/cache/base.js @@ -1,6 +1,4574 @@ /*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -;!function(d,c){"object"==typeof module&&"object"==typeof module.exports?module.exports=d.document?c(d,!0):function(b){if(!b.document){throw new Error("jQuery requires a window with a document")}return c(b)}:c(d)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++){if(null!=(e=arguments[h])){for(d in e){a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c))}}}return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a){return !1}return !0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a)){return !1}try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf")){return !1}}catch(c){return !1}if(l.ownLast){for(b in a){return j.call(a,b)}}for(b in a){}return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++){if(d=b.apply(a[e],c),d===!1){break}}}else{for(e in a){if(d=b.apply(a[e],c),d===!1){break}}}}else{if(g){for(;f>e;e++){if(d=b.call(a[e],e,a[e]),d===!1){break}}}else{for(e in a){if(d=b.call(a[e],e,a[e]),d===!1){break}}}}return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g){return g.call(b,a,c)}for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++){if(c in b&&b[c]===a){return c}}}return -1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d){a[e++]=b[d++]}if(c!==c){while(void 0!==b[d]){a[e++]=b[d++]}}return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++){d=!b(a[f],f),d!==h&&e.push(a[f])}return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h){for(;g>f;f++){d=b(a[f],f,c),null!=d&&i.push(d)}}else{for(f in a){d=b(a[f],f,c),null!=d&&i.push(d)}}return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return +new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++){if(this[b]===a){return b}}return -1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]){}a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a){return d}if(1!==(i=b.nodeType)&&9!==i){return[]}if(n&&!e){if(f=Z.exec(a)){if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode){return d}if(g.id===h){return d.push(g),d}}else{if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h){return d.push(g),d}}}else{if(f[2]){return G.apply(d,b.getElementsByTagName(a)),d}if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName){return G.apply(d,b.getElementsByClassName(h)),d}}}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--){m[j]=q+pb(m[j])}u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v){try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return !!a(b)}catch(c){return !1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--){d.attrHandle[c[e]]=b}}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d){return d}if(c){while(c=c.nextSibling){if(c===b){return -1}}}return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--){c[e=f[g]]&&(c[e]=!(d[e]=c[e]))}})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++]){1===c.nodeType&&d.push(c)}return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return !0}}}return !1},z=b?function(a,b){if(a===b){return j=!0,0}var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b){return j=!0,0}var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g){return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0}if(f===g){return ib(a,b)}c=a;while(c=c.parentNode){h.unshift(c)}c=b;while(c=c.parentNode){k.unshift(c)}while(h[d]===k[d]){d++}return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b))){try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType){return d}}catch(e){}}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++]){b===a[f]&&(e=d.push(f))}while(e--){a.splice(d[e],1)}}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent){return a.textContent}for(a=a.firstChild;a;a=a.nextSibling){c+=e(a)}}else{if(3===f||4===f){return a.nodeValue}}}else{while(b=a[d++]){c+=e(b)}}return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return !0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return !!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:1===l.nodeType){return !1}}o=p="only"===a&&!o&&"nextSibling"}return !0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}}else{if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b)){break}}}}return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--){(f=g[h])&&(a[h]=!(b[h]=f))}}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do{if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-")}}while((b=b.parentNode)&&1===b.nodeType);return !1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling){if(a.nodeType<6){return !1}}return !0},parent:function(a){return !d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2){a.push(c)}return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2){a.push(c)}return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;){a.push(d)}return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++){d+=a[b].value}return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d]){if(1===b.nodeType||e){return a(b,c,f)}}}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d]){if((1===b.nodeType||e)&&a(b,c,g)){return !0}}}else{while(b=b[d]){if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f){return j[2]=h[2]}if(i[d]=j,j[2]=a(b,c,g)){return !0}}}}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--){if(!a[e](b,c,d)){return !1}}return !0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++){(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h))}return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--){(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}}if(f){if(e||a){if(e){j=[],k=r.length;while(k--){(l=r[k])&&j.push(q[k]=l)}e(null,r=[],j,i)}k=r.length;while(k--){(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}}else{r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)}})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return !g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++){if(c=d.relative[a[j].type]){m=[qb(rb(m),c)]}else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++){if(d.relative[a[e].type]){break}}return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||0.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++]){if(o(m,g,i)){j.push(m);break}}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++]){o(r,s,g,i)}if(f){if(p>0){while(q--){r[q]||s[q]||(s[q]=E.call(j))}}s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--){f=ub(b[c]),f[s]?d.push(f):e.push(f)}f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++){db(a,b[d],c)}return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b){return e}a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type]){break}if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a){return G.apply(e,f),e}break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b)){return n.grep(a,function(a,d){return !!b.call(a,d,a)!==c})}if(b.nodeType){return n.grep(a,function(a){return a===b!==c})}if("string"==typeof b){if(w.test(b)){return n.filter(b,a,c)}b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a){return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++){if(n.contains(d[b],this)){return !0}}}))}for(b=0;e>b;b++){n.find(a,d[b],c)}return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return !!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a){return this}if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b){return !b||b.jquery?(b||y).find(a):this.constructor(b).find(a)}if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b)){for(c in b){n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c])}}return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2]){return y.find(a)}this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c))){1===e.nodeType&&d.push(e),e=e[b]}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling){1===a.nodeType&&a!==b&&c.push(a)}return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++){if(n.contains(this,c[b])){return !0}}})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++){for(c=this[d];c&&c!==b;c=c.parentNode){if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}}}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do{a=a[b]}while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++){if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1){h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return !h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return !i},fireWith:function(a,c){return !h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return !!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1){for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++){c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f}}return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body){return setTimeout(n.ready)}n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I){if(I=n.Deferred(),"complete"===z.readyState){setTimeout(n.ready)}else{if(z.addEventListener){z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1)}else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}}}return I.promise(b)};var L="undefined",M;for(M in n(l)){break}l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else{c=void 0}}return c}function Q(a){var b;for(b in a){if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b){return !1}}return !0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b){return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--){delete d[b[e]]}if(c?!Q(d):!n.isEmptyObject(d)){return}}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--){d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]))}n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++){b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)))}}}return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in {submit:!0,change:!0,focusin:!0}){c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1)}d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return !0}function cb(){return !1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--){f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0)}a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--){if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--){g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g))}i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else{for(o in k){n.event.remove(a,o+b[j],c,d,!0)}}}n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode){o.push(h),l=h}l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped()){b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault())}if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped()){(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type)){for(;i!=this;i=i.parentNode||this){if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++){d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d)}e.length&&g.push({elem:i,handlers:e})}}}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f){for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++){!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b))}}return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++){n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h){for(d=0,e=h[c].length;e>d;d++){n.event.add(b,c,h[c][d])}}}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events){n.removeEvent(b,d,e.handle)}b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a))){for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g){d[g]&&Cb(e,d[g])}}if(b){if(c){for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++){Bb(e,d[g])}}else{Bb(a,f)}}return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++){if(f=a[q],f||0===f){if("object"===n.type(f)){n.merge(p,f.nodeType?[f]:f)}else{if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--){h=h.lastChild}if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--){n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild){h.removeChild(h.firstChild)}h=o.lastChild}else{p.push(b.createTextNode(f))}}}}h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++]){if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++]){pb.test(f.type||"")&&c.push(f)}}}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++){if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events){for(e in g.events){m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle)}}j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++){b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c))}return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild){a.removeChild(a.firstChild)}a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a){return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0}if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++){b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a)}b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p)){return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)})}if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++){d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j)}if(f){for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++){d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")))}}i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++){c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get())}return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("').prependTo(document.body);$("#loading").html(_.label("Uploading file...")).show();a.submit();$("#uploadResponse").load(function(){var b=$(this).contents().find("body").text();$("#loading").hide();b=b.split("\n");var c=[],d=[];$.each(b,function(e,f){if(f.substr(0,1)=="/"){c[c.length]=f.substr(1,f.length-1)}else{d[d.length]=f}});if(d.length){d=d.join("\n");if(d.replace(/^\s+/g,"").replace(/\s+$/g,"").length){_.alert(d)}}if(!c.length){c=null}_.refresh(c);$("#upload").detach();setTimeout(function(){$("#uploadResponse").detach()},1);_.initUploadButton()})};_.maximize=function(b){if(_.opener.name=="tinymce"){var e=window.parent.document,h=$('iframe[src*="browse.php?opener=tinymce&"]',e),g=parseInt(h.attr("id").replace(/^mce_(\d+)_ifr$/,"$1")),f=$("#mce_"+g,e);if($(b).hasClass("selected")){$(b).removeClass("selected");f.css({left:_.maximizeMCE.left,top:_.maximizeMCE.top,width:_.maximizeMCE.width,height:_.maximizeMCE.height});h.css({width:_.maximizeMCE.width-_.maximizeMCE.Hspace,height:_.maximizeMCE.height-_.maximizeMCE.Vspace})}else{$(b).addClass("selected");_.maximizeMCE={width:parseInt(f.css("width")),height:parseInt(f.css("height")),left:f.position().left,top:f.position().top,Hspace:parseInt(f.css("width"))-parseInt(h.css("width")),Vspace:parseInt(f.css("height"))-parseInt(h.css("height"))};var d=$(window.top).width(),a=$(window.top).height();f.css({left:$(window.parent).scrollLeft(),top:$(window.parent).scrollTop(),width:d,height:a});h.css({width:d-_.maximizeMCE.Hspace,height:a-_.maximizeMCE.Vspace})}}else{if(_.opener.name=="tinymce4"){var e=window.parent.document,h=$('iframe[src*="browse.php?opener=tinymce4&"]',e).parent(),f=h.parent();if($(b).hasClass("selected")){$(b).removeClass("selected");f.css({left:_.maximizeMCE4.left,top:_.maximizeMCE4.top,width:_.maximizeMCE4.width,height:_.maximizeMCE4.height});h.css({width:_.maximizeMCE4.width,height:_.maximizeMCE4.height-_.maximizeMCE4.Vspace})}else{$(b).addClass("selected");_.maximizeMCE4={width:parseInt(f.css("width")),height:parseInt(f.css("height")),left:f.position().left,top:f.position().top,Vspace:f.outerHeight(true)-h.outerHeight(true)-1};var d=$(window.top).width(),a=$(window.top).height();f.css({left:0,top:0,width:d,height:a});h.css({width:d,height:a-_.maximizeMCE4.Vspace})}}else{if(window.opener){window.moveTo(0,0);d=screen.availWidth;a=screen.availHeight;if($.agent.opera){a-=50}window.resizeTo(d,a)}else{if(window.parent){var c=null;$(window.parent.document).find("iframe").each(function(){if(this.src.replace("/?","?")==window.location.href.replace("/?","?")){c=this;return false}});if(c!==null){$(c).toggleFullscreen(window.parent.document)}else{$("body").toggleFullscreen()}}else{$("body").toggleFullscreen()}}}}};_.refresh=function(a){_.fadeFiles();$.ajax({type:"post",dataType:"json",url:_.getURL("chDir"),data:{dir:_.dir},async:false,success:function(b){if(_.check4errors(b)){$("#files > div").css({opacity:"",filter:""});return}_.dirWritable=b.dirWritable;_.files=b.files?b.files:[];_.orderFiles(null,a);_.statusDir()},error:function(){$("#files > div").css({opacity:"",filter:""});$("#files").html(_.label("Unknown error."))}})};_.initSettings=function(){$("#settings fieldset").disableTextSelect();if(!_.shows.length){$('#show input[type="checkbox"]').each(function(c){_.shows[c]=this.name})}var a=_.shows;if(!$.$.kuki.isSet("showname")){$.$.kuki.set("showname","on");$.each(a,function(c,d){if(d!="name"){$.$.kuki.set("show"+d,"off")}})}$('#show input[type="checkbox"]').click(function(){$.$.kuki.set("show"+this.name,this.checked?"on":"off");$("#files .file div."+this.name).css("display",this.checked?"block":"none")});$.each(a,function(c,d){$('#show input[name="'+d+'"]').get(0).checked=($.$.kuki.get("show"+d)=="on")?"checked":""});if(!_.orders.length){$('#order input[type="radio"]').each(function(c){_.orders[c]=this.value})}var b=_.orders;if(!$.$.kuki.isSet("order")){$.$.kuki.set("order","name")}if(!$.$.kuki.isSet("orderDesc")){$.$.kuki.set("orderDesc","off")}$('#order input[value="'+$.$.kuki.get("order")+'"]').get(0).checked=true;$('#order input[name="desc"]').get(0).checked=($.$.kuki.get("orderDesc")=="on");$('#order input[type="radio"]').click(function(){$.$.kuki.set("order",this.value);_.orderFiles()});$('#order input[name="desc"]').click(function(){$.$.kuki.set("orderDesc",this.checked?"on":"off");_.orderFiles()});if(!$.$.kuki.isSet("view")){$.$.kuki.set("view","thumbs")}if($.$.kuki.get("view")=="list"){$("#show").parent().hide()}$('#view input[value="'+$.$.kuki.get("view")+'"]').get(0).checked=true;$("#view input").click(function(){var c=this.value;if($.$.kuki.get("view")!=c){$.$.kuki.set("view",c);if(c=="list"){$("#show").parent().hide()}else{$("#show").parent().show()}}_.fixFilesHeight();_.refresh()});$("#settings fieldset, #settings input, #settings label").transForm();_.initLangs()};_.initLangs=function(){$.each(_.langs,function(c,a){var b=$("");b.val(c).text(a);if(c==_.lang){b.attr({selected:true})}$("#lang").append(b)});$("#lang").change(function(){window.location=_.getURL("browser",this.value)+"&theme="+encodeURIComponent(_.theme)})};_.initFiles=function(){$(document).unbind("keydown").keydown(function(a){return !_.selectAll(a)});$("#files").unbind().scroll(function(){_.menu.hide()}).disableTextSelect();$(".file").unbind().click(function(a){_.selectFile($(this),a)}).rightClick(function(a,b){_.menuFile($(a),b)}).dblclick(function(){_.returnFile($(this))});if($.mobile){$(".file").on("taphold",function(){_.menuFile($(this),{pageX:$(this).offset().left,pageY:$(this).offset().top+$(this).outerHeight()})})}$.each(_.shows,function(a,b){$("#files .file div."+b).css("display",($.$.kuki.get("show"+b)=="off")?"none":"block")});_.statusDir()};_.showFiles=function(b,a){_.fadeFiles();setTimeout(function(){var d=$("
");$.each(_.files,function(g,e){var j,h,c=e.size+"|"+e.mtime;if($.$.kuki.get("view")=="list"){if(!g){d.html("
")}h=$.$.getFileExtension(e.name);if(e.thumb){h=".image"}else{if(!h.length||!e.smallIcon){h="."}}h="themes/"+_.theme+"/img/files/small/"+h+".png";j=$('');j.appendTo(d.find("table"))}else{if(e.thumb){h=_.getURL("thumb")+"&file="+encodeURIComponent(e.name)+"&dir="+encodeURIComponent(_.dir)+"&stamp="+c}else{if(e.smallThumb){h=_.uploadURL+"/"+_.dir+"/"+encodeURIComponent(e.name);h=$.$.escapeDirs(h).replace(/\'/g,"%27")}else{h=e.bigIcon?$.$.getFileExtension(e.name):".";if(!h.length){h="."}h="themes/"+_.theme+"/img/files/big/"+h+".png"}}j=$('
');j.appendTo(d)}j.find(".thumb").css({backgroundImage:'url("'+h+'")'});j.find(".name").text(e.name);j.find(".time").html(e.date);j.find(".size").html(_.humanSize(e.size));j.data(e);if((e.name===a)||$.$.inArray(e.name,a)){j.addClass("selected")}});d.css({opacity:"",filter:""});$("#files").html(d);if(b){b()}_.initFiles();_.fixScrollRadius()},200)};_.selectFile=function(b,h){if(h.ctrlKey||h.metaKey||h.shiftKey){if(h.shiftKey&&!b.hasClass("selected")){var g=b.prev();while(g.get(0)&&!g.hasClass("selected")){g.addClass("selected");g=g.prev()}}b.toggleClass("selected");var c=$(".file.selected").get(),a=0,d;if(!c.length){_.statusDir()}else{$.each(c,function(f,e){a+=$(e).data("size")});a=_.humanSize(a);if(c.length>1){$("#fileinfo").html(c.length+" "+_.label("selected files")+" ("+a+")")}else{d=$(c[0]).data();$("#fileinfo").text(d.name+" ("+_.humanSize(d.size)+", "+d.date+")")}}}else{d=b.data();$(".file").removeClass("selected");b.addClass("selected");$("#fileinfo").text(d.name+" ("+_.humanSize(d.size)+", "+d.date+")")}};_.selectAll=function(c){if((!c.ctrlKey&&!c.metaKey)||((c.keyCode!=65)&&(c.keyCode!=97))){return false}var b=$(".file"),a=0;if(b.length){b.addClass("selected").each(function(){a+=$(this).data("size")});$("#fileinfo").html(b.length+" "+_.label("selected files")+" ("+_.humanSize(a)+")")}return true};_.returnFile=function(c){var b,d,a=c.substr?c:_.uploadURL+"/"+_.dir+"/"+c.data("name");a=$.$.escapeDirs(a);if(_.opener.name=="ckeditor"){_.opener.CKEditor.object.tools.callFunction(_.opener.CKEditor.funcNum,a,"");window.close()}else{if(_.opener.name=="fckeditor"){window.opener.SetUrl(a);window.close()}else{if(_.opener.name=="tinymce"){d=tinyMCEPopup.getWindowArg("window");d.document.getElementById(tinyMCEPopup.getWindowArg("input")).value=a;if(d.getImageData){d.getImageData()}if(typeof(d.ImageDialog)!="undefined"){if(d.ImageDialog.getImageData){d.ImageDialog.getImageData()}if(d.ImageDialog.showPreviewImage){d.ImageDialog.showPreviewImage(a)}}tinyMCEPopup.close()}else{if(_.opener.name=="tinymce4"){d=(window.opener?window.opener:window.parent);$(d.document).find("#"+_.opener.TinyMCE.field).val(a);d.tinyMCE.activeEditor.windowManager.close()}else{if(_.opener.callBack){if(window.opener&&window.opener.KCFinder){_.opener.callBack(a);window.close()}if(window.parent&&window.parent.KCFinder){b=$('#toolbar a[href="kcact:maximize"]');if(b.hasClass("selected")){_.maximize(b)}_.opener.callBack(a)}}else{if(_.opener.callBackMultiple){if(window.opener&&window.opener.KCFinder){_.opener.callBackMultiple([a]);window.close()}if(window.parent&&window.parent.KCFinder){b=$('#toolbar a[href="kcact:maximize"]');if(b.hasClass("selected")){_.maximize(b)}_.opener.callBackMultiple([a])}}}}}}}};_.returnFiles=function(b){if(_.opener.callBackMultiple&&b.length){var a=[];$.each(b,function(d,c){a[d]=_.uploadURL+"/"+_.dir+"/"+$(c).data("name");a[d]=$.$.escapeDirs(a[d])});_.opener.callBackMultiple(a);if(window.opener){window.close()}}};_.returnThumbnails=function(c){if(_.opener.callBackMultiple){var b=[],a=0;$.each(c,function(e,d){if($(d).data("thumb")){b[a]=_.thumbsURL+"/"+_.dir+"/"+$(d).data("name");b[a]=$.$.escapeDirs(b[a++])}});_.opener.callBackMultiple(b);if(window.opener){window.close()}}};_.initFolders=function(){$("#folders").scroll(function(){_.menu.hide()}).disableTextSelect();$("div.folder > a").unbind().click(function(){_.menu.hide();return false});$("div.folder > a > span.brace").unbind().click(function(){if($(this).hasClass("opened")||$(this).hasClass("closed")){_.expandDir($(this).parent())}});$("div.folder > a > span.folder").unbind().click(function(){_.changeDir($(this).parent())}).rightClick(function(a,b){_.menuDir($(a).parent(),b)});if($.mobile){$("div.folder > a > span.folder").on("taphold",function(){_.menuDir($(this).parent(),{pageX:$(this).offset().left+1,pageY:$(this).offset().top+$(this).outerHeight()})})}};_.setTreeData=function(b,c){if(!c){c=""}else{if(c.length&&(c.substr(c.length-1,1)!="/")){c+="/"}}c+=b.name;var a='#folders a[href="kcdir:/'+$.$.escapeDirs(c)+'"]';$(a).data({name:b.name,path:c,readable:b.readable,writable:b.writable,removable:b.removable,hasDirs:b.hasDirs});$(a+" span.folder").addClass(b.current?"current":"regular");if(b.dirs&&b.dirs.length){$(a+" span.brace").addClass("opened");$.each(b.dirs,function(e,d){_.setTreeData(d,c+"/")})}else{if(b.hasDirs){$(a+" span.brace").addClass("closed")}}};_.buildTree=function(a,e){if(!e){e=""}e+=a.name;var b,d='
 '+$.$.htmlData(a.name)+"";if(a.dirs){d+='
';for(var c=0;c'+_.label("Loading folders...")+"
");$("#loadingDirs").hide().show(200,function(){$.ajax({type:"post",dataType:"json",url:_.getURL("expand"),data:{dir:b},async:false,success:function(e){$("#loadingDirs").hide(200,function(){$("#loadingDirs").detach()});if(_.check4errors(e)){return}var d="";$.each(e.dirs,function(g,f){d+='"});if(d.length){a.parent().append('
'+d+"
");var c=$(a.parent().children(".folders").first());c.hide();$(c).show(500,function(){_.fixScrollRadius()});$.each(e.dirs,function(g,f){_.setTreeData(f,b)})}if(e.dirs.length){a.children(".brace").removeClass("closed").addClass("opened")}else{a.children(".brace").removeClass("opened closed")}_.initFolders();_.initDropUpload();_.fixScrollRadius()},error:function(){$("#loadingDirs").detach();_.alert(_.label("Unknown error."));_.fixScrollRadius()}});_.fixScrollRadius()})}}}};_.changeDir=function(a){if(a.children("span.folder").hasClass("regular")){$("div.folder > a > span.folder").removeClass("current regular").addClass("regular");a.children("span.folder").removeClass("regular").addClass("current");$("#files").html(_.label("Loading files..."));$.ajax({type:"post",dataType:"json",url:_.getURL("chDir"),data:{dir:a.data("path")},async:false,success:function(b){if(_.check4errors(b)){return}_.files=b.files;_.orderFiles();_.dir=a.data("path");_.dirWritable=b.dirWritable;_.setTitle("KCFinder: /"+_.dir);_.statusDir();_.initDropUpload()},error:function(){$("#files").html(_.label("Unknown error."))}})}};_.statusDir=function(){var b=0,a=0;for(;b<_.files.length;b++){a+=_.files[b].size}a=_.humanSize(a);$("#fileinfo").html(_.files.length+" "+_.label("files")+" ("+a+")")};_.refreshDir=function(a){var b=a.data("path");if(a.children(".brace").hasClass("opened")||a.children(".brace").hasClass("closed")){a.children(".brace").removeClass("opened").addClass("closed")}a.parent().children(".folders").first().detach();if(b==_.dir.substr(0,b.length)){_.changeDir(a)}_.expandDir(a);return true};_.menu={init:function(){$("#menu").html("
    ").css("display","none")},addItem:function(b,c,d,a){if(typeof a=="undefined"){a=false}$("#menu ul").append('
  • "+c+"
  • ");if(!a&&$.isFunction(d)){$('#menu a[href="'+b+'"]').click(function(){_.menu.hide();return d()})}},addDivider:function(){if($("#menu ul").html().length){$("#menu ul").append("
  • -
  • ")}},show:function(f){var g=$("#menu"),a=$("#menu ul");if(a.html().length){g.find("ul").first().menu();if(typeof f!="undefined"){var d=f.pageX,c=f.pageY,b=$(window);if((g.outerWidth()+d)>b.width()){d=b.width()-g.outerWidth()}if((g.outerHeight()+c)>b.height()){c=b.height()-g.outerHeight()}g.hide().css({left:d,top:c,width:""}).fadeIn("fast")}else{g.fadeIn("fast")}}else{a.detach()}},hide:function(){$("#clipboard").removeClass("selected");$("div.folder > a > span.folder").removeClass("context");$("#menu").hide().css("width","").html("").data("title",null).unbind().click(function(){return false});$(document).unbind("keydown").keydown(function(a){return !_.selectAll(a)})}};_.menuFile=function(b,g){_.menu.init();var f=b.data(),c=$(".file.selected").get();if(b.hasClass("selected")&&c.length&&(c.length>1)){var a=false,h=0,d;$.each(c,function(j,e){d=$(e).data();if(d.thumb){a=true}if(!f.writable){h++}});if(_.opener.callBackMultiple){_.menu.addItem("kcact:pick",_.label("Select"),function(){_.returnFiles(c);return false});if(a){_.menu.addItem("kcact:pick_thumb",_.label("Select Thumbnails"),function(){_.returnThumbnails(c);return false})}}if(f.thumb||f.smallThumb||_.support.zip){_.menu.addDivider();if(f.thumb||f.smallThumb){_.menu.addItem("kcact:view",_.label("View"),function(){_.viewImage(f)})}if(_.support.zip){_.menu.addItem("kcact:download",_.label("Download"),function(){var e=[];$.each(c,function(k,j){e[k]=$(j).data("name")});_.post(_.getURL("downloadSelected"),{dir:_.dir,files:e});return false})}}if(_.access.files.copy||_.access.files.move){_.menu.addDivider();_.menu.addItem("kcact:clpbrdadd",_.label("Add to Clipboard"),function(){var e="";$.each(c,function(l,k){var m=$(k).data(),j=false;for(l=0;l<_.clipboard.length;l++){if((_.clipboard[l].name==m.name)&&(_.clipboard[l].dir==_.dir)){j=true;e+=m.name+": "+_.label("This file is already added to the Clipboard.")+"\n";break}}if(!j){m.dir=_.dir;_.clipboard[_.clipboard.length]=m}});_.initClipboard();if(e.length){_.alert(e.substr(0,e.length-1))}return false})}if(_.access.files["delete"]){_.menu.addDivider();_.menu.addItem("kcact:rm",_.label("Delete"),function(){if($(this).hasClass("denied")){return false}var e=0,k=[];$.each(c,function(m,l){var n=$(l).data();if(!n.writable){e++}else{k[k.length]=_.dir+"/"+n.name}});if(e==c.length){_.alert(_.label("The selected files are not removable."));return false}var j=function(l){_.fadeFiles();$.ajax({type:"post",dataType:"json",url:_.getURL("rm_cbd"),data:{files:k},async:false,success:function(m){if(l){l()}_.check4errors(m);_.refresh()},error:function(){if(l){l()}$("#files > div").css({opacity:"",filter:""});_.alert(_.label("Unknown error."))}})};if(e){_.confirm(_.label("{count} selected files are not removable. Do you want to delete the rest?",{count:e}),j)}else{_.confirm(_.label("Are you sure you want to delete all selected files?"),j)}return false},(h==c.length))}_.menu.show(g)}else{$(".file").removeClass("selected");b.addClass("selected");$("#fileinfo").text(f.name+" ("+_.humanSize(f.size)+", "+f.date+")");if(_.opener.callBack||_.opener.callBackMultiple){_.menu.addItem("kcact:pick",_.label("Select"),function(){_.returnFile(b);return false});if(f.thumb){_.menu.addItem("kcact:pick_thumb",_.label("Select Thumbnail"),function(){_.returnFile(_.thumbsURL+"/"+_.dir+"/"+f.name);return false})}_.menu.addDivider()}if(f.thumb||f.smallThumb){_.menu.addItem("kcact:view",_.label("View"),function(){_.viewImage(f)})}_.menu.addItem("kcact:download",_.label("Download"),function(){$("#menu").html('
    ');$("#downloadForm input").get(0).value=_.dir;$("#downloadForm input").get(1).value=f.name;$("#downloadForm").submit();return false});if(_.access.files.copy||_.access.files.move){_.menu.addDivider();_.menu.addItem("kcact:clpbrdadd",_.label("Add to Clipboard"),function(){for(i=0;i<_.clipboard.length;i++){if((_.clipboard[i].name==f.name)&&(_.clipboard[i].dir==_.dir)){_.alert(_.label("This file is already added to the Clipboard."));return false}}var e=f;e.dir=_.dir;_.clipboard[_.clipboard.length]=e;_.initClipboard();return false})}if(_.access.files.rename||_.access.files["delete"]){_.menu.addDivider()}if(_.access.files.rename){_.menu.addItem("kcact:mv",_.label("Rename..."),function(){if(!f.writable){return false}_.fileNameDialog({dir:_.dir,file:f.name},"newName",f.name,_.getURL("rename"),{title:"New file name:",errEmpty:"Please enter new file name.",errSlash:"Unallowable characters in file name.",errDot:"File name shouldn't begins with '.'"},_.refresh);return false},!f.writable)}if(_.access.files["delete"]){_.menu.addItem("kcact:rm",_.label("Delete"),function(){if(!f.writable){return false}_.confirm(_.label("Are you sure you want to delete this file?"),function(e){$.ajax({type:"post",dataType:"json",url:_.getURL("delete"),data:{dir:_.dir,file:f.name},async:false,success:function(j){if(e){e()}_.clearClipboard();if(_.check4errors(j)){return}_.refresh()},error:function(){if(e){e()}_.alert(_.label("Unknown error."))}})});return false},!f.writable)}_.menu.show(g)}};_.menuDir=function(a,d){_.menu.init();var c=a.data(),b="
      ";if(_.clipboard&&_.clipboard.length){if(_.access.files.copy){_.menu.addItem("kcact:cpcbd",_.label("Copy {count} files",{count:_.clipboard.length}),function(){_.copyClipboard(c.path);return false},!c.writable)}if(_.access.files.move){_.menu.addItem("kcact:mvcbd",_.label("Move {count} files",{count:_.clipboard.length}),function(){_.moveClipboard(c.path);return false},!c.writable)}if(_.access.files.copy||_.access.files.move){_.menu.addDivider()}}_.menu.addItem("kcact:refresh",_.label("Refresh"),function(){_.refreshDir(a);return false});if(_.support.zip){_.menu.addDivider();_.menu.addItem("kcact:download",_.label("Download"),function(){_.post(_.getURL("downloadDir"),{dir:c.path});return false})}if(_.access.dirs.create||_.access.dirs.rename||_.access.dirs["delete"]){_.menu.addDivider()}if(_.access.dirs.create){_.menu.addItem("kcact:mkdir",_.label("New Subfolder..."),function(f){if(!c.writable){return false}_.fileNameDialog({dir:c.path},"newDir","",_.getURL("newDir"),{title:"New folder name:",errEmpty:"Please enter new folder name.",errSlash:"Unallowable characters in folder name.",errDot:"Folder name shouldn't begins with '.'"},function(){_.refreshDir(a);_.initDropUpload();if(!c.hasDirs){a.data("hasDirs",true);a.children("span.brace").addClass("closed")}});return false},!c.writable)}if(_.access.dirs.rename){_.menu.addItem("kcact:mvdir",_.label("Rename..."),function(f){if(!c.removable){return false}_.fileNameDialog({dir:c.path},"newName",c.name,_.getURL("renameDir"),{title:"New folder name:",errEmpty:"Please enter new folder name.",errSlash:"Unallowable characters in folder name.",errDot:"Folder name shouldn't begins with '.'"},function(e){if(!e.name){_.alert(_.label("Unknown error."));return}var g=(c.path==_.dir);a.children("span.folder").text(e.name);a.data("name",e.name);a.data("path",$.$.dirname(c.path)+"/"+e.name);if(g){_.dir=a.data("path")}_.initDropUpload()},true);return false},!c.removable)}if(_.access.dirs["delete"]){_.menu.addItem("kcact:rmdir",_.label("Delete"),function(){if(!c.removable){return false}_.confirm(_.label("Are you sure you want to delete this folder and all its content?"),function(e){$.ajax({type:"post",dataType:"json",url:_.getURL("deleteDir"),data:{dir:c.path},async:false,success:function(f){if(e){e()}if(_.check4errors(f)){return}a.parent().hide(500,function(){var h=a.parent().parent();var g=h.parent().children("a").first();a.parent().detach();if(!h.children("div.folder").get(0)){g.children("span.brace").first().removeClass("opened closed");g.parent().children(".folders").detach();g.data("hasDirs",false)}if(g.data("path")==_.dir.substr(0,g.data("path").length)){_.changeDir(g)}_.initDropUpload()})},error:function(){if(e){e()}_.alert(_.label("Unknown error."))}})});return false},!c.removable)}_.menu.show(d);$("div.folder > a > span.folder").removeClass("context");if(a.children("span.folder").hasClass("regular")){a.children("span.folder").addClass("context")}};_.openClipboard=function(){if(!_.clipboard||!_.clipboard.length){return}if($('#menu a[href="kcact:clrcbd"]').html()){$("#clipboard").removeClass("selected");_.menu.hide();return}setTimeout(function(){_.menu.init();var k=$("#menu"),e=$("#status"),f='
    • ';$.each(_.clipboard,function(a,l){var b=$.$.getFileExtension(l.name);if(l.thumb){b=".image"}else{if(!l.smallIcon||!b.length){b="."}}b="themes/"+_.theme+"/img/files/small/"+b+".png";f+=''+$.$.htmlData($.$.basename(l.name))+""});f+='
    • -
    • ';$("#menu ul").append(f);if(_.support.zip){_.menu.addItem("kcact:download",_.label("Download files"),function(){_.downloadClipboard();return false})}if(_.access.files.copy||_.access.files.move||_.access.files["delete"]){_.menu.addDivider()}if(_.access.files.copy){_.menu.addItem("kcact:cpcbd",_.label("Copy files here"),function(){if(!_.dirWritable){return false}_.copyClipboard(_.dir);return false},!_.dirWritable)}if(_.access.files.move){_.menu.addItem("kcact:mvcbd",_.label("Move files here"),function(){if(!_.dirWritable){return false}_.moveClipboard(_.dir);return false},!_.dirWritable)}if(_.access.files["delete"]){_.menu.addItem("kcact:rmcbd",_.label("Delete files"),function(){_.confirm(_.label("Are you sure you want to delete all files in the Clipboard?"),function(a){if(a){a()}_.deleteClipboard()});return false})}_.menu.addDivider();_.menu.addItem("kcact:clrcbd",_.label("Clear the Clipboard"),function(){_.clearClipboard();return false});$("#clipboard").addClass("selected");_.menu.show();var h=$(window).width()-k.css({width:""}).outerWidth(),g=$(window).height()-k.outerHeight()-e.outerHeight(),j=g+k.outerTopSpace();k.find(".list").css({"max-height":j,"overflow-y":"auto","overflow-x":"hidden",width:""});g=$(window).height()-k.outerHeight(true)-e.outerHeight(true);k.css({left:h-5,top:g}).fadeIn("fast");var d=k.find(".list").outerHeight(),c=k.find(".list div").outerHeight();if(c-d>10){k.css({left:parseInt(k.css("left"))-_.scrollbarWidth}).width(k.width()+_.scrollbarWidth)}},1)};_.viewImage=function(b){var d=new Date().getTime(),f=false,g=[],c=100,i=$(window),h,j,a,e,k=function(o){_.lock=true;var m=$.$.escapeDirs(_.uploadURL+"/"+_.dir+"/"+o.name)+"?ts="+d,l=new Image(),n=$(l),r=function(){_.lock=false;$("#files .file").each(function(){if($(this).data("name")==o.name){_.ssImage=this;return false}});n.hide().appendTo("body");var D=i.width(),M=i.height(),u=n.width(),A=n.height(),I=u,w=A,y=false,z=$('
      '),N=function(O){if(!_.lock){var t=g[O];_.currImg=O;k(t)}},G=function(){N((_.currImg>=g.length-1)?0:(_.currImg+1))},x=function(){N((_.currImg?_.currImg:g.length)-1)},F=function(t){if(_.ssImage){_.selectFile($(_.ssImage),t)}f.dialog("destroy").detach()};n.detach().appendTo(z);if(!f){y=true;var H=function(){f.dialog("destroy").detach()},L=function(){setTimeout(function(){f.find("input").get(0).focus()},100)};f=_.dialog(".","",{draggable:false,nopadding:true,close:H,show:false,hide:false,buttons:[{text:_.label("Previous"),icons:{primary:"ui-icon-triangle-1-w"},click:x},{text:_.label("Next"),icons:{secondary:"ui-icon-triangle-1-e"},click:G},{text:_.label("Select"),icons:{primary:"ui-icon-check"},click:F},{text:_.label("Close"),icons:{primary:"ui-icon-closethick"},click:H}]});f.click(G).css({overflow:"hidden"}).parent().css({width:"auto",height:"auto"});j=f.parent().click(L).rightClick(L).disableTextSelect().addClass("kcfImageViewer");a=j.find(".ui-dialog-titlebar").outerHeight()+j.find(".ui-dialog-buttonpane").outerHeight()+j.outerVSpace("b");e=j.outerHSpace("b");h=j.outerWidth()-e}var J=D-e,v=M-a+1,B=0,s=0,E=u,C=A;if((u>J)||(A>v)){if((v/J)<(A/u)){C=v;E=(u*C)/A}else{E=J;C=(A*E)/u}I=E;w=C}else{if((u');f.find("input").keydown(function(O){if(!_.lock){if(O.metaKey||O.ctrlKey||O.altKey||O.shiftKey){return}var t=O.keyCode;if((t==37)){x()}if((t==39)){G()}if((t==13)||(t==32)){F(O)}}}).get(0).focus();n.css({padding:B+"px 0 0 "+s+"px",width:I,height:w}).show();f.children().first().css({width:E,height:C,display:"none"}).fadeIn(150,function(){p();var t=o.name+" ("+u+" x "+A+")";f.prev().find(".ui-dialog-title").css({width:E-f.prev().find(".ui-dialog-titlebar-close").outerWidth()-20}).text(t).attr({title:t}).css({cursor:"default"})})})};if(y){K()}else{f.children().first().fadeOut(150,K)}},q=function(){if(f){f.prev().addClass("loading").find(".ui-dialog-title").text(_.label("Loading image...")).css({width:"auto"})}else{$("#loading").text(_.label("Loading image...")).show()}},p=function(){if(f){f.prev().removeClass("loading")}$("#loading").hide()};q();l.src=m;if(l.complete){r()}else{l.onload=r;l.onerror=function(){_.lock=false;p();_.alert(_.label("Unknown error."));_.refresh()}}};$.each(_.files,function(m,l){m=g.length;if(l.thumb||l.smallThumb){g[m]=l}if(l.name==b.name){_.currImg=m}});k(b);return false};_.initClipboard=function(){if(!_.clipboard||!_.clipboard.length){return}var b=0,c=$("#clipboard");$.each(_.clipboard,function(d,e){b+=e.size});b=_.humanSize(b);c.disableTextSelect().html('
      ');var a=function(){c.css({left:$(window).width()-c.outerWidth(),top:$(window).height()-c.outerHeight()})};a();c.show();$(window).unbind().resize(function(){_.resize();a()})};_.removeFromClipboard=function(a){if(!_.clipboard||!_.clipboard[a]){return false}if(_.clipboard.length==1){_.clearClipboard();_.menu.hide();return}if(a<_.clipboard.length-1){var b=_.clipboard.slice(a+1);_.clipboard=_.clipboard.slice(0,a);_.clipboard=_.clipboard.concat(b)}else{_.clipboard.pop()}_.initClipboard();_.menu.hide();_.openClipboard();return true};_.copyClipboard=function(b){if(!_.clipboard||!_.clipboard.length){return}var d=[],a=0;for(i=0;i<_.clipboard.length;i++){if(_.clipboard[i].readable){d[i]=_.clipboard[i].dir+"/"+_.clipboard[i].name}else{a++}}if(_.clipboard.length==a){_.alert(_.label("The files in the Clipboard are not readable."));return}var c=function(e){if(b==_.dir){_.fadeFiles()}$.ajax({type:"post",dataType:"json",url:_.getURL("cp_cbd"),data:{dir:b,files:d},async:false,success:function(f){if(e){e()}_.check4errors(f);_.clearClipboard();if(b==_.dir){_.refresh()}},error:function(){if(e){e()}$("#files > div").css({opacity:"",filter:""});_.alert(_.label("Unknown error."))}})};if(a){_.confirm(_.label("{count} files in the Clipboard are not readable. Do you want to copy the rest?",{count:a}),c)}else{c()}};_.moveClipboard=function(b){if(!_.clipboard||!_.clipboard.length){return}var d=[],a=0;for(i=0;i<_.clipboard.length;i++){if(_.clipboard[i].readable&&_.clipboard[i].writable){d[i]=_.clipboard[i].dir+"/"+_.clipboard[i].name}else{a++}}if(_.clipboard.length==a){_.alert(_.label("The files in the Clipboard are not movable."));return}var c=function(e){_.fadeFiles();$.ajax({type:"post",dataType:"json",url:_.getURL("mv_cbd"),data:{dir:b,files:d},async:false,success:function(f){if(e){e()}_.check4errors(f);_.clearClipboard();_.refresh()},error:function(){if(e){e()}$("#files > div").css({opacity:"",filter:""});_.alert(_.label("Unknown error."))}})};if(a){_.confirm(_.label("{count} files in the Clipboard are not movable. Do you want to move the rest?",{count:a}),c)}else{c()}};_.deleteClipboard=function(){if(!_.clipboard||!_.clipboard.length){return}var c=[],a=0;for(i=0;i<_.clipboard.length;i++){if(_.clipboard[i].readable&&_.clipboard[i].writable){c[i]=_.clipboard[i].dir+"/"+_.clipboard[i].name}else{a++}}if(_.clipboard.length==a){_.alert(_.label("The files in the Clipboard are not removable."));return}var b=function(d){_.fadeFiles();$.ajax({type:"post",dataType:"json",url:_.getURL("rm_cbd"),data:{files:c},async:false,success:function(e){if(d){d()}_.check4errors(e);_.clearClipboard();_.refresh()},error:function(){if(d){d()}$("#files > div").css({opacity:"",filter:""});_.alert(_.label("Unknown error."))}})};if(a){_.confirm(_.label("{count} files in the Clipboard are not removable. Do you want to delete the rest?",{count:a}),b)}else{b()}};_.downloadClipboard=function(){if(!_.clipboard||!_.clipboard.length){return}var a=[];for(i=0;i<_.clipboard.length;i++){if(_.clipboard[i].readable){a[i]=_.clipboard[i].dir+"/"+_.clipboard[i].name}}if(a.length){_.post(_.getURL("downloadClipboard"),{files:a})}};_.clearClipboard=function(){$("#clipboard").html("");_.clipboard=[]};_.initDropUpload=function(){if(!_.access.files.upload){return}var b=$("#files"),d=$("#folders").find("div.folder > a"),g,j,e,c,k,l=function(m){e=c=0;k=[];var i=m.dataTransfer.files;for(g=0;g
       
       
       
    ');j.find(".bar.count").progressbar({max:i.length,value:0});j.find(".bar.size").progressbar({max:e,value:0});j.find(".info").css("padding","5px 0").first().css("paddingTop",0);j.find(".info").last().css("paddingBottom",0);j=_.dialog(_.label("Uploading files"),j,{closeOnEscape:false,buttons:[]});j.parent().css("paddingBottom",0).find(".ui-dialog-titlebar button").css("visibility","hidden").get(0).disabled=true;return true},f={param:"upload[]",maxFilesize:_.dropUploadMaxFilesize,begin:function(n,i,m){j.find(".info.count").html(_.label("Uploading file {current} of {count}",{current:i,count:m}));j.find(".info.size").html(_.label("Uploaded {uploaded} of {total}",{uploaded:_.humanSize(c),total:_.humanSize(e)}));j.find(".info.errors").html(_.label("Errors:")+" "+k.length);j.find(".bar.count").progressbar({value:i});j.find(".bar.size").progressbar({value:c})},success:function(o,m,n){c+=o.file.size;var i=o.responseText;if(i.substr(0,1)!="/"){k.push($.$.htmlData(i))}},error:function(n,i,m){c+=n.file.size;k.push($.$.htmlData(n.file.name+": "+_.label("Failed to upload {filename}!",{filename:n.file.name})))},abort:function(n,m,i){c+=n.file.size;k.push($.$.htmlData(n.file.name+": "+_.label("Failed to upload {filename}!",{filename:n.file.name})))},filesizeCallback:function(n,m,i){c+=n.file.size;k.push($.$.htmlData(n.file.name+": "+_.label("The uploaded file exceeds {size} bytes.",{size:_.dropUploadMaxFilesize})))},finish:function(){_.refresh();j.find(".bar.size").progressbar({value:c});j.find(".info.size").html(_.label("Uploaded: {uploaded} of {total}",{uploaded:_.humanSize(c),total:_.humanSize(e)}));j.find(".info.errors").html(_.label("Errors:")+" "+k.length);var i=k;setTimeout(function(){j.dialog("destroy").detach();if(i.length){_.alert(i.join("
    "))}},500)}},h={ajax:{success:function(i){_.refresh();if(i.error){_.alert(i.error);return}},error:function(){_.refresh();_.alert(_.label("Unknown error."))},abort:function(){_.refresh()}}},a="&dir="+encodeURIComponent(_.dir);b.shDropUpload($.extend(f,{url:_.getURL("upload")+a,precheck:function(i){if(!$("#folders span.current").first().parent().data("writable")){_.alert(_.label("Cannot write to upload folder."));return false}return l(i)}}),$.extend(true,h,{ajax:{url:_.getURL("dragUrl")+a}}));d.each(function(){var m=this,i="&dir="+encodeURIComponent($(m).data("path"));$(m).shDropUpload($.extend(f,{url:_.getURL("upload")+i,precheck:function(n){if(!$(m).data("writable")){_.alert(_.label("Cannot write to upload folder."));return false}return l(n)}}),$.extend(true,h,{ajax:{url:_.getURL("dragUrl")+i}}))})};_.orderFiles=function(f,e){var b=$.$.kuki.get("order"),g=($.$.kuki.get("orderDesc")=="on"),c,d,a;if(!_.files||!_.files.sort){_.files=[]}_.files=_.files.sort(function(i,h){if(!b){b="name"}if(b=="date"){c=i.mtime;d=h.mtime}else{if(b=="type"){c=$.$.getFileExtension(i.name);d=$.$.getFileExtension(h.name)}else{if(b=="size"){c=i.size;d=h.size}else{c=i[b].toLowerCase();d=h[b].toLowerCase()}}}if((b=="size")||(b=="date")){if(cd){return g?-1:1}}if(c==d){c=i.name.toLowerCase();d=h.name.toLowerCase();a=[c,d];a=a.sort();return(a[0]==c)?-1:1}a=[c,d];a=a.sort();if(a[0]==c){return g?1:-1}return g?-1:1});_.showFiles(f,e);_.initFiles()};_.humanSize=function(a){if(a<1024){a=a.toString()+" B"}else{if(a<1048576){a/=1024;a=parseInt(a).toString()+" KB"}else{if(a<1073741824){a/=1048576;a=parseInt(a).toString()+" MB"}else{if(a<1099511627776){a/=1073741824;a=parseInt(a).toString()+" GB"}else{a/=1099511627776;a=parseInt(a).toString()+" TB"}}}}return a};_.getURL=function(a,c){if(!c){c=_.lang}var b="browse.php?type="+encodeURIComponent(_.type)+"&lng="+encodeURIComponent(c);if(_.opener.name){b+="&opener="+encodeURIComponent(_.opener.name)}if(a){b+="&act="+encodeURIComponent(a)}if(_.cms){b+="&cms="+encodeURIComponent(_.cms)}return b};_.label=function(b,c){var a=_.labels[b]?_.labels[b]:b;if(c){$.each(c,function(d,e){a=a.replace("{"+d+"}",e)})}return a};_.check4errors=function(a){if(!a.error){return false}var b=a.error.join?a.error.join("\n"):a.error;_.alert(b);return true};_.post=function(a,c){var b='
    ';$.each(c,function(d,e){if($.isArray(e)){$.each(e,function(g,f){b+=''})}else{b+=''}});b+="
    ";$("#menu").html(b).show();$("#postForm").get(0).submit()};_.fadeFiles=function(){$("#files > div").css({opacity:"0.4",filter:"alpha(opacity=40)"})}; \ No newline at end of file +(function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("
    "),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widths?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("
    ").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY=0;u--)r=p.snapElements[u].left,l=r+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==g.snapMode&&(s=f>=Math.abs(h-b),n=f>=Math.abs(c-v),a=f>=Math.abs(r-_),o=f>=Math.abs(l-m),s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapMode&&(s=f>=Math.abs(h-v),n=f>=Math.abs(c-b),a=f>=Math.abs(r-m),o=f>=Math.abs(l-_),s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,a,o=(t.positionAbs||t.position.absolute).left,r=(t.positionAbs||t.position.absolute).top,l=o+t.helperProportions.width,h=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return o>=c&&d>=l&&r>=u&&p>=h;case"intersect":return o+t.helperProportions.width/2>c&&d>l-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&p>h-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,a=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(a,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||h>=u&&p>=h||u>r&&h>p)&&(o>=c&&d>=o||l>=c&&d>=l||c>o&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),a.length&&(s=t.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}})(jQuery);(function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("
    ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),a="ui-resizable-"+s,n=t("
    "),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,a;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,a),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(t(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),o.containment&&(s+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-a.left||0,d=e.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,a=s?0:c.sizeDiff.width,o={width:c.helper.width()-a,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(o,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidtht.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),a&&(t.height=e.maxHeight),o&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),a&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,a=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
    "),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:o,h=t.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,a,o=t(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,c=o._aspectRatio||e.shiftKey,u={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-u.left:o.offset.left-u.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-u.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=Math.abs(o.parentData.left)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,c&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,c&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),h=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,a=e.originalPosition,o=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.top=a.top-u):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.left=a.left-c):(p-l>0?(e.size.height=p,e.position.top=a.top-u):(e.size.height=l,e.position.top=a.top+n.height-l),d-h>0?(e.size.width=d,e.position.left=a.left-c):(e.size.width=h,e.position.left=a.left+n.width-h))}})})(jQuery);(function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("
    ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=e.pageX,l=e.pageY;return a>r&&(i=r,r=a,a=i),o>l&&(i=l,l=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:l-o}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>r||a>i.right||i.top>l||o>i.bottom):"fit"===n.tolerance&&(h=i.left>a&&r>i.right&&i.top>o&&l>i.bottom),h?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t(" ",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.leftthis.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:n=this.headers[(s+1)%a];break;case i.LEFT:case i.UP:n=this.headers[(s-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:n=this.headers[0];break;case i.END:n=this.headers[a-1]}n&&(e(t.target).attr("tabIndex",-1),e(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,a=this.options,s=a.heightStyle,n=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),a=i.attr("id"),s=i.next(),n=s.attr("id");a||(a=r+"-header-"+t,i.attr("id",a)),n||(n=r+"-panel-"+t,s.attr("id",n)),i.attr("aria-controls",n),s.attr("aria-labelledby",a)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(a.event),"fill"===s?(i=n.height(),this.element.siblings(":visible").each(function(){var t=e(this),a=t.css("position");"absolute"!==a&&"fixed"!==a&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,a=this.active,s=e(t.currentTarget),n=s[0]===a[0],r=n&&i.collapsible,o=r?e():s.next(),h=a.next(),d={oldHeader:a,oldPanel:h,newHeader:r?e():s,newPanel:o};t.preventDefault(),n&&!i.collapsible||this._trigger("beforeActivate",t,d)===!1||(i.active=r?!1:this.headers.index(s),this.active=n?e():s,this._toggle(d),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,s){var n,r,o,h=this,d=0,c=e.length&&(!t.length||e.index()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,undefined;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("
      ").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:s})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length").append(e("").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",n="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},a=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.10.4",defaultElement:"").addClass(this._triggerClass).html(n?e("").attr({src:n,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,a,s,n=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,a=0,s=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,a=s);return a},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length)}},_inlineDatepicker:function(t,i){var a=e(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(i.dpDiv),e.data(t,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,a,n,o){var u,c,h,l,d,p=this._dialogInst;return p||(this.uuid+=1,u="dp"+this.uuid,this._dialogInput=e(""),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],r,p)),s(p.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+l,h/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(t){var i,a=e(t),s=e.data(t,r);a.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(s.append.remove(),s.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&a.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,a,n){var r,o,u,c,h=this._getInst(i);return 2===arguments.length&&"string"==typeof a?"defaults"===a?e.extend({},e.datepicker._defaults):h?"all"===a?e.extend({},h.settings):this._get(h,a):null:(r=a||{},"string"==typeof a&&(r={},r[a]=n),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),u=this._getMinMaxDate(h,"min"),c=this._getMinMaxDate(h,"max"),s(h.settings,r),null!==u&&r.dateFormat!==t&&r.minDate===t&&(h.settings.minDate=this._formatDate(h,u)),null!==c&&r.dateFormat!==t&&r.maxDate===t&&(h.settings.maxDate=this._formatDate(h,c)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),t)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,a,s,n=e.datepicker._getInst(t.target),r=!0,o=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",n.dpDiv),s[0]&&e.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),i=e.datepicker._get(n,"onSelect"),i?(a=e.datepicker._formatDate(n),i.apply(n.input?n.input[0]:null,[a,n])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(i){var a,s,n=e.datepicker._getInst(i.target);return e.datepicker._get(n,"constrainInput")?(a=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">s||!a||a.indexOf(s)>-1):t},_doKeyUp:function(t){var i,a=e.datepicker._getInst(t.target);if(a.input.val()!==a.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,e.datepicker._getFormatConfig(a)),i&&(e.datepicker._setDateFromField(a),e.datepicker._updateAlternate(a),e.datepicker._updateDatepicker(a))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,a,n,r,o,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),a=e.datepicker._get(i,"beforeShow"),n=a?a.apply(t,[t,i]):{},n!==!1&&(s(i.settings,n),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),o={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),o=e.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,n=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,a=this._getNumberOfMonths(t),s=a[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,a){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,u=document.documentElement.clientWidth+(a?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=a&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=a&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>u&&u>s?Math.abs(i.left+s-u):0),i.top-=Math.min(i.top,i.top+n>c&&c>n?Math.abs(n+o):0),i},_findPos:function(t){for(var i,a=this._getInst(t),s=this._get(a,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,a,s,n,o=this._curInst;!o||t&&o!==e.data(t,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),a=this._get(o,"duration"),s=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),a,s):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?a:null,s),i||s(),this._datepickerShowing=!1,n=this._get(o,"onClose"),n&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),a=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==a)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,a){var s=e(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,i+("M"===a?this._get(n,"showCurrentAtPos"):0),a),this._updateDatepicker(n))},_gotoToday:function(t){var i,a=e(t),s=this._getInst(a[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(a)},_selectMonthYear:function(t,i,a){var s=e(t),n=this._getInst(s[0]);n["selected"+("M"===a?"Month":"Year")]=n["draw"+("M"===a?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,i,a,s){var n,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(n=this._getInst(r[0]),n.selectedDay=n.currentDay=e("a",s).html(),n.selectedMonth=n.currentMonth=i,n.selectedYear=n.currentYear=a,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var a,s=e(t),n=this._getInst(s[0]);i=null!=i?i:this._formatDate(n),n.input&&n.input.val(i),this._updateAlternate(n),a=this._get(n,"onSelect"),a?a.apply(n.input?n.input[0]:null,[i,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,a,s,n=this._get(t,"altField");n&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),a=this._getDate(t),s=this.formatDate(i,a,this._getFormatConfig(t)),e(n).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(i,a,s){if(null==i||null==a)throw"Invalid arguments";if(a="object"==typeof a?""+a:a+"",""===a)return null;var n,r,o,u,c=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,p=(s?s.dayNames:null)||this._defaults.dayNames,g=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,m=(s?s.monthNames:null)||this._defaults.monthNames,f=-1,_=-1,v=-1,k=-1,y=!1,b=function(e){var t=i.length>n+1&&i.charAt(n+1)===e;return t&&n++,t},D=function(e){var t=b(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=RegExp("^\\d{1,"+i+"}"),n=a.substring(c).match(s);if(!n)throw"Missing number at position "+c;return c+=n[0].length,parseInt(n[0],10)},w=function(i,s,n){var r=-1,o=e.map(b(i)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,i){var s=i[1];return a.substr(c,s.length).toLowerCase()===s.toLowerCase()?(r=i[0],c+=s.length,!1):t}),-1!==r)return r+1;throw"Unknown name at position "+c},M=function(){if(a.charAt(c)!==i.charAt(n))throw"Unexpected literal at position "+c;c++};for(n=0;i.length>n;n++)if(y)"'"!==i.charAt(n)||b("'")?M():y=!1;else switch(i.charAt(n)){case"d":v=D("d");break;case"D":w("D",d,p);break;case"o":k=D("o");break;case"m":_=D("m");break;case"M":_=w("M",g,m);break;case"y":f=D("y");break;case"@":u=new Date(D("@")),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"!":u=new Date((D("!")-this._ticksTo1970)/1e4),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"'":b("'")?M():y=!0;break;default:M()}if(a.length>c&&(o=a.substr(c),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l>=f?0:-100)),k>-1)for(_=1,v=k;;){if(r=this._getDaysInMonth(f,_-1),r>=v)break;_++,v-=r}if(u=this._daylightSavingAdjust(new Date(f,_-1,v)),u.getFullYear()!==f||u.getMonth()+1!==_||u.getDate()!==v)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var a,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,u=function(t){var i=e.length>a+1&&e.charAt(a+1)===t;return i&&a++,i},c=function(e,t,i){var a=""+t;if(u(e))for(;i>a.length;)a="0"+a;return a},h=function(e,t,i,a){return u(e)?a[t]:i[t]},l="",d=!1;if(t)for(a=0;e.length>a;a++)if(d)"'"!==e.charAt(a)||u("'")?l+=e.charAt(a):d=!1;else switch(e.charAt(a)){case"d":l+=c("d",t.getDate(),2);break;case"D":l+=h("D",t.getDay(),s,n);break;case"o":l+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=c("m",t.getMonth()+1,2);break;case"M":l+=h("M",t.getMonth(),r,o);break;case"y":l+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?l+="'":d=!0;break;default:l+=e.charAt(a)}return l},_possibleChars:function(e){var t,i="",a=!1,s=function(i){var a=e.length>t+1&&e.charAt(t+1)===i;return a&&t++,a};for(t=0;e.length>t;t++)if(a)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):a=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":a=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(i,a,r)||s}catch(o){a=t?"":a}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=a?n.getDate():0,e.currentMonth=a?n.getMonth():0,e.currentYear=a?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,a){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},n=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(a){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,n=s.getFullYear(),r=s.getMonth(),o=s.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=u.exec(i);c;){switch(c[2]||"d"){case"d":case"D":o+=parseInt(c[1],10);break;case"w":case"W":o+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r))}c=u.exec(i)}return new Date(n,r,o)},r=null==i||""===i?a:"string"==typeof i?n(i):"number"==typeof i?isNaN(i)?a:s(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?a:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),a="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(a,-i,"M")},next:function(){e.datepicker._adjustDate(a,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(a)},selectDay:function(){return e.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(a,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,s,n,r,o,u,c,h,l,d,p,g,m,f,_,v,k,y,b,D,w,M,C,x,I,N,T,A,E,S,Y,F,P,O,j,K,R,H=new Date,W=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),L=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),z=this._get(e,"navigationAsDateFormat"),q=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),Q=1!==q[0]||1!==q[1],V=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(e,"min"),X=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),X)for(t=this._daylightSavingAdjust(new Date(X.getFullYear(),X.getMonth()-q[0]*q[1]+1,X.getDate())),t=$&&$>t?$:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-J,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,-1,et,Z)?""+i+"":B?"":""+i+"",s=this._get(e,"nextText"),s=z?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+J,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,1,et,Z)?""+s+"":B?"":""+s+"",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?V:W,r=z?this.formatDate(r,o,this._getFormatConfig(e)):r,u=e.inline?"":"",c=U?"
      "+(L?u:"")+(this._isInRange(e,o)?"":"")+(L?"":u)+"
      ":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,l=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),k=this._getDefaultDate(e),y="",D=0;q[0]>D;D++){for(w="",this.maxRows=4,M=0;q[1]>M;M++){if(C=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),x=" ui-corner-all",I="",Q){if(I+="
      "}for(I+="
      "+(/all|left/.test(x)&&0===D?L?n:a:"")+(/all|right/.test(x)&&0===D?L?a:n:"")+this._generateMonthYearHeader(e,Z,et,$,X,D>0||M>0,g,m)+"
      "+"",N=l?"":"",b=0;7>b;b++)T=(b+h)%7,N+="=5?" class='ui-datepicker-week-end'":"")+">"+""+p[T]+"";for(I+=N+"",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),E=(this._getFirstDayOfMonth(et,Z)-h+7)%7,S=Math.ceil((E+A)/7),Y=Q?this.maxRows>S?this.maxRows:S:S,this.maxRows=Y,F=this._daylightSavingAdjust(new Date(et,Z,1-E)),P=0;Y>P;P++){for(I+="",O=l?"":"",b=0;7>b;b++)j=f?f.apply(e.input?e.input[0]:null,[F]):[!0,""],K=F.getMonth()!==Z,R=K&&!v||!j[0]||$&&$>F||X&&F>X,O+="",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);I+=O+""}Z++,Z>11&&(Z=0,et++),I+="
      "+this._get(e,"weekHeader")+"
      "+this._get(e,"calculateWeek")(F)+""+(K&&!_?" ":R?""+F.getDate()+"":""+F.getDate()+"")+"
      "+(Q?"
      "+(q[0]>0&&M===q[1]-1?"
      ":""):""),w+=I}y+=w}return y+=c,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,c,h,l,d,p,g,m,f=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),k="
      ",y="";if(n||!f)y+=""+r[t]+"";else{for(u=a&&a.getFullYear()===i,c=s&&s.getFullYear()===i,y+=""}if(v||(k+=y+(!n&&f&&_?"":" ")),!e.yearshtml)if(e.yearshtml="",n||!_)k+=""+i+"";else{for(l=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10); +return isNaN(t)?d:t},g=p(l[0]),m=Math.max(g,p(l[1]||"")),g=a?Math.max(g,a.getFullYear()):g,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),v&&(k+=(!n&&f&&_?"":" ")+y),k+="
      "},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return a&&s>a?a:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(0>t?t:s[0]*s[1]),1));return 0>t&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i,a,s=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),r=null,o=null,u=this._get(e,"yearRange");return u&&(i=u.split(":"),a=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=a),i[1].match(/[+\-].*/)&&(o+=a)),(!s||t.getTime()>=s.getTime())&&(!n||t.getTime()<=n.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.4"})(jQuery);(function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,a=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){a._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),undefined;if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),a=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==a[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(a.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html(" "),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(e.each(i,function(i,a){var s,n;a=e.isFunction(a)?{click:a,text:i}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(t.element[0],arguments)},n={icons:a.icons,text:a.showText},delete a.icons,delete a.showText,e("",a).button(n).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",a,t(s))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(s,n){a.position=[n.position.left-i.document.scrollLeft(),n.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(n))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,a=this.options,s=a.resizable,n=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:r,start:function(a,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",a,t(s))},resize:function(e,a){i._trigger("resize",e,t(a))},stop:function(s,n){a.height=e(this).height(),a.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(n))}}).css("position",n)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(a){var s=this,n=!1,r={};e.each(a,function(e,a){s._setOption(e,a),e in t&&(n=!0),e in i&&(r[e]=a)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,t){var i,a,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(a=s.is(":data(ui-resizable)"),a&&!t&&s.resizable("destroy"),a&&"string"==typeof t&&s.resizable("option","handles",t),a||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,a=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),a.minWidth>a.width&&(a.width=a.minWidth),e=this.uiDialog.css({height:"auto",width:a.width}).outerHeight(),t=Math.max(0,a.minHeight-e),i="number"==typeof a.maxHeight?Math.max(0,a.maxHeight-e):"none","auto"===a.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,a.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("
      ").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(a){t._allowInteraction(a)||(a.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,a=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(a=i.split?i.split(" "):[i[0],i[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(s[e]=a[e],a[e]=t)}),i={my:a[0]+(0>s[0]?s[0]:"+"+s[0])+" "+a[1]+(0>s[1]?s[1]:"+"+s[1]),at:a.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.position(i),t||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.4",defaultElement:"
        ",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()
      ").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("
      ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("
      ").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.4",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("
      ").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var e=t(this).attr("title")||"";return t("").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("
      ").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("
      ").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("

      ")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addBack():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("

      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,g,m)),h&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m).animate(a,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),h&&(n.css(d,0),n.css(p,a/2)),f[d]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(l=m.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=m.left+o*v,h=o-(d-1)/2,p.clone().appendTo("body").wrap("
      ").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;h>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),h=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;h>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("
      ").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);/* + +Uniform v2.1.2 +Copyright © 2009 Josh Pyles / Pixelmatrix Design LLC +http://pixelmatrixdesign.com + +Requires jQuery 1.3 or newer + +Much thanks to Thomas Reynolds and Buck Wilson for their help and advice on +this. + +Disabling text selection is made possible by Mathias Bynens + and his noSelect plugin. +, which is embedded. + +Also, thanks to David Kaneda and Eugene Bond for their contributions to the +plugin. + +Tyler Akins has also rewritten chunks of the plugin, helped close many issues, +and ensured version 2 got out the door. + +License: +MIT License - http://www.opensource.org/licenses/mit-license.php + +Enjoy! + +*/ + +/*global jQuery, document, navigator*/ + +(function (wind, $, undef) { + "use strict"; + + /** + * Use .prop() if jQuery supports it, otherwise fall back to .attr() + * + * @param jQuery $el jQuery'd element on which we're calling attr/prop + * @param ... All other parameters are passed to jQuery's function + * @return The result from jQuery + */ + function attrOrProp($el) { + var args = Array.prototype.slice.call(arguments, 1); + + if ($el.prop) { + // jQuery 1.6+ + return $el.prop.apply($el, args); + } + + // jQuery 1.5 and below + return $el.attr.apply($el, args); + } + + /** + * For backwards compatibility with older jQuery libraries, only bind + * one thing at a time. Also, this function adds our namespace to + * events in one consistent location, shrinking the minified code. + * + * The properties on the events object are the names of the events + * that we are supposed to add to. It can be a space separated list. + * The namespace will be added automatically. + * + * @param jQuery $el + * @param Object options Uniform options for this element + * @param Object events Events to bind, properties are event names + */ + function bindMany($el, options, events) { + var name, namespaced; + + for (name in events) { + if (events.hasOwnProperty(name)) { + namespaced = name.replace(/ |$/g, options.eventNamespace); + $el.bind(namespaced, events[name]); + } + } + } + + /** + * Bind the hover, active, focus, and blur UI updates + * + * @param jQuery $el Original element + * @param jQuery $target Target for the events (our div/span) + * @param Object options Uniform options for the element $target + */ + function bindUi($el, $target, options) { + bindMany($el, options, { + focus: function () { + $target.addClass(options.focusClass); + }, + blur: function () { + $target.removeClass(options.focusClass); + $target.removeClass(options.activeClass); + }, + mouseenter: function () { + $target.addClass(options.hoverClass); + }, + mouseleave: function () { + $target.removeClass(options.hoverClass); + $target.removeClass(options.activeClass); + }, + "mousedown touchbegin": function () { + if (!$el.is(":disabled")) { + $target.addClass(options.activeClass); + } + }, + "mouseup touchend": function () { + $target.removeClass(options.activeClass); + } + }); + } + + /** + * Remove the hover, focus, active classes. + * + * @param jQuery $el Element with classes + * @param Object options Uniform options for the element + */ + function classClearStandard($el, options) { + $el.removeClass(options.hoverClass + " " + options.focusClass + " " + options.activeClass); + } + + /** + * Add or remove a class, depending on if it's "enabled" + * + * @param jQuery $el Element that has the class added/removed + * @param String className Class or classes to add/remove + * @param Boolean enabled True to add the class, false to remove + */ + function classUpdate($el, className, enabled) { + if (enabled) { + $el.addClass(className); + } else { + $el.removeClass(className); + } + } + + /** + * Updating the "checked" property can be a little tricky. This + * changed in jQuery 1.6 and now we can pass booleans to .prop(). + * Prior to that, one either adds an attribute ("checked=checked") or + * removes the attribute. + * + * @param jQuery $tag Our Uniform span/div + * @param jQuery $el Original form element + * @param Object options Uniform options for this element + */ + function classUpdateChecked($tag, $el, options) { + setTimeout(function() { // sunhater@sunhater.com + + var c = "checked", + isChecked = $el.is(":" + c); + + if ($el.prop) { + // jQuery 1.6+ + $el.prop(c, isChecked); + } else { + // jQuery 1.5 and below + if (isChecked) { + $el.attr(c, c); + } else { + $el.removeAttr(c); + } + } + classUpdate($tag, options.checkedClass, isChecked); + }, 1); + } + + /** + * Set or remove the "disabled" class for disabled elements, based on + * if the element is detected to be disabled. + * + * @param jQuery $tag Our Uniform span/div + * @param jQuery $el Original form element + * @param Object options Uniform options for this element + */ + function classUpdateDisabled($tag, $el, options) { + classUpdate($tag, options.disabledClass, $el.is(":disabled")); + } + + /** + * Wrap an element inside of a container or put the container next + * to the element. See the code for examples of the different methods. + * + * Returns the container that was added to the HTML. + * + * @param jQuery $el Element to wrap + * @param jQuery $container Add this new container around/near $el + * @param String method One of "after", "before" or "wrap" + * @return $container after it has been cloned for adding to $el + */ + function divSpanWrap($el, $container, method) { + switch (method) { + case "after": + // Result: + $el.after($container); + return $el.next(); + case "before": + // Result: + $el.before($container); + return $el.prev(); + case "wrap": + // Result: + $el.wrap($container); + return $el.parent(); + } + + return null; + } + + + /** + * Create a div/span combo for uniforming an element + * + * @param jQuery $el Element to wrap + * @param Object options Options for the element, set by the user + * @param Object divSpanConfig Options for how we wrap the div/span + * @return Object Contains the div and span as properties + */ + function divSpan($el, options, divSpanConfig) { + var $div, $span, id; + + if (!divSpanConfig) { + divSpanConfig = {}; + } + + divSpanConfig = $.extend({ + bind: {}, + divClass: null, + divWrap: "wrap", + spanClass: null, + spanHtml: null, + spanWrap: "wrap" + }, divSpanConfig); + + $div = $('
      '); + $span = $(''); + + // Automatically hide this div/span if the element is hidden. + // Do not hide if the element is hidden because a parent is hidden. + if (options.autoHide && $el.is(':hidden') && $el.css('display') === 'none') { + $div.hide(); + } + + if (divSpanConfig.divClass) { + $div.addClass(divSpanConfig.divClass); + } + + if (options.wrapperClass) { + $div.addClass(options.wrapperClass); + } + + if (divSpanConfig.spanClass) { + $span.addClass(divSpanConfig.spanClass); + } + + id = attrOrProp($el, 'id'); + + if (options.useID && id) { + attrOrProp($div, 'id', options.idPrefix + '-' + id); + } + + if (divSpanConfig.spanHtml) { + $span.html(divSpanConfig.spanHtml); + } + + $div = divSpanWrap($el, $div, divSpanConfig.divWrap); + $span = divSpanWrap($el, $span, divSpanConfig.spanWrap); + classUpdateDisabled($div, $el, options); + return { + div: $div, + span: $span + }; + } + + + /** + * Wrap an element with a span to apply a global wrapper class + * + * @param jQuery $el Element to wrap + * @param object options + * @return jQuery Wrapper element + */ + function wrapWithWrapperClass($el, options) { + var $span; + + if (!options.wrapperClass) { + return null; + } + + $span = $('').addClass(options.wrapperClass); + $span = divSpanWrap($el, $span, "wrap"); + return $span; + } + + + /** + * Test if high contrast mode is enabled. + * + * In high contrast mode, background images can not be set and + * they are always returned as 'none'. + * + * @return boolean True if in high contrast mode + */ + function highContrast() { + var c, $div, el, rgb; + + // High contrast mode deals with white and black + rgb = 'rgb(120,2,153)'; + $div = $('
      '); + $('body').append($div); + el = $div.get(0); + + // $div.css() will get the style definition, not + // the actually displaying style + if (wind.getComputedStyle) { + c = wind.getComputedStyle(el, '').color; + } else { + c = (el.currentStyle || el.style || {}).color; + } + + $div.remove(); + return c.replace(/ /g, '') !== rgb; + } + + + /** + * Change text into safe HTML + * + * @param String text + * @return String HTML version + */ + function htmlify(text) { + if (!text) { + return ""; + } + + return $('').text(text).html(); + } + + /** + * If not MSIE, return false. + * If it is, return the version number. + * + * @return false|number + */ + function isMsie() { + return navigator.cpuClass && !navigator.product; + } + + /** + * Return true if this version of IE allows styling + * + * @return boolean + */ + function isMsieSevenOrNewer() { + if (wind.XMLHttpRequest !== undefined) { + return true; + } + + return false; + } + + /** + * Test if the element is a multiselect + * + * @param jQuery $el Element + * @return boolean true/false + */ + function isMultiselect($el) { + var elSize; + + if ($el[0].multiple) { + return true; + } + + elSize = attrOrProp($el, "size"); + + if (!elSize || elSize <= 1) { + return false; + } + + return true; + } + + /** + * Meaningless utility function. Used mostly for improving minification. + * + * @return false + */ + function returnFalse() { + return false; + } + + /** + * noSelect plugin, very slightly modified + * http://mths.be/noselect v1.0.3 + * + * @param jQuery $elem Element that we don't want to select + * @param Object options Uniform options for the element + */ + function noSelect($elem, options) { + var none = 'none'; + bindMany($elem, options, { + 'selectstart dragstart mousedown': returnFalse + }); + + $elem.css({ + MozUserSelect: none, + msUserSelect: none, + webkitUserSelect: none, + userSelect: none + }); + } + + /** + * Updates the filename tag based on the value of the real input + * element. + * + * @param jQuery $el Actual form element + * @param jQuery $filenameTag Span/div to update + * @param Object options Uniform options for this element + */ + function setFilename($el, $filenameTag, options) { + var filename = $el.val(); + + if (filename === "") { + filename = options.fileDefaultHtml; + } else { + filename = filename.split(/[\/\\]+/); + filename = filename[(filename.length - 1)]; + } + + $filenameTag.text(filename); + } + + + /** + * Function from jQuery to swap some CSS values, run a callback, + * then restore the CSS. Modified to pass JSLint and handle undefined + * values with 'use strict'. + * + * @param jQuery $el Element + * @param object newCss CSS values to swap out + * @param Function callback Function to run + */ + function swap($elements, newCss, callback) { + var restore, item; + + restore = []; + + $elements.each(function () { + var name; + + for (name in newCss) { + if (Object.prototype.hasOwnProperty.call(newCss, name)) { + restore.push({ + el: this, + name: name, + old: this.style[name] + }); + + this.style[name] = newCss[name]; + } + } + }); + + callback(); + + while (restore.length) { + item = restore.pop(); + item.el.style[item.name] = item.old; + } + } + + + /** + * The browser doesn't provide sizes of elements that are not visible. + * This will clone an element and add it to the DOM for calculations. + * + * @param jQuery $el + * @param String method + */ + function sizingInvisible($el, callback) { + var targets; + + // We wish to target ourselves and any parents as long as + // they are not visible + targets = $el.parents(); + targets.push($el[0]); + targets = targets.not(':visible'); + swap(targets, { + visibility: "hidden", + display: "block", + position: "absolute" + }, callback); + } + + + /** + * Standard way to unwrap the div/span combination from an element + * + * @param jQuery $el Element that we wish to preserve + * @param Object options Uniform options for the element + * @return Function This generated function will perform the given work + */ + function unwrapUnwrapUnbindFunction($el, options) { + return function () { + $el.unwrap().unwrap().unbind(options.eventNamespace); + }; + } + + var allowStyling = true, // False if IE6 or other unsupported browsers + highContrastTest = false, // Was the high contrast test ran? + uniformHandlers = [ // Objects that take care of "unification" + { + // Buttons + match: function ($el) { + return $el.is("a, button, :submit, :reset, input[type='button']"); + }, + apply: function ($el, options) { + var $div, defaultSpanHtml, ds, getHtml, doingClickEvent; + defaultSpanHtml = options.submitDefaultHtml; + + if ($el.is(":reset")) { + defaultSpanHtml = options.resetDefaultHtml; + } + + if ($el.is("a, button")) { + // Use the HTML inside the tag + getHtml = function () { + return $el.html() || defaultSpanHtml; + }; + } else { + // Use the value property of the element + getHtml = function () { + return htmlify(attrOrProp($el, "value")) || defaultSpanHtml; + }; + } + + ds = divSpan($el, options, { + divClass: options.buttonClass, + spanHtml: getHtml() + }); + $div = ds.div; + bindUi($el, $div, options); + doingClickEvent = false; + bindMany($div, options, { + "click touchend": function () { + var ev, res, target, href; + + if (doingClickEvent) { + return; + } + + if ($el.is(':disabled')) { + return; + } + + doingClickEvent = true; + + if ($el[0].dispatchEvent) { + ev = document.createEvent("MouseEvents"); + ev.initEvent("click", true, true); + res = $el[0].dispatchEvent(ev); + + if ($el.is('a') && res) { + target = attrOrProp($el, 'target'); + href = attrOrProp($el, 'href'); + + if (!target || target === '_self') { + document.location.href = href; + } else { + wind.open(href, target); + } + } + } else { + $el.click(); + } + + doingClickEvent = false; + } + }); + noSelect($div, options); + return { + remove: function () { + // Move $el out + $div.after($el); + + // Remove div and span + $div.remove(); + + // Unbind events + $el.unbind(options.eventNamespace); + return $el; + }, + update: function () { + classClearStandard($div, options); + classUpdateDisabled($div, $el, options); + $el.detach(); + ds.span.html(getHtml()).append($el); + } + }; + } + }, + { + // Checkboxes + match: function ($el) { + return $el.is(":checkbox"); + }, + apply: function ($el, options) { + var ds, $div, $span; + ds = divSpan($el, options, { + divClass: options.checkboxClass + }); + $div = ds.div; + $span = ds.span; + + // Add focus classes, toggling, active, etc. + bindUi($el, $div, options); + bindMany($el, options, { + "click touchend": function () { + classUpdateChecked($span, $el, options); + } + }); + classUpdateChecked($span, $el, options); + return { + remove: unwrapUnwrapUnbindFunction($el, options), + update: function () { + classClearStandard($div, options); + $span.removeClass(options.checkedClass); + classUpdateChecked($span, $el, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // File selection / uploads + match: function ($el) { + return $el.is(":file"); + }, + apply: function ($el, options) { + var ds, $div, $filename, $button; + + // The "span" is the button + ds = divSpan($el, options, { + divClass: options.fileClass, + spanClass: options.fileButtonClass, + spanHtml: options.fileButtonHtml, + spanWrap: "after" + }); + $div = ds.div; + $button = ds.span; + $filename = $("").html(options.fileDefaultHtml); + $filename.addClass(options.filenameClass); + $filename = divSpanWrap($el, $filename, "after"); + + // Set the size + if (!attrOrProp($el, "size")) { + attrOrProp($el, "size", $div.width() / 10); + } + + // Actions + function filenameUpdate() { + setFilename($el, $filename, options); + } + + bindUi($el, $div, options); + + // Account for input saved across refreshes + filenameUpdate(); + + // IE7 doesn't fire onChange until blur or second fire. + if (isMsie()) { + // IE considers browser chrome blocking I/O, so it + // suspends tiemouts until after the file has + // been selected. + bindMany($el, options, { + click: function () { + $el.trigger("change"); + setTimeout(filenameUpdate, 0); + } + }); + } else { + // All other browsers behave properly + bindMany($el, options, { + change: filenameUpdate + }); + } + + noSelect($filename, options); + noSelect($button, options); + return { + remove: function () { + // Remove filename and button + $filename.remove(); + $button.remove(); + + // Unwrap parent div, remove events + return $el.unwrap().unbind(options.eventNamespace); + }, + update: function () { + classClearStandard($div, options); + setFilename($el, $filename, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // Input fields (text) + match: function ($el) { + if ($el.is("input")) { + var t = (" " + attrOrProp($el, "type") + " ").toLowerCase(), + allowed = " color date datetime datetime-local email month number password search tel text time url week "; + return allowed.indexOf(t) >= 0; + } + + return false; + }, + apply: function ($el, options) { + var elType, $wrapper; + + elType = attrOrProp($el, "type"); + $el.addClass(options.inputClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + if (options.inputAddTypeAsClass) { + $el.addClass(elType); + } + + return { + remove: function () { + $el.removeClass(options.inputClass); + + if (options.inputAddTypeAsClass) { + $el.removeClass(elType); + } + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + }, + { + // Radio buttons + match: function ($el) { + return $el.is(":radio"); + }, + apply: function ($el, options) { + var ds, $div, $span; + ds = divSpan($el, options, { + divClass: options.radioClass + }); + $div = ds.div; + $span = ds.span; + + // Add classes for focus, handle active, checked + bindUi($el, $div, options); + bindMany($el, options, { + "click touchend": function () { + // Find all radios with the same name, then update + // them with $.uniform.update() so the right + // per-element options are used + $.uniform.update($(':radio[name="' + attrOrProp($el, "name") + '"]')); + } + }); + classUpdateChecked($span, $el, options); + return { + remove: unwrapUnwrapUnbindFunction($el, options), + update: function () { + classClearStandard($div, options); + classUpdateChecked($span, $el, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // Select lists, but do not style multiselects here + match: function ($el) { + if ($el.is("select") && !isMultiselect($el)) { + return true; + } + + return false; + }, + apply: function ($el, options) { + var ds, $div, $span, origElemWidth; + + if (options.selectAutoWidth) { + sizingInvisible($el, function () { + origElemWidth = $el.width(); + }); + } + + ds = divSpan($el, options, { + divClass: options.selectClass, + spanHtml: ($el.find(":selected:first") || $el.find("option:first")).html(), + spanWrap: "before" + }); + $div = ds.div; + $span = ds.span; + + if (options.selectAutoWidth) { + // Use the width of the select and adjust the + // span and div accordingly + sizingInvisible($el, function () { + // Force "display: block" - related to bug #287 + swap($([ $span[0], $div[0] ]), { + display: "block" + }, function () { + var spanPad; + spanPad = $span.outerWidth() - $span.width(); + $div.width(origElemWidth + spanPad); + $span.width(origElemWidth); + }); + }); + } else { + // Force the select to fill the size of the div + $div.addClass('fixedWidth'); + } + + // Take care of events + bindUi($el, $div, options); + bindMany($el, options, { + change: function () { + $span.html($el.find(":selected").html()); + $div.removeClass(options.activeClass); + }, + "click touchend": function () { + // IE7 and IE8 may not update the value right + // until after click event - issue #238 + var selHtml = $el.find(":selected").html(); + + if ($span.html() !== selHtml) { + // Change was detected + // Fire the change event on the select tag + $el.trigger('change'); + } + }, + keyup: function () { + $span.html($el.find(":selected").html()); + } + }); + noSelect($span, options); + return { + remove: function () { + // Remove sibling span + $span.remove(); + + // Unwrap parent div + $el.unwrap().unbind(options.eventNamespace); + return $el; + }, + update: function () { + if (options.selectAutoWidth) { + // Easier to remove and reapply formatting + $.uniform.restore($el); + $el.uniform(options); + } else { + classClearStandard($div, options); + + // Reset current selected text + $span.html($el.find(":selected").html()); + classUpdateDisabled($div, $el, options); + } + } + }; + } + }, + { + // Select lists - multiselect lists only + match: function ($el) { + if ($el.is("select") && isMultiselect($el)) { + return true; + } + + return false; + }, + apply: function ($el, options) { + var $wrapper; + + $el.addClass(options.selectMultiClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + return { + remove: function () { + $el.removeClass(options.selectMultiClass); + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + }, + { + // Textareas + match: function ($el) { + return $el.is("textarea"); + }, + apply: function ($el, options) { + var $wrapper; + + $el.addClass(options.textareaClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + return { + remove: function () { + $el.removeClass(options.textareaClass); + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + } + ]; + + // IE6 can't be styled - can't set opacity on select + if (isMsie() && !isMsieSevenOrNewer()) { + allowStyling = false; + } + + $.uniform = { + // Default options that can be overridden globally or when uniformed + // globally: $.uniform.defaults.fileButtonHtml = "Pick A File"; + // on uniform: $('input').uniform({fileButtonHtml: "Pick a File"}); + defaults: { + activeClass: "active", + autoHide: true, + buttonClass: "button", + checkboxClass: "checker", + checkedClass: "checked", + disabledClass: "disabled", + eventNamespace: ".uniform", + fileButtonClass: "action", + fileButtonHtml: "Choose File", + fileClass: "uploader", + fileDefaultHtml: "No file selected", + filenameClass: "filename", + focusClass: "focus", + hoverClass: "hover", + idPrefix: "uniform", + inputAddTypeAsClass: true, + inputClass: "uniform-input", + radioClass: "radio", + resetDefaultHtml: "Reset", + resetSelector: false, // We'll use our own function when you don't specify one + selectAutoWidth: true, + selectClass: "selector", + selectMultiClass: "uniform-multiselect", + submitDefaultHtml: "Submit", // Only text allowed + textareaClass: "uniform", + useID: true, + wrapperClass: null + }, + + // All uniformed elements - DOM objects + elements: [] + }; + + $.fn.uniform = function (options) { + var el = this; + options = $.extend({}, $.uniform.defaults, options); + + // If we are in high contrast mode, do not allow styling + if (!highContrastTest) { + highContrastTest = true; + + if (highContrast()) { + allowStyling = false; + } + } + + // Only uniform on browsers that work + if (!allowStyling) { + return this; + } + + // Code for specifying a reset button + if (options.resetSelector) { + $(options.resetSelector).mouseup(function () { + wind.setTimeout(function () { + $.uniform.update(el); + }, 10); + }); + } + + return this.each(function () { + var $el = $(this), i, handler, callbacks; + + // Avoid uniforming elements already uniformed - just update + if ($el.data("uniformed")) { + $.uniform.update($el); + return; + } + + // See if we have any handler for this type of element + for (i = 0; i < uniformHandlers.length; i = i + 1) { + handler = uniformHandlers[i]; + + if (handler.match($el, options)) { + callbacks = handler.apply($el, options); + $el.data("uniformed", callbacks); + + // Store element in our global array + $.uniform.elements.push($el.get(0)); + return; + } + } + + // Could not style this element + }); + }; + + $.uniform.restore = $.fn.uniform.restore = function (elem) { + if (elem === undef) { + elem = $.uniform.elements; + } + + $(elem).each(function () { + var $el = $(this), index, elementData; + elementData = $el.data("uniformed"); + + // Skip elements that are not uniformed + if (!elementData) { + return; + } + + // Unbind events, remove additional markup that was added + elementData.remove(); + + // Remove item from list of uniformed elements + index = $.inArray(this, $.uniform.elements); + + if (index >= 0) { + $.uniform.elements.splice(index, 1); + } + + $el.removeData("uniformed"); + }); + }; + + $.uniform.update = $.fn.uniform.update = function (elem) { + if (elem === undef) { + elem = $.uniform.elements; + } + + $(elem).each(function () { + var $el = $(this), elementData; + elementData = $el.data("uniformed"); + + // Skip elements that are not uniformed + if (!elementData) { + return; + } + + elementData.update($el, elementData.options); + }); + }; +}(this, jQuery));/** This file is part of KCFinder project + * + * @desc My jQuery UI & Uniform fixes + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +(function($) { + + $.fn.oldMenu = $.fn.menu; + $.fn.menu = function(p1, p2, p3) { + var ret = $(this).oldMenu(p1, p2, p3); + $(this).each(function() { + if (!$(this).hasClass('sh-menu')) { + $(this).addClass('sh-menu') + .children().first().addClass('ui-menu-item-first'); + $(this).children().last().addClass('ui-menu-item-last'); + $(this).find('.ui-menu').addClass('sh-menu').each(function() { + $(this).children().first().addClass('ui-menu-item-first'); + $(this).children().last().addClass('ui-menu-item-last'); + }); + } + }); + return ret; + }; + + $.fn.oldUniform = $.fn.uniform; + $.fn.uniform = function(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) { + var ret = $(this).oldUniform(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); + + $(this).each(function() { + var t = $(this); + + if (!t.hasClass('sh-uniform')) { + t.addClass('sh-uniform'); + + // Fix upload filename width + if (t.is('input[type="file"]')) { + var f = t.parent().find('.filename'); + f.css('width', f.innerWidth()); + } + + // Add an icon into select boxes + if (t.is('select') && !t.attr('multiple')) { + + var p = t.parent(), + height = p.height(), + width = p.outerWidth(), + width2 = p.find('span').outerWidth(); + + $('
      ').addClass('ui-icon').css({ + 'float': "right", + marginTop: - parseInt((height / 2) + 8), + marginRight: - parseInt((width - width2) / 2) - 7 + }).appendTo(p); + } + } + }); + return ret; + }; + +})(jQuery);/** This file is part of KCFinder project + * + * @desc Right Click jQuery Plugin + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +(function($) { + $.fn.rightClick = function(func) { + var events = "contextmenu rightclick"; + $(this).each(function() { + $(this).unbind(events).bind(events, function(e) { + e.preventDefault(); + $.clearSelection(); + if ($.isFunction(func)) + func(this, e); + }); + }); + return $(this); + }; +})(jQuery);// @author Rich Adams + +// Implements a tap and hold functionality. If you click/tap and release, it will trigger a normal +// click event. But if you click/tap and hold for 1s (default), it will trigger a taphold event instead. + +;(function($) +{ + // Default options + var defaults = { + duration: 1000, // ms + clickHandler: null + } + + // When start of a taphold event is triggered. + function startHandler(event) + { + var $elem = jQuery(this); + + // Merge the defaults and any user defined settings. + settings = jQuery.extend({}, defaults, event.data); + + // If object also has click handler, store it and unbind. Taphold will trigger the + // click itself, rather than normal propagation. + if (typeof $elem.data("events") != "undefined" + && typeof $elem.data("events").click != "undefined") + { + // Find the one without a namespace defined. + for (var c in $elem.data("events").click) + { + if ($elem.data("events").click[c].namespace == "") + { + var handler = $elem.data("events").click[c].handler + $elem.data("taphold_click_handler", handler); + $elem.unbind("click", handler); + break; + } + } + } + // Otherwise, if a custom click handler was explicitly defined, then store it instead. + else if (typeof settings.clickHandler == "function") + { + $elem.data("taphold_click_handler", settings.clickHandler); + } + + // Reset the flags + $elem.data("taphold_triggered", false); // If a hold was triggered + $elem.data("taphold_clicked", false); // If a click was triggered + $elem.data("taphold_cancelled", false); // If event has been cancelled. + + // Set the timer for the hold event. + $elem.data("taphold_timer", + setTimeout(function() + { + // If event hasn't been cancelled/clicked already, then go ahead and trigger the hold. + if (!$elem.data("taphold_cancelled") + && !$elem.data("taphold_clicked")) + { + // Trigger the hold event, and set the flag to say it's been triggered. + $elem.trigger(jQuery.extend(event, jQuery.Event("taphold"))); + $elem.data("taphold_triggered", true); + } + }, settings.duration)); + } + + // When user ends a tap or click, decide what we should do. + function stopHandler(event) + { + var $elem = jQuery(this); + + // If taphold has been cancelled, then we're done. + if ($elem.data("taphold_cancelled")) { return; } + + // Clear the hold timer. If it hasn't already triggered, then it's too late anyway. + clearTimeout($elem.data("taphold_timer")); + + // If hold wasn't triggered and not already clicked, then was a click event. + if (!$elem.data("taphold_triggered") + && !$elem.data("taphold_clicked")) + { + // If click handler, trigger it. + if (typeof $elem.data("taphold_click_handler") == "function") + { + $elem.data("taphold_click_handler")(jQuery.extend(event, jQuery.Event("click"))); + } + + // Set flag to say we've triggered the click event. + $elem.data("taphold_clicked", true); + } + } + + // If a user prematurely leaves the boundary of the object we're working on. + function leaveHandler(event) + { + // Cancel the event. + $(this).data("taphold_cancelled", true); + } + + // Determine if touch events are supported. + var touchSupported = ("ontouchstart" in window) // Most browsers + || ("onmsgesturechange" in window); // Microsoft + + var taphold = $.event.special.taphold = + { + setup: function(data) + { + $(this).bind((touchSupported ? "touchstart" : "mousedown"), data, startHandler) + .bind((touchSupported ? "touchend" : "mouseup"), stopHandler) + .bind((touchSupported ? "touchmove touchcancel" : "mouseleave"), leaveHandler); + }, + teardown: function(namespaces) + { + $(this).unbind((touchSupported ? "touchstart" : "mousedown"), startHandler) + .unbind((touchSupported ? "touchend" : "mouseup"), stopHandler) + .unbind((touchSupported ? "touchmove touchcancel" : "mouseleave"), leaveHandler); + } + }; +})(jQuery);/** This file is part of KCFinder project + * + * @desc User Agent jQuery Plugin + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +(function($) { + $.agent = {}; + + var agent = " " + navigator.userAgent, + + patterns = [ + { + expr: / [a-z]+\/[0-9a-z\.]+/ig, + delim: "/" + }, { + expr: / [a-z]+:[0-9a-z\.]+/ig, + delim: ":", + keys: ["rv", "version"] + }, { + expr: / [a-z]+\s+[0-9a-z\.]+/ig, + delim: /\s+/, + keys: ["opera", "msie", "firefox", "android"] + }, { + expr: /[ \/\(]([a-z0-9_]+)[ ;\)\/]/ig, + keys: "i386|i486|i586|i686|x86|x64|x86_64|intel|ppc|powerpc|windows|macintosh|darwin|unix|linux|sunos|android|iphone|ipad|ipod|amiga|amigaos|beos|wii|playstation|gentoo|fedora|slackware|ubuntu|archlinux|debian|mint|mageia|mandriva|freebsd|openbsd|netbsd|solaris|opensolaris|x11|mobile|phone".split('|'), + sub: "platform" + } + ]; + + $.each(patterns, function(i, pattern) { + var elements = agent.match(pattern.expr); + if (elements === null) + return; + $.each(elements, function(j, ag) { + ag = ag.replace(/^\s+/, "").toLowerCase(); + var key = ag.replace(pattern.expr, "$1"), + val = true; + if (typeof pattern.delim != "undefined") { + ag = ag.split(pattern.delim); + key = ag[0]; + val = ag[1]; + } + + if (typeof pattern.keys != "undefined") { + var exists = false, k = 0; + for (; k < pattern.keys.length; k++) + if (pattern.keys[k] == key) { + exists = true; + break; + } + if (!exists) + return; + } + + if (typeof pattern.sub != "undefined") { + if (typeof $.agent[pattern.sub] != "object") + $.agent[pattern.sub] = {}; + if (typeof $.agent[pattern.sub][key] == "undefined") + $.agent[pattern.sub][key] = val; + + } else if (typeof $.agent[key] == "undefined") + $.agent[key] = val; + }); + }); + + if (!$.agent.platform) + $.agent.platform = {}; + + // Check for mobile device + $.mobile = false; + var keys = "mobile|android|iphone|ipad|ipod|iemobile|phone".split('|'); + a = $.agent; + + $.each([a, a.platform], function(i, p) { + for (var j = 0; j < keys.length; j++) { + if (p[keys[j]]) { + $.mobile = true; + return false; + } + } + }); +})(jQuery);/** This file is part of KCFinder project + * + * @desc Helper functions integrated in jQuery + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +(function($) { + + $.fn.selection = function(start, end) { + var field = this.get(0); + + if (field.createTextRange) { + var selRange = field.createTextRange(); + selRange.collapse(true); + selRange.moveStart('character', start); + selRange.moveEnd('character', end-start); + selRange.select(); + } else if (field.setSelectionRange) { + field.setSelectionRange(start, end); + } else if (field.selectionStart) { + field.selectionStart = start; + field.selectionEnd = end; + } + field.focus(); + }; + + $.fn.disableTextSelect = function() { + return this.each(function() { + if ($.agent.firefox) { // Firefox + $(this).css('MozUserSelect', "none"); + } else if ($.agent.msie) { // IE + $(this).bind('selectstart', function() { + return false; + }); + } else { //Opera, etc. + $(this).mousedown(function() { + return false; + }); + } + }); + }; + + $.fn.outerSpace = function(type, mbp) { + var selector = this.get(0), + r = 0, x; + + if (!mbp) mbp = "mbp"; + + if (/m/i.test(mbp)) { + x = parseInt($(selector).css('margin-' + type)); + if (x) r += x; + } + + if (/b/i.test(mbp)) { + x = parseInt($(selector).css('border-' + type + '-width')); + if (x) r += x; + } + + if (/p/i.test(mbp)) { + x = parseInt($(selector).css('padding-' + type)); + if (x) r += x; + } + + return r; + }; + + $.fn.outerLeftSpace = function(mbp) { + return this.outerSpace('left', mbp); + }; + + $.fn.outerTopSpace = function(mbp) { + return this.outerSpace('top', mbp); + }; + + $.fn.outerRightSpace = function(mbp) { + return this.outerSpace('right', mbp); + }; + + $.fn.outerBottomSpace = function(mbp) { + return this.outerSpace('bottom', mbp); + }; + + $.fn.outerHSpace = function(mbp) { + return (this.outerLeftSpace(mbp) + this.outerRightSpace(mbp)); + }; + + $.fn.outerVSpace = function(mbp) { + return (this.outerTopSpace(mbp) + this.outerBottomSpace(mbp)); + }; + + $.fn.fullscreen = function() { + if (!$(this).get(0)) + return + var t = $(this).get(0), + requestMethod = + t.requestFullScreen || + t.requestFullscreen || + t.webkitRequestFullScreen || + t.mozRequestFullScreen || + t.msRequestFullscreen; + + if (requestMethod) + requestMethod.call(t); + + else if (typeof window.ActiveXObject !== "undefined") { + var wscript = new ActiveXObject("WScript.Shell"); + if (wscript !== null) + wscript.SendKeys("{F11}"); + } + }; + + $.fn.toggleFullscreen = function(doc) { + if ($.isFullscreen(doc)) + $.exitFullscreen(doc); + else + $(this).fullscreen(); + }; + + $.exitFullscreen = function(doc) { + var d = doc ? doc : document, + requestMethod = + d.cancelFullScreen || + d.cancelFullscreen || + d.webkitCancelFullScreen || + d.mozCancelFullScreen || + d.msExitFullscreen || + d.exitFullscreen; + + if (requestMethod) + requestMethod.call(d); + + else if (typeof window.ActiveXObject !== "undefined") { + var wscript = new ActiveXObject("WScript.Shell"); + if (wscript !== null) + wscript.SendKeys("{F11}"); + } + }; + + $.isFullscreen = function(doc) { + var d = doc ? doc : document; + return (d.fullScreenElement && (d.fullScreenElement !== null)) || + (d.fullscreenElement && (d.fullscreenElement !== null)) || + (d.msFullscreenElement && (d.msFullscreenElement !== null)) || + d.mozFullScreen || d.webkitIsFullScreen; + }; + + $.clearSelection = function() { + if (document.selection) + document.selection.empty(); + else if (window.getSelection) + window.getSelection().removeAllRanges(); + }; + + $.$ = { + + htmlValue: function(value) { + return value + .replace(/\&/g, "&") + .replace(/\"/g, """) + .replace(/\'/g, "'"); + }, + + htmlData: function(value) { + return value.toString() + .replace(/\&/g, "&") + .replace(/\/g, ">") + .replace(/\ /g, " ") + .replace(/\"/g, """) + .replace(/\'/g, "'"); + }, + + jsValue: function(value) { + return value + .replace(/\\/g, "\\\\") + .replace(/\r?\n/, "\\\n") + .replace(/\"/g, "\\\"") + .replace(/\'/g, "\\'"); + }, + + basename: function(path) { + var expr = /^.*\/([^\/]+)\/?$/g; + return expr.test(path) + ? path.replace(expr, "$1") + : path; + }, + + dirname: function(path) { + var expr = /^(.*)\/[^\/]+\/?$/g; + return expr.test(path) + ? path.replace(expr, "$1") + : ''; + }, + + inArray: function(needle, arr) { + if (!$.isArray(arr)) + return false; + for (var i = 0; i < arr.length; i++) + if (arr[i] == needle) + return true; + return false; + }, + + getFileExtension: function(filename, toLower) { + if (typeof toLower == 'undefined') toLower = true; + if (/^.*\.[^\.]*$/.test(filename)) { + var ext = filename.replace(/^.*\.([^\.]*)$/, "$1"); + return toLower ? ext.toLowerCase(ext) : ext; + } else + return ""; + }, + + escapeDirs: function(path) { + var fullDirExpr = /^([a-z]+)\:\/\/([^\/^\:]+)(\:(\d+))?\/(.+)$/, + prefix = ""; + if (fullDirExpr.test(path)) { + var port = path.replace(fullDirExpr, "$4"); + prefix = path.replace(fullDirExpr, "$1://$2"); + if (port.length) + prefix += ":" + port; + prefix += "/"; + path = path.replace(fullDirExpr, "$5"); + } + + var dirs = path.split('/'), + escapePath = '', i = 0; + for (; i < dirs.length; i++) + escapePath += encodeURIComponent(dirs[i]) + '/'; + + return prefix + escapePath.substr(0, escapePath.length - 1); + }, + + kuki: { + prefix: '', + duration: 356, + domain: '', + path: '', + secure: false, + + set: function(name, value, duration, domain, path, secure) { + name = this.prefix + name; + if (duration == null) duration = this.duration; + if (secure == null) secure = this.secure; + if ((domain == null) && this.domain) domain = this.domain; + if ((path == null) && this.path) path = this.path; + secure = secure ? true : false; + + var date = new Date(); + date.setTime(date.getTime() + (duration * 86400000)); + var expires = date.toGMTString(); + + var str = name + '=' + value + '; expires=' + expires; + if (domain != null) str += '; domain=' + domain; + if (path != null) str += '; path=' + path; + if (secure) str += '; secure'; + + return (document.cookie = str) ? true : false; + }, + + get: function(name) { + name = this.prefix + name; + var nameEQ = name + '='; + var kukis = document.cookie.split(';'); + var kuki; + + for (var i = 0; i < kukis.length; i++) { + kuki = kukis[i]; + while (kuki.charAt(0) == ' ') + kuki = kuki.substring(1, kuki.length); + + if (kuki.indexOf(nameEQ) == 0) + return kuki.substring(nameEQ.length, kuki.length); + } + + return null; + }, + + del: function(name) { + return this.set(name, '', -1); + }, + + isSet: function(name) { + return (this.get(name) != null); + } + } + + }; + +})(jQuery); +/** This file is part of KCFinder project + * + * @desc Helper MD5 checksum function + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +(function($) { + + $.$.utf8encode = function(string) { + string = string.replace(/\r\n/g,"\n"); + var utftext = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } else if((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + + return utftext; + }; + + $.$.md5 = function(string) { + + string = $.$.utf8encode(string); + + var RotateLeft = function(lValue, iShiftBits) { + return (lValue<>>(32-iShiftBits)); + }, + + AddUnsigned = function(lX, lY) { + var lX8 = (lX & 0x80000000), + lY8 = (lY & 0x80000000), + lX4 = (lX & 0x40000000), + lY4 = (lY & 0x40000000), + lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); + if (lX4 & lY4) + return (lResult ^ 0x80000000 ^ lX8 ^ lY8); + if (lX4 | lY4) + return (lResult & 0x40000000) + ? (lResult ^ 0xC0000000 ^ lX8 ^ lY8) + : (lResult ^ 0x40000000 ^ lX8 ^ lY8); + else + return (lResult ^ lX8 ^ lY8); + }, + + F = function(x, y, z) { return (x & y) | ((~x) & z); }, + G = function(x, y, z) { return (x & z) | (y & (~z)); }, + H = function(x, y, z) { return (x ^ y ^ z); }, + I = function(x, y, z) { return (y ^ (x | (~z))); }, + + FF = function(a, b, c, d, x, s, ac) { + a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); + return AddUnsigned(RotateLeft(a, s), b); + }, + + GG = function(a, b, c, d, x, s, ac) { + a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); + return AddUnsigned(RotateLeft(a, s), b); + }, + + HH = function(a, b, c, d, x, s, ac) { + a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); + return AddUnsigned(RotateLeft(a, s), b); + }, + + II = function(a, b, c, d, x, s, ac) { + a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); + return AddUnsigned(RotateLeft(a, s), b); + }, + + ConvertToWordArray = function(string) { + var lWordCount, + lMessageLength = string.length, + lNumberOfWords_temp1 = lMessageLength + 8, + lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64, + lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16, + lWordArray = [lNumberOfWords - 1], + lBytePosition = 0, + lByteCount = 0; + + while (lByteCount < lMessageLength) { + lWordCount = (lByteCount - (lByteCount % 4)) / 4; + lBytePosition = (lByteCount % 4) * 8; + lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition)); + lByteCount++; + } + + lWordCount = (lByteCount - (lByteCount % 4)) / 4; + lBytePosition = (lByteCount % 4) * 8; + lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); + lWordArray[lNumberOfWords - 2] = lMessageLength << 3; + lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; + + return lWordArray; + }, + + WordToHex = function(lValue) { + var lByte, lCount = 0, + WordToHexValue = "", + WordToHexValue_temp = ""; + + for (; lCount <= 3; lCount++) { + lByte = (lValue >>> (lCount * 8)) & 255; + WordToHexValue_temp = "0" + lByte.toString(16); + WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2,2); + } + + return WordToHexValue; + }, + + AA, BB, CC, DD, k = 0, + x = ConvertToWordArray(string), + a = 0x67452301, b = 0xEFCDAB89, + c = 0x98BADCFE, d = 0x10325476, + S11 = 7, S12 = 12, S13 = 17, S14 = 22, + S21 = 5, S22 = 9, S23 = 14, S24 = 20, + S31 = 4, S32 = 11, S33 = 16, S34 = 23, + S41 = 6, S42 = 10, S43 = 15, S44 = 21; + + for (; k < x.length; k += 16) { + AA = a; BB = b; CC = c; DD = d; + a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478); + d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756); + c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB); + b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE); + a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF); + d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A); + c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613); + b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501); + a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8); + d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF); + c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1); + b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE); + a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122); + d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193); + c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E); + b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821); + a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562); + d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340); + c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51); + b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA); + a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D); + d = GG(d, a, b, c, x[k + 10], S22, 0x2441453); + c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681); + b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8); + a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6); + d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6); + c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87); + b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED); + a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905); + d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8); + c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9); + b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A); + a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942); + d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681); + c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122); + b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C); + a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44); + d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9); + c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60); + b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70); + a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6); + d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA); + c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085); + b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05); + a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039); + d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5); + c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8); + b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665); + a = II(a, b, c, d, x[k + 0], S41, 0xF4292244); + d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97); + c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7); + b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039); + a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3); + d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92); + c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D); + b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1); + a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F); + d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0); + c = II(c, d, a, b, x[k + 6], S43, 0xA3014314); + b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1); + a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82); + d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235); + c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB); + b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391); + a = AddUnsigned(a, AA); + b = AddUnsigned(b, BB); + c = AddUnsigned(c, CC); + d = AddUnsigned(d, DD); + } + + return (WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d)).toLowerCase(); + }; + +})(jQuery);/** This file is part of KCFinder project + * + * @desc Base JavaScript object properties + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +var _ = { + opener: {}, + support: {}, + files: [], + clipboard: [], + labels: [], + shows: [], + orders: [], + cms: "", + scrollbarWidth: 20 +}; +/** This file is part of KCFinder project + * + * @desc Dialog boxes functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.alert = function(text, field, options) { + var close = !field + ? function() {} + : ($.isFunction(field) + ? field + : function() { setTimeout(function() {field.focus(); }, 1); } + ), + o = { + close: function() { + close(); + if ($(this).hasClass('ui-dialog-content')) + $(this).dialog('destroy').detach(); + } + }; + + $.extend(o, options); + + return _.dialog(_.label("Warning"), text.replace("\n", "
      \n"), o); +}; + +_.confirm = function(text, callback, options) { + var o = { + buttons: [ + { + text: _.label("Yes"), + icons: {primary: "ui-icon-check"}, + click: function() { + callback(); + $(this).dialog('destroy').detach(); + } + }, + { + text: _.label("No"), + icons: {primary: "ui-icon-closethick"}, + click: function() { + $(this).dialog('destroy').detach(); + } + } + ] + }; + + $.extend(o, options); + return _.dialog(_.label("Confirmation"), text, o); +}; + +_.dialog = function(title, content, options) { + + if (!options) options = {}; + var dlg = $('
      '); + dlg.hide().attr('title', title).html(content).appendTo('body'); + if (dlg.find('form').get(0) && !dlg.find('form [type="submit"]').get(0)) + dlg.find('form').append(''); + + var o = { + resizable: false, + minHeight: false, + modal: true, + width: 351, + buttons: [ + { + text: _.label("OK"), + icons: {primary: "ui-icon-check"}, + click: function() { + if (typeof options.close != "undefined") + options.close(); + if ($(this).hasClass('ui-dialog-content')) + $(this).dialog('destroy').detach(); + } + } + ], + close: function() { + if ($(this).hasClass('ui-dialog-content')) + $(this).dialog('destroy').detach(); + }, + closeText: false, + zindex: 1000000, + alone: false, + blur: false, + legend: false, + nopadding: false, + show: { effect: "fade", duration: 250 }, + hide: { effect: "fade", duration: 250 } + }; + + $.extend(o, options); + + if (o.alone) + $('.ui-dialog .ui-dialog-content').dialog('destroy').detach(); + + dlg.dialog(o); + + if (o.nopadding) + dlg.css({padding: 0}); + + if (o.blur) + dlg.parent().find('.ui-dialog-buttonpane button').first().get(0).blur(); + + if (o.legend) + dlg.parent().find('.ui-dialog-buttonpane').prepend('
      ' + o.legend + '
      '); + + if ($.agent && $.agent.firefox) + dlg.css('overflow-x', "hidden"); + + return dlg; +}; + +_.fileNameDialog = function(post, inputName, inputValue, url, labels, callBack, selectAll) { + var html = '
      ', + submit = function() { + var name = dlg.find('[type="text"]').get(0); + name.value = $.trim(name.value); + if (name.value == "") { + _.alert(_.label(labels.errEmpty), function() { + name.focus(); + }); + return false; + } else if (/[\/\\]/g.test(name.value)) { + _.alert(_.label(labels.errSlash), function() { + name.focus(); + }); + return false; + } else if (name.value.substr(0, 1) == ".") { + _.alert(_.label(labels.errDot), function() { + name.focus(); + }); + return false; + } + post[inputName] = name.value; + $.ajax({ + type: "post", + dataType: "json", + url: url, + data: post, + async: false, + success: function(data) { + if (_.check4errors(data, false)) + return; + if (callBack) callBack(data); + dlg.dialog("destroy").detach(); + }, + error: function() { + _.alert(_.label("Unknown error.")); + } + }); + return false; + }, + dlg = _.dialog(_.label(labels.title), html, { + width: 351, + buttons: [ + { + text: _.label("OK"), + icons: {primary: "ui-icon-check"}, + click: function() { + submit(); + } + }, + { + text: _.label("Cancel"), + icons: {primary: "ui-icon-closethick"}, + click: function() { + $(this).dialog('destroy').detach(); + } + } + ] + }), + + field = dlg.find('[type="text"]'); + + field.uniform().attr('value', inputValue).css('width', 310); + dlg.find('form').submit(submit); + + if (!selectAll && /^(.+)\.[^\.]+$/ .test(inputValue)) + field.selection(0, inputValue.replace(/^(.+)\.[^\.]+$/, "$1").length); + else { + field.get(0).focus(); + field.get(0).select(); + } +};/** This file is part of KCFinder project + * + * @desc Object initializations + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.init = function() { + if (!_.checkAgent()) return; + + $('body').click(function() { + _.menu.hide(); + }).rightClick(); + + $('#menu').unbind().click(function() { + return false; + }); + + _.initOpeners(); + _.initSettings(); + _.initContent(); + _.initToolbar(); + _.initResizer(); + _.initDropUpload(); + + var div = $('
      ') + .css({width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: -1000}) + .prependTo('body').append('
      ').find('div').css({width: '100%', height: 200}); + _.scrollbarWidth = 100 - div.width(); + div.parent().remove(); + + $.each($.agent, function(i) { + if (i != "platform") + $('body').addClass(i) + }); + + if ($.agent.platform) + $.each($.agent.platform, function(i) { + $('body').addClass(i) + }); + + if ($.mobile) + $('body').addClass("mobile"); +}; + +_.checkAgent = function() { + if (($.agent.msie && !$.agent.opera && !$.agent.chromeframe && (parseInt($.agent.msie) < 9)) || + ($.agent.opera && (parseInt($.agent.version) < 10)) || + ($.agent.firefox && (parseFloat($.agent.firefox) < 1.8)) + ) { + var html = '
      Your browser is not capable to display KCFinder. Please update your browser or install another one: Mozilla Firefox, Apple Safari, Google Chrome, Opera.'; + if ($.agent.msie && !$.agent.opera) + html += ' You may also install Google Chrome Frame ActiveX plugin to get Internet Explorer 6, 7, 8 working.'; + html += '
      '; + $('body').html(html); + return false; + } + return true; +}; + +_.initOpeners = function() { + + try { + + // TinyMCE 3 + if (_.opener.name == "tinymce") { + if (typeof tinyMCEPopup == "undefined") + _.opener.name = null; + else + _.opener.callBack = true; + + // TinyMCE 4 + } else if (_.opener.name == "tinymce4") + _.opener.callBack = true; + + // CKEditor + else if (_.opener.name == "ckeditor") { + if (window.parent && window.parent.CKEDITOR) + _.opener.CKEditor.object = window.parent.CKEDITOR; + else if (window.opener && window.opener.CKEDITOR) { + _.opener.CKEditor.object = window.opener.CKEDITOR; + _.opener.callBack = true; + } else + _.opener.CKEditor = null; + + // FCKeditor + } else if ((!_.opener.name || (_.opener.name == "fckeditor")) && window.opener && window.opener.SetUrl) { + _.opener.name = "fckeditor"; + _.opener.callBack = true; + } + + // Custom callback + if (!_.opener.callBack) { + if ((window.opener && window.opener.KCFinder && window.opener.KCFinder.callBack) || + (window.parent && window.parent.KCFinder && window.parent.KCFinder.callBack) + ) + _.opener.callBack = window.opener + ? window.opener.KCFinder.callBack + : window.parent.KCFinder.callBack; + + if (( + window.opener && + window.opener.KCFinder && + window.opener.KCFinder.callBackMultiple + ) || ( + window.parent && + window.parent.KCFinder && + window.parent.KCFinder.callBackMultiple + ) + ) + _.opener.callBackMultiple = window.opener + ? window.opener.KCFinder.callBackMultiple + : window.parent.KCFinder.callBackMultiple; + } + + } catch(e) {} +}; + +_.initContent = function() { + $('div#folders').html(_.label("Loading folders...")); + $('div#files').html(_.label("Loading files...")); + $.ajax({ + type: "get", + dataType: "json", + url: _.getURL("init"), + async: false, + success: function(data) { + if (_.check4errors(data)) + return; + _.dirWritable = data.dirWritable; + $('#folders').html(_.buildTree(data.tree)); + _.setTreeData(data.tree); + _.setTitle("KCFinder: /" + _.dir); + _.initFolders(); + _.files = data.files ? data.files : []; + _.orderFiles(); + }, + error: function() { + $('div#folders').html(_.label("Unknown error.")); + $('div#files').html(_.label("Unknown error.")); + } + }); +}; + +_.initResizer = function() { + var cursor = ($.agent.opera) ? 'move' : 'col-resize'; + $('#resizer').css('cursor', cursor).draggable({ + axis: 'x', + start: function() { + $(this).css({ + opacity: "0.4", + filter: "alpha(opacity=40)" + }); + $('#all').css('cursor', cursor); + }, + stop: function() { + $(this).css({ + opacity: "0", + filter: "alpha(opacity=0)" + }); + $('#all').css('cursor', ""); + + var jLeft = $('#left'), + jRight = $('#right'), + jFiles = $('#files'), + jFolders = $('#folders'), + left = parseInt($(this).css('left')) + parseInt($(this).css('width')), + w = 0, r; + + $('#toolbar a').each(function() { + if ($(this).css('display') != "none") + w += $(this).outerWidth(true); + }); + + r = $(window).width() - w; + + if (left < 100) + left = 100; + + if (left > r) + left = r; + + var right = $(window).width() - left; + + jLeft.css('width', left); + jRight.css('width', right); + jFiles.css('width', jRight.innerWidth() - jFiles.outerHSpace()); + + $('#resizer').css({ + left: jLeft.outerWidth() - jFolders.outerRightSpace('m'), + width: jFolders.outerRightSpace('m') + jFiles.outerLeftSpace('m') + }); + + _.fixFilesHeight(); + } + }); +}; + +_.resize = function() { + var jLeft = $('#left'), + jRight = $('#right'), + jStatus = $('#status'), + jFolders = $('#folders'), + jFiles = $('#files'), + jResizer = $('#resizer'), + jWindow = $(window); + + jLeft.css({ + width: "25%", + height: jWindow.height() - jStatus.outerHeight() + }); + jRight.css({ + width: "75%", + height: jWindow.height() - jStatus.outerHeight() + }); + $('#toolbar').css('height', $('#toolbar a').outerHeight()); + + jResizer.css('height', $(window).height()); + + jFolders.css('height', jLeft.outerHeight() - jFolders.outerVSpace()); + _.fixFilesHeight(); + var width = jLeft.outerWidth() + jRight.outerWidth(); + jStatus.css('width', width); + while (jStatus.outerWidth() > width) + jStatus.css('width', parseInt(jStatus.css('width')) - 1); + while (jStatus.outerWidth() < width) + jStatus.css('width', parseInt(jStatus.css('width')) + 1); + jFiles.css('width', jRight.innerWidth() - jFiles.outerHSpace()); + jResizer.css({ + left: jLeft.outerWidth() - jFolders.outerRightSpace('m'), + width: jFolders.outerRightSpace('m') + jFiles.outerLeftSpace('m') + }); +}; + +_.setTitle = function(title) { + document.title = title; + if (_.opener.name == "tinymce") + tinyMCEPopup.editor.windowManager.setTitle(window, title); + else if (_.opener.name == "tinymce4") { + var ifr = $('iframe[src*="browse.php?opener=tinymce4&"]', window.parent.document), + path = ifr.attr('src').split('browse.php?')[0]; + ifr.parent().parent().find('div.mce-title').html('' + title + ''); + } +}; + +_.fixFilesHeight = function() { + var jFiles = $('#files'), + jSettings = $('#settings'); + + jFiles.css('height', + $('#left').outerHeight() - $('#toolbar').outerHeight() - jFiles.outerVSpace() - + ((jSettings.css('display') != "none") ? jSettings.outerHeight() : 0) + ); +}; +/** This file is part of KCFinder project + * + * @desc Toolbar functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initToolbar = function() { + $('#toolbar').disableTextSelect(); + $('#toolbar a').click(function() { + _.menu.hide(); + }); + + if (!$.$.kuki.isSet('displaySettings')) + $.$.kuki.set('displaySettings', "off"); + + if ($.$.kuki.get('displaySettings') == "on") { + $('#toolbar a[href="kcact:settings"]').addClass('selected'); + $('#settings').show(); + _.resize(); + } + + $('#toolbar a[href="kcact:settings"]').click(function () { + var jSettings = $('#settings'); + if (jSettings.css('display') == "none") { + $(this).addClass('selected'); + $.$.kuki.set('displaySettings', "on"); + jSettings.show(); + _.fixFilesHeight(); + } else { + $(this).removeClass('selected'); + $.$.kuki.set('displaySettings', "off"); + jSettings.hide(); + _.fixFilesHeight(); + } + return false; + }); + + $('#toolbar a[href="kcact:refresh"]').click(function() { + _.refresh(); + return false; + }); + + $('#toolbar a[href="kcact:maximize"]').click(function() { + _.maximize(this); + return false; + }); + + $('#toolbar a[href="kcact:about"]').click(function() { + var html = '
      ' + + '
      KCFinder ' + _.version + '
      '; + if (_.support.check4Update) + html += '
      ' + _.label("Checking for new version...") + '
      '; + html += + '
      ' + _.label("Licenses:") + ' GPLv3 & LGPLv3
      ' + + '
      Copyright ©2010-2014 Pavel Tzonkov
      ' + + '
      '; + + var dlg = _.dialog(_.label("About"), html, {width: 301}); + + setTimeout(function() { + $.ajax({ + dataType: "json", + url: _.getURL('check4Update'), + async: true, + success: function(data) { + if (!dlg.html().length) + return; + var span = $('#checkver'); + span.removeClass('loading'); + if (!data.version) { + span.html(_.label("Unable to connect!")); + return; + } + if (_.version < data.version) + span.html('' + _.label("Download version {version} now!", {version: data.version}) + ''); + else + span.html(_.label("KCFinder is up to date!")); + }, + error: function() { + if (!dlg.html().length) + return; + $('#checkver').removeClass('loading').html(_.label("Unable to connect!")); + } + }); + }, 1000); + + return false; + }); + + _.initUploadButton(); +}; + +_.initUploadButton = function() { + var btn = $('#toolbar a[href="kcact:upload"]'); + if (!_.access.files.upload) { + btn.hide(); + return; + } + var top = btn.get(0).offsetTop, + width = btn.outerWidth(), + height = btn.outerHeight(), + jInput = $('#upload input'); + + $('#toolbar').prepend('
      '); + jInput.css('margin-left', "-" + (jInput.outerWidth() - width)); + $('#upload').mouseover(function() { + $('#toolbar a[href="kcact:upload"]').addClass('hover'); + }).mouseout(function() { + $('#toolbar a[href="kcact:upload"]').removeClass('hover'); + }); +}; + +_.uploadFile = function(form) { + if (!_.dirWritable) { + _.alert(_.label("Cannot write to upload folder.")); + $('#upload').detach(); + _.initUploadButton(); + return; + } + form.elements[1].value = _.dir; + $('').prependTo(document.body); + $('#loading').html(_.label("Uploading file...")).show(); + form.submit(); + $('#uploadResponse').load(function() { + var response = $(this).contents().find('body').text(); + $('#loading').hide(); + response = response.split("\n"); + + var selected = [], errors = []; + $.each(response, function(i, row) { + if (row.substr(0, 1) == "/") + selected[selected.length] = row.substr(1, row.length - 1); + else + errors[errors.length] = row; + }); + if (errors.length) { + errors = errors.join("\n"); + if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) + _.alert(errors); + } + if (!selected.length) + selected = null; + _.refresh(selected); + $('#upload').detach(); + setTimeout(function() { + $('#uploadResponse').detach(); + }, 1); + _.initUploadButton(); + }); +}; + +_.maximize = function(button) { + + // TINYMCE 3 + if (_.opener.name == "tinymce") { + + var par = window.parent.document, + ifr = $('iframe[src*="browse.php?opener=tinymce&"]', par), + id = parseInt(ifr.attr('id').replace(/^mce_(\d+)_ifr$/, "$1")), + win = $('#mce_' + id, par); + + if ($(button).hasClass('selected')) { + $(button).removeClass('selected'); + win.css({ + left: _.maximizeMCE.left, + top: _.maximizeMCE.top, + width: _.maximizeMCE.width, + height: _.maximizeMCE.height + }); + ifr.css({ + width: _.maximizeMCE.width - _.maximizeMCE.Hspace, + height: _.maximizeMCE.height - _.maximizeMCE.Vspace + }); + + } else { + $(button).addClass('selected') + _.maximizeMCE = { + width: parseInt(win.css('width')), + height: parseInt(win.css('height')), + left: win.position().left, + top: win.position().top, + Hspace: parseInt(win.css('width')) - parseInt(ifr.css('width')), + Vspace: parseInt(win.css('height')) - parseInt(ifr.css('height')) + }; + var width = $(window.top).width(), + height = $(window.top).height(); + win.css({ + left: $(window.parent).scrollLeft(), + top: $(window.parent).scrollTop(), + width: width, + height: height + }); + ifr.css({ + width: width - _.maximizeMCE.Hspace, + height: height - _.maximizeMCE.Vspace + }); + } + + // TINYMCE 4 + } else if (_.opener.name == "tinymce4") { + + var par = window.parent.document, + ifr = $('iframe[src*="browse.php?opener=tinymce4&"]', par).parent(), + win = ifr.parent(); + + if ($(button).hasClass('selected')) { + $(button).removeClass('selected'); + + win.css({ + left: _.maximizeMCE4.left, + top: _.maximizeMCE4.top, + width: _.maximizeMCE4.width, + height: _.maximizeMCE4.height + }); + + ifr.css({ + width: _.maximizeMCE4.width, + height: _.maximizeMCE4.height - _.maximizeMCE4.Vspace + }); + + } else { + $(button).addClass('selected'); + + _.maximizeMCE4 = { + width: parseInt(win.css('width')), + height: parseInt(win.css('height')), + left: win.position().left, + top: win.position().top, + Vspace: win.outerHeight(true) - ifr.outerHeight(true) - 1 + }; + + var width = $(window.top).width(), + height = $(window.top).height(); + + win.css({ + left: 0, + top: 0, + width: width, + height: height + }); + + ifr.css({ + width: width, + height: height - _.maximizeMCE4.Vspace + }); + } + + // PUPUP WINDOW + } else if (window.opener) { + window.moveTo(0, 0); + width = screen.availWidth; + height = screen.availHeight; + if ($.agent.opera) + height -= 50; + window.resizeTo(width, height); + + } else { + if (window.parent) { + var el = null; + $(window.parent.document).find('iframe').each(function() { + if (this.src.replace('/?', '?') == window.location.href.replace('/?', '?')) { + el = this; + return false; + } + }); + + // IFRAME + if (el !== null) + $(el).toggleFullscreen(window.parent.document); + + // SELF WINDOW + else + $('body').toggleFullscreen(); + + } else + $('body').toggleFullscreen(); + } +}; + +_.refresh = function(selected) { + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("chDir"), + data: {dir: _.dir}, + async: false, + success: function(data) { + if (_.check4errors(data)) { + $('#files > div').css({opacity: "", filter: ""}); + return; + } + _.dirWritable = data.dirWritable; + _.files = data.files ? data.files : []; + _.orderFiles(null, selected); + _.statusDir(); + }, + error: function() { + $('#files > div').css({opacity: "", filter: ""}); + $('#files').html(_.label("Unknown error.")); + } + }); +}; +/** This file is part of KCFinder project + * + * @desc Settings panel functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initSettings = function() { + $('#settings').disableTextSelect(); + $('#settings fieldset, #settings input, #settings label').uniform(); + + if (!_.shows.length) + $('#show input[type="checkbox"]').each(function(i) { + _.shows[i] = this.name; + }); + + var shows = _.shows; + + if (!$.$.kuki.isSet('showname')) { + $.$.kuki.set('showname', "on"); + $.each(shows, function (i, val) { + if (val != "name") $.$.kuki.set('show' + val, "off"); + }); + } + + $('#show input[type="checkbox"]').click(function() { + $.$.kuki.set('show' + this.name, this.checked ? "on" : "off") + $('#files .file div.' + this.name).css('display', this.checked ? "block" : "none"); + }); + + $.each(shows, function(i, val) { + $('#show input[name="' + val + '"]').get(0).checked = ($.$.kuki.get('show' + val) == "on") ? "checked" : ""; + }); + + if (!_.orders.length) + $('#order input[type="radio"]').each(function(i) { + _.orders[i] = this.value; + }) + + var orders = _.orders; + + if (!$.$.kuki.isSet('order')) + $.$.kuki.set('order', "name"); + + if (!$.$.kuki.isSet('orderDesc')) + $.$.kuki.set('orderDesc', "off"); + + $('#order input[value="' + $.$.kuki.get('order') + '"]').get(0).checked = true; + $('#order input[name="desc"]').get(0).checked = ($.$.kuki.get('orderDesc') == "on"); + + $('#order input[type="radio"]').click(function() { + $.$.kuki.set('order', this.value); + _.orderFiles(); + }); + + $('#order input[name="desc"]').click(function() { + $.$.kuki.set('orderDesc', this.checked ? 'on' : "off"); + _.orderFiles(); + }); + + if (!$.$.kuki.isSet('view')) + $.$.kuki.set('view', "thumbs"); + + if ($.$.kuki.get('view') == "list") + $('#show').parent().hide(); + + $('#view input[value="' + $.$.kuki.get('view') + '"]').get(0).checked = true; + + $('#view input').click(function() { + var view = this.value; + if ($.$.kuki.get('view') != view) { + $.$.kuki.set('view', view); + if (view == "list") + $('#show').parent().hide(); + else + $('#show').parent().show(); + } + _.fixFilesHeight(); + _.refresh(); + }); +}; +/** This file is part of KCFinder project + * + * @desc File related functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initFiles = function() { + $(document).unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + $('#files').unbind().scroll(function() { + _.menu.hide(); + }).disableTextSelect(); + + $('.file').unbind().click(function(e) { + _.selectFile($(this), e); + + }).rightClick(function(el, e) { + _.menuFile($(el), e); + }).dblclick(function() { + _.returnFile($(this)); + }); + + if ($.mobile) + $('.file').on('taphold', function() { + _.menuFile($(this), { + pageX: $(this).offset().left, + pageY: $(this).offset().top + $(this).outerHeight() + }); + }); + + $.each(_.shows, function(i, val) { + $('#files .file div.' + val).css('display', ($.$.kuki.get('show' + val) == "off") ? "none" : "block"); + }); + _.statusDir(); +}; + +_.showFiles = function(callBack, selected) { + _.fadeFiles(); + setTimeout(function() { + var c = $('
      '); + + $.each(_.files, function(i, file) { + var f, icon, + stamp = file.size + "|" + file.mtime; + + // List + if ($.$.kuki.get('view') == "list") { + if (!i) c.html('
      '); + + icon = $.$.getFileExtension(file.name); + if (file.thumb) + icon = ".image"; + else if (!icon.length || !file.smallIcon) + icon = "."; + icon = "themes/" + _.theme + "/img/files/small/" + icon + ".png"; + + f = $(''); + f.appendTo(c.find('table')); + + // Thumbnails + } else { + if (file.thumb) + icon = _.getURL('thumb') + "&file=" + encodeURIComponent(file.name) + "&dir=" + encodeURIComponent(_.dir) + "&stamp=" + stamp; + else if (file.smallThumb) { + icon = _.uploadURL + "/" + _.dir + "/" + encodeURIComponent(file.name); + icon = $.$.escapeDirs(icon).replace(/\'/g, "%27"); + } else { + icon = file.bigIcon ? $.$.getFileExtension(file.name) : "."; + if (!icon.length) icon = "."; + icon = "themes/" + _.theme + "/img/files/big/" + icon + ".png"; + } + f = $('
      '); + f.appendTo(c); + } + + f.find('.thumb').css({backgroundImage: 'url("' + icon + '")'}); + f.find('.name').html($.$.htmlData(file.name)); + f.find('.time').html(file.date); + f.find('.size').html(_.humanSize(file.size)); + f.data(file); + + if ((file.name === selected) || $.$.inArray(file.name, selected)) + f.addClass('selected'); + }); + + c.css({opacity:'', filter:''}); + $('#files').html(c); + + if (callBack) callBack(); + _.initFiles(); + }, 200); +}; + +_.selectFile = function(file, e) { + + // Click with Ctrl, Meta or Shift key + if (e.ctrlKey || e.metaKey || e.shiftKey) { + + // Click with Shift key + if (e.shiftKey && !file.hasClass('selected')) { + var f = file.prev(); + while (f.get(0) && !f.hasClass('selected')) { + f.addClass('selected'); + f = f.prev(); + } + } + + file.toggleClass('selected'); + + // Update statusbar + var files = $('.file.selected').get(), + size = 0, data; + if (!files.length) + _.statusDir(); + else { + $.each(files, function(i, cfile) { + size += $(cfile).data('size'); + }); + size = _.humanSize(size); + if (files.length > 1) + $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + size + ")"); + else { + data = $(files[0]).data(); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + } + } + + // Normal click + } else { + data = file.data(); + $('.file').removeClass('selected'); + file.addClass('selected'); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + } +}; + +_.selectAll = function(e) { + if ((!e.ctrlKey && !e.metaKey) || ((e.keyCode != 65) && (e.keyCode != 97))) // Ctrl-A + return false; + + var files = $('.file'), + size = 0; + + if (files.length) { + + files.addClass('selected').each(function() { + size += $(this).data('size'); + }); + + $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + _.humanSize(size) + ")"); + } + + return true; +}; + +_.returnFile = function(file) { + + var button, win, fileURL = file.substr + ? file : _.uploadURL + "/" + _.dir + "/" + file.data('name'); + fileURL = $.$.escapeDirs(fileURL); + + if (_.opener.name == "ckeditor") { + _.opener.CKEditor.object.tools.callFunction(_.opener.CKEditor.funcNum, fileURL, ""); + window.close(); + + } else if (_.opener.name == "fckeditor") { + window.opener.SetUrl(fileURL) ; + window.close() ; + + } else if (_.opener.name == "tinymce") { + win = tinyMCEPopup.getWindowArg('window'); + win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = fileURL; + if (win.getImageData) win.getImageData(); + if (typeof(win.ImageDialog) != "undefined") { + if (win.ImageDialog.getImageData) + win.ImageDialog.getImageData(); + if (win.ImageDialog.showPreviewImage) + win.ImageDialog.showPreviewImage(fileURL); + } + tinyMCEPopup.close(); + + } else if (_.opener.name == "tinymce4") { + win = (window.opener ? window.opener : window.parent); + $(win.document).find('#' + _.opener.TinyMCE.field).val(fileURL); + win.tinyMCE.activeEditor.windowManager.close(); + + } else if (_.opener.callBack) { + + if (window.opener && window.opener.KCFinder) { + _.opener.callBack(fileURL); + window.close(); + } + + if (window.parent && window.parent.KCFinder) { + button = $('#toolbar a[href="kcact:maximize"]'); + if (button.hasClass('selected')) + _.maximize(button); + _.opener.callBack(fileURL); + } + + } else if (_.opener.callBackMultiple) { + if (window.opener && window.opener.KCFinder) { + _.opener.callBackMultiple([fileURL]); + window.close(); + } + + if (window.parent && window.parent.KCFinder) { + button = $('#toolbar a[href="kcact:maximize"]'); + if (button.hasClass('selected')) + _.maximize(button); + _.opener.callBackMultiple([fileURL]); + } + + } +}; + +_.returnFiles = function(files) { + if (_.opener.callBackMultiple && files.length) { + var rfiles = []; + $.each(files, function(i, file) { + rfiles[i] = _.uploadURL + "/" + _.dir + "/" + $(file).data('name'); + rfiles[i] = $.$.escapeDirs(rfiles[i]); + }); + _.opener.callBackMultiple(rfiles); + if (window.opener) window.close() + } +}; + +_.returnThumbnails = function(files) { + if (_.opener.callBackMultiple) { + var rfiles = [], j = 0; + $.each(files, function(i, file) { + if ($(file).data('thumb')) { + rfiles[j] = _.thumbsURL + "/" + _.dir + "/" + $(file).data('name'); + rfiles[j] = $.$.escapeDirs(rfiles[j++]); + } + }); + _.opener.callBackMultiple(rfiles); + if (window.opener) window.close() + } +}; +/** This file is part of KCFinder project + * + * @desc Folder related functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initFolders = function() { + $('#folders').scroll(function() { + _.menu.hide(); + }).disableTextSelect(); + $('div.folder > a').unbind().click(function() { + _.menu.hide(); + return false; + }); + $('div.folder > a > span.brace').unbind().click(function() { + if ($(this).hasClass('opened') || $(this).hasClass('closed')) + _.expandDir($(this).parent()); + }); + $('div.folder > a > span.folder').unbind().click(function() { + _.changeDir($(this).parent()); + }).rightClick(function(el, e) { + _.menuDir($(el).parent(), e); + }); + if ($.mobile) { + $('div.folder > a > span.folder').on('taphold', function() { + _.menuDir($(this).parent(), { + pageX: $(this).offset().left + 1, + pageY: $(this).offset().top + $(this).outerHeight() + }); + }); + } +}; + +_.setTreeData = function(data, path) { + if (!path) + path = ""; + else if (path.length && (path.substr(path.length - 1, 1) != '/')) + path += "/"; + path += data.name; + var selector = '#folders a[href="kcdir:/' + $.$.escapeDirs(path) + '"]'; + $(selector).data({ + name: data.name, + path: path, + readable: data.readable, + writable: data.writable, + removable: data.removable, + hasDirs: data.hasDirs + }); + $(selector + ' span.folder').addClass(data.current ? 'current' : 'regular'); + if (data.dirs && data.dirs.length) { + $(selector + ' span.brace').addClass('opened'); + $.each(data.dirs, function(i, cdir) { + _.setTreeData(cdir, path + "/"); + }); + } else if (data.hasDirs) + $(selector + ' span.brace').addClass('closed'); +}; + +_.buildTree = function(root, path) { + if (!path) path = ""; + path += root.name; + var cdir, html = '
       ' + $.$.htmlData(root.name) + ''; + if (root.dirs) { + html += '
      '; + for (var i = 0; i < root.dirs.length; i++) { + cdir = root.dirs[i]; + html += _.buildTree(cdir, path + "/"); + } + html += '
      '; + } + html += '
      '; + return html; +}; + +_.expandDir = function(dir) { + var path = dir.data('path'); + if (dir.children('.brace').hasClass('opened')) { + dir.parent().children('.folders').hide(500, function() { + if (path == _.dir.substr(0, path.length)) + _.changeDir(dir); + }); + dir.children('.brace').removeClass('opened').addClass('closed'); + } else { + if (dir.parent().children('.folders').get(0)) { + dir.parent().children('.folders').show(500); + dir.children('.brace').removeClass('closed').addClass('opened'); + } else if (!$('#loadingDirs').get(0)) { + dir.parent().append('
      ' + _.label("Loading folders...") + '
      '); + $('#loadingDirs').hide().show(200, function() { + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("expand"), + data: {dir: path}, + async: false, + success: function(data) { + $('#loadingDirs').hide(200, function() { + $('#loadingDirs').detach(); + }); + if (_.check4errors(data)) + return; + + var html = ""; + $.each(data.dirs, function(i, cdir) { + html += ''; + }); + if (html.length) { + dir.parent().append('
      ' + html + '
      '); + var folders = $(dir.parent().children('.folders').first()); + folders.hide(); + $(folders).show(500); + $.each(data.dirs, function(i, cdir) { + _.setTreeData(cdir, path); + }); + } + if (data.dirs.length) + dir.children('.brace').removeClass('closed').addClass('opened'); + else + dir.children('.brace').removeClass('opened closed'); + _.initFolders(); + _.initDropUpload(); + }, + error: function() { + $('#loadingDirs').detach(); + _.alert(_.label("Unknown error.")); + } + }); + }); + } + } +}; + +_.changeDir = function(dir) { + if (dir.children('span.folder').hasClass('regular')) { + $('div.folder > a > span.folder').removeClass('current regular').addClass('regular'); + dir.children('span.folder').removeClass('regular').addClass('current'); + $('#files').html(_.label("Loading files...")); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("chDir"), + data: {dir: dir.data('path')}, + async: false, + success: function(data) { + if (_.check4errors(data)) + return; + _.files = data.files; + _.orderFiles(); + _.dir = dir.data('path'); + _.dirWritable = data.dirWritable; + _.setTitle("KCFinder: /" + _.dir); + _.statusDir(); + }, + error: function() { + $('#files').html(_.label("Unknown error.")); + } + }); + } +}; + +_.statusDir = function() { + var i = 0, size = 0; + for (; i < _.files.length; i++) + size += _.files[i].size; + size = _.humanSize(size); + $('#fileinfo').html(_.files.length + " " + _.label("files") + " (" + size + ")"); +}; + +_.refreshDir = function(dir) { + var path = dir.data('path'); + if (dir.children('.brace').hasClass('opened') || dir.children('.brace').hasClass('closed')) + dir.children('.brace').removeClass('opened').addClass('closed'); + dir.parent().children('.folders').first().detach(); + if (path == _.dir.substr(0, path.length)) + _.changeDir(dir); + _.expandDir(dir); + return true; +}; +/** This file is part of KCFinder project + * + * @desc Context menus + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.menu = { + + init: function() { + $('#menu').html("
        ").css('display', 'none'); + }, + + addItem: function(href, label, callback, denied) { + if (typeof denied == "undefined") + denied = false; + + $('#menu ul').append('
      • ' + label + '
      • '); + + if (!denied && $.isFunction(callback)) + $('#menu a[href="' + href + '"]').click(function() { + _.menu.hide(); + return callback(); + }); + }, + + addDivider: function() { + if ($('#menu ul').html().length) + $('#menu ul').append("
      • -
      • "); + }, + + show: function(e) { + var dlg = $('#menu'), + ul = $('#menu ul'); + if (ul.html().length) { + dlg.find('ul').first().menu(); + if (typeof e != "undefined") { + var left = e.pageX, + top = e.pageY, + win = $(window); + + if ((dlg.outerWidth() + left) > win.width()) + left = win.width() - dlg.outerWidth(); + + if ((dlg.outerHeight() + top) > win.height()) + top = win.height() - dlg.outerHeight(); + + dlg.hide().css({ + left: left, + top: top, + width: "" + }).fadeIn('fast'); + } else + dlg.fadeIn('fast'); + } else + ul.detach(); + }, + + hide: function() { + $('#clipboard').removeClass('selected'); + $('div.folder > a > span.folder').removeClass('context'); + $('#menu').hide().css('width', "").html("").data('title', null).unbind().click(function() { + return false; + }); + $(document).unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + } +}; + +// FILE CONTEXT MENU +_.menuFile = function(file, e) { + _.menu.init(); + + var data = file.data(), + files = $('.file.selected').get(); + + // MULTIPLE FILES MENU + if (file.hasClass('selected') && files.length && (files.length > 1)) { + var thumb = false, + notWritable = 0, + cdata; + + $.each(files, function(i, cfile) { + cdata = $(cfile).data(); + if (cdata.thumb) thumb = true; + if (!data.writable) notWritable++; + }); + + if (_.opener.callBackMultiple) { + + // SELECT FILES + _.menu.addItem("kcact:pick", _.label("Select"), function() { + _.returnFiles(files); + return false; + }); + + // SELECT THUMBNAILS + if (thumb) + _.menu.addItem("kcact:pick_thumb", _.label("Select Thumbnails"), function() { + _.returnThumbnails(files); + return false; + }); + } + + if (data.thumb || data.smallThumb || _.support.zip) { + + _.menu.addDivider(); + + // VIEW IMAGE + if (data.thumb || data.smallThumb) + _.menu.addItem("kcact:view", _.label("View"), function() { + _.viewImage(data); + }); + + // DOWNLOAD + if (_.support.zip) + _.menu.addItem("kcact:download", _.label("Download"), function() { + var pfiles = []; + $.each(files, function(i, cfile) { + pfiles[i] = $(cfile).data('name'); + }); + _.post(_.getURL('downloadSelected'), {dir:_.dir, files:pfiles}); + return false; + }); + } + + // ADD TO CLIPBOARD + if (_.access.files.copy || _.access.files.move) { + _.menu.addDivider(); + _.menu.addItem("kcact:clpbrdadd", _.label("Add to Clipboard"), function() { + var msg = ''; + $.each(files, function(i, cfile) { + var cdata = $(cfile).data(), + failed = false; + for (i = 0; i < _.clipboard.length; i++) + if ((_.clipboard[i].name == cdata.name) && + (_.clipboard[i].dir == _.dir) + ) { + failed = true; + msg += cdata.name + ": " + _.label("This file is already added to the Clipboard.") + "\n"; + break; + } + + if (!failed) { + cdata.dir = _.dir; + _.clipboard[_.clipboard.length] = cdata; + } + }); + _.initClipboard(); + if (msg.length) _.alert(msg.substr(0, msg.length - 1)); + return false; + }); + } + + // DELETE + if (_.access.files['delete']) { + _.menu.addDivider(); + _.menu.addItem("kcact:rm", _.label("Delete"), function() { + if ($(this).hasClass('denied')) return false; + var failed = 0, + dfiles = []; + $.each(files, function(i, cfile) { + var cdata = $(cfile).data(); + if (!cdata.writable) + failed++; + else + dfiles[dfiles.length] = _.dir + "/" + cdata.name; + }); + if (failed == files.length) { + _.alert(_.label("The selected files are not removable.")); + return false; + } + + var go = function(callBack) { + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("rm_cbd"), + data: {files:dfiles}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.check4errors(data); + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + $('#files > div').css({ + opacity: "", + filter: "" + }); + _.alert(_.label("Unknown error.")); + } + }); + }; + + if (failed) + _.confirm( + _.label("{count} selected files are not removable. Do you want to delete the rest?", {count:failed}), + go + ); + + else + _.confirm( + _.label("Are you sure you want to delete all selected files?"), + go + ); + + return false; + }, (notWritable == files.length)); + } + + _.menu.show(e); + + // SINGLE FILE MENU + } else { + $('.file').removeClass('selected'); + file.addClass('selected'); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + + if (_.opener.callBack || _.opener.callBackMultiple) { + + // SELECT FILE + _.menu.addItem("kcact:pick", _.label("Select"), function() { + _.returnFile(file); + return false; + }); + + // SELECT THUMBNAIL + if (data.thumb) + _.menu.addItem("kcact:pick_thumb", _.label("Select Thumbnail"), function() { + _.returnFile(_.thumbsURL + "/" + _.dir + "/" + data.name); + return false; + }); + + _.menu.addDivider(); + } + + // VIEW IMAGE + if (data.thumb || data.smallThumb) + _.menu.addItem("kcact:view", _.label("View"), function() { + _.viewImage(data); + }); + + // DOWNLOAD + _.menu.addItem("kcact:download", _.label("Download"), function() { + $('#menu').html('
        '); + $('#downloadForm input').get(0).value = _.dir; + $('#downloadForm input').get(1).value = data.name; + $('#downloadForm').submit(); + return false; + }); + + // ADD TO CLIPBOARD + if (_.access.files.copy || _.access.files.move) { + _.menu.addDivider(); + _.menu.addItem("kcact:clpbrdadd", _.label("Add to Clipboard"), function() { + for (i = 0; i < _.clipboard.length; i++) + if ((_.clipboard[i].name == data.name) && + (_.clipboard[i].dir == _.dir) + ) { + _.alert(_.label("This file is already added to the Clipboard.")); + return false; + } + var cdata = data; + cdata.dir = _.dir; + _.clipboard[_.clipboard.length] = cdata; + _.initClipboard(); + return false; + }); + } + + + if (_.access.files.rename || _.access.files['delete']) + _.menu.addDivider(); + + // RENAME + if (_.access.files.rename) + _.menu.addItem("kcact:mv", _.label("Rename..."), function() { + if (!data.writable) return false; + _.fileNameDialog( + {dir: _.dir, file: data.name}, + 'newName', data.name, _.getURL("rename"), { + title: "New file name:", + errEmpty: "Please enter new file name.", + errSlash: "Unallowable characters in file name.", + errDot: "File name shouldn't begins with '.'" + }, + _.refresh + ); + return false; + }, !data.writable); + + // DELETE + if (_.access.files['delete']) + _.menu.addItem("kcact:rm", _.label("Delete"), function() { + if (!data.writable) return false; + _.confirm(_.label("Are you sure you want to delete this file?"), + function(callBack) { + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("delete"), + data: {dir: _.dir, file: data.name}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.clearClipboard(); + if (_.check4errors(data)) + return; + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + _.alert(_.label("Unknown error.")); + } + }); + } + ); + return false; + }, !data.writable); + + _.menu.show(e); + } + +}; + +// FOLDER CONTEXT MENU +_.menuDir = function(dir, e) { + _.menu.init(); + + var data = dir.data(), + html = '
          '; + + if (_.clipboard && _.clipboard.length) { + + // COPY CLIPBOARD + if (_.access.files.copy) + _.menu.addItem("kcact:cpcbd", _.label("Copy {count} files", {count: _.clipboard.length}), function() { + _.copyClipboard(data.path); + return false; + }, !data.writable); + + // MOVE CLIPBOARD + if (_.access.files.move) + _.menu.addItem("kcact:mvcbd", _.label("Move {count} files", {count: _.clipboard.length}), function() { + _.moveClipboard(data.path); + return false; + }, !data.writable); + + if (_.access.files.copy || _.access.files.move) + _.menu.addDivider(); + } + + // REFRESH + _.menu.addItem("kcact:refresh", _.label("Refresh"), function() { + _.refreshDir(dir); + return false; + }); + + // DOWNLOAD + if (_.support.zip) { + _.menu.addDivider(); + _.menu.addItem("kcact:download", _.label("Download"), function() { + _.post(_.getURL("downloadDir"), {dir:data.path}); + return false; + }); + } + + if (_.access.dirs.create || _.access.dirs.rename || _.access.dirs['delete']) + _.menu.addDivider(); + + // NEW SUBFOLDER + if (_.access.dirs.create) + _.menu.addItem("kcact:mkdir", _.label("New Subfolder..."), function(e) { + if (!data.writable) return false; + _.fileNameDialog( + {dir: data.path}, + "newDir", "", _.getURL("newDir"), { + title: "New folder name:", + errEmpty: "Please enter new folder name.", + errSlash: "Unallowable characters in folder name.", + errDot: "Folder name shouldn't begins with '.'" + }, function() { + _.refreshDir(dir); + _.initDropUpload(); + if (!data.hasDirs) { + dir.data('hasDirs', true); + dir.children('span.brace').addClass('closed'); + } + } + ); + return false; + }, !data.writable); + + // RENAME + if (_.access.dirs.rename) + _.menu.addItem("kcact:mvdir", _.label("Rename..."), function(e) { + if (!data.removable) return false; + _.fileNameDialog( + {dir: data.path}, + "newName", data.name, _.getURL("renameDir"), { + title: "New folder name:", + errEmpty: "Please enter new folder name.", + errSlash: "Unallowable characters in folder name.", + errDot: "Folder name shouldn't begins with '.'" + }, function(dt) { + if (!dt.name) { + _.alert(_.label("Unknown error.")); + return; + } + var currentDir = (data.path == _.dir); + dir.children('span.folder').html($.$.htmlData(dt.name)); + dir.data('name', dt.name); + dir.data('path', $.$.dirname(data.path) + '/' + dt.name); + if (currentDir) + _.dir = dir.data('path'); + _.initDropUpload(); + }, + true + ); + return false; + }, !data.removable); + + // DELETE + if (_.access.dirs['delete']) + _.menu.addItem("kcact:rmdir", _.label("Delete"), function() { + if (!data.removable) return false; + _.confirm( + _.label("Are you sure you want to delete this folder and all its content?"), + function(callBack) { + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("deleteDir"), + data: {dir: data.path}, + async: false, + success: function(data) { + if (callBack) callBack(); + if (_.check4errors(data)) + return; + dir.parent().hide(500, function() { + var folders = dir.parent().parent(); + var pDir = folders.parent().children('a').first(); + dir.parent().detach(); + if (!folders.children('div.folder').get(0)) { + pDir.children('span.brace').first().removeClass('opened closed'); + pDir.parent().children('.folders').detach(); + pDir.data('hasDirs', false); + } + if (pDir.data('path') == _.dir.substr(0, pDir.data('path').length)) + _.changeDir(pDir); + _.initDropUpload(); + }); + }, + error: function() { + if (callBack) callBack(); + _.alert(_.label("Unknown error.")); + } + }); + } + ); + return false; + }, !data.removable); + + _.menu.show(e); + + $('div.folder > a > span.folder').removeClass('context'); + if (dir.children('span.folder').hasClass('regular')) + dir.children('span.folder').addClass('context'); +}; + +// CLIPBOARD MENU +_.openClipboard = function() { + + if (!_.clipboard || !_.clipboard.length) return; + + // CLOSE MENU + if ($('#menu a[href="kcact:clrcbd"]').html()) { + $('#clipboard').removeClass('selected'); + _.menu.hide(); + return; + } + + setTimeout(function() { + _.menu.init(); + + var dlg = $('#menu'), + jStatus = $('#status'), + html = '
        • '; + + // CLIPBOARD FILES + $.each(_.clipboard, function(i, val) { + var icon = $.$.getFileExtension(val.name); + if (val.thumb) + icon = ".image"; + else if (!val.smallIcon || !icon.length) + icon = "."; + icon = "themes/" + _.theme + "/img/files/small/" + icon + ".png"; + html += '' + $.$.htmlData($.$.basename(val.name)) + ''; + }); + html += '
        • -
        • '; + $('#menu ul').append(html); + + // DOWNLOAD + if (_.support.zip) + _.menu.addItem("kcact:download", _.label("Download files"), function() { + _.downloadClipboard(); + return false; + }); + + if (_.access.files.copy || _.access.files.move || _.access.files['delete']) + _.menu.addDivider(); + + // COPY + if (_.access.files.copy) + _.menu.addItem("kcact:cpcbd", _.label("Copy files here"), function() { + if (!_.dirWritable) return false; + _.copyClipboard(_.dir); + return false; + }, !_.dirWritable); + + // MOVE + if (_.access.files.move) + _.menu.addItem("kcact:mvcbd", _.label("Move files here"), function() { + if (!_.dirWritable) return false; + _.moveClipboard(_.dir); + return false; + }, !_.dirWritable); + + // DELETE + if (_.access.files['delete']) + _.menu.addItem("kcact:rmcbd", _.label("Delete files"), function() { + _.confirm( + _.label("Are you sure you want to delete all files in the Clipboard?"), + function(callBack) { + if (callBack) callBack(); + _.deleteClipboard(); + } + ); + return false; + }); + + _.menu.addDivider(); + + // CLEAR CLIPBOARD + _.menu.addItem("kcact:clrcbd", _.label("Clear the Clipboard"), function() { + _.clearClipboard(); + return false; + }); + + $('#clipboard').addClass('selected'); + _.menu.show(); + + var left = $(window).width() - dlg.css({width: ""}).outerWidth(), + top = $(window).height() - dlg.outerHeight() - jStatus.outerHeight(), + lheight = top + dlg.outerTopSpace(); + + dlg.find('.list').css({ + 'max-height': lheight, + 'overflow-y': "auto", + 'overflow-x': "hidden", + width: "" + }); + + top = $(window).height() - dlg.outerHeight(true) - jStatus.outerHeight(true); + + dlg.css({ + left: left - 5, + top: top + }).fadeIn("fast"); + + var a = dlg.find('.list').outerHeight(), + b = dlg.find('.list div').outerHeight(); + + if (b - a > 10) { + dlg.css({ + left: parseInt(dlg.css('left')) - _.scrollbarWidth, + }).width(dlg.width() + _.scrollbarWidth); + } + }, 1); +};/** This file is part of KCFinder project + * + * @desc Image viewer + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.viewImage = function(data) { + + var ts = new Date().getTime(), + dlg = false, + images = [], + + showImage = function(data) { + _.lock = true; + $('#loading').html(_.label("Loading image...")).show(); + + var url = $.$.escapeDirs(_.uploadURL + "/" + _.dir + "/" + data.name) + "?ts=" + ts, + img = new Image(), + i = $(img), + w = $(window), + d = $(document); + + onImgLoad = function() { + _.lock = false; + + $('#files .file').each(function() { + if ($(this).data('name') == data.name) { + _.ssImage = this; + return false; + } + }); + + i.hide().appendTo('body'); + + var o_w = i.width(), + o_h = i.height(), + i_w = o_w, + i_h = o_h, + + goTo = function(i) { + if (!_.lock) { + var nimg = images[i]; + _.currImg = i; + showImage(nimg); + } + }, + + nextFunc = function() { + goTo((_.currImg >= images.length - 1) ? 0 : (_.currImg + 1)); + }, + + prevFunc = function() { + goTo((_.currImg ? _.currImg : images.length) - 1); + }, + + t = $('
          '); + + i.detach().appendTo(t); + t.addClass("img"); + + if (!dlg) { + + var ww = w.width() - 60, + + closeFunc = function() { + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + dlg.dialog('destroy').detach(); + }; + + if ((ww % 2)) ww++; + + dlg = _.dialog($.$.htmlData(data.name), t.get(0), { + width: ww, + height: w.height() - 36, + position: [30, 30], + draggable: false, + nopadding: true, + close: closeFunc, + show: false, + hide: false, + buttons: [ + { + text: _.label("Previous"), + icons: {primary: "ui-icon-triangle-1-w"}, + click: prevFunc + + }, { + text: _.label("Next"), + icons: {secondary: "ui-icon-triangle-1-e"}, + click: nextFunc + + }, { + text: _.label("Select"), + icons: {primary: "ui-icon-check"}, + click: function(e) { + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + if (_.ssImage) { + _.selectFile($(_.ssImage), e); + } + dlg.dialog('destroy').detach(); + } + + }, { + text: _.label("Close"), + icons: {primary: "ui-icon-closethick"}, + click: closeFunc + } + ] + }); + + dlg.addClass('kcfImageViewer').css('overflow', "hidden").parent().find('.ui-dialog-buttonpane button').get(2).focus(); + + } else { + dlg.prev().find('.ui-dialog-title').html($.$.htmlData(data.name)); + dlg.html(t.get(0)); + } + + dlg.unbind('click').click(nextFunc).disableTextSelect(); + + var d_w = dlg.innerWidth(), + d_h = dlg.innerHeight(); + + if ((o_w > d_w) || (o_h > d_h)) { + i_w = d_w; + i_h = d_h; + if ((d_w / d_h) > (o_w / o_h)) + i_w = parseInt((o_w * d_h) / o_h); + else if ((d_w / d_h) < (o_w / o_h)) + i_h = parseInt((o_h * d_w) / o_w); + } + + i.css({ + width: i_w, + height: i_h + }).show().parent().css({ + display: "block", + margin: "0 auto", + width: i_w, + height: i_h, + marginTop: parseInt((d_h - i_h) / 2) + }); + + $('#loading').hide(); + + d.unbind('keydown').keydown(function(e) { + if (!_.lock) { + var kc = e.keyCode; + if ((kc == 37)) prevFunc(); + if ((kc == 39)) nextFunc(); + } + }); + }; + + img.src = url; + + if (img.complete) + onImgLoad(); + else { + img.onload = onImgLoad; + img.onerror = function() { + _.lock = false; + $('#loading').hide(); + _.alert(_.label("Unknown error.")); + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + _.refresh(); + }; + } + }; + + $.each(_.files, function(i, file) { + var i = images.length; + if (file.thumb || file.smallThumb) + images[i] = file; + if (file.name == data.name) + _.currImg = i; + }); + + showImage(data); + return false; +}; +/** This file is part of KCFinder project + * + * @desc Clipboard functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initClipboard = function() { + if (!_.clipboard || !_.clipboard.length) return; + + var size = 0, + jClipboard = $('#clipboard'); + + $.each(_.clipboard, function(i, val) { + size += val.size; + }); + size = _.humanSize(size); + jClipboard.disableTextSelect().html('
          '); + var resize = function() { + jClipboard.css({ + left: $(window).width() - jClipboard.outerWidth(), + top: $(window).height() - jClipboard.outerHeight() + }); + }; + resize(); + jClipboard.show(); + $(window).unbind().resize(function() { + _.resize(); + resize(); + }); +}; + +_.removeFromClipboard = function(i) { + if (!_.clipboard || !_.clipboard[i]) return false; + if (_.clipboard.length == 1) { + _.clearClipboard(); + _.menu.hide(); + return; + } + + if (i < _.clipboard.length - 1) { + var last = _.clipboard.slice(i + 1); + _.clipboard = _.clipboard.slice(0, i); + _.clipboard = _.clipboard.concat(last); + } else + _.clipboard.pop(); + + _.initClipboard(); + _.menu.hide(); + _.openClipboard(); + return true; +}; + +_.copyClipboard = function(dir) { + if (!_.clipboard || !_.clipboard.length) return; + var files = [], + failed = 0; + for (i = 0; i < _.clipboard.length; i++) + if (_.clipboard[i].readable) + files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; + else + failed++; + if (_.clipboard.length == failed) { + _.alert(_.label("The files in the Clipboard are not readable.")); + return; + } + var go = function(callBack) { + if (dir == _.dir) + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("cp_cbd"), + data: {dir: dir, files: files}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.check4errors(data); + _.clearClipboard(); + if (dir == _.dir) + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + $('#files > div').css({ + opacity: "", + filter: "" + }); + _.alert(_.label("Unknown error.")); + } + }); + }; + + if (failed) + _.confirm( + _.label("{count} files in the Clipboard are not readable. Do you want to copy the rest?", {count:failed}), + go + ) + else + go(); + +}; + +_.moveClipboard = function(dir) { + if (!_.clipboard || !_.clipboard.length) return; + var files = [], + failed = 0; + for (i = 0; i < _.clipboard.length; i++) + if (_.clipboard[i].readable && _.clipboard[i].writable) + files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; + else + failed++; + if (_.clipboard.length == failed) { + _.alert(_.label("The files in the Clipboard are not movable.")) + return; + } + + var go = function(callBack) { + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("mv_cbd"), + data: {dir: dir, files: files}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.check4errors(data); + _.clearClipboard(); + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + $('#files > div').css({ + opacity: "", + filter: "" + }); + _.alert(_.label("Unknown error.")); + } + }); + }; + + if (failed) + _.confirm( + _.label("{count} files in the Clipboard are not movable. Do you want to move the rest?", {count: failed}), + go + ); + else + go(); +}; + +_.deleteClipboard = function() { + if (!_.clipboard || !_.clipboard.length) return; + var files = [], + failed = 0; + for (i = 0; i < _.clipboard.length; i++) + if (_.clipboard[i].readable && _.clipboard[i].writable) + files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; + else + failed++; + if (_.clipboard.length == failed) { + _.alert(_.label("The files in the Clipboard are not removable.")) + return; + } + var go = function(callBack) { + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("rm_cbd"), + data: {files:files}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.check4errors(data); + _.clearClipboard(); + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + $('#files > div').css({ + opacity: "", + filter: "" + }); + _.alert(_.label("Unknown error.")); + } + }); + }; + if (failed) + _.confirm( + _.label("{count} files in the Clipboard are not removable. Do you want to delete the rest?", {count: failed}), + go + ); + else + go(); +}; + +_.downloadClipboard = function() { + if (!_.clipboard || !_.clipboard.length) return; + var files = []; + for (i = 0; i < _.clipboard.length; i++) + if (_.clipboard[i].readable) + files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; + if (files.length) + _.post(_.getURL('downloadClipboard'), {files:files}); +}; + +_.clearClipboard = function() { + $('#clipboard').html(""); + _.clipboard = []; +}; +/** This file is part of KCFinder project + * + * @desc Upload files using drag and drop + * @package KCFinder + * @version 3.12 + * @author Forum user (updated by Pavel Tzonkov) + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ +_.initDropUpload = function() { + + if ((typeof XMLHttpRequest == "undefined") || + (typeof document.addEventListener == "undefined") || + (typeof File == "undefined") || + (typeof FileReader == "undefined") + ) { + return; + } + + if (!XMLHttpRequest.prototype.sendAsBinary) { + XMLHttpRequest.prototype.sendAsBinary = function(datastr) { + var ords = Array.prototype.map.call(datastr, function(x) { + return x.charCodeAt(0) & 0xff; + }), + ui8a = new Uint8Array(ords); + this.send(ui8a.buffer); + } + } + + var uploadQueue = [], + uploadInProgress = false, + filesCount = 0, + errors = [], + files = $('#files'), + folders = $('div.folder > a'), + boundary = "------multipartdropuploadboundary" + (new Date).getTime(), + currentFile; + + var filesDragOver, filesDragEnter, filesDrop, folderDrag, folderDrop = false; + + filesDragOver = function(e) { + if (e.preventDefault) e.preventDefault(); + $('#files').addClass('drag'); + return false; + }; + + filesDragEnter = function(e) { + if (e.preventDefault) e.preventDefault(); + return false; + }; + + filesDragLeave = function(e) { + if (e.preventDefault) e.preventDefault(); + $('#files').removeClass('drag'); + return false; + }; + + filesDrop = function(e) { + + console.log("Files Dropped"); + + if (e.preventDefault) e.preventDefault(); + if (e.stopPropagation) e.stopPropagation(); + $('#files').removeClass('drag'); + if (!$('#folders span.current').first().parent().data('writable')) { + _.alert("Cannot write to upload folder."); + return false; + }; + filesCount += e.dataTransfer.files.length; + for (var i = 0; i < e.dataTransfer.files.length; i++) { + var file = e.dataTransfer.files[i]; + file.thisTargetDir = _.dir; + uploadQueue.push(file); + } + + processUploadQueue(); + return false; + + }; + + folderDrag = function(e) { + if (e.preventDefault) e.preventDefault(); + return false; + }; + + folderDrop = function(e, dir) { + if (e.preventDefault) e.preventDefault(); + if (e.stopPropagation) e.stopPropagation(); + if (!$(dir).data('writable')) { + _.alert(_.label("Cannot write to upload folder.")); + return false; + } + filesCount += e.dataTransfer.files.length; + for (var i = 0; i < e.dataTransfer.files.length; i++) { + var file = e.dataTransfer.files[i]; + file.thisTargetDir = $(dir).data('path'); + uploadQueue.push(file); + } + processUploadQueue(); + return false; + }; + + // console.log("Handling Event Listeners"); + + if (!files.data('dropupload_handlers')) { + + // console.log("Adding Event Listeners"); + + // Remove Listener + files.get(0).removeEventListener('dragover', filesDragOver, false); + files.get(0).removeEventListener('dragenter', filesDragEnter, false); + files.get(0).removeEventListener('dragleave', filesDragLeave, false); + files.get(0).removeEventListener('drop', filesDrop, false); + + // Add listener + files.get(0).addEventListener('dragover', filesDragOver, false); + files.get(0).addEventListener('dragenter', filesDragEnter, false); + files.get(0).addEventListener('dragleave', filesDragLeave, false); + files.get(0).addEventListener('drop', filesDrop, false); + + // Notify JS that we have already assigned HANDLERS for the FILES + files.data('dropupload_handlers', true); + + }; + + + folders.each(function() { + + var folder, folder_element, dragOver, dragLeave, drop = false; + + folder = this; + folder_element = $(folder); + + dragOver = function(e) { + $(folder).children('span.folder').addClass('context'); + return folderDrag(e); + }; + + dragLeave = function(e) { + $(folder).children('span.folder').removeClass('context'); + return folderDrag(e); + }; + + drop = function(e) { + $(folder).children('span.folder').removeClass('context'); + return folderDrop(e, folder); + }; + + if (!folder_element.data('dropupload_handlers')) { + + // Remove Current Handlers + this.removeEventListener('dragover', dragOver, false); + this.removeEventListener('dragenter', folderDrag, false); + this.removeEventListener('dragleave', dragLeave, false); + this.removeEventListener('drop', drop, false); + + // Folder Drag, Drop etc + this.addEventListener('dragover', dragOver, false); + this.addEventListener('dragenter', folderDrag, false); + this.addEventListener('dragleave', dragLeave, false); + this.addEventListener('drop', drop, false); + + // Notify JS that we have already assigned HANDLERS for the FILES + folder_element.data('dropupload_handlers', true); + + }; + + }); + + function updateProgress(evt) { + var progress = evt.lengthComputable ? + Math.round((evt.loaded * 100) / evt.total) + '%' : + Math.round(evt.loaded / 1024) + " KB"; + $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { + number: filesCount - uploadQueue.length, + count: filesCount, + progress: progress + })); + } + + function processUploadQueue() { + + if (uploadInProgress) { + return false; + } + + if (uploadQueue && uploadQueue.length) { + var file = uploadQueue.shift(); + currentFile = file; + $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { + number: filesCount - uploadQueue.length, + count: filesCount, + progress: "" + })).show(); + + var reader = new FileReader(); + reader.thisFileName = file.name; + reader.thisFileType = file.type; + reader.thisFileSize = file.size; + reader.thisTargetDir = file.thisTargetDir; + + reader.onload = function(evt) { + uploadInProgress = true; + + var postbody = '--' + boundary + '\r\nContent-Disposition: form-data; name="upload[]"'; + if (evt.target.thisFileName) + postbody += '; filename="' + $.$.utf8encode(evt.target.thisFileName) + '"'; + postbody += '\r\n'; + if (evt.target.thisFileSize) + postbody += "Content-Length: " + evt.target.thisFileSize + "\r\n"; + postbody += "Content-Type: " + evt.target.thisFileType + "\r\n\r\n" + evt.target.result + "\r\n--" + boundary + '\r\nContent-Disposition: form-data; name="dir"\r\n\r\n' + $.$.utf8encode(evt.target.thisTargetDir) + "\r\n--" + boundary + "\r\n--" + boundary + "--\r\n"; + + var xhr = new XMLHttpRequest(); + xhr.thisFileName = evt.target.thisFileName; + + if (xhr.upload) { + xhr.upload.thisFileName = evt.target.thisFileName; + xhr.upload.addEventListener("progress", updateProgress, false); + } + xhr.open('post', _.getURL('upload'), true); + xhr.setRequestHeader('Content-Type', "multipart/form-data; boundary=" + boundary); + //xhr.setRequestHeader('Content-Length', postbody.length); + + xhr.onload = function(e) { + $('#loading').hide(); + if (_.dir == reader.thisTargetDir) + _.fadeFiles(); + uploadInProgress = false; + processUploadQueue(); + if (xhr.responseText.substr(0, 1) != "/") + errors[errors.length] = xhr.responseText; + }; + + xhr.sendAsBinary(postbody); + }; + + reader.onerror = function(evt) { + $('#loading').hide(); + uploadInProgress = false; + processUploadQueue(); + errors[errors.length] = _.label("Failed to upload {filename}!", { + filename: evt.target.thisFileName + }); + }; + + reader.readAsBinaryString(file); + + } else { + + filesCount = 0; + var loop = setInterval(function() { + if (uploadInProgress) return; + boundary = "------multipartdropuploadboundary" + (new Date).getTime(); + uploadQueue = []; + clearInterval(loop); + if (currentFile.thisTargetDir == _.dir) + _.refresh(); + if (errors.length) { + errors = errors.join("\n"); + if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) + _.alert(errors); + errors = []; + } + }, 333); + + }; + + }; + +};/** This file is part of KCFinder project + * + * @desc Miscellaneous functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.orderFiles = function(callBack, selected) { + var order = $.$.kuki.get('order'), + desc = ($.$.kuki.get('orderDesc') == "on"), + a1, b1, arr; + + if (!_.files || !_.files.sort) + _.files = []; + + _.files = _.files.sort(function(a, b) { + if (!order) order = "name"; + + if (order == "date") { + a1 = a.mtime; + b1 = b.mtime; + } else if (order == "type") { + a1 = $.$.getFileExtension(a.name); + b1 = $.$.getFileExtension(b.name); + } else if (order == "size") { + a1 = a.size; + b1 = b.size; + } else { + a1 = a[order].toLowerCase(); + b1 = b[order].toLowerCase(); + } + + if ((order == "size") || (order == "date")) { + if (a1 < b1) return desc ? 1 : -1; + if (a1 > b1) return desc ? -1 : 1; + } + + if (a1 == b1) { + a1 = a.name.toLowerCase(); + b1 = b.name.toLowerCase(); + arr = [a1, b1]; + arr = arr.sort(); + return (arr[0] == a1) ? -1 : 1; + } + + arr = [a1, b1]; + arr = arr.sort(); + if (arr[0] == a1) return desc ? 1 : -1; + return desc ? -1 : 1; + }); + + _.showFiles(callBack, selected); + _.initFiles(); +}; + +_.humanSize = function(size) { + if (size < 1024) { + size = size.toString() + " B"; + } else if (size < 1048576) { + size /= 1024; + size = parseInt(size).toString() + " KB"; + } else if (size < 1073741824) { + size /= 1048576; + size = parseInt(size).toString() + " MB"; + } else if (size < 1099511627776) { + size /= 1073741824; + size = parseInt(size).toString() + " GB"; + } else { + size /= 1099511627776; + size = parseInt(size).toString() + " TB"; + } + return size; +}; + +_.getURL = function(act) { + var url = "browse.php?type=" + encodeURIComponent(_.type) + "&lng=" + encodeURIComponent(_.lang); + if (_.opener.name) + url += "&opener=" + encodeURIComponent(_.opener.name); + if (act) + url += "&act=" + encodeURIComponent(act); + if (_.cms) + url += "&cms=" + encodeURIComponent(_.cms); + return url; +}; + +_.label = function(index, data) { + var label = _.labels[index] ? _.labels[index] : index; + if (data) + $.each(data, function(key, val) { + label = label.replace("{" + key + "}", val); + }); + return label; +}; + +_.check4errors = function(data) { + if (!data.error) + return false; + var msg = data.error.join + ? data.error.join("\n") + : data.error; + _.alert(msg); + return true; +}; + +_.post = function(url, data) { + var html = '
          '; + $.each(data, function(key, val) { + if ($.isArray(val)) + $.each(val, function(i, aval) { + html += ''; + }); + else + html += ''; + }); + html += '
          '; + $('#menu').html(html).show(); + $('#postForm').get(0).submit(); +}; + +_.fadeFiles = function() { + $('#files > div').css({ + opacity: "0.4", + filter: "alpha(opacity=40)" + }); +}; diff --git a/cache/theme_dark.css b/cache/theme_dark.css index bde5f16..fbf6cf8 100644 --- a/cache/theme_dark.css +++ b/cache/theme_dark.css @@ -1 +1,2408 @@ -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}.ui-front{z-index:100}.ui-widget .ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-size:1em}.ui-widget-content{border:1px solid #888;background:#000;color:#aaa}.ui-widget-content a{color:#aaa}.ui-widget-header{border:1px solid #4685b3;color:#fff;font-weight:bold;background:#184977;background:-webkit-linear-gradient(top,#184977,#4685b3);background:-moz-linear-gradient(top,#184977,#4685b3);background:-ms-linear-gradient(top,#184977,#4685b3);background:-o-linear-gradient(top,#184977,#4685b3);background:linear-gradient(to bottom,#184977,#4685b3)}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-widget.ui-state-disabled{transition:.2s;border:1px solid #555;background:#333;background:-webkit-linear-gradient(top,#555,#111);background:-moz-linear-gradient(top,#555,#111);background:-ms-linear-gradient(top,#555,#111);background:-o-linear-gradient(top,#555,#111);background:linear-gradient(to bottom,#555,#111);font-weight:bold;color:#aaa}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{transition:.2s;background:-webkit-linear-gradient(top,#111,#555);background:-moz-linear-gradient(top,#111,#555);background:-ms-linear-gradient(top,#111,#555);background:-o-linear-gradient(top,#111,#555);background:linear-gradient(to bottom,#111,#555)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,.ui-menu .ui-state-focus{transition:.2s;border:1px solid #184977;background:#4685b3;background:-webkit-linear-gradient(top,#184977,#4685b3);background:-moz-linear-gradient(top,#184977,#4685b3);background:-ms-linear-gradient(top,#184977,#4685b3);background:-o-linear-gradient(top,#184977,#4685b3);background:linear-gradient(to bottom,#184977,#4685b3);font-weight:bold;color:#fff}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{transition:.2s;color:#fff;text-decoration:none}.ui-menu .ui-state-active{transition:.2s;border-color:#6b6b6b;background:#6b6b6b;background:-webkit-linear-gradient(top,#6b6b6b,#ababab);background:-moz-linear-gradient(top,#6b6b6b,#ababab);background:-ms-linear-gradient(top,#6b6b6b,#ababab);background:-o-linear-gradient(top,#6b6b6b,#ababab);background:linear-gradient(to bottom,#6b6b6b,#ababab)}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #d5bc2c;box-shadow:inset 0 0 5px #d5bc2c;background:#fff6bf;color:#aaa}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cf7f7f;box-shadow:inset 0 0 5px #cf7f7f;background:#fac4c4;color:#aaa}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a,.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a,.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#aaa}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.5;filter:alpha(opacity=50);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.50;filter:alpha(opacity=50);background-image:none}.ui-state-disabled .ui-icon{filter:alpha(opacity=50)}.ui-state-disabled{cursor:default !important}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:6px;min-height:0}.ui-accordion .ui-accordion-icons,.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:24px}.ui-accordion .ui-accordion-noicons{padding-left:5px}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:5px;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:pointer}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:36px}.ui-button-icons-only{width:50px}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:6px 10px}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:6px;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:6px 10px 6px 28px}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:6px 28px 6px 10px}.ui-button-text-icons .ui-button-text{padding-left:28px;padding-right:28px}input.ui-button{padding:6px 10px}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:7px}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:7px}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-buttonset{margin:0;overflow:auto}.ui-buttonset .ui-button{margin:0;float:left}.ui-datepicker{width:19em;display:none;padding:10px}.ui-datepicker .ui-datepicker-header{position:relative;padding:2px 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:4px;width:20px;height:20px}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:3px}.ui-datepicker .ui-datepicker-prev{left:4px}.ui-datepicker .ui-datepicker-next{right:4px}.ui-datepicker .ui-datepicker-prev-hover{left:3px}.ui-datepicker .ui-datepicker-next-hover{right:3px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 10px;padding:4px 0;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:-2px 2px;padding:0;outline:0}.ui-datepicker table{width:100%;border-collapse:collapse;margin:0;font-size:1em}.ui-datepicker th{padding:3px;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:2px 3px;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:10px -11px -11px -11px;padding:10px;border:1px solid #184977;background:#e4f5ff;overflow:auto}.ui-datepicker .ui-datepicker-buttonpane button{float:right;cursor:pointer;width:auto;overflow:visible;margin:0;padding:6px 10px;font-weight:bold;opacity:1;filter:alpha(opacity=100)}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto;padding:10px}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group .ui-datepicker-header{margin:0}.ui-datepicker-multi .ui-datepicker-group.ui-datepicker-group-last{margin-right:0}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;font-size:0;width:100px}th.ui-datepicker-week-col{color:#215b82}td.ui-datepicker-week-col{text-align:right;padding-right:7px;color:#215b82}td.ui-datepicker-other-month a.ui-state-default{font-weight:bold}th.ui-datepicker-week-end{color:#f44}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:4px;outline:0;box-shadow:0 0 10px #000}.ui-dialog .ui-dialog-titlebar{padding:5px 10px;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:0;padding:1px 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:1em;margin:0 -4px;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;padding:10px}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:0 0 0 5px;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:1px 10px 1px 10px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0;border-color:#777}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:5px 10px;line-height:1.5;min-height:0;font-weight:normal;border-radius:0}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px;transition:none}.ui-menu .ui-state-disabled{font-weight:normal;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu.ui-corner-all.sh-menu{border-radius:4px}.ui-menu.ui-corner-all,.ui-menu.sh-menu.ui-autocomplete.ui-corner-all{border-radius:0}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2.1em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left;margin:0 13px;border-radius:15px}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:18px;height:18px;border-radius:9px;cursor:default;box-shadow:0 0 3px #aaa,inset 0 0 7px #fff,inset 0 0 3px #fff}.ui-slider .ui-slider-handle.ui-state-active{box-shadow:0 0 3px #4685b3,inset 0 0 7px #fff,inset 0 0 3px #fff}.ui-slider .ui-slider-range{position:absolute;z-index:1;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:10px}.ui-slider-horizontal .ui-slider-handle{top:-5px;margin-left:-9px}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:10px;height:150px}.ui-slider-vertical .ui-slider-handle{left:-5px;margin-left:0;margin-bottom:-9px}.ui-slider-vertical .ui-slider-range{left:-1px;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner.ui-widget{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle;background:#fff;background:-webkit-linear-gradient(top,#f0f0f0,#fff);background:-moz-linear-gradient(top,#f0f0f0,#fff);background:-ms-linear-gradient(top,#f0f0f0,#fff);background:-o-linear-gradient(top,#f0f0f0,#fff);background:linear-gradient(to bottom,#f0f0f0,#fff)}.ui-spinner-input{border:0;color:inherit;padding:0;margin:6px 24px 6px 10px;vertical-align:middle;outline:0;background:transparent}.ui-spinner-input{color:#aaa}.ui-spinner-input:focus{color:#000}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative}.ui-tabs .ui-tabs-nav{margin:0;padding:3px 3px 0 3px}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px 3px 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:6px 10px;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em;background:0}body .ui-tooltip{padding:6px 10px;position:absolute;z-index:9999;max-width:300px;color:gray;border-color:#a5a5a5;box-shadow:inset 0 0 4px #a5a5a5,0 0 4px #a5a5a5;background:-webkit-linear-gradient(top,#ddd,#fff);background:-moz-linear-gradient(top,#ddd,#fff);background:-ms-linear-gradient(top,#ddd,#fff);background:-o-linear-gradient(top,#ddd,#fff);background:linear-gradient(to bottom,#ddd,#fff)}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;width:16px;height:16px}.ui-icon,.ui-button.ui-state-active .ui-icon,.ui-dialog .ui-dialog-titlebar-close .ui-icon{background-image:url(img/ui-icons_white.png)}.ui-button .ui-icon{background-image:url(img/ui-icons_grey.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl,.ui-menu .ui-menu-item.ui-menu-item-first a{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr,.ui-menu .ui-menu-item.ui-menu-item-first a{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl,.ui-menu .ui-menu-item.ui-menu-item-last a,.ui-dialog-buttonpane,.ui-datepicker-multi .ui-datepicker-group-first .ui-datepicker-header,.ui-datepicker .ui-datepicker-buttonpane{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br,.ui-menu .ui-menu-item.ui-menu-item-last a,.ui-dialog-buttonpane,.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker .ui-datepicker-buttonpane{border-bottom-right-radius:4px}.ui-widget-overlay{background:rgba(255,255,255,.5)}.ui-widget-shadow{margin:-7px 0 0 -7px;padding:7px;background:rgba(0,0,0,.3);border-radius:8px}.ui-accordion-content-active,.ui-tabs,.ui-slider-range,.ui-datepicker,.ui-dialog{border-color:#4d637c}.ui-slider .ui-slider-range{border:1px solid #4685b3;top:-1px}.ui-progressbar{overflow:visible}.ui-progressbar-value{border:1px solid #4685b3;margin-top:-1px}.ui-button{box-shadow:inset 0 0 3px #555,inset 0 0 6px #555,0 0 3px #000,0 0 2px #000}.ui-button.ui-state-active{box-shadow:inset 0 0 3px #88b9da,0 0 3px #000,0 0 2px #000}.ui-widget-header,.ui-menu-item .ui-state-focus{box-shadow:inset 0 0 3px #88b9da}.ui-state-default,.ui-state-focus,.ui-state-active,.ui-widget-header,fieldset.sh-uniform label,fieldset.sh-uniform legend{text-shadow:1px 0 rgba(0,0,0,.2),-1px 0 rgba(0,0,0,.2),0 -1px rgba(0,0,0,.2),0 1px rgba(0,0,0,.2),1px 1px rgba(0,0,0,.2),-1px -1px rgba(0,0,0,.2),1px -1px rgba(0,0,0,.2),-1px 1px rgba(0,0,0,.2)}.ui-tabs .ui-state-active,.ui-datepicker .ui-state-highlight{text-shadow:none}.ui-datepicker .ui-state-highlight{color:#215b82;border-color:#4685b3;box-shadow:inset 0 0 4px #4685b3;background:#fff;background:-webkit-linear-gradient(top,#dfeef8,#fff);background:-moz-linear-gradient(top,#dfeef8,#fff);background:-ms-linear-gradient(top,#dfeef8,#fff);background:-o-linear-gradient(top,#dfeef8,#fff);background:linear-gradient(to bottom,#dfeef8,#fff)}.ui-progressbar,.ui-slider,.ui-menu{box-shadow:inset 0 0 4px #666,0 0 3px #000,0 0 6px #000;background:#000;background:-webkit-linear-gradient(top,#111,#444);background:-moz-linear-gradient(top,#111,#444);background:-ms-linear-gradient(top,#111,#444);background:-o-linear-gradient(top,#111,#444);background:linear-gradient(to bottom,#111,#444)}.ui-slider,.ui-spinner,.ui-progressbar,.ui-menu{border-color:#555}.ui-datepicker-calendar .ui-state-default{border-radius:3px}.ui-tabs .ui-tabs-nav{margin:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;padding-left:3px}.ui-tabs-active.ui-state-active{background:#fff;background:-webkit-linear-gradient(top,#ccc,#ddd,#eee,#fff,#fff,#fff);background:-moz-linear-gradient(top,#ccc,#ddd,#eee,#fff,#fff,#fff);background:-ms-linear-gradient(top,#ccc,#ddd,#eee,#fff,#fff,#fff);background:-o-linear-gradient(top,#ccc,#ddd,#eee,#fff,#fff,#fff);background:linear-gradient(to bottom,#ccc,#ddd,#eee,#fff,#fff,#fff);box-shadow:inset 0 0 5px #fff,inset 0 0 5px #fff,inset 0 0 5px #fff}.ui-tabs-active.ui-state-active a{color:#215b82}.ui-state-default,.ui-state-default a{outline:0}.ui-datepicker-header,.ui-dialog-titlebar{border-bottom-right-radius:0;border-bottom-left-radius:0;margin:-5px -5px 0 -5px}.ui-datepicker-header{margin:-11px -11px 5px -11px}.ui-datepicker-header a:hover{cursor:pointer}.ui-dialog-titlebar-close.ui-state-default{border-color:transparent;background:0;box-shadow:none}.ui-dialog-titlebar-close.ui-state-default.ui-state-hover{transition:.2s;border:1px solid #555;background:#333;background:-webkit-linear-gradient(top,#555,#111);background:-moz-linear-gradient(top,#555,#111);background:-ms-linear-gradient(top,#555,#111);background:-o-linear-gradient(top,#555,#111);background:linear-gradient(to bottom,#555,#111);box-shadow:inset 0 0 3px #555,inset 0 0 6px #555,0 0 3px #000,0 0 2px #000}.ui-dialog-buttonpane{background:#202d3e;box-shadow:inset 0 0 3px #000,inset 0 0 2px #000;border-top-color:#4d637c;margin:0 -4px -4px -4px;padding:0}.tf-select,.tf-input,.tf-textarea,.tf-multiple,.tf-label,.tf-fieldset legend,.tf-file,.tf-file input,.tf-radio,.tf-checkbox,.tf-button,.tf-input.tf-color,.tf-input.tf-range{font-size:13px;cursor:pointer}.tf-select .tf-selected,.tf-input,.tf-multiple,.tf-textarea,.tf-file .tf-info,.tf-radio,.tf-checkbox{background:#000;background:-webkit-linear-gradient(top,#111,#333);background:-moz-linear-gradient(top,#111,#333);background:-ms-linear-gradient(top,#111,#333);background:-o-linear-gradient(top,#111,#333);background:linear-gradient(to bottom,#111,#333);box-shadow:inset 0 0 4px #555;border:1px solid #666;color:#aaa;border-radius:4px;color:#6b6b6b;padding:6px 10px}.tf-select.tf-focused .tf-selected,.tf-select .tf-menu,.tf-multiple.tf-focused,.tf-input:focus,.tf-textarea:focus,.tf-file.tf-focused .tf-info,.tf-radio.tf-focused,.tf-checkbox.tf-focused{background:#202d3e;background:-webkit-linear-gradient(top,#131427,#273446);background:-moz-linear-gradient(top,#131427,#273446);background:-ms-linear-gradient(top,#131427,#273446);background:-o-linear-gradient(top,#131427,#273446);background:linear-gradient(to bottom,#131427,#273446);box-shadow:inset 0 0 4px #4d637c;border:1px solid #4d637c;color:#fff}.tf-button,.tf-file .tf-button{background:#333;background:-webkit-linear-gradient(top,#555,#111);background:-moz-linear-gradient(top,#555,#111);background:-ms-linear-gradient(top,#555,#111);background:-o-linear-gradient(top,#555,#111);background:linear-gradient(to bottom,#555,#111);box-shadow:inset 0 0 7px #555,inset 0 0 3px #555,0 0 3px #000,0 0 6px #000;border:1px solid #555;border-radius:4px;padding:6px 10px}.tf-file .tf-button,.tf-select .tf-button{box-shadow:inset 0 0 7px #555,inset 0 0 3px #555}.tf-file.tf-focused .tf-button,.tf-button.tf-focused,.tf-select.tf-focused .tf-button{background:#4685b3;background:-webkit-linear-gradient(top,#4685b3,#184977);background:-moz-linear-gradient(top,#4685b3,#184977);background:-ms-linear-gradient(top,#4685b3,#184977);background:-o-linear-gradient(top,#4685b3,#184977);background:linear-gradient(to bottom,#4685b3,#184977);box-shadow:inset 0 0 7px #4e9ed4,inset 0 0 3px #4e9ed4,0 0 3px #000,0 0 6px #000;border-color:#4685b3;color:#fff}.tf-file.tf-focused .tf-button,.tf-select.tf-focused .tf-button{box-shadow:inset 0 0 7px #4e9ed4,inset 0 0 3px #4e9ed4}.tf-select .tf-menu .tf-hover,.tf-multiple .tf-hover,.tf-multiple .tf-selected,.tf-button{color:#fff;text-shadow:1px 0 rgba(0,0,0,.2),-1px 0 rgba(0,0,0,.2),0 -1px rgba(0,0,0,.2),0 1px rgba(0,0,0,.2),1px 1px rgba(0,0,0,.2),-1px -1px rgba(0,0,0,.2),1px -1px rgba(0,0,0,.2),-1px 1px rgba(0,0,0,.2)}.tf-select .tf-selected{border-radius:4px 0 0 4px}.tf-select .tf-button{border-left:0;border-radius:0 4px 4px 0}.tf-select .tf-button span{display:block;background:url('img/ui-icons_grey.png') -64px -15px;width:16px;margin-left:4px;margin-right:5px}.tf-select.tf-focused .tf-button span{background-image:url('img/ui-icons_white.png')}.tf-select .tf-menu{border-radius:0 0 4px 4px}.tf-select .tf-menu div,.tf-multiple div{border:1px solid transparent;border-left-width:0;border-right-width:0;padding:6px 10px;margin-top:-1px}.tf-select .tf-menu .tf-hover,.tf-multiple.tf-focused .tf-hover,.tf-multiple.tf-focused .tf-selected,.tf-select.tf-opened.tf-focused .tf-button{border-color:#4685b3;background:#4685b3;background:-webkit-linear-gradient(top,#184977,#4685b3);background:-moz-linear-gradient(top,#184977,#4685b3);background:-ms-linear-gradient(top,#184977,#4685b3);background:-o-linear-gradient(top,#184977,#4685b3);background:linear-gradient(to bottom,#184977,#4685b3);box-shadow:inset 0 0 7px #4e9ed4,inset 0 0 3px #4e9ed4}.tf-select.tf-opened .tf-button{background:#111;background:-webkit-linear-gradient(top,#555,#111);background:-moz-linear-gradient(top,#555,#111);background:-ms-linear-gradient(top,#555,#111);background:-o-linear-gradient(top,#555,#111);background:linear-gradient(to bottom,#555,#111);box-shadow:inset 0 0 7px #555,inset 0 0 3px #555}.tf-select .tf-menu .tf-group-last,.tf-select .tf-menu div.tf-last{border-bottom-width:0}.tf-select .tf-menu ul{overflow:hidden}.tf-select .tf-menu li.tf-last{margin-bottom:-1px}.tf-select .tf-menu .tf-last{border-radius:0 0 4px 4px}.tf-select.tf-opened .tf-selected{border-radius:4px 0 0 0}.tf-select.tf-opened .tf-button{border-radius:0 4px 0 0}.tf-select .tf-menu li,.tf-multiple.tf-focused li{border-bottom:1px solid #54b0e0;border-top:1px solid #54b0e0;margin:-1px 0}.tf-select .tf-menu li>span,.tf-multiple li>span,.tf-multiple.tf-focused li>span{display:block;padding:6px 10px;text-align:center;font-weight:bold;color:#6b6b6b;background:#a7deff;border-bottom:1px solid #54b0e0;cursor:default;white-space:nowrap}.tf-multiple{padding:0}.tf-multiple li{border:1px solid #54b0e0;border-right:0;border-left:0;margin:-1px 0}.tf-multiple li>span{color:#70a5d1;border-color:#54b0e0;background:#c1ddf5}.tf-multiple .tf-hover,.tf-multiple .tf-selected,.tf-multiple.tf-focused .tf-hover{background:#4685b3;background:-webkit-linear-gradient(top,#184977,#4685b3);background:-moz-linear-gradient(top,#184977,#4685b3);background:-ms-linear-gradient(top,#184977,#4685b3);background:-o-linear-gradient(top,#184977,#4685b3);background:linear-gradient(to bottom,#184977,#4685b3);box-shadow:inset 0 0 7px #4e9ed4,inset 0 0 3px #4e9ed4;border-color:#4685b3}.tf-multiple .tf-hover,.tf-multiple .tf-selected{border:1px solid #54b0e0;border-left:0;border-right:0}.tf-multiple div.tf-first{border-top:0;border-radius:4px 4px 0 0;margin-top:0}.tf-multiple div.tf-last{border-bottom:0;border-radius:0 0 4px 4px}.tf-multiple .tf-group-first{border-top:0;margin-top:0}.tf-multiple li.tf-last,.tf-multiple .tf-group-last{border-bottom:0}.tf-file{width:200px;padding:0;overflow:auto}.tf-file .tf-info,.tf-file.tf-focused .tf-info{padding:6px 10px;border-radius:4px 0 0 4px;border-right:0}.tf-file .tf-button{border-radius:0 4px 4px 0;color:transparent;text-shadow:none;padding:6px 8px}.tf-file .tf-button span{margin:0 0 0 -4px;width:16px;height:16px;display:block;overflow:hidden;background:url('img/ui-icons_grey.png') -16px -96px}.tf-file .tf-button:after{content:"\00a0"}.tf-file input::-webkit-file-upload-button{cursor:pointer}.tf-radio{width:15px;height:15px;padding:0;border-radius:8px}.tf-radio input{width:17px;height:17px;margin:-1px 0 0 -1px;cursor:pointer}.tf-radio span{width:15px;height:15px;display:block;float:right}.tf-radio.tf-checked span{background:url('img/ui-icons_grey.png') -80px -145px}.tf-radio.tf-checked.tf-focused span{background-image:url('img/ui-icons_white.png')}.tf-checkbox{padding:0;width:15px;height:15px;border-radius:3px}.tf-checkbox input{width:17px;height:17px;margin:-1px 0 0 -1px;cursor:pointer}.tf-checkbox.tf-checked span{width:15px;height:15px;display:block;background:url('img/ui-icons_grey.png') -64px -145px;float:right}.tf-checkbox.tf-focused.tf-checked span{background-image:url('img/ui-icons_white.png')}.tf-button{overflow:hidden;padding:0}.tf-button span{margin:3px 7px;float:right}.tf-button input,.tf-button button{cursor:pointer}.tf-input,.tf-textarea{outline:0;cursor:text;margin:0}.tf-input::-webkit-input-placeholder,.tf-textarea::-webkit-input-placeholder{color:#aaa}.tf-input:-moz-placeholder,.tf-textarea:-moz-placeholder{color:#aaa}.tf-input::-moz-placeholder,.tf-textarea::-moz-placeholder{color:#aaa}.tf-input:-ms-input-placeholder,.tf-textarea:-ms-input-placeholder{color:#aaa}.tf-input:focus::-webkit-input-placeholder,.tf-textarea:focus::-webkit-input-placeholder{color:#184977}.tf-input:focus:-moz-placeholder,.tf-textarea:focus:-moz-placeholder{color:#184977}.tf-input:focus::-moz-placeholder,.tf-textarea:focus::-moz-placeholder{color:#184977}.tf-input:focus:-ms-input-placeholder,.tf-textarea:focus:-ms-input-placeholder{color:#184977}.tf-fieldset{color:#aaa;border:1px solid #425064;border-radius:4px;background:#202d3e;box-shadow:inset 0 0 3px #000,inset 0 0 6px #000,0 0 3px #425064,0 0 2px #425064;margin:0 10px 10px 0;padding:10px}.tf-fieldset legend{font-weight:bold;color:#aaa}.tf-label{color:#aaa}.tf-label.tf-focused{color:#fff}.tf-disabled{opacity:.5;filter:alpha(opacity=50)}.tf-disabled,.tf-disabled input,.tf-disabled button,.tf-disabled * *.tf-disabled{cursor:default}.tf-file.tf-disabled input::-webkit-file-upload-button{cursor:pointer}.tf-fieldset.tf-disabled,.tf-form.tf-disabled{opacity:1;filter:alpha(opacity=100)}.tf-input.tf-color{width:30px;padding:0;height:24px}.tf-input.tf-number{text-align:right}.tf-input.tf-range{height:9px;margin:8px 0 7px 0}.tf-input.tf-search,.tf-input.tf-search.tf-readOnly{border-radius:11px}.tf-input.tf-datetime,.tf-input.tf-datetime-local,.tf-input.tf-month,.tf-input.tf-time,.tf-input.tf-week,.tf-input.tf-datetime:focus,.tf-input.tf-datetime-local:focus,.tf-input.tf-month:focus,.tf-input.tf-time:focus,.tf-input.tf-week:focus{padding:1px 5px}*{font-size:13px}body{background:#000;color:#aaa}fieldset td{white-space:nowrap}#folders{margin:5px 5px 0 5px}#files{margin-right:5px}#toolbar a:hover,#toolbar a.hover,span.current,span.regular:hover,span.context,a.drag>span.folder,#clipboard div:hover,div.file:hover,#files div.selected,#files div.selected:hover,tr.selected>td,tr.selected:hover>td,#menu .list div a:hover,#toolbar a.selected{color:#fff;text-shadow:1px 0 rgba(0,0,0,.2),-1px 0 rgba(0,0,0,.2),0 -1px rgba(0,0,0,.2),0 1px rgba(0,0,0,.2),1px 1px rgba(0,0,0,.2),-1px -1px rgba(0,0,0,.2),1px -1px rgba(0,0,0,.2),-1px 1px rgba(0,0,0,.2)}#files div{text-shadow:1px 0 rgba(0,0,0,.2),-1px 0 rgba(0,0,0,.2),0 -1px rgba(0,0,0,.2),0 1px rgba(0,0,0,.2),1px 1px rgba(0,0,0,.2),-1px -1px rgba(0,0,0,.2),1px -1px rgba(0,0,0,.2),-1px 1px rgba(0,0,0,.2)}#files,#folders,#toolbar a.selected{color:#aaa;border:1px solid #425064;border-radius:4px;background:#202d3e;box-shadow:inset 0 0 3px #000,inset 0 0 6px #000,0 0 3px #425064,0 0 2px #425064}#toolbar{padding:5px 0}#toolbar a{color:#949494;margin-right:5px;border:1px solid transparent;outline:0;display:block;float:left;border-radius:4px;padding:0}#toolbar a>span{padding:6px 10px 6px 26px;diaplay:block;float:left;background:no-repeat 6px center}#toolbar a:hover,#toolbar a.hover{color:#fff;border-color:#184977;background:#4685b3;background:-webkit-linear-gradient(top,#4685b3,#184977);background:-moz-linear-gradient(top,#4685b3,#184977);background:-ms-linear-gradient(top,#4685b3,#184977);background:-o-linear-gradient(top,#4685b3,#184977);background:linear-gradient(to bottom,#4685b3,#184977);box-shadow:inset 0 0 3px #88b9da}#toolbar a[href="kcact:upload"] span{background-image:url(img/icons/upload.png)}#toolbar a[href="kcact:refresh"] span{background-image:url(img/icons/refresh.png)}#toolbar a[href="kcact:settings"] span{background-image:url(img/icons/settings.png)}#toolbar a[href="kcact:about"] span{background-image:url(img/icons/about.png)}#toolbar a[href="kcact:maximize"] span{background-image:url(img/icons/maximize.png)}#settings label{cursor:pointer}#settings fieldset{margin-right:5px;margin-bottom:6px;margin-top:-5px;padding:6px}div.folder{padding-top:2px;margin-top:5px;white-space:nowrap}div.folder a{text-decoration:none;cursor:default;outline:0;color:#aaa}span.folder{padding:2px 3px 2px 23px;outline:0;background:no-repeat 3px center;cursor:pointer;border-radius:3px;border:1px solid transparent}span.brace{width:16px;height:16px;outline:0}span.current{transition:.3s;background-image:url(img/tree/folder.png);background-color:#306999;border-color:#306999;box-shadow:inset 0 0 7px #8fd6ea,inset 0 0 3px #8fd6ea,0 0 2px #000,0 0 1px #000}span.regular{transition:.3s;background-image:url(img/tree/folder.png);background-color:transparent}span.regular:hover,span.context,a.drag>span.folder,#clipboard div:hover{transition:.3s;background-color:#333;border-color:#777;box-shadow:inset 0 0 7px #777,inset 0 0 3px #777,0 0 2px #000,0 0 1px #000}span.opened{background-image:url(img/tree/minus.png)}span.closed{background-image:url(img/tree/plus.png)}span.denied{background-image:url(img/tree/denied.png)}div.file{padding:4px;margin:3px;border:1px solid transparent;border-radius:4px}div.file:hover{box-shadow:inset 0 0 7px #555,inset 0 0 3px #555,0 0 3px #000,0 0 6px #000;background:#000;background:-webkit-linear-gradient(top,#111,#555);background:-moz-linear-gradient(top,#111,#555);background:-ms-linear-gradient(top,#111,#555);background:-o-linear-gradient(top,#111,#555);background:linear-gradient(to bottom,#111,#555);border-color:#555}div.file .name{margin-top:4px;font-weight:bold;height:16px;overflow:hidden;padding-bottom:2px}div.file .time{font-size:10px}div.file .size{font-size:10px}#files div.selected,#files div.selected:hover{border-color:#4685b3;background:#4685b3;background:-webkit-linear-gradient(top,#4685b3,#184977);background:-moz-linear-gradient(top,#4685b3,#184977);background:-ms-linear-gradient(top,#4685b3,#184977);background:-o-linear-gradient(top,#4685b3,#184977);background:linear-gradient(to bottom,#4685b3,#184977);box-shadow:inset 0 0 7px #4e9ed4,inset 0 0 3px #4e9ed4,0 0 3px #000,0 0 6px #000}tr.file>td{padding:3px 4px}tr.file:hover>td{background-color:#000;transition:none}tr.selected>td,tr.selected:hover>td{transition:.3s;background-color:#2d5277}tr.file td.name{background-position:2px center;padding-left:22px}a.denied{color:#666;opacity:.5;filter:alpha(opacity:50);cursor:default}a.denied:hover{background-color:#e4e3e2;border-color:transparent;box-shadow:none}#menu .ui-menu a span{background:left center no-repeat;padding-left:20px;white-space:nowrap}#menu a[href="kcact:refresh"] span{background-image:url(img/icons/refresh.png)}#menu a[href="kcact:mkdir"] span{background-image:url(img/icons/folder-new.png)}#menu a[href="kcact:mvdir"] span,#menu a[href="kcact:mv"] span{background-image:url(img/icons/rename.png)}#menu a[href="kcact:rmdir"] span,#menu a[href="kcact:rm"] span,#menu a[href="kcact:rmcbd"] span{background-image:url(img/icons/delete.png)}#menu a[href="kcact:clpbrdadd"] span{background-image:url(img/icons/clipboard-add.png)}#menu a[href="kcact:pick"] span,#menu a[href="kcact:pick_thumb"] span{background-image:url(img/icons/select.png)}#menu a[href="kcact:download"] span{background-image:url(img/icons/download.png)}#menu a[href="kcact:view"] span{background-image:url(img/icons/view.png)}#menu a[href="kcact:cpcbd"] span{background-image:url(img/icons/copy.png)}#menu a[href="kcact:mvcbd"] span{background-image:url(img/icons/move.png)}#menu a[href="kcact:clrcbd"] span{background-image:url(img/icons/clipboard-clear.png)}#clipboard{margin-left:-3px;padding:2px}#clipboard div{background:url(img/icons/clipboard.png) no-repeat center center;border:1px solid transparent;padding:2px;cursor:pointer;border-radius:4px}#clipboard.selected div,#clipboard.selected div:hover{background-color:#306999;border-color:#306999;box-shadow:inset 0 0 7px #8fd6ea,inset 0 0 3px #8fd6ea}#menu .list a,#menu .list a.ui-state-focus{margin:-1px 0 0 -1px;padding:6px 10px;border:1px solid transparent;background:0;border-radius:0;text-shadow:none;box-shadow:none}#menu .list a.first,#menu .list a.first.ui-state-focus{border-radius:4px 4px 0 0}#menu .list a:hover{border-color:#4685b3;background:#4685b3;background:-webkit-linear-gradient(top,#184977,#4685b3);background:-moz-linear-gradient(top,#184977,#4685b3);background:-ms-linear-gradient(top,#184977,#4685b3);background:-o-linear-gradient(top,#184977,#4685b3);background:linear-gradient(to bottom,#184977,#4685b3);box-shadow:inset 0 0 7px #4e9ed4,inset 0 0 3px #4e9ed4}#menu .list{overflow:hidden;max-height:1px;margin-bottom:-1px;padding-bottom:1px}#menu li.div-files{margin:0 0 1px 0}.about{text-align:center}.about div.head{font-weight:bold;font-size:12px;padding:3px 0 8px 0}.about div.head a{background:url(img/kcf_logo.png) no-repeat left center;padding:0 0 0 27px;font-size:17px;outline:0}.about a{text-decoration:none;color:#3665b4}.about a:hover{text-decoration:underline}#checkver{margin:5px 0 10px 0}#loading,#checkver>span.loading{background:url(img/loading.gif);border:1px solid #425064;box-shadow:inset 0 0 3px #000,inset 0 0 6px #000,0 0 3px #425064,0 0 2px #425064;padding:6px 10px;border-radius:4px;color:#aaa}#checkver a{font-weight:normal;padding:3px 3px 3px 20px;background:url(img/icons/download.png) no-repeat left center}.kcfImageViewer .ui-dialog-content{background:#000;cursor:pointer}.kcfImageViewer .img{background:url(img/bg_transparent.png)}.ui-dialog-titlebar.loading{background:url(img/loading.gif);box-shadow:inset 0 0 3px #000,inset 0 0 6px #000;border-color:#425064}.ui-dialog-titlebar.loading .ui-dialog-title{color:#aaa;font-weight:normal}.ui-dialog-titlebar.loading .ui-dialog-titlebar-close .ui-button-icon-primary.ui-icon.ui-icon-closethick{background-image:url(img/ui-icons_grey.png)}#settings .tf-select{margin:3px 5px 6px 0}#settings .tf-selected{padding-top:10px;padding-bottom:11px}#settings .tf-select .tf-button{padding-top:7px;padding-bottom:8px}#loading{margin-right:5px}#loadingDirs{padding:5px 0 1px 24px}#files.drag{background:#ddebf8}#resizer{background:#fff}div.selector#uniform-lang{margin:8px 6px 6px 0}body.msie fieldset,body.trident.rv fieldset{border-radius:0} \ No newline at end of file +/* + +This CSS code is generated from http://ui.sunhater.com +(c)2014 Pavel Tzonkov, sunhater.com. All rights reserved. + +*/ +/*** jQueryUI */ +/** Base */ + +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:alpha(opacity=0); +} + +.ui-front { + z-index: 100; +} + +.ui-widget .ui-widget, +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #888; + background: #000; + color: #aaa; +} +.ui-widget-content a { + color: #aaa; +} +.ui-widget-header { + border: 1px solid #4685b3; + color: #fff; + font-weight: bold; + background: #184977; + background: -webkit-linear-gradient(top, #184977, #4685b3); + background: -moz-linear-gradient(top, #184977, #4685b3); + background: -ms-linear-gradient(top, #184977, #4685b3); + background: -o-linear-gradient(top, #184977, #4685b3); + background: linear-gradient(to bottom, #184977, #4685b3); +} +.ui-widget-header a { + color: #fff; +} + +/* Interaction states +----------------------------------*/ + +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default, +.ui-widget.ui-state-disabled { + transition: .2s; + border: 1px solid #555; + background: #333; + background: -webkit-linear-gradient(top, #555, #111); + background: -moz-linear-gradient(top, #555, #111); + background: -ms-linear-gradient(top, #555, #111); + background: -o-linear-gradient(top, #555, #111); + background: linear-gradient(to bottom, #555, #111); + font-weight: bold; + color: #aaa; +} + +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + transition: .2s; + background: -webkit-linear-gradient(top, #111, #555); + background: -moz-linear-gradient(top, #111, #555); + background: -ms-linear-gradient(top, #111, #555); + background: -o-linear-gradient(top, #111, #555); + background: linear-gradient(to bottom, #111, #555); +} + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +.ui-menu .ui-state-focus { + transition: .2s; + border: 1px solid #184977; + background: #4685b3; + background: -webkit-linear-gradient(top, #184977, #4685b3); + background: -moz-linear-gradient(top, #184977, #4685b3); + background: -ms-linear-gradient(top, #184977, #4685b3); + background: -o-linear-gradient(top, #184977, #4685b3); + background: linear-gradient(to bottom, #184977, #4685b3); + font-weight: bold; + color: #fff; +} + +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited, +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + transition: .2s; + color: #fff; + text-decoration: none; +} + +.ui-menu .ui-state-active { + transition: .2s; + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); +} + +/* Interaction Cues +----------------------------------*/ + +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #d5bc2c; + box-shadow: inset 0 0 5px #d5bc2c; + background: #fff6bf; + color: #aaa; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cf7f7f; + box-shadow: inset 0 0 5px #cf7f7f; + background: #fac4c4; + color: #aaa; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a, +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a, +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #aaa; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .5; + filter:alpha(opacity=50); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .50; + filter:alpha(opacity=50); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:alpha(opacity=50); /* For IE8 - See #6059 */ +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} + + +/** Accordion */ + +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin-top: 2px; + padding: 6px; + min-height: 0; /* support: IE7 */ +} +.ui-accordion .ui-accordion-icons, +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 24px; +} +.ui-accordion .ui-accordion-noicons { + padding-left: 5px; +} + +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: 5px; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em; + border-top: 0; + overflow: auto; +} + + +/** Autocomplete */ + +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: pointer; +} + + +/** Button */ + +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 36px; +} +.ui-button-icons-only { + width: 50px; +} +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: 6px 10px; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: 6px; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 6px 10px 6px 28px; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 6px 28px 6px 10px; +} +.ui-button-text-icons .ui-button-text { + padding-left: 28px; + padding-right: 28px; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: 6px 10px; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: 7px; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: 7px; +} +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} + + +/** Button set */ + +.ui-buttonset { + margin:0; + overflow:auto; +} +.ui-buttonset .ui-button { + margin: 0; + float:left; +} + + +/** Date picker */ + +.ui-datepicker { + width: 19em; + display: none; + padding: 10px; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: 2px 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 4px; + width: 20px; + height: 20px; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 3px; +} +.ui-datepicker .ui-datepicker-prev { + left: 4px; +} +.ui-datepicker .ui-datepicker-next { + right: 4px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 3px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 3px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 10px; + padding: 4px 0; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin:-2px 2px; + padding:0; + outline:0; +} +.ui-datepicker table { + width: 100%; + border-collapse: collapse; + margin: 0; + font-size: 1em; +} +.ui-datepicker th { + padding: 3px; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: 2px 3px; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: 10px -11px -11px -11px; + padding: 10px; + border: 1px solid #184977; + background: #e4f5ff; + overflow: auto; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + cursor: pointer; + width: auto; + overflow: visible; + margin: 0; + padding: 6px 10px; + font-weight: bold; + opacity: 1; + filter: alpha(opacity=100); +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; + padding:10px; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group .ui-datepicker-header { + margin:0; +} +.ui-datepicker-multi .ui-datepicker-group.ui-datepicker-group-last { + margin-right:0; +} + +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} + +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + font-size: 0; + width: 100px; +} +th.ui-datepicker-week-col { + color: #215b82; +} +td.ui-datepicker-week-col { + text-align:right; + padding-right:7px; + color: #215b82; +} +td.ui-datepicker-other-month a.ui-state-default { + font-weight: bold; +} +th.ui-datepicker-week-end { + color: #f44; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} + + +/** Dialog */ + +.ui-dialog { + position: absolute; + top: 0; + left: 0; + padding: 4px; + outline: 0; + box-shadow: 0 0 10px #000; +} +.ui-dialog .ui-dialog-titlebar { + padding: 5px 10px; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: 0; + padding: 1px 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 21px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: 1em; + margin: 0 -4px; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + padding: 10px; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: 0 0 0 5px; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} + + +/** Menu */ + +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: 0; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 1px 10px 1px 10px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; + border-color: #777; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 5px 10px; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; + border-radius:0; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; + transition: none; +} +.ui-menu .ui-state-disabled { + font-weight: normal; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} +.ui-menu.ui-corner-all.sh-menu { + border-radius: 4px; +} +.ui-menu.ui-corner-all, .ui-menu.sh-menu.ui-autocomplete.ui-corner-all { + border-radius: 0; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} + + +/** Progress bar */ + +.ui-progressbar { + height: 2.1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} + + +/** Slider */ + +.ui-slider { + position: relative; + text-align: left; + margin: 0 13px; + border-radius:15px; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 18px; + height: 18px; + border-radius: 9px; + cursor: default; + box-shadow: 0 0 3px #aaa, inset 0 0 7px #fff, inset 0 0 3px #fff; +} +.ui-slider .ui-slider-handle.ui-state-active { + box-shadow: 0 0 3px #4685b3, inset 0 0 7px #fff, inset 0 0 3px #fff; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: 10px; +} +.ui-slider-horizontal .ui-slider-handle { + top: -5px; + margin-left: -9px; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: 10px; + height: 150px; +} +.ui-slider-vertical .ui-slider-handle { + left: -5px; + margin-left: 0; + margin-bottom: -9px; +} +.ui-slider-vertical .ui-slider-range { + left: -1px; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} + + +/** Spinner */ + +.ui-spinner.ui-widget { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} +.ui-spinner-input { + border: none; + color: inherit; + padding: 0; + margin: 6px 24px 6px 10px; + vertical-align: middle; + outline: 0; + background: transparent; +} +.ui-spinner-input { + color: #aaa} +.ui-spinner-input:focus { + color: #000; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to overide default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertical centre icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} + + +/** Tabs */ + +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: 3px 3px 0 3px; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px 3px 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: 6px 10px; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em; + background: none; +} + +/** Tooltip */ + +body .ui-tooltip { + padding: 6px 10px; + position: absolute; + z-index: 9999; + max-width: 300px; + color: #808080; + border-color: #a5a5a5; + box-shadow: inset 0 0 4px #a5a5a5, 0 0 4px #a5a5a5; + background: -webkit-linear-gradient(top, #ddd, #fff); + background: -moz-linear-gradient(top, #ddd, #fff); + background: -ms-linear-gradient(top, #ddd, #fff); + background: -o-linear-gradient(top, #ddd, #fff); + background: linear-gradient(to bottom, #ddd, #fff); +} + +/** Icons */ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; + width: 16px; + height: 16px; +} + +.ui-icon, +.ui-button.ui-state-active .ui-icon, +.ui-dialog .ui-dialog-titlebar-close .ui-icon { + background-image: url(img/ui-icons_white.png); +} + +.ui-button .ui-icon { + background-image: url(img/ui-icons_grey.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/** Misc */ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl, +.ui-menu .ui-menu-item.ui-menu-item-first a { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr, +.ui-menu .ui-menu-item.ui-menu-item-first a { + border-top-right-radius:4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl, +.ui-menu .ui-menu-item.ui-menu-item-last a, +.ui-dialog-buttonpane, +.ui-datepicker-multi .ui-datepicker-group-first .ui-datepicker-header, +.ui-datepicker .ui-datepicker-buttonpane { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br, +.ui-menu .ui-menu-item.ui-menu-item-last a, +.ui-dialog-buttonpane, +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker .ui-datepicker-buttonpane { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: rgba(255,255,255,.5); +} +.ui-widget-shadow { + margin: -7px 0 0 -7px; + padding: 7px; + background: rgba(0,0,0,.3); + border-radius: 8px; +} + +/* SunHater Fixes */ + +.ui-accordion-content-active, .ui-tabs, .ui-slider-range, .ui-datepicker, .ui-dialog { + border-color: #4d637c; +} + +.ui-slider .ui-slider-range { + border: 1px solid #4685b3; + top: -1px +} + +.ui-progressbar { + overflow:visible; +} +.ui-progressbar-value { + border: 1px solid #4685b3; + margin-top: -1px +} + +.ui-button { + box-shadow: inset 0 0 3px #555, inset 0 0 6px #555, 0 0 3px #000, 0 0 2px #000; +} +.ui-button.ui-state-active { + box-shadow: inset 0 0 3px #88b9da, 0 0 3px #000, 0 0 2px #000; +} +.ui-widget-header, +.ui-menu-item .ui-state-focus { + box-shadow: inset 0 0 3px #88b9da; +} + +.ui-state-default, +.ui-state-focus, +.ui-state-active, +.ui-widget-header, +fieldset.sh-uniform label, +fieldset.sh-uniform legend { + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +.ui-tabs .ui-state-active, +.ui-datepicker .ui-state-highlight { + text-shadow: none; +} +.ui-datepicker .ui-state-highlight { + color: #215b82; + border-color: #4685b3; + box-shadow: inset 0 0 4px #4685b3; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} + +.ui-progressbar, .ui-slider, .ui-menu { + box-shadow: inset 0 0 4px #666, 0 0 3px #000, 0 0 6px #000; + background: #000; + background: -webkit-linear-gradient(top, #111, #444); + background: -moz-linear-gradient(top, #111, #444); + background: -ms-linear-gradient(top, #111, #444); + background: -o-linear-gradient(top, #111, #444); + background: linear-gradient(to bottom, #111, #444); +} + +.ui-slider, .ui-spinner, .ui-progressbar, .ui-menu { + border-color: #555; +} + +.ui-datepicker-calendar .ui-state-default { + border-radius: 3px; +} + +.ui-tabs .ui-tabs-nav { + margin: -1px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + padding-left:3px; +} + +.ui-tabs-active.ui-state-active { + background: #fff; + background: -webkit-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -moz-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -ms-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -o-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: linear-gradient(to bottom, #ccc, #ddd, #eee, #fff, #fff, #fff); + box-shadow: inset 0 0 5px #fff, inset 0 0 5px #fff, inset 0 0 5px #fff; +} +.ui-tabs-active.ui-state-active a { + color: #215b82; +} +.ui-state-default, .ui-state-default a { + outline: 0; +} +.ui-datepicker-header, +.ui-dialog-titlebar { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + margin: -5px -5px 0 -5px; +} +.ui-datepicker-header { + margin: -11px -11px 5px -11px; +} + +.ui-datepicker-header a:hover { + cursor: pointer; +} + +.ui-dialog-titlebar-close.ui-state-default { + border-color: transparent; + background: none; + box-shadow: none; +} + +.ui-dialog-titlebar-close.ui-state-default.ui-state-hover { + transition: .2s; + border: 1px solid #555; + background: #333; + background: -webkit-linear-gradient(top, #555, #111); + background: -moz-linear-gradient(top, #555, #111); + background: -ms-linear-gradient(top, #555, #111); + background: -o-linear-gradient(top, #555, #111); + background: linear-gradient(to bottom, #555, #111); + box-shadow: inset 0 0 3px #555, inset 0 0 6px #555, 0 0 3px #000, 0 0 2px #000; +} + +.ui-dialog-buttonpane { + background: #202D3E; + box-shadow: inset 0 0 3px #000, inset 0 0 2px #000; + border-top-color: #4d637c; + margin: 0 -4px -4px -4px; + padding: 0; +} + +/*** Uniform */ +/* Remove default webkit and possible mozilla .search styles. + * Keeping this as :active to remove browser styles */ +div.checker input, +input[type="search"], +input[type="search"]:active { + -moz-appearance: none; + -webkit-appearance: none; +} + +div.selector, +div.selector span, +div.checker span, +div.radio span, +div.uploader, +div.uploader +span.action, +div.button, +div.button span { + -webkit-font-smoothing: antialiased; +} + +div.selector, +div.checker, +div.button, +div.radio, +div.uploader { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + vertical-align: middle; +} + +div.checker span, +div.checker input, +div.radio span, +div.radio input, +div.button span { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + text-align: center; +} + +div.selector select, +div.checker input, +div.button button, +div.button input, +div.button a, +div.radio input, +div.uploader input, +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + outline: 0; +} + +div.selector, +div.selector *, +div.radio, +div.radio *, +div.checker, +div.checker *, +div.uploader, +div.uploader *, +div.button, +div.button * { + margin: 0; + padding: 0; +} + +/* Select */ +div.selector { + padding: 0 1.9em 0 0; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.selector span { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + padding:6px 0 6px 10px; + cursor: pointer; + width: 100%; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.selector .ui-icon { + background: url(img/ui-icons_grey.png) -65px -16px; +} +div.selector select { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + height: 50px; + bottom: 0; + width: 100%; + cursor: pointer; +} + +/* Checkbox */ +div.checker { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 4px; +} +div.checker, +div.checker span, +div.checker input { + width: 15px; + height: 15px; +} +div.checker span.checked { + background: url(img/ui-icons_grey.png) -64px -145px; +} +div.checker input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + cursor: pointer; +} + +/* Radio */ +div.radio { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 9px; +} +div.radio, +div.radio span, +div.radio input { + width: 15px; + height: 15px; +} +div.radio span.checked { + background: url(img/ui-icons_grey.png) -80px -145px; +} +div.radio input { + opacity: 0; + border: 0; + background: none; + cursor: pointer; +} + +/* Upload */ +div.uploader { + cursor: pointer; + position: relative; + overflow: hidden; + border-radius: 4px; +} +div.uploader span.action { + text-align: center; + float: left; + display: inline; + overflow: hidden; + cursor: pointer; + padding: 6px 10px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +div.uploader span.filename { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + float: left; + padding: 6px 10px; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.uploader input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + top: 0; + right: 0; + float: right; + cursor: pointer; + font-size: 100px; +} +div.uploader input::-webkit-file-upload-button { + cursor: pointer; +} +div.uploader.active span.filename, +div.uploader.focus span.filename { + border-right: 1px solid; +} + +/* Button */ +div.button { + cursor: pointer; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.button a, +div.button button, +div.button input { + opacity: 0; + filter: alpha(opacity=0); + display: block; + left: 0; + top: 0; + position: absolute; + margin: 0; + padding: 0; + font-size: 1000px; + cursor: pointer; +} +div.button span { + padding: 0; + margin: 6px 10px; +} + +/* Text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + margin: 0; + border: 1px solid; + border-radius: 4px; +} +input.uniform-input, +textarea.uniform { + padding: 6px 10px; +} +textarea.uniform { + overflow: auto; +} +select.uniform-multiselect { + padding: 5px; +} + + +/** Colorize elements */ + +div.uploader { + border: 1px solid #aaa; +} +div.uploader.active, +div.uploader.focus { + border-color: #184977; +} + +/* Default - text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform, +div.uploader span.filename, +div.selector span { + border-color: #666; + box-shadow: inset 0 0 4px #555; + background: #000; + background: -webkit-linear-gradient(top, #111, #333); + background: -moz-linear-gradient(top, #111, #333); + background: -ms-linear-gradient(top, #111, #333); + background: -o-linear-gradient(top, #111, #333); + background: linear-gradient(to bottom, #111, #333); + color: #aaa; +} + +select.uniform-multiselect option { + color: #aaa; +} + +select.uniform-multiselect.focus option { + color: #000; +} + +/* Focus - text fields */ +input.uniform-input.focus, +select.uniform-multiselect.focus, +textarea.uniform.focus, +div.uploader.active span.filename, +div.uploader.focus span.filename, +div.selector.active span, +div.selector.focus span { + border-color: #4d637c; + box-shadow: inset 0 0 4px #4d637c; + color: #fff; + background: #202D3E; + background: -webkit-linear-gradient(top, #131427, #273446); + background: -moz-linear-gradient(top, #131427, #273446); + background: -ms-linear-gradient(top, #131427, #273446); + background: -o-linear-gradient(top, #131427, #273446); + background: linear-gradient(to bottom, #131427, #273446); +} + +/* Read-only - text fields */ +input.uniform-input[readonly], +textarea.uniform[readonly], +input.uniform-input[readonly]:focus, +textarea.uniform[readonly]:focus { + color: #808080; + border-color: #a5a5a5; + box-shadow: inset 0 0 4px #a5a5a5; + background: -webkit-linear-gradient(top, #ddd, #fff); + background: -moz-linear-gradient(top, #ddd, #fff); + background: -ms-linear-gradient(top, #ddd, #fff); + background: -o-linear-gradient(top, #ddd, #fff); + background: linear-gradient(to bottom, #ddd, #fff); +} + +/* Default - buttons */ +div.selector, +div.button, +div.uploader span.action, +div.radio, +div.checker { + border-color: #555; + background: #333; + background: -webkit-linear-gradient(top, #555, #111); + background: -moz-linear-gradient(top, #555, #111); + background: -ms-linear-gradient(top, #555, #111); + background: -o-linear-gradient(top, #555, #111); + background: linear-gradient(to bottom, #555, #111); + box-shadow: inset 0 0 7px #555, inset 0 0 3px #555, 0 0 3px #000, 0 0 6px #000; +} + +/* Hover - buttons */ +div.selector.hover, +div.button.hover, +div.uploader.hover span.action, +div.radio.hover, +div.checker.hover { + background: #333; + background: -webkit-linear-gradient(top, #111, #555); + background: -moz-linear-gradient(top, #111, #555); + background: -ms-linear-gradient(top, #111, #555); + background: -o-linear-gradient(top, #111, #555); + background: linear-gradient(to bottom, #111, #555); +} + +/* Focus - buttons */ +div.selector.focus, +div.button.focus, +div.uploader.focus span.action, +div.radio.focus, +div.checker.focus { + color: #fff; + border-color: #4685b3; + background: #4685b3; + background: -webkit-linear-gradient(top, #4685b3, #184977); + background: -moz-linear-gradient(top, #4685b3, #184977); + background: -ms-linear-gradient(top, #4685b3, #184977); + background: -o-linear-gradient(top, #4685b3, #184977); + background: linear-gradient(to bottom, #4685b3, #184977); + box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4, 0 0 3px #000, 0 0 6px #000; +} + +/* Active - buttons */ +div.button.active, +div.button.active.hover, +div.button.focus.hover, +div.uploader.active span.action, +div.uploader.active.hover span.action, +div.uploader.focus.hover span.action, +div.radio.active, +div.radio.active.hover, +div.radio.focus.hover, +div.checker.active, +div.checker.active.hover, +div.checker.focus.hover, +div.selector.active, +div.selector.active.hover { + color: #fff; + border-color: #4685b3; + background: #184977; + background: -webkit-linear-gradient(top, #184977, #4685b3); + background: -moz-linear-gradient(top, #184977, #4685b3); + background: -ms-linear-gradient(top, #184977, #4685b3); + background: -o-linear-gradient(top, #184977, #4685b3); + background: linear-gradient(to bottom, #184977, #4685b3); + box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4, 0 0 3px #000, 0 0 6px #000; +} + +div.selector.focus .ui-icon, +div.checker.focus span.checked, +div.radio.focus span.checked, +div.selector.active .ui-icon, +div.checker.active span.checked, +div.radio.active span.checked { + background-image: url(img/ui-icons_white.png); +} + +/* Disabled */ +input.uniform-input[disabled], +select.uniform-multiselect[disabled], +textarea.uniform[disabled], +div.button.disabled, +div.uploader.disabled, +div.radio.disabled, +div.checker.disabled, +div.selector.disabled, +div.selector.disabled.active{ + opacity: .5; + filter: alpha(opacity=50); + cursor: default; +} + +div.selector.disabled select, +div.uploader.disabled input, +div.button.disabled input, +div.button.disabled button, +div.button.disabled a, +div.radio.disabled input, +div.checker.disabled input { + cursor: default; +} + +/* Buttons text */ +div.button span, +div.uploader span.action { + font-weight: bold; + color: #aaa; + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +/* Placeholder colors */ +input.uniform-input::-webkit-input-placeholder, +textarea.uniform::-webkit-input-placeholder { + color: #ababab; +} +input.uniform-input:-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #aaa; +} +input.uniform-input::-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #aaa; +} +input.uniform-input:-ms-input-placeholder, +textarea.uniform:-ms-input-placeholder{ + color: #ababab; +} +input.uniform-input:focus::-webkit-input-placeholder, +textarea.uniform:focus::-webkit-input-placeholder{ + color: #184977; +} +input.uniform-input:focus:-moz-placeholder, +textarea.uniform:focus:-moz-placeholder { + color: #184977; +} +input.uniform-input:focus::-moz-placeholder, +textarea.uniform:focus::-moz-placeholder { + color: #184977; +} +input.uniform-input:focus:-ms-input-placeholder, +textarea.uniform:focus:-ms-input-placeholder { + color: #184977; +} + +/** sh-uniform elements (a shUniform patch must be applied) */ + +fieldset.sh-uniform { + color: #aaa; + border: 1px solid #425064; + border-radius: 4px; + background: #202d3e; + box-shadow: inset 0 0 3px #000, inset 0 0 6px #000, 0 0 3px #425064, 0 0 2px #425064; + margin: 0 10px 10px 0; + padding: 10px; +} +fieldset.sh-uniform legend { + font-weight: bold; + color: #aaa; +} +label.sh-uniform { + color: #aaa; +} + +/*** shCheckset */ + +.shcs { + margin: 0; +} +.shcs > div { + border: 1px solid; + border-top: 0; + padding: 5px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; +} +.shcs > input, .shcs > input:focus, .shcs > input:hover { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + margin:0; +} +.shcs label { + padding: 2px 5px 2px 2px; + border: 1px solid transparent; + border-radius: 4px; + color: #aaa; +} +.shcs > div, .shcs label:hover { + border-color: #aaa; + box-shadow: inset 0 0 4px #aaa; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} +.shcs label:hover { + color: #aaa; + cursor: pointer; +} +.shcs > div.focus, .shcs label.checked { + border-color: #184977; + box-shadow: inset 0 0 4px #4685b3; + color: #000; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} +.shcs label.checked div.checker { + border-color: #4685b3; + background: #4685b3; + background: -webkit-linear-gradient(top, #4685b3, #184977); + background: -moz-linear-gradient(top, #4685b3, #184977); + background: -ms-linear-gradient(top, #4685b3, #184977); + background: -o-linear-gradient(top, #4685b3, #184977); + background: linear-gradient(to bottom, #4685b3, #184977); +} +.shcs label.checked div.checker.hover { + border-color: #4685b3; + background: #184977; + background: -webkit-linear-gradient(top, #184977, #4685b3); + background: -moz-linear-gradient(top, #184977, #4685b3); + background: -ms-linear-gradient(top, #184977, #4685b3); + background: -o-linear-gradient(top, #184977, #4685b3); + background: linear-gradient(to bottom, #184977, #4685b3); +} + +.shcs div.checker.focus { + border-color: #aaa; + background: #aaa; + background: -webkit-linear-gradient(top, #ababab, #aaa); + background: -moz-linear-gradient(top, #ababab, #aaa); + background: -ms-linear-gradient(top, #ababab, #aaa); + background: -o-linear-gradient(top, #ababab, #aaa); + background: linear-gradient(to bottom, #ababab, #aaa); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} + +.shcs div.checker.focus.hover { + border-color: #aaa; + background: #aaa; + background: -webkit-linear-gradient(top, #aaa, #ababab); + background: -moz-linear-gradient(top, #aaa, #ababab); + background: -ms-linear-gradient(top, #aaa, #ababab); + background: -o-linear-gradient(top, #aaa, #ababab); + background: linear-gradient(to bottom, #aaa, #ababab); +} + +.shcs label > span { + position:relative; + margin-left:5px; + top:1px; +}* { + font-size: 13px; +} +body { + background: #000; + color: #aaa; +} +fieldset td { + white-space: nowrap; +} +#folders { + margin: 5px 5px 0 5px; +} +#files { + margin-right: 5px; +} + + +/* SHARED DECLARATIONS */ + +#toolbar a:hover, +#toolbar a.hover, +span.current, +span.regular:hover, +span.context, +#clipboard div:hover, +div.file:hover, +#files div.selected, +#files div.selected:hover, +tr.selected > td, +tr.selected:hover > td, +#menu .list div a:hover, +#toolbar a.selected { + color: #fff; + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} +#files div { + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +#files, +#folders, +#toolbar a.selected { + color: #aaa; + border: 1px solid #425064; + border-radius: 4px; + background: #202d3e; + box-shadow: inset 0 0 3px #000, inset 0 0 6px #000, 0 0 3px #425064, 0 0 2px #425064; +} + +/* TOOLBAR */ +#toolbar { + padding: 5px 0; +} +#toolbar a { + color: #949494; + margin-right: 5px; + border: 1px solid transparent; + outline: none; + display: block; + float: left; + border-radius: 4px; + transition: .3s; + padding:0; +} +#toolbar a > span { + padding: 6px 10px 6px 26px; + diaplay: block; + float:left; + background: no-repeat 6px center; +} +#toolbar a:hover, +#toolbar a.hover { + color: #fff; + border-color: #184977; + background: #4685b3; + background: -webkit-linear-gradient(top, #4685b3, #184977); + background: -moz-linear-gradient(top, #4685b3, #184977); + background: -ms-linear-gradient(top, #4685b3, #184977); + background: -o-linear-gradient(top, #4685b3, #184977); + background: linear-gradient(to bottom, #4685b3, #184977); + box-shadow: inset 0 0 3px #88b9da; + transition: .3s; +} +#toolbar a[href="kcact:upload"] span { + background-image: url(img/icons/upload.png); +} +#toolbar a[href="kcact:refresh"] span { + background-image: url(img/icons/refresh.png); +} +#toolbar a[href="kcact:settings"] span { + background-image: url(img/icons/settings.png); +} +#toolbar a[href="kcact:about"] span { + background-image: url(img/icons/about.png); +} +#toolbar a[href="kcact:maximize"] span { + background-image: url(img/icons/maximize.png); +} + + +/* SETTINGS BAR */ + +#settings label { + cursor: pointer; +} +#settings fieldset { + margin-right:5px; + margin-bottom: 6px; + margin-top:-5px; + padding:6px; +} + + +/* FOLDERS */ + +div.folder { + padding-top: 2px; + margin-top: 5px; + white-space: nowrap; +} +div.folder a { + text-decoration: none; + cursor: default; + outline: none; + color: #aaa; +} +span.folder { + padding: 2px 3px 2px 23px; + outline: none; + background: no-repeat 3px center; + cursor: pointer; + border-radius: 3px; + border: 1px solid transparent; +} +span.brace { + width: 16px; + height: 16px; + outline: none; +} +span.current { + transition: .3s; + background-image: url(img/tree/folder.png); + background-color: #306999; + border-color: #306999; + box-shadow: inset 0 0 7px #8FD6EA, inset 0 0 3px #8FD6EA, 0 0 2px #000, 0 0 1px #000; +} +span.regular { + transition: .3s; + background-image: url(img/tree/folder.png); + background-color: transparent; +} +span.regular:hover, span.context, #clipboard div:hover { + transition: .3s; + background-color: #333; + border-color: #777; + box-shadow: inset 0 0 7px #777, inset 0 0 3px #777, 0 0 2px #000, 0 0 1px #000; +} +span.opened { + background-image: url(img/tree/minus.png); +} +span.closed { + background-image: url(img/tree/plus.png); +} +span.denied { + background-image: url(img/tree/denied.png); +} + + +/* FILES */ + +div.file { + padding: 4px; + margin: 3px; + border: 1px solid transparent; + border-radius: 4px; +} +div.file:hover { + box-shadow: inset 0 0 7px #555, inset 0 0 3px #555, 0 0 3px #000, 0 0 6px #000; + background: #000; + background: -webkit-linear-gradient(top, #111, #555); + background: -moz-linear-gradient(top, #111, #555); + background: -ms-linear-gradient(top, #111, #555); + background: -o-linear-gradient(top, #111, #555); + background: linear-gradient(to bottom, #111, #555); + border-color: #555; +} +div.file .name { + margin-top: 4px; + font-weight: bold; + height: 16px; + overflow: hidden; + padding-bottom:2px; +} +div.file .time { + font-size: 10px; +} +div.file .size { + font-size: 10px; +} +#files div.selected, +#files div.selected:hover { + border-color: #4685b3; + background: #4685b3; + background: -webkit-linear-gradient(top, #4685b3, #184977); + background: -moz-linear-gradient(top, #4685b3, #184977); + background: -ms-linear-gradient(top, #4685b3, #184977); + background: -o-linear-gradient(top, #4685b3, #184977); + background: linear-gradient(to bottom, #4685b3, #184977); + box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4, 0 0 3px #000, 0 0 6px #000; +} +tr.file > td { + padding: 3px 4px; +} +tr.file:hover > td { + background-color: #000; + transition: none; +} +tr.selected > td, +tr.selected:hover > td { + transition: .3s; + background-color: #2d5277; +} +tr.file td.name { + background-position: 2px center; + padding-left: 22px; +} +a.denied { + color: #666; + opacity: 0.5; + filter: alpha(opacity:50); + cursor: default; +} +a.denied:hover { + background-color: #e4e3e2; + border-color: transparent; + box-shadow: none; +} + +/* FILE MENU */ + +#menu .ui-menu a span { + background: left center no-repeat; + padding-left: 20px; + white-space: nowrap; +} +#menu a[href="kcact:refresh"] span { + background-image: url(img/icons/refresh.png); +} +#menu a[href="kcact:mkdir"] span { + background-image: url(img/icons/folder-new.png); +} +#menu a[href="kcact:mvdir"] span, #menu a[href="kcact:mv"] span { + background-image: url(img/icons/rename.png); +} +#menu a[href="kcact:rmdir"] span, #menu a[href="kcact:rm"] span, #menu a[href="kcact:rmcbd"] span { + background-image: url(img/icons/delete.png); +} +#menu a[href="kcact:clpbrdadd"] span { + background-image: url(img/icons/clipboard-add.png); +} +#menu a[href="kcact:pick"] span, #menu a[href="kcact:pick_thumb"] span { + background-image: url(img/icons/select.png); +} +#menu a[href="kcact:download"] span { + background-image: url(img/icons/download.png); +} +#menu a[href="kcact:view"] span { + background-image: url(img/icons/view.png); +} +#menu a[href="kcact:cpcbd"] span { + background-image: url(img/icons/copy.png); +} +#menu a[href="kcact:mvcbd"] span { + background-image: url(img/icons/move.png); +} +#menu a[href="kcact:clrcbd"] span { + background-image: url(img/icons/clipboard-clear.png); +} + +/* CLIPBOARD */ + +#clipboard { + margin-left:-3px; + padding: 2px; +} +#clipboard div { + background: url(img/icons/clipboard.png) no-repeat center center; + border: 1px solid transparent; + padding: 2px; + cursor: pointer; + border-radius: 4px; +} +#clipboard.selected div, #clipboard.selected div:hover { + background-color: #306999; + border-color: #306999; + box-shadow: inset 0 0 7px #8FD6EA, inset 0 0 3px #8FD6EA; +} +#menu .list a, #menu .list a.ui-state-focus { + margin: -1px 0 0 -1px; + padding: 6px 10px; + border: 1px solid transparent; + background: none; + border-radius: 0; + text-shadow: none; + box-shadow: none; +} +#menu .list a.first, #menu .list a.first.ui-state-focus { + border-radius: 4px 4px 0 0; +} +#menu .list a:hover { + border-color: #4685b3; + background: #4685b3; + background: -webkit-linear-gradient(top, #184977, #4685b3); + background: -moz-linear-gradient(top, #184977, #4685b3); + background: -ms-linear-gradient(top, #184977, #4685b3); + background: -o-linear-gradient(top, #184977, #4685b3); + background: linear-gradient(to bottom, #184977, #4685b3); + box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4; +} +#menu .list { + overflow:hidden; + max-height: 1px; + margin-bottom: -1px; + padding-bottom:1px; +} +#menu li.div-files { + margin: 0 0 1px 0; +} + +/* ABOUT DIALOG */ + +.about { + text-align: center; +} +.about div.head { + font-weight: bold; + font-size: 12px; + padding: 3px 0 8px 0; +} +.about div.head a { + background: url(img/kcf_logo.png) no-repeat left center; + padding: 0 0 0 27px; + font-size: 17px; + outline: none; +} + +.about a { + text-decoration: none; + color: #3665b4; +} + +.about a:hover { + text-decoration: underline; +} +#checkver { + margin: 5px 0 10px 0; +} +#loading, #checkver > span.loading { + background: url(img/loading.gif); + border: 1px solid #425064; + box-shadow: inset 0 0 3px #000, inset 0 0 6px #000, 0 0 3px #425064, 0 0 2px #425064; + padding: 6px 10px; + border-radius: 4px; + color: #aaa; +} +#checkver a { + font-weight: normal; + padding: 3px 3px 3px 20px; + background: url(img/icons/download.png) no-repeat left center; +} + +/* IMAGE VIEWER */ + +.ui-dialog-content.kcfImageViewer { + background: #000; + cursor: pointer; +} +.kcfImageViewer .img { + background: url(img/bg_transparent.png); +} + +/* MISC */ + +#loading { + margin-right: 5px; +} +#loadingDirs { + padding: 5px 0 1px 24px; +} +#files.drag { + background: #ddebf8; +} +#resizer { + background: #fff; +} + +/* FIX FIELDSET BORDER RADIUS BUG ON IE */ +body.msie fieldset, +body.trident.rv fieldset { + border-radius: 0; +} \ No newline at end of file diff --git a/cache/theme_dark.js b/cache/theme_dark.js index 628d36f..35e2fbf 100644 --- a/cache/theme_dark.js +++ b/cache/theme_dark.js @@ -1 +1 @@ -$.each(["loading.gif","ui-icons_black.png","ui-icons_grey.png","ui-icons_white.png"],function(b,a){new Image().src="themes/dark/img/"+a}); \ No newline at end of file +new Image().src = 'themes/dark/img/loading.gif'; // preload animated gif diff --git a/cache/theme_default.css b/cache/theme_default.css index 8df51fa..35b2f73 100644 --- a/cache/theme_default.css +++ b/cache/theme_default.css @@ -1 +1,2440 @@ -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}.ui-front{z-index:100}.ui-widget .ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-size:1em}.ui-widget-content{border:1px solid #888;background:#fff;color:#6b6b6b}.ui-widget-content a{color:#6b6b6b}.ui-widget-header{border:1px solid #1b79b8;color:#fff;font-weight:bold;background:#1b79b8;background:-webkit-linear-gradient(top,#1b79b8,#59b5f2);background:-moz-linear-gradient(top,#1b79b8,#59b5f2);background:-ms-linear-gradient(top,#1b79b8,#59b5f2);background:-o-linear-gradient(top,#1b79b8,#59b5f2);background:linear-gradient(to bottom,#1b79b8,#59b5f2)}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-widget.ui-state-disabled{transition:.2s;border:1px solid #6b6b6b;background:#6b6b6b;background:-webkit-linear-gradient(top,#ababab,#6b6b6b);background:-moz-linear-gradient(top,#ababab,#6b6b6b);background:-ms-linear-gradient(top,#ababab,#6b6b6b);background:-o-linear-gradient(top,#ababab,#6b6b6b);background:linear-gradient(to bottom,#ababab,#6b6b6b);font-weight:bold;color:#fff}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{transition:.2s;border:1px solid #6b6b6b;background:#6b6b6b;background:-webkit-linear-gradient(top,#6b6b6b,#ababab);background:-moz-linear-gradient(top,#6b6b6b,#ababab);background:-ms-linear-gradient(top,#6b6b6b,#ababab);background:-o-linear-gradient(top,#6b6b6b,#ababab);background:linear-gradient(to bottom,#6b6b6b,#ababab);font-weight:bold;color:#fff}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,.ui-menu .ui-state-focus{transition:.2s;border:1px solid #1b79b8;background:#1b79b8;background:-webkit-linear-gradient(top,#1b79b8,#59b5f2);background:-moz-linear-gradient(top,#1b79b8,#59b5f2);background:-ms-linear-gradient(top,#1b79b8,#59b5f2);background:-o-linear-gradient(top,#1b79b8,#59b5f2);background:linear-gradient(to bottom,#1b79b8,#59b5f2);font-weight:bold;color:#fff}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{transition:.2s;color:#fff;text-decoration:none}.ui-menu .ui-state-active{transition:.2s;border-color:#6b6b6b;background:#6b6b6b;background:-webkit-linear-gradient(top,#6b6b6b,#ababab);background:-moz-linear-gradient(top,#6b6b6b,#ababab);background:-ms-linear-gradient(top,#6b6b6b,#ababab);background:-o-linear-gradient(top,#6b6b6b,#ababab);background:linear-gradient(to bottom,#6b6b6b,#ababab)}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #d5bc2c;box-shadow:inset 0 0 5px #d5bc2c;background:#fff6bf;color:#6b6b6b}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cf7f7f;box-shadow:inset 0 0 5px #cf7f7f;background:#fac4c4;color:#6b6b6b}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a,.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a,.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#6b6b6b}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.5;filter:alpha(opacity=50);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.50;filter:alpha(opacity=50);background-image:none}.ui-state-disabled .ui-icon{filter:alpha(opacity=50)}.ui-state-disabled{cursor:default !important}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:6px;min-height:0}.ui-accordion .ui-accordion-icons,.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:24px}.ui-accordion .ui-accordion-noicons{padding-left:5px}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:5px;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:pointer}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:36px}.ui-button-icons-only{width:50px}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:6px 10px}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:6px;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:6px 10px 6px 28px}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:6px 28px 6px 10px}.ui-button-text-icons .ui-button-text{padding-left:28px;padding-right:28px}input.ui-button{padding:6px 10px}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:7px}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:7px}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-buttonset{margin:0;overflow:auto}.ui-buttonset .ui-button{margin:0;float:left}.ui-datepicker{width:19em;width:19em;display:none;padding:10px}.ui-datepicker .ui-datepicker-header{position:relative;padding:2px 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:4px;width:20px;height:20px}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:3px}.ui-datepicker .ui-datepicker-prev{left:4px}.ui-datepicker .ui-datepicker-next{right:4px}.ui-datepicker .ui-datepicker-prev-hover{left:3px}.ui-datepicker .ui-datepicker-next-hover{right:3px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 10px;padding:4px 0;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:-2px 2px;padding:0;outline:0}.ui-datepicker table{width:100%;border-collapse:collapse;margin:0;font-size:1em}.ui-datepicker th{padding:3px;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:2px 3px;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:10px -11px -11px -11px;padding:10px;border:1px solid #1b79b8;background:#e4f5ff;overflow:auto}.ui-datepicker .ui-datepicker-buttonpane button{float:right;cursor:pointer;width:auto;overflow:visible;margin:0;padding:6px 10px;font-weight:bold;opacity:1;filter:alpha(opacity=100)}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto;padding:10px}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group .ui-datepicker-header{margin:0}.ui-datepicker-multi .ui-datepicker-group.ui-datepicker-group-last{margin-right:0}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;font-size:0;width:100px}th.ui-datepicker-week-col{color:#215b82}td.ui-datepicker-week-col{text-align:right;padding-right:7px;color:#215b82}td.ui-datepicker-other-month a.ui-state-default{font-weight:bold}th.ui-datepicker-week-end{color:#f44}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:4px;outline:0;box-shadow:0 0 10px #000}.ui-dialog .ui-dialog-titlebar{padding:5px 10px;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:0;padding:1px 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:1em;margin:0 -4px;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;padding:10px}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:0 0 0 5px;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:1px 10px 1px 10px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0;border-color:#bbb}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:5px 10px;line-height:1.5;min-height:0;font-weight:normal;border-radius:0}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px;transition:none}.ui-menu .ui-state-disabled{font-weight:normal;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu.ui-corner-all.sh-menu{border-radius:4px}.ui-menu.ui-corner-all,.ui-menu.sh-menu.ui-autocomplete.ui-corner-all{border-radius:0}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2.1em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left;margin:0 13px;border-radius:15px}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:18px;height:18px;border-radius:9px;cursor:default;box-shadow:0 0 3px #6b6b6b,inset 0 0 7px #fff,inset 0 0 3px #fff}.ui-slider .ui-slider-handle.ui-state-active{box-shadow:0 0 3px #1b79b8,inset 0 0 7px #fff,inset 0 0 3px #fff}.ui-slider .ui-slider-range{position:absolute;z-index:1;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:10px}.ui-slider-horizontal .ui-slider-handle{top:-5px;margin-left:-9px}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:10px;height:150px}.ui-slider-vertical .ui-slider-handle{left:-5px;margin-left:0;margin-bottom:-9px}.ui-slider-vertical .ui-slider-range{left:-1px;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner.ui-widget{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle;background:#fff;background:-webkit-linear-gradient(top,#f0f0f0,#fff);background:-moz-linear-gradient(top,#f0f0f0,#fff);background:-ms-linear-gradient(top,#f0f0f0,#fff);background:-o-linear-gradient(top,#f0f0f0,#fff);background:linear-gradient(to bottom,#f0f0f0,#fff)}.ui-spinner-input{border:0;color:inherit;padding:0;margin:6px 24px 6px 10px;vertical-align:middle;outline:0;background:transparent}.ui-spinner-input{color:#6b6b6b}.ui-spinner-input:focus{color:#000}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative}.ui-tabs .ui-tabs-nav{margin:0;padding:3px 3px 0 3px}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px 3px 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:6px 10px;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em;background:0}body .ui-tooltip{padding:6px 10px;position:absolute;z-index:9999;max-width:300px;color:gray;border-color:#a5a5a5;box-shadow:inset 0 0 4px #a5a5a5,0 0 4px #a5a5a5;background:-webkit-linear-gradient(top,#ddd,#fff);background:-moz-linear-gradient(top,#ddd,#fff);background:-ms-linear-gradient(top,#ddd,#fff);background:-o-linear-gradient(top,#ddd,#fff);background:linear-gradient(to bottom,#ddd,#fff)}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon,.ui-state-highlight .ui-icon,.ui-state-error .ui-icon,.ui-state-error-text .ui-icon,.ui-icon.ui-icon-black{background-image:url(img/ui-icons_black.png)}.ui-widget-header .ui-icon,.ui-state-default .ui-icon,.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-state-active .ui-icon,.ui-icon.ui-icon-white{background-image:url(img/ui-icons_white.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl,.ui-menu .ui-menu-item.ui-menu-item-first a{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr,.ui-menu .ui-menu-item.ui-menu-item-first a{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl,.ui-menu .ui-menu-item.ui-menu-item-last a,.ui-dialog-buttonpane,.ui-datepicker-multi .ui-datepicker-group-first .ui-datepicker-header,.ui-datepicker .ui-datepicker-buttonpane{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br,.ui-menu .ui-menu-item.ui-menu-item-last a,.ui-dialog-buttonpane,.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker .ui-datepicker-buttonpane{border-bottom-right-radius:4px}.ui-widget-overlay{background:rgba(255,255,255,.5)}.ui-widget-shadow{margin:-7px 0 0 -7px;padding:7px;background:rgba(0,0,0,.3);border-radius:8px}.ui-accordion-content-active,.ui-tabs,.ui-slider-range,.ui-datepicker,.ui-dialog{border-color:#1b79b8}.ui-slider .ui-slider-range{border:1px solid #1b79b8;top:-1px}.ui-progressbar{overflow:visible}.ui-progressbar-value{border:1px solid #1b79b8;margin-top:-1px}.ui-accordion-header,.ui-tabs-nav,.ui-button,.ui-tabs li,.ui-slider-handle,.ui-slider-range,.ui-datepicker-header,.ui-datepicker-header a:hover,.ui-datepicker-calendar .ui-state-default,.ui-progressbar-value,.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active,.ui-dialog-titlebar,.ui-dialog-titlebar-close.ui-state-default.ui-state-hover,.ui-datepicker .ui-datepicker-buttonpane button{box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff}.ui-spinner,.ui-menu{box-shadow:inset 0 0 4px #6b6b6b}.ui-accordion-content,.ui-tabs,.ui-dialog-content,.ui-dialog-buttonpane,.ui-datepicker,.ui-datepicker .ui-datepicker-buttonpane{box-shadow:inset 0 0 4px #1b79b8}.ui-state-default,.ui-state-focus,.ui-state-active,.ui-widget-header{text-shadow:1px 0 rgba(0,0,0,.2),-1px 0 rgba(0,0,0,.2),0 -1px rgba(0,0,0,.2),0 1px rgba(0,0,0,.2),1px 1px rgba(0,0,0,.2),-1px -1px rgba(0,0,0,.2),1px -1px rgba(0,0,0,.2),-1px 1px rgba(0,0,0,.2)}.ui-tabs .ui-state-active,.ui-datepicker .ui-state-highlight{text-shadow:none}.ui-datepicker .ui-state-highlight{color:#215b82;border-color:#1b79b8;box-shadow:inset 0 0 4px #1b79b8;background:#fff;background:-webkit-linear-gradient(top,#dfeef8,#fff);background:-moz-linear-gradient(top,#dfeef8,#fff);background:-ms-linear-gradient(top,#dfeef8,#fff);background:-o-linear-gradient(top,#dfeef8,#fff);background:linear-gradient(to bottom,#dfeef8,#fff)}.ui-progressbar,.ui-slider,.ui-menu{box-shadow:inset 0 0 4px #6b6b6b;background:#fff;background:-webkit-linear-gradient(top,#f0f0f0,#fff);background:-moz-linear-gradient(top,#f0f0f0,#fff);background:-ms-linear-gradient(top,#f0f0f0,#fff);background:-o-linear-gradient(top,#f0f0f0,#fff);background:linear-gradient(to bottom,#f0f0f0,#fff)}.ui-slider,.ui-spinner,.ui-progressbar,.ui-menu{border-color:#6b6b6b}.ui-datepicker-calendar .ui-state-default{border-radius:3px}.ui-tabs .ui-tabs-nav{margin:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;padding-left:3px}.ui-tabs-active.ui-state-active{background:#fff;background:-webkit-linear-gradient(top,#ccc,#ddd,#eee,#fff,#fff,#fff);background:-moz-linear-gradient(top,#ccc,#ddd,#eee,#fff,#fff,#fff);background:-ms-linear-gradient(top,#ccc,#ddd,#eee,#fff,#fff,#fff);background:-o-linear-gradient(top,#ccc,#ddd,#eee,#fff,#fff,#fff);background:linear-gradient(to bottom,#ccc,#ddd,#eee,#fff,#fff,#fff);box-shadow:inset 0 0 5px #fff,inset 0 0 5px #fff,inset 0 0 5px #fff}.ui-tabs-active.ui-state-active a{color:#215b82}.ui-state-default,.ui-state-default a{outline:0}.ui-datepicker-header,.ui-dialog-titlebar{border-bottom-right-radius:0;border-bottom-left-radius:0;margin:-5px -5px 0 -5px}.ui-datepicker-header{margin:-11px -11px 5px -11px}.ui-datepicker-header a:hover{cursor:pointer}.ui-dialog-titlebar-close.ui-state-default{border-color:transparent;background:0;box-shadow:none}.ui-dialog-titlebar-close.ui-state-default.ui-state-hover{border-color:#6b6b6b;background:#6b6b6b}.ui-dialog-buttonpane{background:#e4f5ff;border-top-color:#1b79b8;margin:0 -4px -4px -4px;padding:0}.tf-select,.tf-input,.tf-textarea,.tf-multiple,.tf-label,.tf-fieldset legend,.tf-file,.tf-file input,.tf-radio,.tf-checkbox,.tf-button,.tf-input.tf-color,.tf-input.tf-range{font-size:13px;cursor:pointer}.tf-select .tf-selected,.tf-input,.tf-multiple,.tf-textarea,.tf-file .tf-info,.tf-radio,.tf-checkbox{background:#f0f0f0;background:-webkit-linear-gradient(top,#e3e3e3,#fff);background:-moz-linear-gradient(top,#e3e3e3,#fff);background:-ms-linear-gradient(top,#e3e3e3,#fff);background:-o-linear-gradient(top,#e3e3e3,#fff);background:linear-gradient(to bottom,#e3e3e3,#fff);box-shadow:inset 0 0 2px #6b6b6b;border:1px solid #6b6b6b;border-radius:4px;color:#6b6b6b;padding:6px 10px}.tf-select.tf-focused .tf-selected,.tf-select .tf-menu,.tf-multiple.tf-focused,.tf-input:focus,.tf-textarea:focus,.tf-file.tf-focused .tf-info,.tf-radio.tf-focused,.tf-checkbox.tf-focused{background:#d2eaf6;background:-webkit-linear-gradient(top,#d2eaf6,#fff);background:-moz-linear-gradient(top,#d2eaf6,#fff);background:-ms-linear-gradient(top,#d2eaf6,#fff);background:-o-linear-gradient(top,#d2eaf6,#fff);background:linear-gradient(to bottom,#d2eaf6,#fff);box-shadow:inset 0 0 2px #1b79b8;border:1px solid #1b79b8;color:#1b79b8}.tf-button,.tf-file .tf-button{background:#6b6b6b;background:-webkit-linear-gradient(top,#ababab,#6b6b6b);background:-moz-linear-gradient(top,#ababab,#6b6b6b);background:-ms-linear-gradient(top,#ababab,#6b6b6b);background:-o-linear-gradient(top,#ababab,#6b6b6b);background:linear-gradient(to bottom,#ababab,#6b6b6b);box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff;border:1px solid #6b6b6b;border-radius:4px;padding:6px 10px}.tf-file.tf-focused .tf-button,.tf-button.tf-focused,.tf-select.tf-focused .tf-button{background:#1b79b8;background:-webkit-linear-gradient(top,#59b5f2,#1b79b8);background:-moz-linear-gradient(top,#59b5f2,#1b79b8);background:-ms-linear-gradient(top,#59b5f2,#1b79b8);background:-o-linear-gradient(top,#59b5f2,#1b79b8);background:linear-gradient(to bottom,#59b5f2,#1b79b8);border-color:#1b79b8}.tf-select .tf-menu .tf-hover,.tf-multiple .tf-hover,.tf-multiple .tf-selected,.tf-button{color:#fff;text-shadow:1px 0 rgba(0,0,0,.2),-1px 0 rgba(0,0,0,.2),0 -1px rgba(0,0,0,.2),0 1px rgba(0,0,0,.2),1px 1px rgba(0,0,0,.2),-1px -1px rgba(0,0,0,.2),1px -1px rgba(0,0,0,.2),-1px 1px rgba(0,0,0,.2)}.tf-select .tf-selected{border-radius:4px 0 0 4px}.tf-select .tf-button{border-left:0;border-radius:0 4px 4px 0}.tf-select .tf-button span{display:block;background:url('img/ui-icons_white.png') -64px -15px;width:16px;margin-left:4px;margin-right:5px}.tf-select .tf-menu{border-radius:0 0 4px 4px}.tf-select .tf-menu div,.tf-multiple div{border:1px solid transparent;border-left-width:0;border-right-width:0;padding:6px 10px;margin-top:-1px}.tf-select .tf-menu .tf-hover,.tf-multiple.tf-focused .tf-hover,.tf-multiple.tf-focused .tf-selected,.tf-select.tf-opened.tf-focused .tf-button{border-color:#1b79b8;background:#59b5f2;background:-webkit-linear-gradient(top,#1b79b8,#59b5f2);background:-moz-linear-gradient(top,#1b79b8,#59b5f2);background:-ms-linear-gradient(top,#1b79b8,#59b5f2);background:-o-linear-gradient(top,#1b79b8,#59b5f2);background:linear-gradient(to bottom,#1b79b8,#59b5f2);box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff}.tf-select.tf-opened .tf-button{background:#ababab;background:-webkit-linear-gradient(top,#6b6b6b,#ababab);background:-moz-linear-gradient(top,#6b6b6b,#ababab);background:-ms-linear-gradient(top,#6b6b6b,#ababab);background:-o-linear-gradient(top,#6b6b6b,#ababab);background:linear-gradient(to bottom,#6b6b6b,#ababab)}.tf-select .tf-menu .tf-group-last,.tf-select .tf-menu div.tf-last{border-bottom-width:0}.tf-select .tf-menu ul{overflow:hidden}.tf-select .tf-menu li.tf-last{margin-bottom:-1px}.tf-select .tf-menu .tf-last{border-radius:0 0 4px 4px}.tf-select.tf-opened .tf-selected{border-radius:4px 0 0 0}.tf-select.tf-opened .tf-button{border-radius:0 4px 0 0}.tf-select .tf-menu li,.tf-multiple.tf-focused li{border-bottom:1px solid #54b0e0;border-top:1px solid #54b0e0;margin:-1px 0}.tf-select .tf-menu li>span,.tf-multiple li>span,.tf-multiple.tf-focused li>span{display:block;padding:6px 10px;text-align:center;font-weight:bold;color:#6b6b6b;background:#a7deff;border-bottom:1px solid #54b0e0;cursor:default;white-space:nowrap}.tf-multiple{padding:0}.tf-multiple li{border:1px solid #54b0e0;border-right:0;border-left:0;margin:-1px 0}.tf-multiple li>span{color:#70a5d1;border-color:#54b0e0;background:#c1ddf5}.tf-multiple .tf-hover,.tf-multiple .tf-selected,.tf-multiple.tf-focused .tf-hover{background:#b7def2;background:-webkit-linear-gradient(top,#54b0e0,#b7def2);background:-moz-linear-gradient(top,#54b0e0,#b7def2);background:-ms-linear-gradient(top,#54b0e0,#b7def2);background:-o-linear-gradient(top,#54b0e0,#b7def2);background:linear-gradient(to bottom,#54b0e0,#b7def2);box-shadow:inset 0 0 2px #fff,inset 0 0 2px #fff;border-color:#54b0e0}.tf-multiple .tf-hover,.tf-multiple .tf-selected{border:1px solid #54b0e0;border-left:0;border-right:0}.tf-multiple div.tf-first{border-top:0;border-radius:4px 4px 0 0;margin-top:0}.tf-multiple div.tf-last{border-bottom:0;border-radius:0 0 4px 4px}.tf-multiple .tf-group-first{border-top:0;margin-top:0}.tf-multiple li.tf-last,.tf-multiple .tf-group-last{border-bottom:0}.tf-file{width:200px;padding:0;overflow:auto}.tf-file .tf-info,.tf-file.tf-focused .tf-info{padding:6px 10px;border-radius:4px 0 0 4px;border-right:0}.tf-file .tf-button{border-radius:0 4px 4px 0;color:transparent;text-shadow:none;padding:6px 8px}.tf-file .tf-button span{margin:0 0 0 -4px;width:16px;height:16px;display:block;overflow:hidden;background:url('img/ui-icons_white.png') -16px -96px}.tf-file .tf-button:after{content:"\00a0"}.tf-file input::-webkit-file-upload-button{cursor:pointer}.tf-radio{width:15px;height:15px;padding:0;border-radius:8px}.tf-radio input{width:17px;height:17px;margin:-1px 0 0 -1px;cursor:pointer}.tf-radio span{width:15px;height:15px;display:block;float:right}.tf-radio.tf-checked span{background:url('img/ui-icons_black.png') -80px -145px}.tf-radio.tf-checked.tf-focused span{background-image:url('img/ui-icons_blue.png')}.tf-checkbox{padding:0;width:15px;height:15px;border-radius:3px}.tf-checkbox input{width:17px;height:17px;margin:-1px 0 0 -1px;cursor:pointer}.tf-checkbox.tf-checked span{width:15px;height:15px;display:block;background:url('img/ui-icons_black.png') -64px -145px;float:right}.tf-checkbox.tf-focused.tf-checked span{background-image:url('img/ui-icons_blue.png')}.tf-button{overflow:hidden;padding:0}.tf-button span{margin:3px 7px;float:right}.tf-button input,.tf-button button{cursor:pointer}.tf-input,.tf-textarea{outline:0;cursor:text;margin:0}.tf-input::-webkit-input-placeholder,.tf-textarea::-webkit-input-placeholder{color:#bbb}.tf-input:-moz-placeholder,.tf-textarea:-moz-placeholder{color:#aaa}.tf-input::-moz-placeholder,.tf-textarea::-moz-placeholder{color:#aaa}.tf-input:-ms-input-placeholder,.tf-textarea:-ms-input-placeholder{color:#bbb}.tf-input:focus::-webkit-input-placeholder,.tf-textarea:focus::-webkit-input-placeholder{color:#abc7d6}.tf-input:focus:-moz-placeholder,.tf-textarea:focus:-moz-placeholder{color:#54b0e0}.tf-input:focus::-moz-placeholder,.tf-textarea:focus::-moz-placeholder{color:#54b0e0}.tf-input:focus:-ms-input-placeholder,.tf-textarea:focus:-ms-input-placeholder{color:#abc7d6}.tf-input.tf-readOnly::-webkit-input-placeholder,.tf-textarea.tf-readOnly::-webkit-input-placeholder{color:#d4d4d4}.tf-input.tf-readOnly:-moz-placeholder,.tf-textarea.tf-readOnly:-moz-placeholder{color:#dedede}.tf-input.tf-readOnly::-moz-placeholder,.tf-textarea.tf-readOnly::-moz-placeholder{color:#dedede}.tf-input.tf-readOnly:-ms-input-placeholder,.tf-textarea.tf-readOnly:-ms-input-placeholder{color:#d4d4d4}.tf-input.tf-readOnly:focus::-webkit-input-placeholder,.tf-textarea.tf-readOnly:focus::-webkit-input-placeholder{color:#d4d4d4}.tf-input.tf-readOnly:focus:-moz-placeholder,.tf-textarea.tf-readOnly:focus:-moz-placeholder{color:#dedede}.tf-input.tf-readOnly:focus::-moz-placeholder,.tf-textarea.tf-readOnly:focus::-moz-placeholder{color:#dedede}.tf-input.tf-readOnly:focus:-ms-input-placeholder,.tf-textarea.tf-readOnly:focus:-ms-input-placeholder{color:#d4d4d4}.tf-fieldset{border:1px solid #6b6b6b;box-shadow:inset 0 0 4px #6b6b6b;border-radius:4px;background:#fff;background:-webkit-linear-gradient(top,#e3e3e3,#fff);background:-moz-linear-gradient(top,#e3e3e3,#fff);background:-ms-linear-gradient(top,#e3e3e3,#fff);background:-o-linear-gradient(top,#e3e3e3,#fff);background:linear-gradient(to bottom,#e3e3e3,#fff);margin:0 10px 10px 0;padding:10px}.tf-fieldset legend{font-weight:bold;color:#6b6b6b;text-shadow:1px 0 rgba(255,255,255,.5),-1px 0 rgba(255,255,255,.5),0 -1px rgba(255,255,255,.5),0 1px rgba(255,255,255,.5),1px 1px rgba(255,255,255,.5),-1px -1px rgba(255,255,255,.5),1px -1px rgba(255,255,255,.5),-1px 1px rgba(255,255,255,.5),0 0 5px #fff}.tf-label{color:#6b6b6b;margin:0 3px}.tf-label.tf-focused{color:#1b79b8}.tf-disabled{opacity:.5;filter:alpha(opacity=50)}.tf-disabled,.tf-disabled input,.tf-disabled button,.tf-disabled * *.tf-disabled{cursor:default}.tf-file.tf-disabled input::-webkit-file-upload-button{cursor:pointer}.tf-fieldset.tf-disabled,.tf-form.tf-disabled{opacity:1;filter:alpha(opacity=100)}.tf-input.tf-color{width:30px;padding:0;height:24px}.tf-input.tf-number{text-align:right}.tf-input.tf-range{height:9px;margin:8px 0 7px 0}.tf-input.tf-search,.tf-input.tf-search.tf-readOnly{border-radius:11px}.tf-input.tf-datetime,.tf-input.tf-datetime-local,.tf-input.tf-month,.tf-input.tf-time,.tf-input.tf-week,.tf-input.tf-datetime:focus,.tf-input.tf-datetime-local:focus,.tf-input.tf-month:focus,.tf-input.tf-time:focus,.tf-input.tf-week:focus{padding:1px 5px}*{font-size:13px}body{background:#e0e0e0;color:#6b6b6b}fieldset td{white-space:nowrap}#folders{margin:5px 5px 0 5px}#files{margin-right:5px}#toolbar a:hover,#toolbar a.hover,span.current,span.regular:hover,span.context,a.drag>span.folder,#clipboard div:hover,div.file:hover,#files div.selected,#files div.selected:hover,tr.selected>td,tr.selected:hover>td,#menu .list div a:hover{color:#fff;text-shadow:1px 0 rgba(0,0,0,.2),-1px 0 rgba(0,0,0,.2),0 -1px rgba(0,0,0,.2),0 1px rgba(0,0,0,.2),1px 1px rgba(0,0,0,.2),-1px -1px rgba(0,0,0,.2),1px -1px rgba(0,0,0,.2),-1px 1px rgba(0,0,0,.2)}#files,#folders,#toolbar a.selected{border:1px solid #6b6b6b;box-shadow:inset 0 0 4px #6b6b6b;border-radius:4px;background:#fff;background:-webkit-linear-gradient(top,#f0f0f0,#fff);background:-moz-linear-gradient(top,#f0f0f0,#fff);background:-ms-linear-gradient(top,#f0f0f0,#fff);background:-o-linear-gradient(top,#f0f0f0,#fff);background:linear-gradient(to bottom,#f0f0f0,#fff)}#toolbar{padding:5px 0}#toolbar a{color:#6b6b6b;margin-right:5px;border:1px solid transparent;outline:0;display:block;float:left;border-radius:4px;padding:0;background:#e0e0e0}#toolbar a>span{padding:6px 10px 6px 26px;diaplay:block;float:left;background:no-repeat 6px center}#toolbar a:hover,#toolbar a.hover{border-color:#1b79b8;background:#1b79b8;background:-webkit-linear-gradient(top,#59b5f2,#1b79b8);background:-moz-linear-gradient(top,#59b5f2,#1b79b8);background:-ms-linear-gradient(top,#59b5f2,#1b79b8);background:-o-linear-gradient(top,#59b5f2,#1b79b8);background:linear-gradient(to bottom,#59b5f2,#1b79b8);box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff}#toolbar a[href="kcact:upload"] span{background-image:url(img/icons/upload.png)}#toolbar a[href="kcact:refresh"] span{background-image:url(img/icons/refresh.png)}#toolbar a[href="kcact:settings"] span{background-image:url(img/icons/settings.png)}#toolbar a[href="kcact:about"] span{background-image:url(img/icons/about.png)}#toolbar a[href="kcact:maximize"] span{background-image:url(img/icons/maximize.png)}#settings label{cursor:pointer}#settings fieldset{margin-right:5px;margin-bottom:6px;margin-top:-5px;padding:6px}div.folder{padding-top:2px;margin-top:4px;white-space:nowrap}div.folder a{text-decoration:none;cursor:default;outline:0;color:#6b6b6b}span.folder{padding:2px 3px 2px 23px;outline:0;background:no-repeat 3px center;cursor:pointer;border-radius:3px;border:1px solid transparent}span.brace{width:16px;height:16px;outline:0}span.current{transition:.3s;background-image:url(img/tree/folder.png);background-color:#3b98d6;border-color:#3b98d6;box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff}span.regular{transition:.3s;background-image:url(img/tree/folder.png);background-color:transparent}span.regular:hover,span.context,a.drag>span.folder,#clipboard div:hover{transition:.3s;background-color:#c6c6c6;border-color:#c6c6c6;box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff}span.opened{background-image:url(img/tree/minus.png)}span.closed{background-image:url(img/tree/plus.png)}span.denied{background-image:url(img/tree/denied.png)}div.file{padding:4px;margin:3px;border:1px solid transparent;border-radius:4px}div.file:hover{border-color:#aaa;box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff;background:#c6c6c6;background:-webkit-linear-gradient(top,#e7e7e7,#c6c6c6);background:-moz-linear-gradient(top,#e7e7e7,#c6c6c6);background:-ms-linear-gradient(top,#e7e7e7,#c6c6c6);background:-o-linear-gradient(top,#e7e7e7,#c6c6c6);background:linear-gradient(to bottom,#e7e7e7,#c6c6c6)}div.file .name{margin-top:4px;font-weight:bold;height:16px;overflow:hidden;padding-bottom:2px}div.file .time{font-size:10px}div.file .size{font-size:10px}#files div.selected,#files div.selected:hover{border-color:#3b98d6;background:#3b98d6;background:-webkit-linear-gradient(top,#7dc2f2,#3b98d6);background:-moz-linear-gradient(top,#7dc2f2,#3b98d6);background:-ms-linear-gradient(top,#7dc2f2,#3b98d6);background:-o-linear-gradient(top,#7dc2f2,#3b98d6);background:linear-gradient(to bottom,#7dc2f2,#3b98d6);box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff}tr.file>td{padding:3px 4px}tr.file:hover>td{background-color:#ddebf8;transition:none}tr.selected>td,tr.selected:hover>td{transition:.3s;background-color:#5b9bda}tr.file td.name{background-position:2px center;padding-left:22px}a.denied{color:#666;opacity:.5;filter:alpha(opacity:50);cursor:default}a.denied:hover{background-color:#e4e3e2;border-color:transparent;box-shadow:none}#menu .ui-menu a span{background:left center no-repeat;padding-left:20px;white-space:nowrap}#menu a[href="kcact:refresh"] span{background-image:url(img/icons/refresh.png)}#menu a[href="kcact:mkdir"] span{background-image:url(img/icons/folder-new.png)}#menu a[href="kcact:mvdir"] span,#menu a[href="kcact:mv"] span{background-image:url(img/icons/rename.png)}#menu a[href="kcact:rmdir"] span,#menu a[href="kcact:rm"] span,#menu a[href="kcact:rmcbd"] span{background-image:url(img/icons/delete.png)}#menu a[href="kcact:clpbrdadd"] span{background-image:url(img/icons/clipboard-add.png)}#menu a[href="kcact:pick"] span,#menu a[href="kcact:pick_thumb"] span{background-image:url(img/icons/select.png)}#menu a[href="kcact:download"] span{background-image:url(img/icons/download.png)}#menu a[href="kcact:view"] span{background-image:url(img/icons/view.png)}#menu a[href="kcact:cpcbd"] span{background-image:url(img/icons/copy.png)}#menu a[href="kcact:mvcbd"] span{background-image:url(img/icons/move.png)}#menu a[href="kcact:clrcbd"] span{background-image:url(img/icons/clipboard-clear.png)}#clipboard{margin-left:-3px;padding:2px}#clipboard div{background:url(img/icons/clipboard.png) no-repeat center center;border:1px solid transparent;padding:2px;cursor:pointer;border-radius:4px}#clipboard.selected div,#clipboard.selected div:hover{background-color:#3b98d6;border-color:#3b98d6;box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff}#menu .list a,#menu .list a.ui-state-focus{margin:-1px 0 0 -1px;padding:6px 10px;border:1px solid transparent;background:0;border-radius:0;text-shadow:none;box-shadow:none;color:#6b6b6b}#menu .list a.first,#menu .list a.first.ui-state-focus{border-radius:4px 4px 0 0}#menu .list a:hover{border-color:#1b79b8;background:#1b79b8;background:-webkit-linear-gradient(top,#1b79b8,#59b5f2);background:-moz-linear-gradient(top,#1b79b8,#59b5f2);background:-ms-linear-gradient(top,#1b79b8,#59b5f2);background:-o-linear-gradient(top,#1b79b8,#59b5f2);background:linear-gradient(to bottom,#1b79b8,#59b5f2);box-shadow:inset 0 0 7px #fff,inset 0 0 3px #fff}#menu .list{overflow:hidden;max-height:1px;margin-bottom:-1px;padding-bottom:1px}#menu li.div-files{margin:0 0 1px 0}.about{text-align:center}.about div.head{font-weight:bold;font-size:12px;padding:3px 0 8px 0}.about div.head a{background:url(img/kcf_logo.png) no-repeat left center;padding:0 0 0 27px;font-size:17px;outline:0}.about a{text-decoration:none;color:#05f}.about a:hover{text-decoration:underline}#checkver{margin:5px 0 10px 0}#loading,#checkver>span.loading{background:url(img/loading.gif);border:1px solid #3687e2;box-shadow:0 0 3px #3687e2,inset 0 0 4px #fff,inset 0 0 5px #fff;padding:6px 10px;border-radius:4px}#checkver a{font-weight:normal;padding:3px 3px 3px 20px;background:url(img/icons/download.png) no-repeat left center}.kcfImageViewer .ui-dialog-content{cursor:pointer}.kcfImageViewer .img{background:url(img/bg_transparent.png)}.ui-dialog-titlebar.loading{background:url(img/loading.gif)}.ui-dialog-titlebar.loading .ui-dialog-title{color:#6b6b6b;text-shadow:none;font-weight:normal}.ui-dialog-titlebar.loading .ui-dialog-titlebar-close .ui-button-icon-primary.ui-icon.ui-icon-closethick{background-image:url(img/ui-icons_black.png)}#loading{margin-right:5px}#loadingDirs{padding:5px 0 1px 24px}#files.drag{background:#ddebf8}#settings .tf-select{margin:3px 5px 6px 0}#settings .tf-selected{padding-top:10px;padding-bottom:11px}#settings .tf-select .tf-button{padding-top:7px;padding-bottom:8px}body.msie fieldset,body.trident.rv fieldset{border-radius:0} \ No newline at end of file +/* + +This CSS code is generated from http://ui.sunhater.com +(c)2014 Pavel Tzonkov, sunhater.com. All rights reserved. + +*/ +/*** jQueryUI */ +/** Base */ + +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:alpha(opacity=0); +} + +.ui-front { + z-index: 100; +} + +.ui-widget .ui-widget, +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #888; + background: #fff; + color: #6B6B6B; +} +.ui-widget-content a { + color: #6B6B6B; +} +.ui-widget-header { + border: 1px solid #1b79b8; + color: #fff; + font-weight: bold; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); +} +.ui-widget-header a { + color: #fff; +} + +/* Interaction states +----------------------------------*/ + +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default, +.ui-widget.ui-state-disabled { + transition: .2s; + border: 1px solid #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #ababab, #6b6b6b); + background: -moz-linear-gradient(top, #ababab, #6b6b6b); + background: -ms-linear-gradient(top, #ababab, #6b6b6b); + background: -o-linear-gradient(top, #ababab, #6b6b6b); + background: linear-gradient(to bottom, #ababab, #6b6b6b); + font-weight: bold; + color: #fff; +} + +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + transition: .2s; + border: 1px solid #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); + font-weight: bold; + color: #fff; +} + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +.ui-menu .ui-state-focus { + transition: .2s; + border: 1px solid #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); + font-weight: bold; + color: #fff; +} + +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited, +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + transition: .2s; + color: #fff; + text-decoration: none; +} + +.ui-menu .ui-state-active { + transition: .2s; + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); +} + +/* Interaction Cues +----------------------------------*/ + +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #d5bc2c; + box-shadow: inset 0 0 5px #d5bc2c; + background: #fff6bf; + color: #6b6b6b; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cf7f7f; + box-shadow: inset 0 0 5px #cf7f7f; + background: #fac4c4; + color: #6b6b6b; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a, +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a, +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #6b6b6b; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .5; + filter:alpha(opacity=50); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .50; + filter:alpha(opacity=50); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:alpha(opacity=50); /* For IE8 - See #6059 */ +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} + + +/** Accordion */ + +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin-top: 2px; + padding: 6px; + min-height: 0; /* support: IE7 */ +} +.ui-accordion .ui-accordion-icons, +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 24px; +} +.ui-accordion .ui-accordion-noicons { + padding-left: 5px; +} + +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: 5px; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em; + border-top: 0; + overflow: auto; +} + + +/** Autocomplete */ + +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: pointer; +} + + +/** Button */ + +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 36px; +} +.ui-button-icons-only { + width: 50px; +} +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: 6px 10px; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: 6px; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 6px 10px 6px 28px; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 6px 28px 6px 10px; +} +.ui-button-text-icons .ui-button-text { + padding-left: 28px; + padding-right: 28px; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: 6px 10px; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: 7px; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: 7px; +} +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} + + +/** Button set */ + +.ui-buttonset { + margin:0; + overflow:auto; +} +.ui-buttonset .ui-button { + margin: 0; + float:left; +} + + +/** Date picker */ + +.ui-datepicker { + width: 19em; + width: 19em; + display: none; + padding: 10px; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: 2px 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 4px; + width: 20px; + height: 20px; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 3px; +} +.ui-datepicker .ui-datepicker-prev { + left: 4px; +} +.ui-datepicker .ui-datepicker-next { + right: 4px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 3px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 3px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 10px; + padding: 4px 0; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin:-2px 2px; + padding:0; + outline:0; +} +.ui-datepicker table { + width: 100%; + border-collapse: collapse; + margin: 0; + font-size: 1em; +} +.ui-datepicker th { + padding: 3px; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: 2px 3px; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: 10px -11px -11px -11px; + padding: 10px; + border: 1px solid #1b79b8; + background: #e4f5ff; + overflow: auto; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + cursor: pointer; + width: auto; + overflow: visible; + margin: 0; + padding: 6px 10px; + font-weight: bold; + opacity: 1; + filter: alpha(opacity=100); +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; + padding:10px; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group .ui-datepicker-header { + margin:0; +} +.ui-datepicker-multi .ui-datepicker-group.ui-datepicker-group-last { + margin-right:0; +} + +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} + +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + font-size: 0; + width: 100px; +} +th.ui-datepicker-week-col { + color: #215b82; +} +td.ui-datepicker-week-col { + text-align:right; + padding-right:7px; + color: #215b82; +} +td.ui-datepicker-other-month a.ui-state-default { + font-weight: bold; +} +th.ui-datepicker-week-end { + color: #f44; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} + + +/** Dialog */ + +.ui-dialog { + position: absolute; + top: 0; + left: 0; + padding: 4px; + outline: 0; + box-shadow: 0 0 10px #000; +} +.ui-dialog .ui-dialog-titlebar { + padding: 5px 10px; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: 0; + padding: 1px 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 21px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: 1em; + margin: 0 -4px; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + padding: 10px; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: 0 0 0 5px; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} + + +/** Menu */ + +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: 0; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 1px 10px 1px 10px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; + border-color: #bbb; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 5px 10px; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; + border-radius:0; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; + transition: none; +} +.ui-menu .ui-state-disabled { + font-weight: normal; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} +.ui-menu.ui-corner-all.sh-menu { + border-radius: 4px; +} +.ui-menu.ui-corner-all, .ui-menu.sh-menu.ui-autocomplete.ui-corner-all { + border-radius: 0; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} + + +/** Progress bar */ + +.ui-progressbar { + height: 2.1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} + + +/** Slider */ + +.ui-slider { + position: relative; + text-align: left; + margin: 0 13px; + border-radius:15px; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 18px; + height: 18px; + border-radius: 9px; + cursor: default; + box-shadow: 0 0 3px #6b6b6b, inset 0 0 7px #fff, inset 0 0 3px #fff; +} +.ui-slider .ui-slider-handle.ui-state-active { + box-shadow: 0 0 3px #1b79b8, inset 0 0 7px #fff, inset 0 0 3px #fff; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: 10px; +} +.ui-slider-horizontal .ui-slider-handle { + top: -5px; + margin-left: -9px; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: 10px; + height: 150px; +} +.ui-slider-vertical .ui-slider-handle { + left: -5px; + margin-left: 0; + margin-bottom: -9px; +} +.ui-slider-vertical .ui-slider-range { + left: -1px; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} + + +/** Spinner */ + +.ui-spinner.ui-widget { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} +.ui-spinner-input { + border: none; + color: inherit; + padding: 0; + margin: 6px 24px 6px 10px; + vertical-align: middle; + outline: 0; + background: transparent; +} +.ui-spinner-input { + color: #6b6b6b} +.ui-spinner-input:focus { + color: #000; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to overide default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertical centre icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} + + +/** Tabs */ + +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: 3px 3px 0 3px; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px 3px 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: 6px 10px; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em; + background: none; +} + +/** Tooltip */ + +body .ui-tooltip { + padding: 6px 10px; + position: absolute; + z-index: 9999; + max-width: 300px; + color: #808080; + border-color: #a5a5a5; + box-shadow: inset 0 0 4px #a5a5a5, 0 0 4px #a5a5a5; + background: -webkit-linear-gradient(top, #ddd, #fff); + background: -moz-linear-gradient(top, #ddd, #fff); + background: -ms-linear-gradient(top, #ddd, #fff); + background: -o-linear-gradient(top, #ddd, #fff); + background: linear-gradient(to bottom, #ddd, #fff); +} + +/** Icons */ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; + width: 16px; + height: 16px; +} + +.ui-icon, +.ui-widget-content .ui-icon, +.ui-state-highlight .ui-icon, +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon, +.ui-icon.ui-icon-black { + background-image: url(img/ui-icons_black.png); +} + +.ui-widget-header .ui-icon, +.ui-state-default .ui-icon, +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon, +.ui-state-active .ui-icon, +.ui-icon.ui-icon-white { + background-image: url(img/ui-icons_white.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/** Misc */ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl, +.ui-menu .ui-menu-item.ui-menu-item-first a { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr, +.ui-menu .ui-menu-item.ui-menu-item-first a { + border-top-right-radius:4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl, +.ui-menu .ui-menu-item.ui-menu-item-last a, +.ui-dialog-buttonpane, +.ui-datepicker-multi .ui-datepicker-group-first .ui-datepicker-header, +.ui-datepicker .ui-datepicker-buttonpane { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br, +.ui-menu .ui-menu-item.ui-menu-item-last a, +.ui-dialog-buttonpane, +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker .ui-datepicker-buttonpane { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: rgba(255,255,255,.5); +} +.ui-widget-shadow { + margin: -7px 0 0 -7px; + padding: 7px; + background: rgba(0,0,0,.3); + border-radius: 8px; +} + +/* SunHater Fixes */ + +.ui-accordion-content-active, .ui-tabs, .ui-slider-range, .ui-datepicker, .ui-dialog { + border-color: #1b79b8; +} + +.ui-slider .ui-slider-range { + border: 1px solid #1b79b8; + top: -1px +} + +.ui-progressbar { + overflow:visible; +} +.ui-progressbar-value { + border: 1px solid #1b79b8; + margin-top: -1px +} + +.ui-accordion-header, +.ui-tabs-nav, +.ui-button, +.ui-tabs li, +.ui-slider-handle, +.ui-slider-range, +.ui-datepicker-header, +.ui-datepicker-header a:hover, +.ui-datepicker-calendar .ui-state-default, +.ui-progressbar-value, +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active, +.ui-dialog-titlebar, +.ui-dialog-titlebar-close.ui-state-default.ui-state-hover, +.ui-datepicker .ui-datepicker-buttonpane button { + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} + +.ui-spinner, +.ui-menu { + box-shadow: inset 0 0 4px #6b6b6b; +} + +.ui-accordion-content, +.ui-tabs, +.ui-dialog-content, +.ui-dialog-buttonpane, +.ui-datepicker, +.ui-datepicker .ui-datepicker-buttonpane { + box-shadow: inset 0 0 4px #1b79b8; +} + +.ui-state-default, +.ui-state-focus, +.ui-state-active, +.ui-widget-header { + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +.ui-tabs .ui-state-active, +.ui-datepicker .ui-state-highlight { + text-shadow: none; +} +.ui-datepicker .ui-state-highlight { + color: #215b82; + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} + +.ui-progressbar, .ui-slider, .ui-menu { + box-shadow: inset 0 0 4px #6b6b6b; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} + +.ui-slider, .ui-spinner, .ui-progressbar, .ui-menu { + border-color: #6b6b6b; +} + +.ui-datepicker-calendar .ui-state-default { + border-radius: 3px; +} + +.ui-tabs .ui-tabs-nav { + margin: -1px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + padding-left:3px; +} + +.ui-tabs-active.ui-state-active { + background: #fff; + background: -webkit-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -moz-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -ms-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -o-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: linear-gradient(to bottom, #ccc, #ddd, #eee, #fff, #fff, #fff); + box-shadow: inset 0 0 5px #fff, inset 0 0 5px #fff, inset 0 0 5px #fff; +} +.ui-tabs-active.ui-state-active a { + color: #215b82; +} +.ui-state-default, .ui-state-default a { + outline: 0; +} +.ui-datepicker-header, +.ui-dialog-titlebar { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + margin: -5px -5px 0 -5px; +} +.ui-datepicker-header { + margin: -11px -11px 5px -11px; +} + +.ui-datepicker-header a:hover { + cursor: pointer; +} + +.ui-dialog-titlebar-close.ui-state-default { + border-color: transparent; + background: none; + box-shadow: none; +} + +.ui-dialog-titlebar-close.ui-state-default.ui-state-hover { + border-color: #6b6b6b; + background: #6b6b6b} + +.ui-dialog-buttonpane { + background: #e4f5ff; + border-top-color: #1b79b8; + margin: 0 -4px -4px -4px; + padding: 0; +} + +/*** Uniform */ +/* Remove default webkit and possible mozilla .search styles. + * Keeping this as :active to remove browser styles */ +div.checker input, +input[type="search"], +input[type="search"]:active { + -moz-appearance: none; + -webkit-appearance: none; +} + +div.selector, +div.selector span, +div.checker span, +div.radio span, +div.uploader, +div.uploader +span.action, +div.button, +div.button span { + -webkit-font-smoothing: antialiased; +} + +div.selector, +div.checker, +div.button, +div.radio, +div.uploader { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + vertical-align: middle; +} + +div.checker span, +div.checker input, +div.radio span, +div.radio input, +div.button span { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + text-align: center; +} + +div.selector select, +div.checker input, +div.button button, +div.button input, +div.button a, +div.radio input, +div.uploader input, +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + outline: 0; +} + +div.selector, +div.selector *, +div.radio, +div.radio *, +div.checker, +div.checker *, +div.uploader, +div.uploader *, +div.button, +div.button * { + margin: 0; + padding: 0; +} + +/* Select */ +div.selector { + padding: 0 1.9em 0 0; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.selector span { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + padding:6px 0 6px 10px; + cursor: pointer; + width: 100%; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.selector .ui-icon { + background: url(img/ui-icons_white.png) -65px -16px; +} +div.selector select { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + height: 50px; + bottom: 0; + width: 100%; + cursor: pointer; +} + +/* Checkbox */ +div.checker { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 4px; +} +div.checker, +div.checker span, +div.checker input { + width: 15px; + height: 15px; +} +div.checker span.checked { + background: url(img/ui-icons_white.png) -64px -145px; +} +div.checker input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + cursor: pointer; +} + +/* Radio */ +div.radio { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 9px; +} +div.radio, +div.radio span, +div.radio input { + width: 15px; + height: 15px; +} +div.radio span.checked { + background: url(img/ui-icons_white.png) -80px -145px; +} +div.radio input { + opacity: 0; + border: 0; + background: none; + cursor: pointer; +} + +/* Upload */ +div.uploader { + cursor: pointer; + position: relative; + overflow: hidden; + border-radius: 4px; +} +div.uploader span.action { + text-align: center; + float: left; + display: inline; + overflow: hidden; + cursor: pointer; + padding: 6px 10px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +div.uploader span.filename { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + float: left; + padding: 6px 10px; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.uploader input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + top: 0; + right: 0; + float: right; + cursor: pointer; + font-size: 100px; +} +div.uploader input::-webkit-file-upload-button { + cursor: pointer; +} +div.uploader.active span.filename, +div.uploader.focus span.filename { + border-right: 1px solid; +} + +/* Button */ +div.button { + cursor: pointer; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.button a, +div.button button, +div.button input { + opacity: 0; + filter: alpha(opacity=0); + display: block; + left: 0; + top: 0; + position: absolute; + margin: 0; + padding: 0; + font-size: 1000px; + cursor: pointer; +} +div.button span { + padding: 0; + margin: 6px 10px; +} + +/* Text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + margin: 0; + border: 1px solid; + border-radius: 4px; +} +input.uniform-input, +textarea.uniform { + padding: 6px 10px; +} +textarea.uniform { + overflow: auto; +} +select.uniform-multiselect { + padding: 5px; +} + + +/** Colorize elements */ + +div.uploader { + border: 1px solid #6b6b6b; +} +div.uploader.active, +div.uploader.focus { + border-color: #1b79b8; +} + +/* Default - text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform, +div.uploader span.filename, +div.selector span { + border-color: #6b6b6b; + box-shadow: inset 0 0 4px #6b6b6b; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); + color: #6b6b6b; +} + +select.uniform-multiselect option { + color: #6b6b6b; +} + +select.uniform-multiselect.focus option { + color: #000; +} + +/* Focus - text fields */ +input.uniform-input.focus, +select.uniform-multiselect.focus, +textarea.uniform.focus, +div.uploader.active span.filename, +div.uploader.focus span.filename, +div.selector.active span, +div.selector.focus span { + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + color: #000; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} + +/* Read-only - text fields */ +input.uniform-input[readonly], +textarea.uniform[readonly], +input.uniform-input[readonly]:focus, +textarea.uniform[readonly]:focus { + color: #808080; + border-color: #a5a5a5; + box-shadow: inset 0 0 4px #a5a5a5; + background: -webkit-linear-gradient(top, #ddd, #fff); + background: -moz-linear-gradient(top, #ddd, #fff); + background: -ms-linear-gradient(top, #ddd, #fff); + background: -o-linear-gradient(top, #ddd, #fff); + background: linear-gradient(to bottom, #ddd, #fff); +} + +/* Default - buttons */ +div.selector, +div.button, +div.uploader span.action, +div.radio, +div.checker { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #ababab, #6b6b6b); + background: -moz-linear-gradient(top, #ababab, #6b6b6b); + background: -ms-linear-gradient(top, #ababab, #6b6b6b); + background: -o-linear-gradient(top, #ababab, #6b6b6b); + background: linear-gradient(to bottom, #ababab, #6b6b6b); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} + +/* Hover - buttons */ +div.selector.hover, +div.button.hover, +div.uploader.hover span.action, +div.radio.hover, +div.checker.hover { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); +} + +/* Focus - buttons */ +div.selector.focus, +div.button.focus, +div.uploader.focus span.action, +div.radio.focus, +div.checker.focus { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); + background: -moz-linear-gradient(top, #59b5f2, #1b79b8); + background: -ms-linear-gradient(top, #59b5f2, #1b79b8); + background: -o-linear-gradient(top, #59b5f2, #1b79b8); + background: linear-gradient(to bottom, #59b5f2, #1b79b8); +} + +/* Active - buttons */ +div.button.active, +div.button.active.hover, +div.button.focus.hover, +div.uploader.active span.action, +div.uploader.active.hover span.action, +div.uploader.focus.hover span.action, +div.radio.active, +div.radio.active.hover, +div.radio.focus.hover, +div.checker.active, +div.checker.active.hover, +div.checker.focus.hover, +div.selector.active, +div.selector.active.hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); +} + +/* Disabled */ +input.uniform-input[disabled], +select.uniform-multiselect[disabled], +textarea.uniform[disabled], +div.button.disabled, +div.uploader.disabled, +div.radio.disabled, +div.checker.disabled, +div.selector.disabled, +div.selector.disabled.active{ + opacity: .5; + filter: alpha(opacity=50); + cursor: default; +} + +div.selector.disabled select, +div.uploader.disabled input, +div.button.disabled input, +div.button.disabled button, +div.button.disabled a, +div.radio.disabled input, +div.checker.disabled input { + cursor: default; +} + +/* Buttons text */ +div.button span, +div.uploader span.action { + font-weight: bold; + color: #fff; + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +/* Placeholder colors */ +input.uniform-input::-webkit-input-placeholder, +textarea.uniform::-webkit-input-placeholder { + color: #ababab; +} +input.uniform-input:-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #6b6b6b; +} +input.uniform-input::-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #6b6b6b; +} +input.uniform-input:-ms-input-placeholder, +textarea.uniform:-ms-input-placeholder{ + color: #ababab; +} +input.uniform-input:focus::-webkit-input-placeholder, +textarea.uniform:focus::-webkit-input-placeholder{ + color: #59b5f2; +} +input.uniform-input:focus:-moz-placeholder, +textarea.uniform:focus:-moz-placeholder { + color: #1b79b8; +} +input.uniform-input:focus::-moz-placeholder, +textarea.uniform:focus::-moz-placeholder { + color: #1b79b8; +} +input.uniform-input:focus:-ms-input-placeholder, +textarea.uniform:focus:-ms-input-placeholder { + color: #59b5f2; +} + +/** sh-uniform elements (a shUniform patch must be applied) */ + +fieldset.sh-uniform { + border: 1px solid #6B6B6B; + box-shadow: inset 0 0 4px #6B6B6B; + border-radius: 4px; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); + margin: 0 10px 10px 0; + padding: 10px; +} +fieldset.sh-uniform legend { + font-weight: bold; + color: #6B6B6B; + text-shadow: + 1px 0 rgba(255,255,255,.5), + -1px 0 rgba(255,255,255,.5), + 0 -1px rgba(255,255,255,.5), + 0 1px rgba(255,255,255,.5), + 1px 1px rgba(255,255,255,.5), + -1px -1px rgba(255,255,255,.5), + 1px -1px rgba(255,255,255,.5), + -1px 1px rgba(255,255,255,.5), + 0 0 5px #fff; +} +label.sh-uniform { + color: #6b6b6b; +} + +/*** shCheckset */ + +.shcs { + margin: 0; +} +.shcs > div { + border: 1px solid; + border-top: 0; + padding: 5px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; +} +.shcs > input, .shcs > input:focus, .shcs > input:hover { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + margin:0; +} +.shcs label { + padding: 2px 5px 2px 2px; + border: 1px solid transparent; + border-radius: 4px; + color: #6b6b6b; +} +.shcs > div, .shcs label:hover { + border-color: #6b6b6b; + box-shadow: inset 0 0 4px #6b6b6b; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} +.shcs label:hover { + color: #6b6b6b; + cursor: pointer; +} +.shcs > div.focus, .shcs label.checked { + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + color: #000; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} +.shcs label.checked div.checker { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); + background: -moz-linear-gradient(top, #59b5f2, #1b79b8); + background: -ms-linear-gradient(top, #59b5f2, #1b79b8); + background: -o-linear-gradient(top, #59b5f2, #1b79b8); + background: linear-gradient(to bottom, #59b5f2, #1b79b8); +} +.shcs label.checked div.checker.hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); +} + +.shcs div.checker.focus { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #ababab, #6b6b6b); + background: -moz-linear-gradient(top, #ababab, #6b6b6b); + background: -ms-linear-gradient(top, #ababab, #6b6b6b); + background: -o-linear-gradient(top, #ababab, #6b6b6b); + background: linear-gradient(to bottom, #ababab, #6b6b6b); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} + +.shcs div.checker.focus.hover { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); +} + +.shcs label > span { + position:relative; + margin-left:5px; + top:1px; +}* { + font-size: 13px; +} +body { + background: #e0e0e0; + color: #6B6B6B; +} +fieldset td { + white-space: nowrap; +} +#folders { + margin: 5px 5px 0 5px; +} +#files { + margin-right: 5px; +} + + +/* SHARED DECLARATIONS */ + +#toolbar a:hover, +#toolbar a.hover, +span.current, +span.regular:hover, +span.context, +#clipboard div:hover, +div.file:hover, +#files div.selected, +#files div.selected:hover, +tr.selected > td, +tr.selected:hover > td, +#menu .list div a:hover { + color: #fff; + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +#files, +#folders, +#toolbar a.selected { + border: 1px solid #6B6B6B; + box-shadow: inset 0 0 4px #6B6B6B; + border-radius: 4px; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} + +/* TOOLBAR */ + +#toolbar { + padding: 5px 0; +} +#toolbar a { + color: #6b6b6b; + margin-right: 5px; + border: 1px solid transparent; + outline: none; + display: block; + float: left; + border-radius: 4px; + transition: .3s; + padding:0; + background: #E0E0E0; +} +#toolbar a > span { + padding: 6px 10px 6px 26px; + diaplay: block; + float:left; + background: no-repeat 6px center; +} +#toolbar a:hover, +#toolbar a.hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); + background: -moz-linear-gradient(top, #59b5f2, #1b79b8); + background: -ms-linear-gradient(top, #59b5f2, #1b79b8); + background: -o-linear-gradient(top, #59b5f2, #1b79b8); + background: linear-gradient(to bottom, #59b5f2, #1b79b8); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +#toolbar a:hover, +#toolbar a.hover { + transition: .3s; +} +#toolbar a[href="kcact:upload"] span { + background-image: url(img/icons/upload.png); +} +#toolbar a[href="kcact:refresh"] span { + background-image: url(img/icons/refresh.png); +} +#toolbar a[href="kcact:settings"] span { + background-image: url(img/icons/settings.png); +} +#toolbar a[href="kcact:about"] span { + background-image: url(img/icons/about.png); +} +#toolbar a[href="kcact:maximize"] span { + background-image: url(img/icons/maximize.png); +} + + +/* SETTINGS BAR */ + +#settings label { + cursor: pointer; +} +#settings fieldset { + margin-right:5px; + margin-bottom: 6px; + margin-top:-5px; + padding:6px; +} +#settings fieldset:hover { + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + background: #dfeef8; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} +#settings fieldset:hover legend, +#settings fieldset:hover label { + color: #215b82; +} + + +/* FOLDERS */ + +div.folder { + padding-top: 2px; + margin-top: 4px; + white-space: nowrap; +} +div.folder a { + text-decoration: none; + cursor: default; + outline: none; + color: #6b6b6b; +} +span.folder { + padding: 2px 3px 2px 23px; + outline: none; + background: no-repeat 3px center; + cursor: pointer; + border-radius: 3px; + border: 1px solid transparent; +} +span.brace { + width: 16px; + height: 16px; + outline: none; +} +span.current { + transition: .3s; + background-image: url(img/tree/folder.png); + background-color: #3b98d6; + border-color: #3b98d6; + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +span.regular { + transition: .3s; + background-image: url(img/tree/folder.png); + background-color: transparent; +} +span.regular:hover, span.context, #clipboard div:hover { + transition: .3s; + background-color: #c6c6c6; + border-color: #c6c6c6; + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +span.opened { + background-image: url(img/tree/minus.png); +} +span.closed { + background-image: url(img/tree/plus.png); +} +span.denied { + background-image: url(img/tree/denied.png); +} + + +/* FILES */ + +div.file { + padding: 4px; + margin: 3px; + border: 1px solid transparent; + border-radius: 4px; +} +div.file:hover { + border-color: #aaa; + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; + background: #c6c6c6; + background: -webkit-linear-gradient(top, #e7e7e7, #c6c6c6); + background: -moz-linear-gradient(top, #e7e7e7, #c6c6c6); + background: -ms-linear-gradient(top, #e7e7e7, #c6c6c6); + background: -o-linear-gradient(top, #e7e7e7, #c6c6c6); + background: linear-gradient(to bottom, #e7e7e7, #c6c6c6); +} +div.file .name { + margin-top: 4px; + font-weight: bold; + height: 16px; + overflow: hidden; + padding-bottom: 2px; +} +div.file .time { + font-size: 10px; +} +div.file .size { + font-size: 10px; +} +#files div.selected, +#files div.selected:hover { + border-color: #3b98d6; + background: #3b98d6; + background: -webkit-linear-gradient(top, #7dc2f2, #3b98d6); + background: -moz-linear-gradient(top, #7dc2f2, #3b98d6); + background: -ms-linear-gradient(top, #7dc2f2, #3b98d6); + background: -o-linear-gradient(top, #7dc2f2, #3b98d6); + background: linear-gradient(to bottom, #7dc2f2, #3b98d6); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +tr.file > td { + padding: 3px 4px; +} +tr.file:hover > td { + background-color: #ddebf8; + transition: none; +} +tr.selected > td, +tr.selected:hover > td { + transition: .3s; + background-color: #5b9bda; +} +tr.file td.name { + background-position: 2px center; + padding-left: 22px; +} +a.denied { + color: #666; + opacity: 0.5; + filter: alpha(opacity:50); + cursor: default; +} +a.denied:hover { + background-color: #e4e3e2; + border-color: transparent; + box-shadow: none; +} + +/* FILE MENU */ + +#menu .ui-menu a span { + background: left center no-repeat; + padding-left: 20px; + white-space: nowrap; +} +#menu a[href="kcact:refresh"] span { + background-image: url(img/icons/refresh.png); +} +#menu a[href="kcact:mkdir"] span { + background-image: url(img/icons/folder-new.png); +} +#menu a[href="kcact:mvdir"] span, #menu a[href="kcact:mv"] span { + background-image: url(img/icons/rename.png); +} +#menu a[href="kcact:rmdir"] span, #menu a[href="kcact:rm"] span, #menu a[href="kcact:rmcbd"] span { + background-image: url(img/icons/delete.png); +} +#menu a[href="kcact:clpbrdadd"] span { + background-image: url(img/icons/clipboard-add.png); +} +#menu a[href="kcact:pick"] span, #menu a[href="kcact:pick_thumb"] span { + background-image: url(img/icons/select.png); +} +#menu a[href="kcact:download"] span { + background-image: url(img/icons/download.png); +} +#menu a[href="kcact:view"] span { + background-image: url(img/icons/view.png); +} +#menu a[href="kcact:cpcbd"] span { + background-image: url(img/icons/copy.png); +} +#menu a[href="kcact:mvcbd"] span { + background-image: url(img/icons/move.png); +} +#menu a[href="kcact:clrcbd"] span { + background-image: url(img/icons/clipboard-clear.png); +} + +/* CLIPBOARD */ + +#clipboard { + margin-left:-3px; + padding: 2px; +} +#clipboard div { + background: url(img/icons/clipboard.png) no-repeat center center; + border: 1px solid transparent; + padding: 2px; + cursor: pointer; + border-radius: 4px; +} +#clipboard.selected div, #clipboard.selected div:hover { + background-color: #3b98d6; + border-color: #3b98d6; + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +#menu .list a, #menu .list a.ui-state-focus { + margin: -1px 0 0 -1px; + padding: 6px 10px; + border: 1px solid transparent; + background: none; + border-radius: 0; + text-shadow: none; + box-shadow: none; + color: #6b6b6b; +} +#menu .list a.first, #menu .list a.first.ui-state-focus { + border-radius: 4px 4px 0 0; +} +#menu .list a:hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +#menu .list { + overflow:hidden; + max-height: 1px; + margin-bottom: -1px; + padding-bottom:1px; +} +#menu li.div-files { + margin: 0 0 1px 0; +} + +/* ABOUT DIALOG */ + +.about { + text-align: center; +} +.about div.head { + font-weight: bold; + font-size: 12px; + padding: 3px 0 8px 0; +} +.about div.head a { + background: url(img/kcf_logo.png) no-repeat left center; + padding: 0 0 0 27px; + font-size: 17px; + outline: none; +} + +.about a { + text-decoration: none; + color: #0055ff; +} + +.about a:hover { + text-decoration: underline; +} +#checkver { + margin: 5px 0 10px 0; +} +#loading, #checkver > span.loading { + background: url(img/loading.gif); + border: 1px solid #3687e2; + box-shadow: 0 0 3px #3687e2, inset 0 0 4px #fff, inset 0 0 5px #fff; + padding: 6px 10px; + border-radius: 4px; +} +#checkver a { + font-weight: normal; + padding: 3px 3px 3px 20px; + background: url(img/icons/download.png) no-repeat left center; +} + +/* IMAGE VIEWER */ + +.ui-dialog-content.kcfImageViewer { + background: #000; + cursor: pointer; +} +.kcfImageViewer .img { + background: url(img/bg_transparent.png); +} + +/* MISC */ + +#loading { + margin-right: 5px; +} +#loadingDirs { + padding: 5px 0 1px 24px; +} +#files.drag { + background: #ddebf8; +} + +/* FIX FIELDSET BORDER RADIUS BUG ON IE */ +body.msie fieldset, +body.trident.rv fieldset { + border-radius: 0; +} \ No newline at end of file diff --git a/cache/theme_default.js b/cache/theme_default.js index 2c4652d..518f854 100644 --- a/cache/theme_default.js +++ b/cache/theme_default.js @@ -1 +1 @@ -$.each(["loading.gif","ui-icons_black.png","ui-icons_blue.png","ui-icons_white.png"],function(b,a){new Image().src="themes/default/img/"+a}); \ No newline at end of file +new Image().src = 'themes/default/img/loading.gif'; // preload animated gif diff --git a/conf/config.php b/conf/config.php index 7636437..63c1bfc 100644 --- a/conf/config.php +++ b/conf/config.php @@ -1,118 +1,135 @@ - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -/* IMPORTANT!!! Do not comment or remove uncommented settings in this file - even if you are using session configuration. - See http://kcfinder.sunhater.com/install for setting descriptions */ - -return array( - +$GLOBALS["init_options"] = array( + "admin_area" => TRUE +); -// GENERAL SETTINGS +require_once '../../prodevKCFinderConfig.php'; +/** This file is part of KCFinder project + * + * @desc Base configuration file + * @package KCFinder + * @version 2.51 + * @author Pavel Tzonkov + * @copyright 2010, 2011 KCFinder Project + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 + * @link http://kcfinder.sunhater.com + */ + +// IMPORTANT!!! Do not remove uncommented settings in this file even if +// you are using session configuration. +// See http://kcfinder.sunhater.com/install for setting descriptions + +$_CONFIG = array( + + + // GENERAL SETTINGS + 'disabled' => true, 'uploadURL' => "upload", 'uploadDir' => "", 'theme' => "default", - + 'types' => array( - - // (F)CKEditor types - 'files' => "", - 'flash' => "swf", - 'images' => "*img", - - // TinyMCE types - 'file' => "", - 'media' => "swf flv avi mpg mpeg qt mov wmv asf rm", - 'image' => "*img", + + // (F)CKEditor types + 'files' => "", + 'flash' => "swf", + 'images' => "*img", + + // TinyMCE types + 'file' => "", + 'media' => "swf flv avi mpg mpeg qt mov wmv asf rm", + 'image' => "*img" ), - - -// IMAGE SETTINGS - + + + // IMAGE SETTINGS + 'imageDriversPriority' => "imagick gmagick gd", 'jpegQuality' => 90, 'thumbsDir' => ".thumbs", - + 'maxImageWidth' => 0, 'maxImageHeight' => 0, - + 'thumbWidth' => 100, 'thumbHeight' => 100, - + 'watermark' => "", - - -// DISABLE / ENABLE SETTINGS - + + + // DISABLE / ENABLE SETTINGS + 'denyZipDownload' => false, 'denyUpdateCheck' => false, 'denyExtensionRename' => false, - - -// PERMISSION SETTINGS - + + + // PERMISSION SETTINGS + 'dirPerms' => 0755, 'filePerms' => 0644, - + 'access' => array( - + 'files' => array( 'upload' => true, 'delete' => true, - 'copy' => true, - 'move' => true, + 'copy' => true, + 'move' => true, 'rename' => true ), - + 'dirs' => array( 'create' => true, 'delete' => true, 'rename' => true ) ), - + 'deniedExts' => "exe com msi bat cgi pl php phps phtml php3 php4 php5 php6 py pyc pyo pcgi pcgi3 pcgi4 pcgi5 pchi6", - - -// MISC SETTINGS - - 'filenameChangeChars' => array(/* - ' ' => "_", - ':' => "." - */), - - 'dirnameChangeChars' => array(/* - ' ' => "_", - ':' => "." - */), - + + + // MISC SETTINGS + + 'filenameChangeChars' => array( /* + ' ' => "_", + ':' => "." + */ ), + + 'dirnameChangeChars' => array( /* + ' ' => "_", + ':' => "." + */ ), + 'mime_magic' => "", - + 'cookieDomain' => "", 'cookiePath' => "", 'cookiePrefix' => 'KCFINDER_', - - -// THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION SETTINGS - - '_sessionVar' => "KCFINDER", - '_check4htaccess' => true, + + + // THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION SETTINGS + '_normalizeFilenames' => false, - '_dropUploadMaxFilesize' => 10485760, + '_check4htaccess' => true, //'_tinyMCEPath' => "/tiny_mce", + + '_sessionVar' => "KCFINDER" + //'_sessionLifetime' => 30, + //'_sessionDir' => "/full/directory/path", + //'_sessionDomain' => ".mysite.com", + //'_sessionPath' => "/my/path", + //'_cssMinCmd' => "java -jar /path/to/yuicompressor.jar --type css {file}", //'_jsMinCmd' => "java -jar /path/to/yuicompressor.jar --type js {file}", + ); + + +prodevKCFinderConfig($_CONFIG); + +?> \ No newline at end of file diff --git a/core/autoload.php b/core/autoload.php index 8d1fbcf..0988af8 100644 --- a/core/autoload.php +++ b/core/autoload.php @@ -21,8 +21,14 @@ list($ns, $class) = $path; if ($ns == "kcfinder") { - if (in_array($class, array("uploader", "browser", "minifier", "session"))) - require "core/class/$class.php"; + + if ($class == "uploader") + require "core/class/uploader.php"; + elseif ($class == "browser") + require "core/class/browser.php"; + elseif ($class == "minifier") + require "core/class/minifier.php"; + elseif (file_exists("core/types/$class.php")) require "core/types/$class.php"; elseif (file_exists("lib/class_$class.php")) @@ -31,3 +37,5 @@ require "lib/helper_$class.php"; } }); + +?> \ No newline at end of file diff --git a/core/bootstrap.php b/core/bootstrap.php index 69b7fdf..bd98538 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -177,3 +177,5 @@ public function gc($maxlifetime) { // PUT YOUR ADDITIONAL CODE HERE + +?> \ No newline at end of file diff --git a/core/class/browser.php b/core/class/browser.php index 0f648e4..f5e6896 100644 --- a/core/class/browser.php +++ b/core/class/browser.php @@ -23,17 +23,28 @@ public function __construct() { parent::__construct(); // SECURITY CHECK INPUT DIRECTORY - if (isset($_POST['dir'])) { - $dir = $this->checkInputDir($_POST['dir'], true, false); - if ($dir === false) unset($_POST['dir']); - $_POST['dir'] = $dir; - } + if (isset($_REQUEST['dir'])) { + + $dir = $this->checkInputDir($_REQUEST['dir'], true, false); + if ($dir === false) unset($_REQUEST['dir']); + + // Support the POST.dir + if(isset($_POST['dir'])) { + $_POST['dir'] = $dir; + } + + // Support the GET.dir + if(isset($_GET['dir'])) { + $_GET['dir'] = $dir; + } + + // Support the REQUEST.dir + if(isset($_REQUEST['dir'])) { + $_REQUEST['dir'] = $dir; + } - if (isset($_GET['dir'])) { - $dir = $this->checkInputDir($_GET['dir'], true, false); - if ($dir === false) unset($_GET['dir']); - $_GET['dir'] = $dir; } + $thumbsDir = $this->config['uploadDir'] . "/" . $this->config['thumbsDir']; if (!$this->config['disabled'] && @@ -195,13 +206,16 @@ protected function act_expand() { } protected function act_chDir() { + $this->postDir(); // Just for existing check $this->session['dir'] = "{$this->type}/{$_POST['dir']}"; $dirWritable = dir::isWritable("{$this->config['uploadDir']}/{$this->session['dir']}"); + return json_encode(array( 'files' => $this->getFiles($this->session['dir']), 'dirWritable' => $dirWritable )); + } protected function act_newDir() { @@ -276,11 +290,11 @@ protected function act_upload() { header("Content-Type: text/plain; charset={$this->charset}"); if (!$this->config['access']['files']['upload'] || - (!isset($_POST['dir']) && !isset($_GET['dir'])) + !isset($_POST['dir']) ) $this->errorMsg("Unknown error."); - $dir = isset($_GET['dir']) ? $this->getDir() : $this->postDir(); + $dir = $this->postDir(); if (!dir::isWritable($dir)) $this->errorMsg("Cannot access or write to upload folder."); @@ -299,28 +313,6 @@ protected function act_upload() { return $this->moveUploadFile($this->file, $dir); } - protected function act_dragUrl() { - if (!$this->config['access']['files']['upload'] || - !isset($_GET['dir']) || - !isset($_POST['url']) || - !isset($_POST['type']) - ) - $this->errorMsg("Unknown error."); - - $dir = $this->getDir(); - - if (!dir::isWritable($dir)) - $this->errorMsg("Cannot access or write to upload folder."); - - if (is_array($_POST['url'])) - foreach ($_POST['url'] as $url) - $this->downloadURL($url, $dir); - else - $this->downloadURL($_POST['url'], $dir); - - return true; - } - protected function act_download() { $dir = $this->postDir(); if (!isset($_POST['dir']) || @@ -653,9 +645,62 @@ protected function act_check4Update() { ) return json_encode(array('version' => $this->session['checkVersion'])); - $ver = phpGet::get("http://kcfinder.sunhater.com/checkVersion.php"); + $protocol = "http"; + $host = "kcfinder.sunhater.com"; + $port = 80; + $path = "/checkVersion.php"; + + $url = "$protocol://$host:$port$path"; + $pattern = '/^\d+\.\d+$/'; + $responsePattern = '/^[A-Z]+\/\d+\.\d+\s+\d+\s+OK\s*([a-zA-Z0-9\-]+\:\s*[^\n]*\n)*\s*(.*)\s*$/'; + + // file_get_contents() + if (ini_get("allow_url_fopen") && + (false !== ($ver = file_get_contents($url))) && + preg_match($pattern, $ver) + + // HTTP extension + ) {} elseif ( + function_exists("http_get") && + (false !== ($ver = @http_get($url))) && + ( + ( + preg_match($responsePattern, $ver, $match) && + false !== ($ver = $match[2]) + ) || true + ) && + preg_match($pattern, $ver) + + // Curl extension + ) {} elseif ( + function_exists("curl_init") && + (false !== ( $curl = @curl_init($url) )) && + ( @ob_start() || (@curl_close($curl) && false)) && + ( @curl_exec($curl) || (@curl_close($curl) && false)) && + ((false !== ( $ver = @ob_get_clean() )) || (@curl_close($curl) && false)) && + ( @curl_close($curl) || true ) && + preg_match($pattern, $ver) + + // Socket extension + ) {} elseif (function_exists('socket_create')) { + $cmd = + "GET $path " . strtoupper($protocol) . "/1.1\r\n" . + "Host: $host\r\n" . + "Connection: Close\r\n\r\n"; + + if ((false !== ( $socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP) )) && + (false !== @socket_connect($socket, $host, $port) ) && + (false !== @socket_write($socket, $cmd, strlen($cmd)) ) && + (false !== ( $ver = @socket_read($socket, 2048) )) && + preg_match($responsePattern, $ver, $match) + ) + $ver = $match[2]; + + if (isset($socket) && is_resource($socket)) + @socket_close($socket); + } - if (isset($ver) && preg_match('/^\d+\.\d+$/', $ver)) { + if (isset($ver) && preg_match($pattern, $ver)) { $this->session['checkVersion'] = $ver; $this->session['checkVersionTime'] = time(); return json_encode(array('version' => $ver)); @@ -684,6 +729,9 @@ protected function moveUploadFile($file, $dir) { } elseif (function_exists('chmod')) chmod($target, $this->config['filePerms']); + $target = $this->checkUploadedFileMime($target); + // $target = basename($uploadedFilePath); + $this->makeThumb($target); return "/" . basename($target); } @@ -886,53 +934,6 @@ protected function errorMsg($message, array $data=null) { protected function htmlData($str) { return htmlentities($str, null, strtoupper($this->charset)); } - - protected function downloadURL($url, $dir) { - - if (!preg_match(phpGet::$urlExpr, $url, $match)) - return; - - if ((isset($match[7]) && strlen($match[7]))) - $furl = explode("&", $match[7]); - - $filename = isset($furl) - ? basename($furl[0]) - : "web_image.jpg"; - - $file = tempnam(sys_get_temp_dir(), $filename); - - if (phpGet::get($url, $file)) - $this->moveUploadFile(array( - 'name' => $filename, - 'tmp_name' => $file, - 'error' => UPLOAD_ERR_OK - ), $dir); - else - @unlink($file); - } - - protected function getLangs() { - if (isset($this->session['langs'])) - return $this->session['langs']; - - $files = dir::content("lang", array( - 'pattern' => '/^[a-z]{2,3}(\-[a-z]{2})?\.php$/', - 'types' => "file" - )); - - $langs = array(); - if (is_array($files)) - foreach ($files as $file) { - include $file; - $id = substr(basename($file), 0, -4); - $langs[$id] = isset($lang['_native']) - ? $lang['_native'] - : (isset($lang['_lang']) - ? $lang['_lang'] - : $id); - } - - $this->session['langs'] = $langs; - return $langs; - } } + +?> \ No newline at end of file diff --git a/core/class/minifier.php b/core/class/minifier.php index bbe0db7..dfe7eab 100644 --- a/core/class/minifier.php +++ b/core/class/minifier.php @@ -25,12 +25,13 @@ class minifier { ); public function __construct($type=null) { - $this->config = require("conf/config.php"); + require "conf/config.php"; + $this->config = $_CONFIG; $type = strtolower($type); if (isset($this->mime[$type])) $this->type = $type; - if (isset($this->config["_{$this->type}MinCmd"])) - $this->minCmd = $this->config["_{$this->type}MinCmd"]; + if (isset($_CONFIG["_{$this->type}MinCmd"])) + $this->minCmd = $_CONFIG["_{$this->type}MinCmd"]; } public function minify($cacheFile=null, $dir=null) { @@ -109,3 +110,5 @@ public function minify($cacheFile=null, $dir=null) { } } + +?> \ No newline at end of file diff --git a/core/class/session.php b/core/class/session.php deleted file mode 100644 index 918a016..0000000 --- a/core/class/session.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -namespace kcfinder; - -class session { - - const SESSION_VAR = "_sessionVar"; - public $values; - protected $config; - - public function __construct($configFile) { - - // Start session if it is not already started - if (!session_id()) - session_start(); - - $config = require($configFile); - - // _sessionVar option is set - if (isset($config[self::SESSION_VAR])) { - $session = &$config[self::SESSION_VAR]; - - // _sessionVar option is string - if (is_string($session)) - $session = &$_SESSION[$session]; - - if (!is_array($session)) - $session = array(); - - // Use global _SESSION array if _sessionVar option is not set - } else - $session = &$_SESSION; - - // Securing the session - $stamp = array( - 'ip' => $_SERVER['REMOTE_ADDR'], - 'agent' => md5($_SERVER['HTTP_USER_AGENT']) - ); - if (!isset($session['stamp'])) - $session['stamp'] = $stamp; - elseif (!is_array($session['stamp']) || ($session['stamp'] !== $stamp)) { - // Destroy session if user agent is different (e.g. after browser update) - if ($session['stamp']['ip'] === $stamp['ip']) - session_destroy(); - die; - } - - // Load session configuration - foreach ($config as $key => $val) - $this->config[$key] = ((substr($key, 0, 1) != "_") && isset($session[$key])) - ? $session[$key] - : $val; - - // Session data goes to 'self' element - if (!isset($session['self'])) - $session['self'] = array(); - $this->values = &$session['self']; - } - - public function getConfig() { - return $this->config; - } - -} diff --git a/core/class/uploader.php b/core/class/uploader.php index 447d0ff..d387d6d 100644 --- a/core/class/uploader.php +++ b/core/class/uploader.php @@ -17,7 +17,7 @@ class uploader { /** Release version */ - const VERSION = "3.20-test2"; + const VERSION = "3.12"; /** Config session-overrided settings * @var array */ @@ -101,16 +101,67 @@ public function __construct() { $this->checkFilename($_GET['cms']) && is_file("integration/{$_GET['cms']}.php") ) - $this->cms = $_GET['cms']; + + $this->cms = $_GET['cms']; // LINKING UPLOADED FILE - if (count($_FILES)) - $this->file = &$_FILES[key($_FILES)]; + if (count($_FILES)) { + $this->file = &$_FILES[key($_FILES)]; + } + + // LOAD DEFAULT CONFIGURATION + require "conf/config.php"; + + // SETTING UP SESSION + if (!session_id()) { + if (isset($_CONFIG['_sessionLifetime'])) + ini_set('session.gc_maxlifetime', $_CONFIG['_sessionLifetime'] * 60); + if (isset($_CONFIG['_sessionDir'])) + ini_set('session.save_path', $_CONFIG['_sessionDir']); + if (isset($_CONFIG['_sessionDomain'])) + ini_set('session.cookie_domain', $_CONFIG['_sessionDomain']); + session_start(); + } + + // LOAD SESSION CONFIGURATION IF EXISTS + $this->config = $_CONFIG; + $sessVar = "_sessionVar"; + if (isset($_CONFIG[$sessVar])) { + + $sessVar = $_CONFIG[$sessVar]; + + if (!isset($_SESSION[$sessVar])) + $_SESSION[$sessVar] = array(); + + $sessVar = &$_SESSION[$sessVar]; + + if (!is_array($sessVar)) + $sessVar = array(); - // CONFIG & SESSION SETUP - $session = new session("conf/config.php"); - $this->config = $session->getConfig(); - $this->session = &$session->values; + foreach ($sessVar as $key => $val) + if ((substr($key, 0, 1) != "_") && isset($_CONFIG[$key])) + $this->config[$key] = $val; + + if (!isset($sessVar['self'])) + $sessVar['self'] = array(); + + $this->session = &$sessVar['self']; + + } else + $this->session = &$_SESSION; + + // SECURING THE SESSION + $stamp = array( + 'ip' => $_SERVER['REMOTE_ADDR'], + 'agent' => md5($_SERVER['HTTP_USER_AGENT']) + ); + if (!isset($this->session['stamp'])) + $this->session['stamp'] = $stamp; + elseif (!is_array($this->session['stamp']) || ($this->session['stamp'] !== $stamp)) { + if ($this->session['stamp']['ip'] === $stamp['ip']) + session_destroy(); + die; + } // IMAGE DRIVER INIT if (isset($this->config['imageDriversPriority'])) { @@ -123,7 +174,7 @@ public function __construct() { if ((!isset($driver) || ($driver === false)) && (image::getDriver(array($this->imageDriver)) === false) ) - $this->backMsg("Cannot find any of the supported PHP image extensions!"); + die("Cannot find any of the supported PHP image extensions!"); // WATERMARK INIT if (isset($this->config['watermark']) && is_string($this->config['watermark'])) @@ -179,7 +230,7 @@ public function __construct() { } elseif ($this->config['uploadURL'] == "/") { $this->config['uploadDir'] = strlen($this->config['uploadDir']) ? path::normalize($this->config['uploadDir']) - : path::normalize(realpath($_SERVER['DOCUMENT_ROOT'])); + : path::normalize($_SERVER['DOCUMENT_ROOT']); $this->typeDir = "{$this->config['uploadDir']}/{$this->type}"; $this->typeURL = "/{$this->type}"; @@ -302,6 +353,8 @@ public function upload() { else { if (function_exists('chmod')) @chmod($target, $this->config['filePerms']); + + $target = $this->checkUploadedFileMime($target); // fix the target ... $this->makeThumb($target); $url = $this->typeURL; if (isset($udir)) $url .= "/$udir"; @@ -355,10 +408,19 @@ protected function normalizeDirname($dirname) { } protected function checkFilePath($file) { + $rPath = realpath($file); - if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") - $rPath = str_replace("\\", "/", $rPath); + + if(is_dir($rPath) || is_link($file)) { + return true; + } + + if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") { + $rPath = str_replace("\\", "/", $rPath); + } + return (substr($rPath, 0, strlen($this->typeDir)) === $this->typeDir); + } protected function checkFilename($file) { @@ -374,24 +436,99 @@ protected function checkFilename($file) { return true; } + + private $shortHandJpgExtensions = true; + + protected function checkUploadedFileMime($targetFile) { + + $targetFileResult = false; + + if(!$targetFile || !file_exists($targetFile)) { + return false; + } + + $targetFileResult = $targetFile; + if($target_imagesize = @getimagesize($targetFile)) { + + if(!function_exists('image_type_to_extension')) { + return false; + } + + $renameResult = FALSE; + $targetFilePathInfo = pathinfo($targetFile); + + // Get the EXPECTED EXTENSION from this MIME + $targetMimeInteger = $target_imagesize[2]; + $expectedExtension = @image_type_to_extension($targetMimeInteger); + + // get the existing MIME + MIME from the EXTENSION on this FILE ... + $targetMimeString = $target_imagesize['mime']; + $currentTargetMime = file::getMimeType($targetFile); + + if($expectedExtension && $currentTargetMime != $targetMimeString) { + + // Ensure we use SHORTHAND JPG extensions .... + if($expectedExtension == ".jpeg" && $this->shortHandJpgExtensions) { + $expectedExtension = ".jpg"; + } + + // Rename the extension from whatever it was previously to a new extension ... + $exptectedFileName = str_replace(".{$targetFilePathInfo['extension']}", $expectedExtension, $targetFile); + + $expectedFileResult = array( + 'target' => basename($targetFile), + 'destination' => basename($exptectedFileName), + ); + + // Testing this code ... + // echo "
          ";
          +				// print_r($expectedFileResult);
          +				// echo "
          "; + // die(); + + $renameResult = @rename($targetFile, $exptectedFileName); + } + + if($renameResult) { + $targetFileResult = $exptectedFileName; + } + + } + + return $targetFile; + + } + protected function checkUploadedFile(array $aFile=null) { + $config = &$this->config; $file = ($aFile === null) ? $this->file : $aFile; - if (!is_array($file) || !isset($file['name'])) - return $this->label("Unknown error"); + // check this file for any service issues ... + if (!is_array($file) || !isset($file['name'])) { + return $this->label("Unknown error"); + } + // Check if we are dealing with more than a single file if (is_array($file['name'])) { + // Loop over sub files within file.name foreach ($file['name'] as $i => $name) { - $return = $this->checkUploadedFile(array( + + $new_file_details = array( 'name' => $name, 'tmp_name' => $file['tmp_name'][$i], 'error' => $file['error'][$i] - )); - if ($return !== true) - return "$name: $return"; + ); + + $return = $this->checkUploadedFile($new_file_details); + + if ($return !== true) { + return "$name: $return"; + } + } + // Done return true; } @@ -399,9 +536,9 @@ protected function checkUploadedFile(array $aFile=null) { $typePatt = strtolower(text::clearWhitespaces($this->types[$this->type])); // CHECK FOR UPLOAD ERRORS - if ($file['error']) - return - ($file['error'] == UPLOAD_ERR_INI_SIZE) ? + if ($file['error']) { + + $file_error_issue = ($file['error'] == UPLOAD_ERR_INI_SIZE) ? $this->label("The uploaded file exceeds {size} bytes.", array('size' => ini_get('upload_max_filesize'))) : ( ($file['error'] == UPLOAD_ERR_FORM_SIZE) ? @@ -418,17 +555,20 @@ protected function checkUploadedFile(array $aFile=null) { $this->label("Unknown error.") ))))); + return $file_error_issue; + + } // HIDDEN FILENAMES CHECK - elseif (substr($file['name'], 0, 1) == ".") - return $this->label("File name shouldn't begins with '.'"); - + elseif (substr($file['name'], 0, 1) == ".") { + return $this->label("File name shouldn't begins with '.'"); + } // EXTENSION CHECK elseif ( (substr($file['name'], -1) == ".") || !$this->validateExtension($extension, $this->type) - ) - return $this->label("Denied file extension."); - + ) { + return $this->label("Denied file extension."); + } // SPECIAL DIRECTORY TYPES CHECK (e.g. *img) elseif (preg_match('/^\*([^ ]+)(.*)?$/s', $typePatt, $patt)) { list($typePatt, $type, $params) = $patt; @@ -437,47 +577,87 @@ protected function checkUploadedFile(array $aFile=null) { $type = new $class(); $cfg = $config; $cfg['filename'] = $file['name']; - if (strlen($params)) - $cfg['params'] = trim($params); + if (strlen($params)) { + $cfg['params'] = trim($params); + } $response = $type->checkFile($file['tmp_name'], $cfg); - if ($response !== true) - return $this->label($response); - } else - return $this->label("Non-existing directory type."); + if ($response !== true) { + return $this->label($response); + } + } else { + return $this->label("Non-existing directory type."); + } } // IMAGE RESIZE $img = image::factory($this->imageDriver, $file['tmp_name']); - if (!$img->initError && !$this->imageResize($img, $file['tmp_name'])) - return $this->label("The image is too big and/or cannot be resized."); + + // imageResize is the issue with PNG images turning to JPEG images - 04/02/2016 + if (!$img->initError && !$this->imageResize($img, $file['tmp_name'])) { + return $this->label("The image is too big and/or cannot be resized."); + } return true; + } protected function checkInputDir($dir, $inclType=true, $existing=true) { + $dir = path::normalize($dir); - if (substr($dir, 0, 1) == "/") - $dir = substr($dir, 1); - - if ((substr($dir, 0, 1) == ".") || (substr(basename($dir), 0, 1) == ".")) - return false; - + + if (substr($dir, 0, 1) == "/") { + $dir = substr($dir, 1); + } + + // Ensure we have a directory .... + if(!$dir) { + return false; + } + + // Check for position of "." on dir + $dir_substr_pos = substr($dir, 0, 1); + $dir_substr_pos_result = ($dir_substr_pos == "."); + + // Check for position of "." within basename of Dir + $basename_substr_pos = substr(basename($dir), 0, 1); + $basename_substr_pos_result = ($basename_substr_pos == "."); + + // Check the positon of "." within $dir, and basename of $dir + if ($dir_substr_pos_result || $basename_substr_pos_result) { + return false; + } + + // Work out the Include TYpe if ($inclType) { $first = explode("/", $dir); $first = $first[0]; - if ($first != $this->type) - return false; + if ($first != $this->type) { + return false; + } $return = $this->removeTypeFromPath($dir); } else { $return = $dir; $dir = "{$this->type}/$dir"; } - if (!$existing) - return $return; + $path = "{$this->config['uploadDir']}/$dir"; // Grab expected PATH + + //if(is_link($path)) { + // $return = realpath($path); + //} + + if (!$existing) { + return $return; + } $path = "{$this->config['uploadDir']}/$dir"; - return (is_dir($path) && is_readable($path)) ? $return : false; + $return_path = false; // Setup variable to store what we want to return + + if((is_dir($path) && is_readable($path)) || is_link($path)) { + $return_path = $return; + } + + return $return_path; } protected function validateExtension($ext, $type) { @@ -521,10 +701,12 @@ protected function imageResize($image, $file=null) { $img = image::factory($this->imageDriver, $image); if ($img->initError) return false; $file = $image; - } elseif ($file === null) - return false; - else - $img = $image; + } elseif ($file === null) { + return false; + } + else { + $img = $image; + } $orientation = 1; if (function_exists("exif_read_data")) { @@ -601,12 +783,29 @@ protected function imageResize($image, $file=null) { ? $this->config['watermark']['top'] : false; $img->watermark($this->config['watermark']['file'], $left, $top); } + + // Check the EXTENSION OF THIS FILE + if($file && is_string($file) && file_exists($file)) { + $file_imgsize = @getimagesize($file); + // Get the EXPECTED EXTENSION from this MIME + if($file_imgsize && !empty($file_imgsize)) { + $fileMimeInteger = $file_imgsize[2]; + $outputFileExtension = @image_type_to_extension($fileMimeInteger); + $outputFileExtension = str_replace('.', '', $outputFileExtension); + } + } + + // Force Jpeg + if(!$outputFileExtension) { + $outputFileExtension = "jpeg"; + } // WRITE TO FILE - return $img->output("jpeg", array( + return $img->output($outputFileExtension, array( 'file' => $file, 'quality' => $this->config['jpegQuality'] )); + } protected function makeThumb($file, $overwrite=true) { @@ -764,3 +963,5 @@ protected function get_htaccess() { return file_get_contents("conf/upload.htaccess"); } } + +?> diff --git a/core/types/type_img.php b/core/types/type_img.php index c03ca7d..378e59d 100644 --- a/core/types/type_img.php +++ b/core/types/type_img.php @@ -29,3 +29,5 @@ public function checkFile($file, array $config) { return true; } } + +?> \ No newline at end of file diff --git a/core/types/type_mime.php b/core/types/type_mime.php index 9fc734d..96cc514 100644 --- a/core/types/type_mime.php +++ b/core/types/type_mime.php @@ -45,3 +45,5 @@ public function checkFile($file, array $config) { : true; } } + +?> \ No newline at end of file diff --git a/css/000.base.css b/css/000.base.css index 7ff23cd..4476b0e 100644 --- a/css/000.base.css +++ b/css/000.base.css @@ -195,9 +195,4 @@ span.brace.opened, span.brace.closed { background: #000; opacity: 0; filter: alpha(opacity=0); -} - -#lang { - opacity: 0; - filter: alpha(opacity=0); } \ No newline at end of file diff --git a/css/001.transForm.css b/css/001.transForm.css deleted file mode 100644 index e9dae28..0000000 --- a/css/001.transForm.css +++ /dev/null @@ -1,88 +0,0 @@ -.tf-select, .tf-multiple, .tf-file, .tf-radio, .tf-checkbox, .tf-button { - cursor: default; - overflow: auto; - display: -moz-inline-box; - display: inline-block; - zoom: 1; - vertical-align: middle; -} - -.tf-select .tf-selected { - float: left; - white-space: nowrap; -} - -.tf-select .tf-menu { - display: none; - position: absolute; - max-height: 173px; - overflow-x: hidden; - overflow-y: auto; -} - -.tf-select.tf-opened .tf-menu { - display: block; -} - -.tf-select .tf-button { - float: right; -} - -.tf-select select, -.tf-multiple select { - position: absolute; - left: -1000000px; - opacity: 0; - filter: alpha(opacity=0); -} - -.tf-select .tf-menu ul, -.tf-multiple ul { - padding: 0; - margin: 0; - list-style-type: none; -} - -.tf-select .tf-menu li, -.tf-multiple li { - padding: 0; - margin: 0; -} - -.tf-multiple span, -.tf-select .tf-button span { - white-space: nowrap; -} - -.tf-textarea { - resize: none; - overflow: auto; -} - -.tf-multiple { - max-height: 118px; -} -.tf-file input, -.tf-radio input, -.tf-checkbox input, -.tf-button input, -.tf-button button { - position: absolute; - opacity: 0; - filter: alpha(opacity=0); - outline: none; - margin: 0; - padding: 0; -} -.tf-file { - overflow: hidden; -} -.tf-file .tf-info { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - float: right; -} -.tf-file .tf-button { - float: right; -} diff --git a/css/index.php b/css/index.php index 256a7b5..0347e40 100644 --- a/css/index.php +++ b/css/index.php @@ -18,3 +18,5 @@ require "core/autoload.php"; $min = new minifier("css"); $min->minify("cache/base.css"); + +?> \ No newline at end of file diff --git a/doc/Changelog b/doc/Changelog new file mode 100644 index 0000000..528f367 --- /dev/null +++ b/doc/Changelog @@ -0,0 +1,193 @@ +VERSION 3.12 - 2014-07-09 +------------------------- +* XSS security fix +* Performance fix +* taphold event added. Emulates right-click on touchscreen devices +* Click with Shift key functionality added +* Minor fixes + + +VERSION 3.11 - 2014-04-21 +------------------------- +* "Unknown error." fixes when using `_normalizeFilenames` setting + and upon new folder creation + + +VERSION 3.10 - 2014-04-16 +------------------------- +* Important secirity fixes + + +VERSION 3.0 - 2014-04-08 +------------------------ +* Minor fixes + + +VERSION 3.0-pre1 - 2014-04-02 +----------------------------- +* Now KCFinder requires PHP >= 5.3 becouse of using namespace: "kcfinder" +* Support CSS & JavaScript minifier (on the fly) +* jQuery UI & Uniform support. New theme & theme engine (old themes are not supported) +* Improvements in JavaScript code to be well compressed and faster +* Keep PNG transparency in generated thumbnails +* New image viewer + + +VERSION 2.54 - 2014-03-12 +------------------------- +* Performance fix only + + +VERSION 2.53 - 2014-02-22 +------------------------- +* Session start fix +* TinyMCE 4 support + + +VERSION 2.52 - 2014-01-20 +------------------------- +* Various image drivers support (gd, imagemagick, graphicsmagic) +* Auto-rotate images based on EXIF data +* PNG watermark support + + +VERSION 2.51 - 2010-08-25 +------------------------- +* Drag and drop uploading plugin - big fixes +* Cookies problem when using single words or IPs as hostname resolved +* Vietnamese localization + + +VERSION 2.5 - 2010-08-23 +------------------------ +* Drupal module support +* Drag and drop uploading plugin +* Two more language labels +* Localhost cookies bugfix +* Renaming current folder bugfix +* Small bugfixes + + +VERSION 2.41 - 2010-07-24 +------------------------- +* Directory types engine improvement +* New 'denyExtensionRename' config setting added + + +VERSION 2.4 - 2010-07-20 +------------------------ +* Online checking if new version is released in About box. To use this + feature you should to have Curl, HTTP or Socket extension, or + allow_url_fopen ini setting should be "on" +* New 'denyUpdateCheck' config setting added +* New 'dark' theme added (made by Dark Preacher) +* Additional 'theme' GET parameter to choose a theme from URL +* Thumbnails loading improvement +* Some changes in Oxygen CSS theme +* Replace alert() and confirm() JavaScript functions with good-looking boxes +* Safari 3 right-click fix +* Small bugfixes + + +VERSION 2.32 - 2010-07-11 +------------------------- +* 'filenameChangeChars' and 'dirnameChangeChars' config settings added +* Content-Type header fix for css.php, js_localize.php and + js/browser/joiner.php +* CKEditorFuncNum with index 0 bugfix +* Session save handler example in core/autoload.php + + +VERSION 2.31 - 2010-07-01 +------------------------- +* Proportional uploaded image resize bugfix +* Slideshow bugfixes +* Other small bugfixes + + +VERSION 2.3 - 2010-06-25 +------------------------ +* Replace XML Ajax responses with JSON +* Replace old 'readonly' config option with advanced 'access' option + PLEASE UPDATE YOUR OLD CONFIG FILE!!! +* Slideshow images in current folder using arrow keys +* Multipe files upload similar to Facebook upload (not works in IE!) +* Option to set protocol, domain and port in 'uploadURL' setting +* Bugfixes + + +VERSION 2.21 - 2010-11-19 +------------------------- +* Bugfixes only + + +VERSION 2.2 - 2010-07-27 +------------------------ +* Many bugfixes +* Read-only config option + + +VERSION 2.1 - 2010-07-04 +------------------------ +* Endless JavaScript loop on KCFinder disable bugfix +* New config setting whether to generate .htaccess file in upload folder +* Upload to specified folder from CKEditor & FCKeditor direct upload dialog +* Select multiple files bugfixes + + +VERSION 2.0 - 2010-07-01 +------------------------ +* Brand new core +* Option to resize files/folders panels with mouse drag +* Select multiple files with Ctrl key +* Return list of files to custom integrating application +* Animated folder tree +* Directory Type specific configuration settings +* Download multiple files or a folder as ZIP file + + +VERSION 1.7 - 2010-06-17 +------------------------ +* Maximize toolbar button +* Clipboard for copying and moving multiple files +* Show warning if the browser is not capable to display KCFinder +* Google Chrome Frame support for old versions of Internet Explorer + + +VERSION 1.6 - 2010-06-02 +------------------------ +* Support of Windows Apache server +* Support of Fileinfo PHP extension to detect mime types (*mime directory type) +* Option to deny globaly some dangerous extensions like exe, php, pl, cgi etc +* Check for denied file extension on file rename +* Disallow to upload hidden files (with names begins with .) +* Missing last character of filenames without extension bugfix +* Some small bugfixes + + +VERSION 1.5 - 2010-05-30 +------------------------ +* Filenames with spaces download bugfix +* FCKEditor direct upload bugfix +* Thumbnail generation bugfixes + + +VERSION 1.4 - 2010-05-24 +------------------------ +* Client-side caching bugfix +* Custom integrations - window.KCFinder.callBack() +* Security fixes + + +VERSION 1.3 - 2010-05-06 +------------------------ +* Another session bugfix. Now session configuratin works! +* Show filename by default bugfix +* Loading box on top right corner + + +VERSION 1.2 - 2010-05-03 +------------------------ +* Thumbnail generation bugfix +* Session bugfix +* other small bugfixes diff --git a/doc/Changelog.md b/doc/Changelog.md deleted file mode 100644 index f7674ec..0000000 --- a/doc/Changelog.md +++ /dev/null @@ -1,184 +0,0 @@ -3.20-test2: 2014-08-24 ----------------------- -* jQuery adapter added -* Session handling improvements. Now `_sessionVar` option could get arrays by reference -* Session related ini options in `conf/config.php` are removed and no more supported -* Removed redundant closing tags in PHP files - -3.20-test1: 2014-08-19 ----------------------- -* "`DOCUMENT_ROOT` is symlink" bugfix -* Uniform is replaced with my alternative - transForm (http://jquery.sunhater.com/transForm) -* Improved image viewer -* Improved drag & drop upload functionality. Progress bars in a dialog box. -* Supports drag & drop images from external html page -* Language dropdown in settings toolbar -* No border-radius when scrollbar(s) exists into files and folders panes -* `_dropUploadMaxFilesize` option is added. (Drag & dropping bigger files cause crash the web browser) -* `composer.json` file added -* 4 new labels to translate - -3.12: 2014-07-09 ----------------- -* XSS security fix -* Performance fix -* taphold event added. Emulates right-click on touchscreen devices -* Click with `Shift` key functionality added -* Minor fixes - -3.11: 2014-04-21 ----------------- -* "Unknown error." fixes when using `_normalizeFilenames` setting and upon new folder creation - -3.10: 2014-04-16 ----------------- -* Important secirity fixes - -3.0: 2014-04-08 ---------------- -* Minor fixes - -3.0-pre1: 2014-04-02 --------------------- -* Now KCFinder requires PHP >= 5.3 becouse of using namespace: `kcfinder` -* Support CSS & JavaScript minifier (on the fly) -* jQuery UI & Uniform support. New theme & theme engine (old themes are not supported) -* Improvements in JavaScript code to be well compressed and faster -* Keep PNG transparency in generated thumbnails -* New image viewer - -2.54: 2014-03-12 ----------------- -* Performance fix only - -2.53: 2014-02-22 ----------------- -* Session start fix -* TinyMCE 4 support - -2.52: 2014-01-20 ----------------- -* Various image drivers support (`gd`, `imagemagick`, `graphicsmagic`) -* Auto-rotate images based on EXIF data -* PNG watermark support - -2.51: 2010-08-25 ----------------- -* Drag and drop uploading plugin - big fixes -* Cookies problem when using single words or IPs as hostname resolved -* Vietnamese localization - -2.5: 2010-08-23 ---------------- -* Drupal module support -* Drag and drop uploading plugin -* Two more language labels -* Localhost cookies bugfix -* Renaming current folder bugfix -* Small bugfixes - -2.41: 2010-07-24 ----------------- -* Directory types engine improvement -* New `denyExtensionRename` config setting added - -2.4: 2010-07-20 ---------------- -* Online checking if new version is released in About box. To use this feature you should to have `curl`, `http` or `socket` extension, or `allow_url_fopen` ini setting should be `on` -* New `denyUpdateCheck` config setting added -* New `dark` theme added (made by Dark Preacher) -* Additional `theme` GET parameter to choose a theme from URL -* Thumbnails loading improvement -* Some changes in Oxygen CSS theme -* Replace `alert()` and `confirm()` JavaScript functions with good-looking boxes -* Safari 3 right-click fix -* Small bugfixes - -2.32: 2010-07-11 ----------------- -* `filenameChangeChars` and `dirnameChangeChars` config settings added -* Content-Type header fix for `css.php`, `js_localize.php` and `js/browser/joiner.php` -* CKEditorFuncNum with index `0` bugfix -* Session save handler example in `core/autoload.php` - -2.31: 2010-07-01 ----------------- -* Proportional uploaded image resize bugfix -* Slideshow bugfixes -* Other small bugfixes - -2.3: 2010-06-25 ---------------- -* Replace XML Ajax responses with JSON -* Replace old `readonly` config option with advanced `access` option. PLEASE UPDATE YOUR OLD CONFIG FILE!!! -* Slideshow images in current folder using arrow keys -* Multipe files upload similar to Facebook upload (not works in IE!) -* Option to set protocol, domain and port in `uploadURL` setting -* Bugfixes - -2.21: 2010-11-19 ----------------- -* Bugfixes only - -2.2: 2010-07-27 ---------------- -* Many bugfixes -* Read-only config option - -2.1: 2010-07-04 ---------------- -* Endless JavaScript loop on KCFinder disable bugfix -* New config setting whether to generate `.htaccess` file in upload folder -* Upload to specified folder from CKEditor & FCKeditor direct upload dialog -* Select multiple files bugfixes - -2.0: 2010-07-01 ---------------- -* Brand new core -* Option to resize `files/folders` panels with mouse drag -* Select multiple files with `Ctrl` key -* Return list of files to custom integrating application -* Animated folder tree -* Directory Type specific configuration settings -* Download multiple files or a folder as ZIP file - -1.7: 2010-06-17 ---------------- -* Maximize toolbar button -* Clipboard for copying and moving multiple files -* Show warning if the browser is not capable to display KCFinder -* Google Chrome Frame support for old versions of Internet Explorer - -1.6: 2010-06-02 ---------------- -* Support of Windows Apache server -* Support of Fileinfo PHP extension to detect mime types (`*mime` directory type) -* Option to deny globaly some dangerous extensions like `exe`, `php`, `pl`, `cgi` etc -* Check for `denied` file extension on file rename -* Disallow to upload hidden files (with names begins with `.`) -* Missing last character of filenames without extension bugfix -* Some small bugfixes - -1.5: 2010-05-30 ---------------- -* Filenames with spaces download bugfix -* FCKEditor direct upload bugfix -* Thumbnail generation bugfixes - -1.4: 2010-05-24 ---------------- -* Client-side caching bugfix -* Custom integrations - `window.KCFinder.callBack()` -* Security fixes - -1.3: 2010-05-06 ---------------- -* Another session bugfix. Now session configuratin works! -* Show filename by default bugfix -* Loading box on top right corner - -1.2: 2010-05-03 ---------------- -* Thumbnail generation bugfix -* Session bugfix -* other small bugfixes diff --git a/index.php b/index.php index 15a4b5e..6d49d5f 100644 --- a/index.php +++ b/index.php @@ -1,2 +1,5 @@ \ No newline at end of file diff --git a/integration/drupal.php b/integration/drupal.php index e5db5f9..e0c5577 100644 --- a/integration/drupal.php +++ b/integration/drupal.php @@ -92,7 +92,7 @@ function CheckAuthentication($drupal_path) { global $user; $_SESSION['KCFINDER']['uploadURL'] = strtr(variable_get('kcfinder_upload_url', 'sites/default/files/kcfinder'), array('%u' => $user->uid, '%n' => $user->name)); $_SESSION['KCFINDER']['uploadDir'] = strtr(variable_get('kcfinder_upload_dir', ''), array('%u' => $user->uid, '%n' => $user->name)); - $_SESSION['KCFINDER']['theme'] = variable_get('kcfinder_theme', 'default'); + $_SESSION['KCFINDER']['theme'] = variable_get('kcfinder_theme', 'oxygen'); //echo '
          uploadURL: ' . $_SESSION['KCFINDER']['uploadURL']
          ; //echo '
          uploadDir: ' . $_SESSION['KCFINDER']['uploadDir']
          ; @@ -109,3 +109,5 @@ function CheckAuthentication($drupal_path) { } CheckAuthentication(get_drupal_path()); + +?> \ No newline at end of file diff --git a/integration/laraveladministrator.php b/integration/laraveladministrator.php deleted file mode 100644 index 195aa5b..0000000 --- a/integration/laraveladministrator.php +++ /dev/null @@ -1,136 +0,0 @@ - - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -class LaravelAdministrator { - protected static $authenticated = false; - protected static $bootstrapAutoload = '/bootstrap/autoload.php'; - protected static $bootstrapStart = '/bootstrap/start.php'; - - static function getLaravelPath() { - - //absolute path method - if (!empty($_SERVER['SCRIPT_FILENAME'])) { - $laravelPath = dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])))))))); - if (!file_exists($laravelPath . self::$bootstrapAutoload)) { - $laravelPath = dirname(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])))); - $depth = 3; - do { - $laravelPath = dirname($laravelPath); - $depth++; - $autoloadFound = file_exists($laravelPath . self::$bootstrapAutoload); - } while (!$autoloadFound && $depth < 10); - } - else { - $autoloadFound = true; - } - } - - //relative path method - if (!isset($autoloadFound) || !$autoloadFound) { - $laravelPath = '../../../../../../..'; - if (!file_exists($laravelPath . self::$bootstrapAutoload)) { - $laravelPath = '../../..'; - $depth = 3; - do { - $laravelPath .= '/..'; - $depth++; - } while (!($autoloadFound = file_exists($laravelPath . self::$bootstrapAutoload)) && $depth < 10); - } - else { - $autoloadFound = true; - } - } - - return $laravelPath; - } - - static function runIntegration() { - - $laravelPath = self::getLaravelPath(); - - if(file_exists($laravelPath . '/bootstrap/autoload.php')) { - $currentCwd = getcwd(); - - // Simulate being in the laravel root folder so we can share the session (is this really needed?) - // chdir($laravelPath); - - // bootstrap - require $laravelPath.'/bootstrap/autoload.php'; - $app = require_once $laravelPath.'/bootstrap/start.php'; - $app->boot(); //Boot the application's service providers. - - //get the admin check closure that should be supplied in the admin config - $permission = \Illuminate\Support\Facades\Config::get('administrator::administrator.permission'); - $hasPermission = $permission(); - self::$authenticated = $hasPermission; - - //start session if not started already - if (session_id() == "") { - session_start(); - $iStartedTheSession = true; - } - - if (!isset($_SESSION['KCFINDER'])) { - $_SESSION['KCFINDER'] = array(); - } - - //if this is a simple true value, user is logged in - if ($hasPermission == true) { - - $configFactory = \Illuminate\Support\Facades\App::make('admin_config_factory'); - $modelName = \Illuminate\Support\Facades\Input::get('model'); - $fieldName = \Illuminate\Support\Facades\Input::get('field'); - - if(!empty($modelName) && !empty($fieldName)) { - - $modelConfig = $configFactory->make($modelName, true); - $modelConfigOptions = $modelConfig->getOption('edit_fields'); - $kcfinderOptions = $modelConfigOptions[$fieldName]["kcfinder"]; - - //allow users to use an option called 'enabled' instead of 'disabled' - if(isset($kcfinderOptions["enabled"])) { - $kcfinderOptions["disabled"] = !$kcfinderOptions["enabled"]; - } - - //save all options to the session - foreach ($kcfinderOptions as $optKey => $optValue) { - $_SESSION['KCFINDER'][$optKey] = $optValue; - } - - self::$authenticated = !$_SESSION['KCFINDER']['disabled']; - - } - } - else { - //clean and reset the session variable - $_SESSION['KCFINDER'] = array(); - } - - //close the session if I started it - if (isset($iStartedTheSession)) { - session_write_close(); - } - - // chdir($currentCwd); - return self::$authenticated; - } - else { - die("The integration service for 'Laravel Administrator' failed. Laravel root path not found!"); - } - - } - -} - -\kcfinder\integration\LaravelAdministrator::runIntegration(); diff --git a/js/006.jquery.transForm.js b/js/006.jquery.transForm.js deleted file mode 100644 index d05794f..0000000 --- a/js/006.jquery.transForm.js +++ /dev/null @@ -1,924 +0,0 @@ -/* - * jQuery TransForm plugin v1.0 - * http://jquery.sunhater.com/transForm - * 2014-08-01 - * - * Copyright (c) 2014 Pavel Tzonkov - * Dual licensed under the MIT and GPL licenses. - */ - -(function($) { - - var scrollbarWidth; - - $.fn.transForm = function(options) { - - // Get scrollbar width - if (!scrollbarWidth) { - var div = $('
          ').css({ - display: 'block', - visibility: 'visible', - position: 'absolute', - overflow: 'auto', - width: 100, - height: 100, - top: -1000, - left: -1000 - }).prependTo('body').append('
          ').find('div').css({ - display: 'block', - visibility: 'visible', - width: '100%', - height: 200 - }); - scrollbarWidth = 100 - div.width(); - div.parent().remove(); - } - - var tags = "|form|fieldset|input|select|textarea|button|label|", - fields = "|text|password|color|datetime|datetime-local|email|month|number|range|search|tel|time|url|week|", - buttons = "|button|submit|reset|", - o = { - cssPrefix: "tf-", - file: { - noFile: "No file chosen", - browse: "Browse", - count: "{count} files" - }, - textarea: { - autoExpand: false, - maxLength: 0 - } - }, - - outerSpace = function(selector, type, mbp) { - var r = 0, x; - - if (!mbp) mbp = "mbp"; - - if (/m/i.test(mbp)) { - x = parseInt($(selector).css('margin-' + type)); - if (x) r += x; - } - - if (/b/i.test(mbp)) { - x = parseInt($(selector).css('border-' + type + '-width')); - if (x) r += x; - } - - if (/p/i.test(mbp)) { - x = parseInt($(selector).css('padding-' + type)); - if (x) r += x; - } - - return r; - }, - - outerLeftSpace = function(selector, mbp) { - return outerSpace(selector, 'left', mbp); - }, - - outerTopSpace = function(selector, mbp) { - return outerSpace(selector, 'top', mbp); - }, - - outerRightSpace = function(selector, mbp) { - return outerSpace(selector, 'right', mbp); - }, - - outerBottomSpace = function(selector, mbp) { - return outerSpace(selector, 'bottom', mbp); - }, - - outerHSpace = function(selector, mbp) { - return (outerLeftSpace(selector, mbp) + outerRightSpace(selector, mbp)); - }, - - outerVSpace = function(selector, mbp) { - return (outerTopSpace(selector, mbp) + outerBottomSpace(selector, mbp)); - }, - - disablePageScroll = function(selector) { - var evts = 'mousewheel.tf DOMMouseScroll.tf'; - $(selector).unbind(evts).bind(evts, function(e) { - var e0 = e.originalEvent, - delta = e0.wheelDelta || -e0.detail; - this.scrollTop += ((delta < 0) ? 1 : -1) * 30; - e.preventDefault(); - }); - }, - - disableSelect = function(selector) { - $(selector).each(function() { - var evts = 'selectstart.tf'; - $(this).css('MozUserSelect', "none"); - $(this).unbind(evts).bind(evts, function() { - return false; - }); - }); - }; - - $.extend(true, o, options); - - $(this).each(function() { - - var t = this, - tagName = $(t).prop("tagName").toLowerCase(); - - // Skip non-form tags - if (tags.indexOf("|" + tagName + "|") == -1) - return; - - var destroy = (options === false), - transForm = $(t).data('transForm'), - construct = (!destroy && !transForm), - destruct = (destroy && transForm), - prefix = transForm ? transForm.prefix : o.cssPrefix, - type = $(t).attr('type'), - type = type ? type : "text", - el, store = {}, - - toggleClass = function(el, cssClass) { - if (construct) - $(el).addClass(cssClass); - else if (destruct) - $(el).removeClass(cssClass); - }, - - cls = function(pClass) { - return prefix + pClass; - }, - - sel = function(pClass) { - return '.' + cls(pClass); - }, - - data = { // target parameter may be removed in the future - set: function(object, target) { - if (typeof target == 'undefined') - target = t; - var d = $(target).data('transForm'); - if (!d) d = {}; - $.extend(true, d, object); - $(target).data('transForm', d); - }, - get: function(key, target) { - if (typeof target == 'undefined') - target = t; - var d = $(target).data('transForm'); - if (typeof key == 'undefined') - return d; - if (!d) d = {}; - return d[key]; - }, - remove: function(key, target) { - if (typeof target == 'undefined') - target = t; - var d = $(target).data('transForm'); - if (!d) d = {}; - if (typeof d[key] == 'undefined') - return; - delete d[key]; - } - }, - - build = { - - form: function() { - $(t).find(tags.substr(1, tags.length - 2).replace(/\|/g, ",")).transForm(options); - toggleClass(t, cls(tagName)); - }, - - fieldset: function() { - this.form(); - }, - - label: function() { - if ($(t).is('[for]')) - toggleClass(t, cls('label')); - }, - - input: function() { - if (this[type]) - this[type](); - - if (!el) { - toggleClass(t, cls("input")); - toggleClass(t, cls(type)); - } - - if (fields.indexOf('|' + type + '|') !== -1) - t.transForm.readOnly = function(readOnly) { - t.readOnly = readOnly; - if (readOnly) - $(t).addClass(cls('readOnly')); - else - $(t).removeClass(cls('readOnly')); - }; - }, - - select: function() { - - if ($(t).attr('multiple')) { - this.multiple(); - return; - } - - if (!construct) { - el = $(t).parent(); - return; - } - - el = $('
           
          '); - - var menu = el.find(sel('menu')), - selected = el.find(sel('selected')), - button = el.find(sel('button')), - clicked = false; - - $(t).bind('keydown.tf', function(e) { - var code = e.keyCode, - up = (code == 38), - down = (code == 40), - enter = (code == 13), - space = (code == 32), - tab = (code == 9), - esc = (code == 27); - - if ((e.metaKey && (code == 82)) || (code == 116)) - return true; - - if (e.ctrlKey || e.shiftKey || e.altKey || e.metaKey) - return false; - - if (up || down) { - var current = selectCurrent(); - - var i = parseInt(current.attr('class').split(cls('index-'))[1].split(/\s/)[0]), - opts = menu.find('div'), - count = menu.data('count'); - - if (up) { - var prev = (i == 0) ? (count - 1) : (i - 1); - prev = opts[prev]; - current.removeClass(cls('hover')); - current = $(prev); - - } else { - var next = (i == count - 1) ? 0 : (i + 1); - next = opts[next]; - current.removeClass(cls('hover')); - current = $(next); - } - - opts.removeClass(cls('hover')); - current.addClass(cls('hover')); - data.set({current: current}); - - $(t).find('option').removeAttr('selected'); - current.data('option').selected = true; - update(); - } - - if (space || enter) { - el.toggleClass(cls('opened')); - selectCurrent(); - } - - if (esc) - el.removeClass(cls('opened')); - - if (!tab) - return false; - }).bind('focus.tf', function() { - el.addClass(cls('focused')); - }).bind('blur.tf', function() { - setTimeout(function() { - if (!clicked) - el.removeClass(cls('focused')).removeClass(cls('opened')); - else { - clicked = false; - t.focus(); - } - }, 100); - return false; - }).after(el).detach().prependTo(el); - - var count = 0, - optgroup = $(t).find('optgroup').get(0); - - if (optgroup) - menu.html('
            '); - - $(t).find('option, optgroup').each(function() { - if ($(this).is('option')) { - var opt = $('
            ' + this.text + '
            '), - target = $(this).parent().is('optgroup') - ? optgroup - : (optgroup ? menu.find('ul') : menu); - opt.data({option: this}).appendTo(target); - } else { - optgroup = $('
          • ' + $(this).attr('label') + '
          • '); - $(menu).find('ul').append(optgroup); - } - }); - menu.data({count: count}); - - var update = function() { - var text = $(t).find('option:selected').text(); - el.find(sel('selected') + ' span').text(text); - }, - - selectCurrent = function() { - var current = false; - menu.find('div').each(function() { - if ($(this).data('option') === $(t).find('option:selected').get(0)) { - $(this).addClass(cls('hover')); - data.set({current: $(this)}); - current = $(this); - return false; - } - }); - return current; - }, - - fClick = function() { - if (!t.disabled) { - clicked = true; - $(sel('focused')).removeClass(cls('focused')); - selectCurrent(); - - setTimeout(function() { - t.focus(); - el.toggleClass(cls('opened')); - var div = menu.get(0); - if (el.hasClass(cls('opened')) && (div.scrollHeight > div.clientHeight)) { - menu.css({borderBottomRightRadius: 0}); - menu.find(sel('last')).css({borderBottomRightRadius: 0}); - disablePageScroll(menu); - } - clicked = false; - }, 200); - } - return true; - }; - - selected.mousedown(fClick); - button.mousedown(fClick); - - menu.find('div').mousedown(function() { - var oldOpt = $(t).find('option:selected').get(0), - newOpt = $(this).data('option'); - $(t).find('option').removeAttr('selected'); - newOpt.selected = true; - update(); - clicked = true; - el.removeClass(cls('opened')); - setTimeout(function() { - t.focus(); - clicked = false; - if (oldOpt !== newOpt) - $(t).trigger('change'); - }, 200); - }).mouseover(function() { - menu.find('div').removeClass(cls('hover')); - $(this).addClass(cls('hover')); - }).mouseout(function() { - $(this).removeClass(cls('hover')); - }); - - selected.css({ - width: menu.outerWidth() - outerHSpace(selected) - }); - var i = 0; - do { - el.css({ - width: selected.outerWidth() + button.outerWidth() + i++ - }); - } while ((selected.offset().top != button.offset().top) && (i < 10000)); - menu.css({ - marginTop: el.outerHeight() - 1, - width: el.outerWidth() - outerHSpace(menu) - }).find('li').first().addClass(cls('first')); - menu.find('li').last().addClass(cls('last')); - menu.find('li').each(function() { - $(this).find('div').first().addClass(cls('group-first')).parent().find('div').last().addClass(cls('group-last')); - }); - menu.find('div').first().addClass(cls('first')); - menu.find('div').last().addClass(cls('last')); - var firstLi = menu.find('li').first(), - lastLi = menu.find('li').last(); - if (firstLi.get(0) && firstLi.prev().get(0)) - firstLi.removeClass(cls('first')); - if (lastLi.get(0) && lastLi.next().get(0)) - lastLi.removeClass(cls('last')); - - update(); - - disableSelect(el); - - t.transForm.value = function(value) { - if (typeof value == "undefined") - return t.value; - var oldValue = t.value; - t.value = value; - update(); - }; - }, - - multiple: function() { - - if (!construct) { - el = $(t).parent(); - return; - } - - el = $('
            '); - - var count = 0, - optgroup = $(t).find('optgroup').get(0); - - if (optgroup) - el.html('
              '); - - $(t).find('option, optgroup').each(function() { - if ($(this).is('option')) { - var opt = $('
              ' + this.text + '
              '), - inGroup = $(this).parent().is('optgroup'), - target = inGroup - ? optgroup - : (optgroup ? el.find('ul') : el); - opt.data({option: this}).appendTo(target); - - if (this.selected) - opt.addClass(cls('selected')); - if (this === $(t).find('option').last().get(0)) - opt.addClass(cls('last')); - if (!inGroup && (this === $(t).find('option').first().get(0))) - opt.addClass(cls('first')); - if (inGroup) { - if (this === $(this).parent().find('option').last().get(0)) - opt.addClass(cls('group-last')); - if (this === $(this).parent().find('option').first().get(0)) - opt.addClass(cls('group-first')); - } - - } else { - optgroup = $('
            • ' + $(this).attr('label') + '
            • '); - if (this === $(t).find('optgroup, option').first().get(0)) - optgroup.addClass(cls('first')); - if (this === $(t).find('optgroup').last().get(0)) - optgroup.addClass(cls('last')); - el.find('ul').append(optgroup); - } - }); - - el.data({count: count}); - $(t).after(el).detach().prependTo(el); - disableSelect(el); - - var div = el.get(0); - if (div.scrollHeight > div.clientHeight) { - el.css({ - width: el.innerWidth() + scrollbarWidth, - borderTopRightRadius: 0, - borderBottomRightRadius: 0 - }); - el.find('div' + sel('first')).css({borderTopRightRadius: 0}); - el.find('div' + sel('last')).css({borderBottomRightRadius: 0}); - el.find('li' + sel('last')).css({borderBottomRightRadius: 0}); - disablePageScroll(el); - } - - var liLast = el.find('li' + sel('last')); - if (liLast.get(0) && liLast.next().get(0)) - liLast.removeClass(cls('last')); - - el.find('div').mouseenter(function() { - if (!t.disabled) - $(this).addClass(cls('hover')); - }).mouseleave(function() { - if (!t.disabled) - $(this).removeClass(cls('hover')); - }).click(function(e) { - if (t.disabled) - return false; - var option = $(this).data('option'); - if (option.selected) { - $(this).removeClass(cls('selected')); - option.selected = false; - } else { - $(this).addClass(cls('selected')); - option.selected = true - } - if (e.shiftKey && option.selected) { - var elm, next = true, - index = parseInt($(this).attr('class').split(cls('index-'))[1].split(/\s/)[0]); - while(index && next) { - index--; - elm = el.find(sel('index-') + index); - if (elm.hasClass(cls('selected'))) - next = false; - else { - elm.addClass(cls('selected')); - elm.data('option').selected = true; - } - } - } - $(t).trigger('change'); - }); - - el.click(function() { - var top = el.scrollTop(); - t.focus(); - el.scrollTop(top); - }); - - $(t).bind('focus.tf', function() { - el.addClass(cls('focused')); - }).bind('blur.tf', function() { - el.removeClass(cls('focused')) - }).bind('change.tf', function() { - $(t).find('option').each(function(i) { - var div = el.find(sel('index-') + i); - if (this.selected) - div.addClass(cls('selected')); - else - div.removeClass(cls('selected')); - }); - }); - - t.transForm.values = function(values) { - - // Get values - if (typeof values == "undefined") { - var ret = []; - $(t).find('option:selected').each(function() { - ret.push(this.value); - }); - return ret; - } - - if (!$.isArray(values)) - return; - - // Set values - $(t).find('option').attr({selected: false}); - el.find('div').removeClass(cls('selected')); - - $.each(values, function(j, v) { - $(t).find('option').each(function(i) { - if (this.value === v) { - this.selected = true; - el.find(sel('index-') + i).addClass(cls('selected')); - } - }); - }); - }; - }, - - textarea: function() { - - if (construct || destruct) - $(t).css({ - overflow: '', - height: '', - borderTopRightRadius: '', - borderBottomRightRadius: '', - borderBottomLeftRadius: '' - }); - - toggleClass(t, cls(tagName)); - - if (!construct) - return; - - var update; - - if (o.textarea.autoExpand) { - $(t).css({overflow: 'hidden'}); - - update = function() { - $(t).scrollTop(0); - - if (t.clientHeight >= t.scrollHeight) - $(t).css({height: 1}); - - $(t).css({height: t.scrollHeight + (document.doctype ? -outerVSpace($(t), 'p') : outerVSpace($(t), 'b'))}); - }; - - } else - update = function() { - - var vScroll = (t.clientHeight < t.scrollHeight), - hScroll = (t.clientWidth < t.scrollWidth); - - if (!store.r) - store.r = { - tr: $(t).css('borderTopRightRadius'), - br: $(t).css('borderBottomRightRadius'), - bl: $(t).css('borderBottomLeftRadius') - }; - - $(t).css({ - borderBottomRightRadius: (vScroll || hScroll) ? 0 : store.r.br, - borderTopRightRadius: vScroll ? 0 : store.r.tr, - borderBottomLeftRadius: hScroll ? 0 : store.r.bl - }); - }; - - var u = function() { - update(); - var maxLength = o.textarea.maxLength; - if (maxLength && (t.value.length > maxLength)) - t.value = t.value.substr(0, maxLength); - }; - - u(); $(t).bind('keyup.tf', u).bind('keydown.tf', u).bind('change.tf', u).bind('scroll.tf', u); - - t.transForm.readOnly = function(readOnly) { - t.readOnly = readOnly; - if (readOnly) - $(t).addClass(cls('readOnly')); - else - $(t).removeClass(cls('readOnly')); - }; - }, - - button: function() { - - if (!construct) { - el = $(t).parent(); - return; - } - - el = $('
              '); - - $(t).after(el).detach().appendTo(el); - el.find('span').text(t.textContent); - - $(t).css({ - width: el.innerWidth() + outerHSpace(el), - height: el.innerHeight() + outerVSpace(el), - marginLeft: - parseInt(el.css('borderLeftWidth')), - marginTop: - parseInt(el.css('borderTopWidth')) - }).bind('focus.tf', function() { - el.addClass(cls('focused')); - }).bind('blur.tf', function() { - el.removeClass(cls('focused')); - }).bind('mousedown.tf', function() { - el.addClass(cls('focused')); - }); - }, - - file: function() { - - if (!construct) { - el = $(t).parent(); - return; - } - - el = $('
              ' + o.file.browse + '
               
              '); - - $(t).after(el).detach().prependTo(el); - - var info = el.find(sel('info')), - button = el.find(sel('button')), - u = function() { - var files = t.files; - if (!files || (files.length <= 0)) - info.find('span').html(o.file.noFile); - else - info.find('span').text((files.length == 1) ? files[0]['name'] : o.file.count.replace('{count}', files.length)); - el.attr('label', $(t).attr('label')) - }; - - var i = 0; - do { - info.css({ - width: el.innerWidth() - button.outerWidth() - outerHSpace(info) - i++ - }); - } while ((info.offset().top != button.offset().top) && (i < 10000)); - - $(t).css({ - width: el.outerWidth(), - height: el.outerHeight() - }).bind('focus.tf', function() { - $(sel('focused')).removeClass(cls('focused')); - el.addClass(cls('focused')); - }).bind('blur.tf', function() { - el.removeClass(cls('focused')); - }).bind('change.tf', u).bind('click.tf', function() { - t.focus(); - }); - - u(); - }, - - checkbox: function() { - - if (!construct) { - el = $(t).parent(); - return; - } - - el = $('
              '); - - var u = function() { - if (t.checked) - el.addClass(cls('checked')); - else - el.removeClass(cls('checked')); - }, - label = $(t).attr('id'); - if (label) - label = $('label[for="' + label + '"]'); - - disableSelect(label); - - $(t).after(el).detach().appendTo(el).bind('focus.tf', function() { - el.addClass(cls('focused')); - if (label.get(0)) - label.addClass(cls('focused')); - }).bind('blur.tf', function() { - el.removeClass(cls('focused')); - if (label.get(0)) - label.removeClass(cls('focused')); - }).bind('click.tf', function() { - u(); - $(sel('focused')).removeClass(cls('focused')); - el.addClass(cls('focused')); - if (label.get(0)) - label.addClass(cls('focused')); - t.focus(); - }).bind('change.tf', u); - - u(); - - t.transForm.checked = function(checked) { - if (typeof checked == "undefined") - return t.checked; - t.checked = !!checked; - u(); - }; - }, - - radio: function() { - - if (!construct) { - el = $(t).parent(); - return; - } - - el = $('
              '); - - var radios = $(t).parents('body, form').find('input[type="radio"][name="' + t.name + '"]'), - u = function() { - $(radios).each(function() { - if (this.checked) - $(this).parent().addClass(cls('checked')); - else - $(this).parent().removeClass(cls('checked')); - }); - }, - f = function(focused) { - if (focused) { - $(radios).parent().addClass(cls('focused')); - $.each(labels, function(i, l) { - l.addClass(cls('focused')); - }); - } else { - $(radios).parent().removeClass(cls('focused')); - $.each(labels, function(i, l) { - l.removeClass(cls('focused')); - }); - } - }, - labels = []; - - $.each(radios, function(i, r) { - var label = $(r).attr('id'); - if (!label) - return; - label = $('label[for="' + label +'"]'); - if (!label.get(0)) - return; - labels.push(label); - disableSelect(label); - }); - - $(t).after(el).detach().appendTo(el).bind('focus.tf', function() { - f(true); - }).bind('blur.tf', function() { - f(false); - }).bind('click.tf', function() { - u(); - f(true); - t.focus(); - }).bind('change.tf', u); - - u(); - - t.transForm.checked = function(checked) { - if (typeof checked == "undefined") - return t.checked; - t.checked = !!checked; - u(); - }; - }, - - submit: function() { - this.button(); - }, - - reset: function() { - this.button(); - } - }; - - if (typeof t.transForm == "undefined") - t.transForm = { - disable: function(disabled) { - var target = el ? el : t; - t.disabled = !!disabled; - if (!!disabled) - target.addClass(cls('disabled')); - else - target.removeClass(cls('disabled')); - }, - destruct: function() { - destruct = true; - construct = false; - build[tagName](); - destructFunc(); - } - }; - - build[tagName](); - - // Common Construct - if (construct) { - var target = el ? el : $(t); - if (t.disabled) - target.addClass(cls('disabled')); - if (t.readOnly) - target.addClass(cls('readOnly')); - data.set({ - prefix: prefix, - transformed: true - }); - } - - // Common Destruct - var destructFunc = function() { - $(t).removeData('transForm').unbind('.tf'); - if (el) { - $(t).detach(); - el.after(t).detach(); - } - if (typeof t.transForm != "undefined") - delete t.transForm; - var classes = $(t).attr('class'); - if (!classes) - return; - $.each(classes.split(/\s+/g), function(i, c) { - if (c.substr(0, prefix.length) == prefix) - $(t).removeClass(c); - }); - }; - if (destruct) - destructFunc(); - - // Toggle disabled - if (typeof o.disabled != "undefined") { - t.disabled = !!o.disabled; - var target = el ? el : $(t); - if (o.disabled) - target.addClass(cls('disabled')); - else - target.removeClass(cls('disabled')); - } - - // Toggle read-only - if ((typeof o.readOnly != "undefined") && - ( - (tagName == "textarea") || - ( - (tagName == "input") && - (fields.indexOf('|' + type + '|') !== -1) - ) - ) - ) { - var readonly = !!o.readOnly; - $(t).attr({readonly: readonly}); - if (!transForm) - return; - if (readonly) - $(t).addClass(cls('readOnly')); - else - $(t).removeClass(cls('readOnly')); - } - }); - return $(this); - }; - -})(jQuery); diff --git a/js/006.jquery.uniform.js b/js/006.jquery.uniform.js new file mode 100644 index 0000000..e936be4 --- /dev/null +++ b/js/006.jquery.uniform.js @@ -0,0 +1,1071 @@ +/* + +Uniform v2.1.2 +Copyright © 2009 Josh Pyles / Pixelmatrix Design LLC +http://pixelmatrixdesign.com + +Requires jQuery 1.3 or newer + +Much thanks to Thomas Reynolds and Buck Wilson for their help and advice on +this. + +Disabling text selection is made possible by Mathias Bynens + and his noSelect plugin. +, which is embedded. + +Also, thanks to David Kaneda and Eugene Bond for their contributions to the +plugin. + +Tyler Akins has also rewritten chunks of the plugin, helped close many issues, +and ensured version 2 got out the door. + +License: +MIT License - http://www.opensource.org/licenses/mit-license.php + +Enjoy! + +*/ + +/*global jQuery, document, navigator*/ + +(function (wind, $, undef) { + "use strict"; + + /** + * Use .prop() if jQuery supports it, otherwise fall back to .attr() + * + * @param jQuery $el jQuery'd element on which we're calling attr/prop + * @param ... All other parameters are passed to jQuery's function + * @return The result from jQuery + */ + function attrOrProp($el) { + var args = Array.prototype.slice.call(arguments, 1); + + if ($el.prop) { + // jQuery 1.6+ + return $el.prop.apply($el, args); + } + + // jQuery 1.5 and below + return $el.attr.apply($el, args); + } + + /** + * For backwards compatibility with older jQuery libraries, only bind + * one thing at a time. Also, this function adds our namespace to + * events in one consistent location, shrinking the minified code. + * + * The properties on the events object are the names of the events + * that we are supposed to add to. It can be a space separated list. + * The namespace will be added automatically. + * + * @param jQuery $el + * @param Object options Uniform options for this element + * @param Object events Events to bind, properties are event names + */ + function bindMany($el, options, events) { + var name, namespaced; + + for (name in events) { + if (events.hasOwnProperty(name)) { + namespaced = name.replace(/ |$/g, options.eventNamespace); + $el.bind(namespaced, events[name]); + } + } + } + + /** + * Bind the hover, active, focus, and blur UI updates + * + * @param jQuery $el Original element + * @param jQuery $target Target for the events (our div/span) + * @param Object options Uniform options for the element $target + */ + function bindUi($el, $target, options) { + bindMany($el, options, { + focus: function () { + $target.addClass(options.focusClass); + }, + blur: function () { + $target.removeClass(options.focusClass); + $target.removeClass(options.activeClass); + }, + mouseenter: function () { + $target.addClass(options.hoverClass); + }, + mouseleave: function () { + $target.removeClass(options.hoverClass); + $target.removeClass(options.activeClass); + }, + "mousedown touchbegin": function () { + if (!$el.is(":disabled")) { + $target.addClass(options.activeClass); + } + }, + "mouseup touchend": function () { + $target.removeClass(options.activeClass); + } + }); + } + + /** + * Remove the hover, focus, active classes. + * + * @param jQuery $el Element with classes + * @param Object options Uniform options for the element + */ + function classClearStandard($el, options) { + $el.removeClass(options.hoverClass + " " + options.focusClass + " " + options.activeClass); + } + + /** + * Add or remove a class, depending on if it's "enabled" + * + * @param jQuery $el Element that has the class added/removed + * @param String className Class or classes to add/remove + * @param Boolean enabled True to add the class, false to remove + */ + function classUpdate($el, className, enabled) { + if (enabled) { + $el.addClass(className); + } else { + $el.removeClass(className); + } + } + + /** + * Updating the "checked" property can be a little tricky. This + * changed in jQuery 1.6 and now we can pass booleans to .prop(). + * Prior to that, one either adds an attribute ("checked=checked") or + * removes the attribute. + * + * @param jQuery $tag Our Uniform span/div + * @param jQuery $el Original form element + * @param Object options Uniform options for this element + */ + function classUpdateChecked($tag, $el, options) { + setTimeout(function() { // sunhater@sunhater.com + + var c = "checked", + isChecked = $el.is(":" + c); + + if ($el.prop) { + // jQuery 1.6+ + $el.prop(c, isChecked); + } else { + // jQuery 1.5 and below + if (isChecked) { + $el.attr(c, c); + } else { + $el.removeAttr(c); + } + } + classUpdate($tag, options.checkedClass, isChecked); + }, 1); + } + + /** + * Set or remove the "disabled" class for disabled elements, based on + * if the element is detected to be disabled. + * + * @param jQuery $tag Our Uniform span/div + * @param jQuery $el Original form element + * @param Object options Uniform options for this element + */ + function classUpdateDisabled($tag, $el, options) { + classUpdate($tag, options.disabledClass, $el.is(":disabled")); + } + + /** + * Wrap an element inside of a container or put the container next + * to the element. See the code for examples of the different methods. + * + * Returns the container that was added to the HTML. + * + * @param jQuery $el Element to wrap + * @param jQuery $container Add this new container around/near $el + * @param String method One of "after", "before" or "wrap" + * @return $container after it has been cloned for adding to $el + */ + function divSpanWrap($el, $container, method) { + switch (method) { + case "after": + // Result: + $el.after($container); + return $el.next(); + case "before": + // Result: + $el.before($container); + return $el.prev(); + case "wrap": + // Result: + $el.wrap($container); + return $el.parent(); + } + + return null; + } + + + /** + * Create a div/span combo for uniforming an element + * + * @param jQuery $el Element to wrap + * @param Object options Options for the element, set by the user + * @param Object divSpanConfig Options for how we wrap the div/span + * @return Object Contains the div and span as properties + */ + function divSpan($el, options, divSpanConfig) { + var $div, $span, id; + + if (!divSpanConfig) { + divSpanConfig = {}; + } + + divSpanConfig = $.extend({ + bind: {}, + divClass: null, + divWrap: "wrap", + spanClass: null, + spanHtml: null, + spanWrap: "wrap" + }, divSpanConfig); + + $div = $('
              '); + $span = $(''); + + // Automatically hide this div/span if the element is hidden. + // Do not hide if the element is hidden because a parent is hidden. + if (options.autoHide && $el.is(':hidden') && $el.css('display') === 'none') { + $div.hide(); + } + + if (divSpanConfig.divClass) { + $div.addClass(divSpanConfig.divClass); + } + + if (options.wrapperClass) { + $div.addClass(options.wrapperClass); + } + + if (divSpanConfig.spanClass) { + $span.addClass(divSpanConfig.spanClass); + } + + id = attrOrProp($el, 'id'); + + if (options.useID && id) { + attrOrProp($div, 'id', options.idPrefix + '-' + id); + } + + if (divSpanConfig.spanHtml) { + $span.html(divSpanConfig.spanHtml); + } + + $div = divSpanWrap($el, $div, divSpanConfig.divWrap); + $span = divSpanWrap($el, $span, divSpanConfig.spanWrap); + classUpdateDisabled($div, $el, options); + return { + div: $div, + span: $span + }; + } + + + /** + * Wrap an element with a span to apply a global wrapper class + * + * @param jQuery $el Element to wrap + * @param object options + * @return jQuery Wrapper element + */ + function wrapWithWrapperClass($el, options) { + var $span; + + if (!options.wrapperClass) { + return null; + } + + $span = $('').addClass(options.wrapperClass); + $span = divSpanWrap($el, $span, "wrap"); + return $span; + } + + + /** + * Test if high contrast mode is enabled. + * + * In high contrast mode, background images can not be set and + * they are always returned as 'none'. + * + * @return boolean True if in high contrast mode + */ + function highContrast() { + var c, $div, el, rgb; + + // High contrast mode deals with white and black + rgb = 'rgb(120,2,153)'; + $div = $('
              '); + $('body').append($div); + el = $div.get(0); + + // $div.css() will get the style definition, not + // the actually displaying style + if (wind.getComputedStyle) { + c = wind.getComputedStyle(el, '').color; + } else { + c = (el.currentStyle || el.style || {}).color; + } + + $div.remove(); + return c.replace(/ /g, '') !== rgb; + } + + + /** + * Change text into safe HTML + * + * @param String text + * @return String HTML version + */ + function htmlify(text) { + if (!text) { + return ""; + } + + return $('').text(text).html(); + } + + /** + * If not MSIE, return false. + * If it is, return the version number. + * + * @return false|number + */ + function isMsie() { + return navigator.cpuClass && !navigator.product; + } + + /** + * Return true if this version of IE allows styling + * + * @return boolean + */ + function isMsieSevenOrNewer() { + if (wind.XMLHttpRequest !== undefined) { + return true; + } + + return false; + } + + /** + * Test if the element is a multiselect + * + * @param jQuery $el Element + * @return boolean true/false + */ + function isMultiselect($el) { + var elSize; + + if ($el[0].multiple) { + return true; + } + + elSize = attrOrProp($el, "size"); + + if (!elSize || elSize <= 1) { + return false; + } + + return true; + } + + /** + * Meaningless utility function. Used mostly for improving minification. + * + * @return false + */ + function returnFalse() { + return false; + } + + /** + * noSelect plugin, very slightly modified + * http://mths.be/noselect v1.0.3 + * + * @param jQuery $elem Element that we don't want to select + * @param Object options Uniform options for the element + */ + function noSelect($elem, options) { + var none = 'none'; + bindMany($elem, options, { + 'selectstart dragstart mousedown': returnFalse + }); + + $elem.css({ + MozUserSelect: none, + msUserSelect: none, + webkitUserSelect: none, + userSelect: none + }); + } + + /** + * Updates the filename tag based on the value of the real input + * element. + * + * @param jQuery $el Actual form element + * @param jQuery $filenameTag Span/div to update + * @param Object options Uniform options for this element + */ + function setFilename($el, $filenameTag, options) { + var filename = $el.val(); + + if (filename === "") { + filename = options.fileDefaultHtml; + } else { + filename = filename.split(/[\/\\]+/); + filename = filename[(filename.length - 1)]; + } + + $filenameTag.text(filename); + } + + + /** + * Function from jQuery to swap some CSS values, run a callback, + * then restore the CSS. Modified to pass JSLint and handle undefined + * values with 'use strict'. + * + * @param jQuery $el Element + * @param object newCss CSS values to swap out + * @param Function callback Function to run + */ + function swap($elements, newCss, callback) { + var restore, item; + + restore = []; + + $elements.each(function () { + var name; + + for (name in newCss) { + if (Object.prototype.hasOwnProperty.call(newCss, name)) { + restore.push({ + el: this, + name: name, + old: this.style[name] + }); + + this.style[name] = newCss[name]; + } + } + }); + + callback(); + + while (restore.length) { + item = restore.pop(); + item.el.style[item.name] = item.old; + } + } + + + /** + * The browser doesn't provide sizes of elements that are not visible. + * This will clone an element and add it to the DOM for calculations. + * + * @param jQuery $el + * @param String method + */ + function sizingInvisible($el, callback) { + var targets; + + // We wish to target ourselves and any parents as long as + // they are not visible + targets = $el.parents(); + targets.push($el[0]); + targets = targets.not(':visible'); + swap(targets, { + visibility: "hidden", + display: "block", + position: "absolute" + }, callback); + } + + + /** + * Standard way to unwrap the div/span combination from an element + * + * @param jQuery $el Element that we wish to preserve + * @param Object options Uniform options for the element + * @return Function This generated function will perform the given work + */ + function unwrapUnwrapUnbindFunction($el, options) { + return function () { + $el.unwrap().unwrap().unbind(options.eventNamespace); + }; + } + + var allowStyling = true, // False if IE6 or other unsupported browsers + highContrastTest = false, // Was the high contrast test ran? + uniformHandlers = [ // Objects that take care of "unification" + { + // Buttons + match: function ($el) { + return $el.is("a, button, :submit, :reset, input[type='button']"); + }, + apply: function ($el, options) { + var $div, defaultSpanHtml, ds, getHtml, doingClickEvent; + defaultSpanHtml = options.submitDefaultHtml; + + if ($el.is(":reset")) { + defaultSpanHtml = options.resetDefaultHtml; + } + + if ($el.is("a, button")) { + // Use the HTML inside the tag + getHtml = function () { + return $el.html() || defaultSpanHtml; + }; + } else { + // Use the value property of the element + getHtml = function () { + return htmlify(attrOrProp($el, "value")) || defaultSpanHtml; + }; + } + + ds = divSpan($el, options, { + divClass: options.buttonClass, + spanHtml: getHtml() + }); + $div = ds.div; + bindUi($el, $div, options); + doingClickEvent = false; + bindMany($div, options, { + "click touchend": function () { + var ev, res, target, href; + + if (doingClickEvent) { + return; + } + + if ($el.is(':disabled')) { + return; + } + + doingClickEvent = true; + + if ($el[0].dispatchEvent) { + ev = document.createEvent("MouseEvents"); + ev.initEvent("click", true, true); + res = $el[0].dispatchEvent(ev); + + if ($el.is('a') && res) { + target = attrOrProp($el, 'target'); + href = attrOrProp($el, 'href'); + + if (!target || target === '_self') { + document.location.href = href; + } else { + wind.open(href, target); + } + } + } else { + $el.click(); + } + + doingClickEvent = false; + } + }); + noSelect($div, options); + return { + remove: function () { + // Move $el out + $div.after($el); + + // Remove div and span + $div.remove(); + + // Unbind events + $el.unbind(options.eventNamespace); + return $el; + }, + update: function () { + classClearStandard($div, options); + classUpdateDisabled($div, $el, options); + $el.detach(); + ds.span.html(getHtml()).append($el); + } + }; + } + }, + { + // Checkboxes + match: function ($el) { + return $el.is(":checkbox"); + }, + apply: function ($el, options) { + var ds, $div, $span; + ds = divSpan($el, options, { + divClass: options.checkboxClass + }); + $div = ds.div; + $span = ds.span; + + // Add focus classes, toggling, active, etc. + bindUi($el, $div, options); + bindMany($el, options, { + "click touchend": function () { + classUpdateChecked($span, $el, options); + } + }); + classUpdateChecked($span, $el, options); + return { + remove: unwrapUnwrapUnbindFunction($el, options), + update: function () { + classClearStandard($div, options); + $span.removeClass(options.checkedClass); + classUpdateChecked($span, $el, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // File selection / uploads + match: function ($el) { + return $el.is(":file"); + }, + apply: function ($el, options) { + var ds, $div, $filename, $button; + + // The "span" is the button + ds = divSpan($el, options, { + divClass: options.fileClass, + spanClass: options.fileButtonClass, + spanHtml: options.fileButtonHtml, + spanWrap: "after" + }); + $div = ds.div; + $button = ds.span; + $filename = $("").html(options.fileDefaultHtml); + $filename.addClass(options.filenameClass); + $filename = divSpanWrap($el, $filename, "after"); + + // Set the size + if (!attrOrProp($el, "size")) { + attrOrProp($el, "size", $div.width() / 10); + } + + // Actions + function filenameUpdate() { + setFilename($el, $filename, options); + } + + bindUi($el, $div, options); + + // Account for input saved across refreshes + filenameUpdate(); + + // IE7 doesn't fire onChange until blur or second fire. + if (isMsie()) { + // IE considers browser chrome blocking I/O, so it + // suspends tiemouts until after the file has + // been selected. + bindMany($el, options, { + click: function () { + $el.trigger("change"); + setTimeout(filenameUpdate, 0); + } + }); + } else { + // All other browsers behave properly + bindMany($el, options, { + change: filenameUpdate + }); + } + + noSelect($filename, options); + noSelect($button, options); + return { + remove: function () { + // Remove filename and button + $filename.remove(); + $button.remove(); + + // Unwrap parent div, remove events + return $el.unwrap().unbind(options.eventNamespace); + }, + update: function () { + classClearStandard($div, options); + setFilename($el, $filename, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // Input fields (text) + match: function ($el) { + if ($el.is("input")) { + var t = (" " + attrOrProp($el, "type") + " ").toLowerCase(), + allowed = " color date datetime datetime-local email month number password search tel text time url week "; + return allowed.indexOf(t) >= 0; + } + + return false; + }, + apply: function ($el, options) { + var elType, $wrapper; + + elType = attrOrProp($el, "type"); + $el.addClass(options.inputClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + if (options.inputAddTypeAsClass) { + $el.addClass(elType); + } + + return { + remove: function () { + $el.removeClass(options.inputClass); + + if (options.inputAddTypeAsClass) { + $el.removeClass(elType); + } + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + }, + { + // Radio buttons + match: function ($el) { + return $el.is(":radio"); + }, + apply: function ($el, options) { + var ds, $div, $span; + ds = divSpan($el, options, { + divClass: options.radioClass + }); + $div = ds.div; + $span = ds.span; + + // Add classes for focus, handle active, checked + bindUi($el, $div, options); + bindMany($el, options, { + "click touchend": function () { + // Find all radios with the same name, then update + // them with $.uniform.update() so the right + // per-element options are used + $.uniform.update($(':radio[name="' + attrOrProp($el, "name") + '"]')); + } + }); + classUpdateChecked($span, $el, options); + return { + remove: unwrapUnwrapUnbindFunction($el, options), + update: function () { + classClearStandard($div, options); + classUpdateChecked($span, $el, options); + classUpdateDisabled($div, $el, options); + } + }; + } + }, + { + // Select lists, but do not style multiselects here + match: function ($el) { + if ($el.is("select") && !isMultiselect($el)) { + return true; + } + + return false; + }, + apply: function ($el, options) { + var ds, $div, $span, origElemWidth; + + if (options.selectAutoWidth) { + sizingInvisible($el, function () { + origElemWidth = $el.width(); + }); + } + + ds = divSpan($el, options, { + divClass: options.selectClass, + spanHtml: ($el.find(":selected:first") || $el.find("option:first")).html(), + spanWrap: "before" + }); + $div = ds.div; + $span = ds.span; + + if (options.selectAutoWidth) { + // Use the width of the select and adjust the + // span and div accordingly + sizingInvisible($el, function () { + // Force "display: block" - related to bug #287 + swap($([ $span[0], $div[0] ]), { + display: "block" + }, function () { + var spanPad; + spanPad = $span.outerWidth() - $span.width(); + $div.width(origElemWidth + spanPad); + $span.width(origElemWidth); + }); + }); + } else { + // Force the select to fill the size of the div + $div.addClass('fixedWidth'); + } + + // Take care of events + bindUi($el, $div, options); + bindMany($el, options, { + change: function () { + $span.html($el.find(":selected").html()); + $div.removeClass(options.activeClass); + }, + "click touchend": function () { + // IE7 and IE8 may not update the value right + // until after click event - issue #238 + var selHtml = $el.find(":selected").html(); + + if ($span.html() !== selHtml) { + // Change was detected + // Fire the change event on the select tag + $el.trigger('change'); + } + }, + keyup: function () { + $span.html($el.find(":selected").html()); + } + }); + noSelect($span, options); + return { + remove: function () { + // Remove sibling span + $span.remove(); + + // Unwrap parent div + $el.unwrap().unbind(options.eventNamespace); + return $el; + }, + update: function () { + if (options.selectAutoWidth) { + // Easier to remove and reapply formatting + $.uniform.restore($el); + $el.uniform(options); + } else { + classClearStandard($div, options); + + // Reset current selected text + $span.html($el.find(":selected").html()); + classUpdateDisabled($div, $el, options); + } + } + }; + } + }, + { + // Select lists - multiselect lists only + match: function ($el) { + if ($el.is("select") && isMultiselect($el)) { + return true; + } + + return false; + }, + apply: function ($el, options) { + var $wrapper; + + $el.addClass(options.selectMultiClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + return { + remove: function () { + $el.removeClass(options.selectMultiClass); + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + }, + { + // Textareas + match: function ($el) { + return $el.is("textarea"); + }, + apply: function ($el, options) { + var $wrapper; + + $el.addClass(options.textareaClass); + $wrapper = wrapWithWrapperClass($el, options); + bindUi($el, $el, options); + + return { + remove: function () { + $el.removeClass(options.textareaClass); + + if ($wrapper) { + $el.unwrap(); + } + }, + update: returnFalse + }; + } + } + ]; + + // IE6 can't be styled - can't set opacity on select + if (isMsie() && !isMsieSevenOrNewer()) { + allowStyling = false; + } + + $.uniform = { + // Default options that can be overridden globally or when uniformed + // globally: $.uniform.defaults.fileButtonHtml = "Pick A File"; + // on uniform: $('input').uniform({fileButtonHtml: "Pick a File"}); + defaults: { + activeClass: "active", + autoHide: true, + buttonClass: "button", + checkboxClass: "checker", + checkedClass: "checked", + disabledClass: "disabled", + eventNamespace: ".uniform", + fileButtonClass: "action", + fileButtonHtml: "Choose File", + fileClass: "uploader", + fileDefaultHtml: "No file selected", + filenameClass: "filename", + focusClass: "focus", + hoverClass: "hover", + idPrefix: "uniform", + inputAddTypeAsClass: true, + inputClass: "uniform-input", + radioClass: "radio", + resetDefaultHtml: "Reset", + resetSelector: false, // We'll use our own function when you don't specify one + selectAutoWidth: true, + selectClass: "selector", + selectMultiClass: "uniform-multiselect", + submitDefaultHtml: "Submit", // Only text allowed + textareaClass: "uniform", + useID: true, + wrapperClass: null + }, + + // All uniformed elements - DOM objects + elements: [] + }; + + $.fn.uniform = function (options) { + var el = this; + options = $.extend({}, $.uniform.defaults, options); + + // If we are in high contrast mode, do not allow styling + if (!highContrastTest) { + highContrastTest = true; + + if (highContrast()) { + allowStyling = false; + } + } + + // Only uniform on browsers that work + if (!allowStyling) { + return this; + } + + // Code for specifying a reset button + if (options.resetSelector) { + $(options.resetSelector).mouseup(function () { + wind.setTimeout(function () { + $.uniform.update(el); + }, 10); + }); + } + + return this.each(function () { + var $el = $(this), i, handler, callbacks; + + // Avoid uniforming elements already uniformed - just update + if ($el.data("uniformed")) { + $.uniform.update($el); + return; + } + + // See if we have any handler for this type of element + for (i = 0; i < uniformHandlers.length; i = i + 1) { + handler = uniformHandlers[i]; + + if (handler.match($el, options)) { + callbacks = handler.apply($el, options); + $el.data("uniformed", callbacks); + + // Store element in our global array + $.uniform.elements.push($el.get(0)); + return; + } + } + + // Could not style this element + }); + }; + + $.uniform.restore = $.fn.uniform.restore = function (elem) { + if (elem === undef) { + elem = $.uniform.elements; + } + + $(elem).each(function () { + var $el = $(this), index, elementData; + elementData = $el.data("uniformed"); + + // Skip elements that are not uniformed + if (!elementData) { + return; + } + + // Unbind events, remove additional markup that was added + elementData.remove(); + + // Remove item from list of uniformed elements + index = $.inArray(this, $.uniform.elements); + + if (index >= 0) { + $.uniform.elements.splice(index, 1); + } + + $el.removeData("uniformed"); + }); + }; + + $.uniform.update = $.fn.uniform.update = function (elem) { + if (elem === undef) { + elem = $.uniform.elements; + } + + $(elem).each(function () { + var $el = $(this), elementData; + elementData = $el.data("uniformed"); + + // Skip elements that are not uniformed + if (!elementData) { + return; + } + + elementData.update($el, elementData.options); + }); + }; +}(this, jQuery)); \ No newline at end of file diff --git a/js/010.jquery.fixes.js b/js/010.jquery.fixes.js index c0b98ee..3fd4696 100644 --- a/js/010.jquery.fixes.js +++ b/js/010.jquery.fixes.js @@ -1,6 +1,6 @@ /** This file is part of KCFinder project * - * @desc My jQuery UI fixes + * @desc My jQuery UI & Uniform fixes * @package KCFinder * @version 3.12 * @author Pavel Tzonkov @@ -29,4 +29,39 @@ return ret; }; + $.fn.oldUniform = $.fn.uniform; + $.fn.uniform = function(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) { + var ret = $(this).oldUniform(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); + + $(this).each(function() { + var t = $(this); + + if (!t.hasClass('sh-uniform')) { + t.addClass('sh-uniform'); + + // Fix upload filename width + if (t.is('input[type="file"]')) { + var f = t.parent().find('.filename'); + f.css('width', f.innerWidth()); + } + + // Add an icon into select boxes + if (t.is('select') && !t.attr('multiple')) { + + var p = t.parent(), + height = p.height(), + width = p.outerWidth(), + width2 = p.find('span').outerWidth(); + + $('
              ').addClass('ui-icon').css({ + 'float': "right", + marginTop: - parseInt((height / 2) + 8), + marginRight: - parseInt((width - width2) / 2) - 7 + }).appendTo(p); + } + } + }); + return ret; + }; + })(jQuery); \ No newline at end of file diff --git a/js/020.jquery.rightClick.js b/js/020.jquery.rightClick.js index 7ccc1b0..4266e12 100644 --- a/js/020.jquery.rightClick.js +++ b/js/020.jquery.rightClick.js @@ -15,7 +15,6 @@ var events = "contextmenu rightclick"; $(this).each(function() { $(this).unbind(events).bind(events, function(e) { - $.globalBlur(); e.preventDefault(); $.clearSelection(); if ($.isFunction(func)) diff --git a/js/022.jquery.shDropUpload.js b/js/022.jquery.shDropUpload.js deleted file mode 100644 index 4886737..0000000 --- a/js/022.jquery.shDropUpload.js +++ /dev/null @@ -1,363 +0,0 @@ -/* - * jQuery shDropUpload v1.2 - * http://jquery.sunhater.com/shDropUpload - * 2014-08-12 - * - * Copyright (c) 2014 Pavel Tzonkov - * Dual licensed under the MIT and GPL licenses. - */ - -(function($) { - - /** @param localOptions Options about local files drag & drop - * @param remoteOptions Options about HTML objects drag & drop */ - - $.fn.shDropUpload = function(localOptions, remoteOptions) { - - // Compatibility check - if ((typeof XMLHttpRequest == "undefined") || - (typeof document.addEventListener == "undefined") || - (typeof File == "undefined") || - (typeof FileReader == "undefined") - ) - return; - - // Default options about local files drag & drop - var lo = { - - // URL to upload handler script - url: "", - - // File field name - param: "upload", - - // Maximum filesize in bytes. If a dragged file is too big, the browser crashes - maxFilesize: 10485760, - - // Called before all uploads. Useful for implementing some checks before uploads begins - // If it returns false, the uploading will be canceled. - precheck: function(evt) { - console.log("shDropUpload: Upload process started"); - return true; - }, - - // Called when an upload begins - begin: function(xhr, currentFile, filesCount) { - console.log("shDropUpload: Uploading file " + currentFile + " of " + filesCount + " (" + xhr.file.name + ")"); - }, - - // Called after successful upload request - success: function(xhr, currentFile, filesCount) { - console.log("shDropUpload: Upload success (" + xhr.file.name + ")"); - }, - - // Called when an upload request fails - error: function(xhr, currentFile, filesCount) { - console.log("shDropUpload: Upload request failed (" + xhr.file.name + ")"); - }, - - // Called when an upload request is aborted - abort: function(xhr, currentFile, filesCount) { - console.log("shDropUpload: Upload request aborted (" + xhr.file.name + ")"); - }, - - // Called when a file exceeds the maxFilesize option - filesizeCallback: function(xhr, currentFile, filesCount) { - console.log("shDropUpload: File is too big (" + xhr.file.name + ")"); - }, - - // Called when all files are proceeded - finish: function() { - console.log("shDropUpload: Upload process finished"); - } - }, - - // Default options about HTML objects drag & drop - ro = { - - // If a selection is dropped you could to fetch multiple URLs from selected HTML - // You can define the selectors URLs will be fetched from. If you want only images - // leave 'img[src]' only - selectors: 'img[src]', - //selectors: 'img[src], a[href], script[src], link[href]', - - // Check URLs for uniqueness - unique: true, - - // Ajax options - ajax: { - url: "", - type: "post", - dataType: "json", - data: { - url: "{url}", // {url} marks the URL from dragged object - type: "{type}" // {type} marks the tag type ("a" or "img") - }, - success: function(response) { - console.log("shDropUpload: URL has been passed to the server."); - }, - error: function() { - console.log("shDropUpload: Request failed!"); - } - } - }, - - utf8encode = function(string) { - string = string.replace(/\r\n/g, "\n"); - var c, utftext = ""; - - for (var n = 0; n < string.length; n++) { - - c = string.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } else if((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - } - - return utftext; - }; - - $.extend(true, ro, remoteOptions); - $.extend(true, lo, localOptions); - - if (!XMLHttpRequest.prototype.sendAsBinary) { - XMLHttpRequest.prototype.sendAsBinary = function(datastr) { - var ords = Array.prototype.map.call(datastr, function(x) { - return x.charCodeAt(0) & 0xff; - }), - ui8a = new Uint8Array(ords); - this.send(ui8a); - } - } - - $(this).each(function() { - var t = this, - uploadQueue = [], - uploadInProgress = false, - filesCount = 0, - boundary = "------multipartdropuploadboundary" + new Date().getTime(), - currentFile, - - dragOver = function(e) { - if (e.preventDefault) e.preventDefault(); - $(t).addClass('drag'); - return false; - }, - - dragEnter = function(e) { - if (e.preventDefault) e.preventDefault(); - return false; - }, - - dragLeave = function(e) { - if (e.preventDefault) e.preventDefault(); - $(t).removeClass('drag'); - return false; - }, - - drop = function(e) { - if (e.preventDefault) e.preventDefault(); - if (e.stopPropagation) e.stopPropagation(); - $(t).removeClass('drag'); - - try { - var el = e.dataTransfer.getData('text/html'); - } catch (e) { - var el = false; - } - - // Remote drop - if (el) { - - if (!remoteOptions) - return false; - - el = '
              ' + el.toString() + '
              '; - var urls = [], types = []; - - var selectors = $.isArray(ro.selectors) - ? ro.selectors - : ro.selectors.split(/\s*,\s*/g); - - $.each(selectors, function(i, selector) { - if (!/^[a-z0-9]+\[[a-z]+\]$/gi.test(selector)) - return true; - var type = selector.split('[')[0], - attr = selector.split('[')[1].split(']')[0]; - $(el).find(selector).each(function() { - var url = $(this).attr(attr); - if (ro.unique) - for (var i = 0; i < urls.length; i++) - if ((urls[i] == url) && (types[i] == type)) - return true; - urls.push(url); - types.push(type); - }); - }); - - if (!urls.length) - return false; - - if (urls.length == 1) { - urls = urls[0]; - types = types[0]; - } - - var opts = $.extend(true, {}, ro.ajax); - if (opts.data) { - $.each(opts.data, function(i, j) { - if (j == "{url}") - opts.data[i] = urls; - if (j == "{type}") - opts.data[i] = types; - }); - } - $.ajax(opts); - - // Local drop - } else { - if (!localOptions) - return false; - - filesCount += e.dataTransfer.files.length; - - if (!filesCount || !lo.precheck(e)) - return false; - - for (var i = 0; i < filesCount; i++) { - var file = e.dataTransfer.files[i]; - uploadQueue.push(file); - } - - uploadNext(); - } - - return false; - }, - - uploadNext = function() { - if (uploadInProgress) - return false; - - if (uploadQueue && uploadQueue.length) { - - var file = uploadQueue.shift(), - currentNum = filesCount - uploadQueue.length, - reader = new FileReader(), - ie = (typeof reader.readAsBinaryString == "undefined"); - - currentFile = reader.file = file; - - reader.onerror = function(evt) { - evt.file = file; - lo.error(evt, currentNum, filesCount); - uploadNext(); - }; - - reader.onload = function(evt) { - uploadInProgress = true; - - var xhr = new XMLHttpRequest(), - postbody = '--' + boundary + '\r\nContent-Disposition: form-data; name="' + lo.param + '"'; - - xhr.file = evt.target.file; - - lo.begin(xhr, currentNum, filesCount); - - if (lo.maxFilesize && (xhr.file.size > lo.maxFilesize)) { - uploadInProgress = false; - lo.filesizeCallback(xhr, currentNum, filesCount); - uploadNext(); - return; - } - - if (ie) { - var binary = "", - bytes = new Uint8Array(evt.target.result); - - for (var i = 0; i < bytes.byteLength; i++) - binary += String.fromCharCode(bytes[i]); - } - - if (xhr.file.name) - postbody += '; filename="' + utf8encode(xhr.file.name) + '"'; - postbody += '\r\n'; - if (xhr.file.size) - postbody += "Content-Length: " + xhr.file.size + "\r\n"; - postbody += "Content-Type: " + xhr.file.type + "\r\n\r\n" + (ie ? binary : evt.target.result) + "\r\n--" + boundary + "--\r\n"; - - xhr.open('post', lo.url, true); - xhr.setRequestHeader('Content-Type', "multipart/form-data; boundary=" + boundary); - - xhr.onload = function() { - uploadInProgress = false; - lo.success(xhr, currentNum, filesCount); - uploadNext(); - }; - - xhr.onerror = function() { - uploadInProgress = false; - lo.error(xhr, currentNum, filesCount); - uploadNext(); - }; - - xhr.onabort = function() { - uploadInProgress = false; - lo.abort(xhr, currentNum, filesCount); - uploadNext(); - }; - - xhr.sendAsBinary(postbody); - }; - - if (ie) - reader.readAsArrayBuffer(file); - else - reader.readAsBinaryString(file); - - } else { - filesCount = 0; - var loop = setInterval(function() { - if (uploadInProgress) return; - boundary = "------multipartdropuploadboundary" + new Date().getTime(); - uploadQueue = []; - clearInterval(loop); - lo.finish(); - }, 333); - } - }; - - if (!$(t).data('shdu')) - $(t).data('shdu', { - dragover: dragOver, - dragenter: dragEnter, - dragLeave: dragLeave, - drop: drop - }); - - var bind = function(event, callback) { - t.removeEventListener(event, $(t).data('shdu')[event], false); - var data = $(t).data('shdu'), - newData = {}; - newData[event] = callback; - $.extend(data, newData); - $(t).data('shdu', data); - t.addEventListener(event, callback, false); - }; - - bind('dragover', dragOver); - bind('dragenter', dragEnter); - bind('dragleave', dragLeave); - bind('drop', drop); - }); - } - -})(jQuery); diff --git a/js/030.jquery.helper.js b/js/030.jquery.helper.js index 62a3fe8..c4c6543 100644 --- a/js/030.jquery.helper.js +++ b/js/030.jquery.helper.js @@ -12,31 +12,6 @@ (function($) { - $.fn.fixScrollbarRadius = function() { - $(this).each(function() { - var t = this, - dataID = 'fixRadius', - vScroll = (t.clientHeight < t.scrollHeight), - hScroll = (t.clientWidth < t.scrollWidth); - - if (!$(t).data(dataID)) - $(t).data(dataID, { - tr: $(t).css('borderTopRightRadius'), - br: $(t).css('borderBottomRightRadius'), - bl: $(t).css('borderBottomLeftRadius') - }); - - var data = $(t).data(dataID); - - $(t).css({ - borderTopRightRadius: vScroll ? 0 : data.tr, - borderBottomRightRadius: (vScroll || hScroll) ? 0 : data.br, - borderBottomLeftRadius: hScroll ? 0 : data.bl - }); - }); - return $(this); - }; - $.fn.selection = function(start, end) { var field = this.get(0); @@ -59,9 +34,12 @@ return this.each(function() { if ($.agent.firefox) { // Firefox $(this).css('MozUserSelect', "none"); + } else if ($.agent.msie) { // IE + $(this).bind('selectstart', function() { + return false; + }); } else { //Opera, etc. $(this).mousedown(function() { - $.globalBlur(); return false; }); } @@ -144,10 +122,6 @@ $(this).fullscreen(); }; - $.globalBlur = function() { - $('').appendTo('body').trigger('focus').detach(); - }; - $.exitFullscreen = function(doc) { var d = doc ? doc : document, requestMethod = @@ -187,21 +161,27 @@ htmlValue: function(value) { return value - .replace(/&/g, "&") - .replace(/"/g, """) - .replace(/'/g, "'"); + .replace(/\&/g, "&") + .replace(/\"/g, """) + .replace(/\'/g, "'"); }, htmlData: function(value) { - return $('

              ').text(value).html(); + return value.toString() + .replace(/\&/g, "&") + .replace(/\/g, ">") + .replace(/\ /g, " ") + .replace(/\"/g, """) + .replace(/\'/g, "'"); }, jsValue: function(value) { return value .replace(/\\/g, "\\\\") .replace(/\r?\n/, "\\\n") - .replace(/"/g, "\\\"") - .replace(/'/g, "\\'"); + .replace(/\"/g, "\\\"") + .replace(/\'/g, "\\'"); }, basename: function(path) { diff --git a/js/041.dialogs.js b/js/041.dialogs.js index d7fbe0e..8a9c5f3 100644 --- a/js/041.dialogs.js +++ b/js/041.dialogs.js @@ -178,7 +178,7 @@ _.fileNameDialog = function(post, inputName, inputValue, url, labels, callBack, field = dlg.find('[type="text"]'); - field.transForm().attr('value', inputValue).css('width', 310); + field.uniform().attr('value', inputValue).css('width', 310); dlg.find('form').submit(submit); if (!selectAll && /^(.+)\.[^\.]+$/ .test(inputValue)) diff --git a/js/050.init.js b/js/050.init.js index 9aebf07..d032415 100644 --- a/js/050.init.js +++ b/js/050.init.js @@ -197,7 +197,6 @@ _.initResizer = function() { }); _.fixFilesHeight(); - _.fixScrollRadius(); } }); }; @@ -225,13 +224,17 @@ _.resize = function() { jFolders.css('height', jLeft.outerHeight() - jFolders.outerVSpace()); _.fixFilesHeight(); - jStatus.css('width', jLeft.outerWidth() + jRight.outerWidth() - jStatus.outerHSpace('p')); + var width = jLeft.outerWidth() + jRight.outerWidth(); + jStatus.css('width', width); + while (jStatus.outerWidth() > width) + jStatus.css('width', parseInt(jStatus.css('width')) - 1); + while (jStatus.outerWidth() < width) + jStatus.css('width', parseInt(jStatus.css('width')) + 1); jFiles.css('width', jRight.innerWidth() - jFiles.outerHSpace()); jResizer.css({ left: jLeft.outerWidth() - jFolders.outerRightSpace('m'), width: jFolders.outerRightSpace('m') + jFiles.outerLeftSpace('m') }); - _.fixScrollRadius(); }; _.setTitle = function(title) { @@ -254,8 +257,3 @@ _.fixFilesHeight = function() { ((jSettings.css('display') != "none") ? jSettings.outerHeight() : 0) ); }; - -_.fixScrollRadius = function() { - $('#folders').fixScrollbarRadius(); - $('#files').fixScrollbarRadius(); -}; \ No newline at end of file diff --git a/js/060.toolbar.js b/js/060.toolbar.js index f83a86e..4c71b0a 100644 --- a/js/060.toolbar.js +++ b/js/060.toolbar.js @@ -23,7 +23,6 @@ _.initToolbar = function() { $('#toolbar a[href="kcact:settings"]').addClass('selected'); $('#settings').show(); _.resize(); - $('#lang').transForm(); } $('#toolbar a[href="kcact:settings"]').click(function () { @@ -33,8 +32,6 @@ _.initToolbar = function() { $.$.kuki.set('displaySettings', "on"); jSettings.show(); _.fixFilesHeight(); - if (!jSettings.find('.tf-select #lang').get(0)) - $('#lang').transForm(); } else { $(this).removeClass('selected'); $.$.kuki.set('displaySettings', "off"); diff --git a/js/070.settings.js b/js/070.settings.js index 5d6886b..ce52b74 100644 --- a/js/070.settings.js +++ b/js/070.settings.js @@ -11,7 +11,8 @@ */ _.initSettings = function() { - $('#settings fieldset').disableTextSelect(); + $('#settings').disableTextSelect(); + $('#settings fieldset, #settings input, #settings label').uniform(); if (!_.shows.length) $('#show input[type="checkbox"]').each(function(i) { @@ -82,20 +83,4 @@ _.initSettings = function() { _.fixFilesHeight(); _.refresh(); }); - $('#settings fieldset, #settings input, #settings label').transForm(); - _.initLangs(); }; - - -_.initLangs = function() { - $.each(_.langs, function(id, lng) { - var opt = $(''); - opt.val(id).text(lng); - if (id == _.lang) - opt.attr({selected: true}); - $('#lang').append(opt); - }); - $('#lang').change(function() { - window.location = _.getURL("browser", this.value) + "&theme=" + encodeURIComponent(_.theme); - }); -} \ No newline at end of file diff --git a/js/080.files.js b/js/080.files.js index f3b5507..610c4ad 100644 --- a/js/080.files.js +++ b/js/080.files.js @@ -81,7 +81,7 @@ _.showFiles = function(callBack, selected) { } f.find('.thumb').css({backgroundImage: 'url("' + icon + '")'}); - f.find('.name').text(file.name); + f.find('.name').html($.$.htmlData(file.name)); f.find('.time').html(file.date); f.find('.size').html(_.humanSize(file.size)); f.data(file); @@ -95,7 +95,6 @@ _.showFiles = function(callBack, selected) { if (callBack) callBack(); _.initFiles(); - _.fixScrollRadius(); }, 200); }; @@ -129,7 +128,7 @@ _.selectFile = function(file, e) { $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + size + ")"); else { data = $(files[0]).data(); - $('#fileinfo').text(data.name + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); } } @@ -138,7 +137,7 @@ _.selectFile = function(file, e) { data = file.data(); $('.file').removeClass('selected'); file.addClass('selected'); - $('#fileinfo').text(data.name + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); } }; diff --git a/js/090.folders.js b/js/090.folders.js index 792113f..3ee2146 100644 --- a/js/090.folders.js +++ b/js/090.folders.js @@ -27,14 +27,14 @@ _.initFolders = function() { }).rightClick(function(el, e) { _.menuDir($(el).parent(), e); }); - if ($.mobile) + if ($.mobile) { $('div.folder > a > span.folder').on('taphold', function() { _.menuDir($(this).parent(), { pageX: $(this).offset().left + 1, pageY: $(this).offset().top + $(this).outerHeight() }); }); - + } }; _.setTreeData = function(data, path) { @@ -84,14 +84,11 @@ _.expandDir = function(dir) { dir.parent().children('.folders').hide(500, function() { if (path == _.dir.substr(0, path.length)) _.changeDir(dir); - _.fixScrollRadius(); }); dir.children('.brace').removeClass('opened').addClass('closed'); } else { if (dir.parent().children('.folders').get(0)) { - dir.parent().children('.folders').show(500, function() { - _.fixScrollRadius(); - }); + dir.parent().children('.folders').show(500); dir.children('.brace').removeClass('closed').addClass('opened'); } else if (!$('#loadingDirs').get(0)) { dir.parent().append('
              ' + _.label("Loading folders...") + '
              '); @@ -117,9 +114,7 @@ _.expandDir = function(dir) { dir.parent().append('
              ' + html + '
              '); var folders = $(dir.parent().children('.folders').first()); folders.hide(); - $(folders).show(500, function() { - _.fixScrollRadius(); - }); + $(folders).show(500); $.each(data.dirs, function(i, cdir) { _.setTreeData(cdir, path); }); @@ -130,15 +125,12 @@ _.expandDir = function(dir) { dir.children('.brace').removeClass('opened closed'); _.initFolders(); _.initDropUpload(); - _.fixScrollRadius(); }, error: function() { $('#loadingDirs').detach(); _.alert(_.label("Unknown error.")); - _.fixScrollRadius(); } }); - _.fixScrollRadius(); }); } } @@ -164,7 +156,6 @@ _.changeDir = function(dir) { _.dirWritable = data.dirWritable; _.setTitle("KCFinder: /" + _.dir); _.statusDir(); - _.initDropUpload(); }, error: function() { $('#files').html(_.label("Unknown error.")); diff --git a/js/091.menus.js b/js/091.menus.js index b6f093d..d587abd 100644 --- a/js/091.menus.js +++ b/js/091.menus.js @@ -223,7 +223,7 @@ _.menuFile = function(file, e) { } else { $('.file').removeClass('selected'); file.addClass('selected'); - $('#fileinfo').text(data.name + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); if (_.opener.callBack || _.opener.callBackMultiple) { @@ -417,7 +417,7 @@ _.menuDir = function(dir, e) { return; } var currentDir = (data.path == _.dir); - dir.children('span.folder').text(dt.name); + dir.children('span.folder').html($.$.htmlData(dt.name)); dir.data('name', dt.name); dir.data('path', $.$.dirname(data.path) + '/' + dt.name); if (currentDir) diff --git a/js/091.viewImage.js b/js/091.viewImage.js index db4861d..4d4f13d 100644 --- a/js/091.viewImage.js +++ b/js/091.viewImage.js @@ -15,16 +15,16 @@ _.viewImage = function(data) { var ts = new Date().getTime(), dlg = false, images = [], - min_h = 100, - w = $(window), - min_w, dd, dv, dh, showImage = function(data) { _.lock = true; + $('#loading').html(_.label("Loading image...")).show(); var url = $.$.escapeDirs(_.uploadURL + "/" + _.dir + "/" + data.name) + "?ts=" + ts, img = new Image(), i = $(img), + w = $(window), + d = $(document); onImgLoad = function() { _.lock = false; @@ -38,53 +38,49 @@ _.viewImage = function(data) { i.hide().appendTo('body'); - var w_w = w.width(), - w_h = w.height(), - o_w = i.width(), + var o_w = i.width(), o_h = i.height(), i_w = o_w, i_h = o_h, - openDlg = false, - t = $('
              '), - goTo = function(i) { - if (!_.lock) { - var nimg = images[i]; - _.currImg = i; - showImage(nimg); - } - }, + goTo = function(i) { + if (!_.lock) { + var nimg = images[i]; + _.currImg = i; + showImage(nimg); + } + }, - nextFunc = function() { - goTo((_.currImg >= images.length - 1) ? 0 : (_.currImg + 1)); - }, + nextFunc = function() { + goTo((_.currImg >= images.length - 1) ? 0 : (_.currImg + 1)); + }, - prevFunc = function() { - goTo((_.currImg ? _.currImg : images.length) - 1); - }, + prevFunc = function() { + goTo((_.currImg ? _.currImg : images.length) - 1); + }, - selectFunc = function(e) { - if (_.ssImage) - _.selectFile($(_.ssImage), e); - dlg.dialog('destroy').detach(); - }; + t = $('
              '); i.detach().appendTo(t); + t.addClass("img"); if (!dlg) { - openDlg = true; - var closeFunc = function() { - dlg.dialog('destroy').detach(); - }, + var ww = w.width() - 60, - focusFunc = function() { - setTimeout(function() { - dlg.find('input').get(0).focus(); - }, 100); + closeFunc = function() { + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + dlg.dialog('destroy').detach(); }; - dlg = _.dialog(".", "", { + if ((ww % 2)) ww++; + + dlg = _.dialog($.$.htmlData(data.name), t.get(0), { + width: ww, + height: w.height() - 36, + position: [30, 30], draggable: false, nopadding: true, close: closeFunc, @@ -104,7 +100,15 @@ _.viewImage = function(data) { }, { text: _.label("Select"), icons: {primary: "ui-icon-check"}, - click: selectFunc + click: function(e) { + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + if (_.ssImage) { + _.selectFile($(_.ssImage), e); + } + dlg.dialog('destroy').detach(); + } }, { text: _.label("Close"), @@ -114,87 +118,49 @@ _.viewImage = function(data) { ] }); - dlg.click(nextFunc).css({overflow: "hidden"}).parent().css({width: "auto", height: "auto"}); + dlg.addClass('kcfImageViewer').css('overflow', "hidden").parent().find('.ui-dialog-buttonpane button').get(2).focus(); - dd = dlg.parent().click(focusFunc).rightClick(focusFunc).disableTextSelect().addClass('kcfImageViewer'); - dv = dd.find('.ui-dialog-titlebar').outerHeight() + dd.find('.ui-dialog-buttonpane').outerHeight() + dd.outerVSpace('b'); - dh = dd.outerHSpace('b'); - min_w = dd.outerWidth() - dh; + } else { + dlg.prev().find('.ui-dialog-title').html($.$.htmlData(data.name)); + dlg.html(t.get(0)); } - var max_w = w_w - dh, - max_h = w_h - dv + 1, - top = 0, - left = 0, - width = o_w, - height = o_h; - - // Too big - if ((o_w > max_w) || (o_h > max_h)) { + dlg.unbind('click').click(nextFunc).disableTextSelect(); - if ((max_h / max_w) < (o_h / o_w)) { - height = max_h; - width = (o_w * height) / o_h; + var d_w = dlg.innerWidth(), + d_h = dlg.innerHeight(); - } else { - width = max_w; - height = (o_h * width) / o_w; - } - - i_w = width; - i_h = height; - - // Too small - } else if ((o_w < min_w) || (o_h < min_h)) { - width = (o_w < min_w) ? min_w : o_w; - height = (o_h < min_h) ? min_h : o_h; - left = (o_w < min_w) ? (min_w - o_w) / 2 : 0; - top = (o_h < min_h) ? (min_h - o_h) / 2 : 0; + if ((o_w > d_w) || (o_h > d_h)) { + i_w = d_w; + i_h = d_h; + if ((d_w / d_h) > (o_w / o_h)) + i_w = parseInt((o_w * d_h) / o_h); + else if ((d_w / d_h) < (o_w / o_h)) + i_h = parseInt((o_h * d_w) / o_w); } - var show = function() { - dlg.animate({width: width, height: height}, 150); - dlg.parent().animate({top: (w_h - height - dv) / 2, left: (w_w - width - dh) / 2}, 150, function() { - dlg.html(t.get(0)).append(''); - dlg.find('input').keydown(function(e) { - if (!_.lock) { - if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) - return; - var kc = e.keyCode; - if ((kc == 37)) prevFunc(); - if ((kc == 39)) nextFunc(); - if ((kc == 13) || (kc == 32)) selectFunc(e); - } - }).get(0).focus(); - i.css({padding: top + "px 0 0 " + left + "px", width: i_w, height: i_h}).show(); - dlg.children().first().css({width: width, height: height, display: "none"}).fadeIn(150, function() { - loadingStop(); - var title = data.name + " (" + o_w + " x " + o_h + ")"; - dlg.prev().find('.ui-dialog-title').css({width:width - dlg.prev().find('.ui-dialog-titlebar-close').outerWidth() - 20}).text(title).attr({title: title}).css({cursor: "default"}); - }); - }); - } + i.css({ + width: i_w, + height: i_h + }).show().parent().css({ + display: "block", + margin: "0 auto", + width: i_w, + height: i_h, + marginTop: parseInt((d_h - i_h) / 2) + }); - if (openDlg) - show(); - else - dlg.children().first().fadeOut(150, show); - }, - - loadingStart = function() { - if (dlg) - dlg.prev().addClass("loading").find('.ui-dialog-title').text(_.label("Loading image...")).css({width: "auto"}); - else - $('#loading').text(_.label("Loading image...")).show(); - }, - - loadingStop = function() { - if (dlg) - dlg.prev().removeClass("loading"); $('#loading').hide(); + + d.unbind('keydown').keydown(function(e) { + if (!_.lock) { + var kc = e.keyCode; + if ((kc == 37)) prevFunc(); + if ((kc == 39)) nextFunc(); + } + }); }; - loadingStart(); img.src = url; if (img.complete) @@ -203,15 +169,18 @@ _.viewImage = function(data) { img.onload = onImgLoad; img.onerror = function() { _.lock = false; - loadingStop(); + $('#loading').hide(); _.alert(_.label("Unknown error.")); + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); _.refresh(); }; } }; $.each(_.files, function(i, file) { - i = images.length; + var i = images.length; if (file.thumb || file.smallThumb) images[i] = file; if (file.name == data.name) diff --git a/js/110.dropUpload.js b/js/110.dropUpload.js index f518c62..50c4d1e 100644 --- a/js/110.dropUpload.js +++ b/js/110.dropUpload.js @@ -1,165 +1,272 @@ /** This file is part of KCFinder project - * - * @desc Upload files using drag and drop - * @package KCFinder - * @version 3.12 - * @author Pavel Tzonkov - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - + * + * @desc Upload files using drag and drop + * @package KCFinder + * @version 3.12 + * @author Forum user (updated by Pavel Tzonkov) + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ _.initDropUpload = function() { - if (!_.access.files.upload) + if ((typeof XMLHttpRequest == "undefined") || + (typeof document.addEventListener == "undefined") || + (typeof File == "undefined") || + (typeof FileReader == "undefined") + ) { return; + } - var files = $('#files'), - folders = $('#folders').find('div.folder > a'), - i, dlg, filesSize, uploaded, errors, - - precheck = function(e) { - filesSize = uploaded = 0; errors = []; - var fs = e.dataTransfer.files; - for (i = 0; i < fs.length; i++) - filesSize += fs[i].size; - - dlg = $('
               
               
               
              '); - - dlg.find('.bar.count').progressbar({max: fs.length, value: 0}); - dlg.find('.bar.size').progressbar({max: filesSize, value: 0}); - dlg.find('.info').css('padding', "5px 0").first().css('paddingTop', 0); - dlg.find('.info').last().css('paddingBottom', 0); - - dlg = _.dialog(_.label("Uploading files"), dlg, { - closeOnEscape: false, - buttons: [] - }); - - dlg.parent().css('paddingBottom', 0).find('.ui-dialog-titlebar button').css('visibility', 'hidden').get(0).disabled = true; - - return true; - }, - - localOptions = { - param: "upload[]", - maxFilesize: _.dropUploadMaxFilesize, - - begin: function(xhr, currentFile, count) { - - dlg.find('.info.count').html(_.label("Uploading file {current} of {count}", { - current: currentFile, - count: count - })); - - dlg.find('.info.size').html(_.label("Uploaded {uploaded} of {total}", { - uploaded: _.humanSize(uploaded), - total: _.humanSize(filesSize) - })); - - dlg.find('.info.errors').html(_.label("Errors:") + " " + errors.length); - dlg.find('.bar.count').progressbar({value: currentFile}); - dlg.find('.bar.size').progressbar({value: uploaded}); - }, - - success: function(xhr, currentFile, count) { - uploaded += xhr.file.size; - var response = xhr.responseText; - if (response.substr(0, 1) != "/") - errors.push($.$.htmlData(response)); - }, - - error: function(xhr, currentFile, count) { - uploaded += xhr.file.size; - errors.push($.$.htmlData(xhr.file.name + ": " + _.label("Failed to upload {filename}!", { - filename: xhr.file.name - }))); - }, - - abort: function(xhr, currentFile, filesCount) { - uploaded += xhr.file.size; - errors.push($.$.htmlData(xhr.file.name + ": " + _.label("Failed to upload {filename}!", { - filename: xhr.file.name - }))); - }, - - filesizeCallback: function(xhr, currentFile, filesCount) { - uploaded += xhr.file.size; - errors.push($.$.htmlData(xhr.file.name + ": " + _.label("The uploaded file exceeds {size} bytes.", { - size: _.dropUploadMaxFilesize - }))); - }, - - finish: function() { - _.refresh(); - dlg.find('.bar.size').progressbar({value: uploaded}); - dlg.find('.info.size').html(_.label("Uploaded: {uploaded} of {total}", { - uploaded: _.humanSize(uploaded), - total: _.humanSize(filesSize) - })); - dlg.find('.info.errors').html(_.label("Errors:") + " " + errors.length); - var err = errors; - setTimeout(function() { - dlg.dialog('destroy').detach(); - if (err.length) - _.alert(err.join('
              ')); - }, 500); + if (!XMLHttpRequest.prototype.sendAsBinary) { + XMLHttpRequest.prototype.sendAsBinary = function(datastr) { + var ords = Array.prototype.map.call(datastr, function(x) { + return x.charCodeAt(0) & 0xff; + }), + ui8a = new Uint8Array(ords); + this.send(ui8a.buffer); } - }, - - remoteOptions = { - ajax: { - success: function(data) { - _.refresh(); - if (data.error) { - _.alert(data.error) - return; - } - }, - error: function() { - _.refresh(); - _.alert(_.label("Unknown error.")); - }, - abort: function() { - _.refresh(); - } + } + + var uploadQueue = [], + uploadInProgress = false, + filesCount = 0, + errors = [], + files = $('#files'), + folders = $('div.folder > a'), + boundary = "------multipartdropuploadboundary" + (new Date).getTime(), + currentFile; + + var filesDragOver, filesDragEnter, filesDrop, folderDrag, folderDrop = false; + + filesDragOver = function(e) { + if (e.preventDefault) e.preventDefault(); + $('#files').addClass('drag'); + return false; + }; + + filesDragEnter = function(e) { + if (e.preventDefault) e.preventDefault(); + return false; + }; + + filesDragLeave = function(e) { + if (e.preventDefault) e.preventDefault(); + $('#files').removeClass('drag'); + return false; + }; + + filesDrop = function(e) { + + console.log("Files Dropped"); + + if (e.preventDefault) e.preventDefault(); + if (e.stopPropagation) e.stopPropagation(); + $('#files').removeClass('drag'); + if (!$('#folders span.current').first().parent().data('writable')) { + _.alert("Cannot write to upload folder."); + return false; + }; + filesCount += e.dataTransfer.files.length; + for (var i = 0; i < e.dataTransfer.files.length; i++) { + var file = e.dataTransfer.files[i]; + file.thisTargetDir = _.dir; + uploadQueue.push(file); } - }, - - url = "&dir=" + encodeURIComponent(_.dir); - - files.shDropUpload($.extend(localOptions, { - url: _.getURL('upload') + url, - precheck: function(e) { - if (!$('#folders span.current').first().parent().data('writable')) { - _.alert(_.label("Cannot write to upload folder.")); - return false; - } - return precheck(e); + + processUploadQueue(); + return false; + + }; + + folderDrag = function(e) { + if (e.preventDefault) e.preventDefault(); + return false; + }; + + folderDrop = function(e, dir) { + if (e.preventDefault) e.preventDefault(); + if (e.stopPropagation) e.stopPropagation(); + if (!$(dir).data('writable')) { + _.alert(_.label("Cannot write to upload folder.")); + return false; } - }), $.extend(true, remoteOptions, { - ajax: { - url: _.getURL('dragUrl') + url + filesCount += e.dataTransfer.files.length; + for (var i = 0; i < e.dataTransfer.files.length; i++) { + var file = e.dataTransfer.files[i]; + file.thisTargetDir = $(dir).data('path'); + uploadQueue.push(file); } - })); + processUploadQueue(); + return false; + }; + + // console.log("Handling Event Listeners"); + + if (!files.data('dropupload_handlers')) { + + // console.log("Adding Event Listeners"); + + // Remove Listener + files.get(0).removeEventListener('dragover', filesDragOver, false); + files.get(0).removeEventListener('dragenter', filesDragEnter, false); + files.get(0).removeEventListener('dragleave', filesDragLeave, false); + files.get(0).removeEventListener('drop', filesDrop, false); + + // Add listener + files.get(0).addEventListener('dragover', filesDragOver, false); + files.get(0).addEventListener('dragenter', filesDragEnter, false); + files.get(0).addEventListener('dragleave', filesDragLeave, false); + files.get(0).addEventListener('drop', filesDrop, false); + + // Notify JS that we have already assigned HANDLERS for the FILES + files.data('dropupload_handlers', true); + + }; + folders.each(function() { - var folder = this, - url = "&dir=" + encodeURIComponent($(folder).data('path')); - $(folder).shDropUpload($.extend(localOptions, { - url: _.getURL('upload') + url, - precheck: function(e) { - if (!$(folder).data('writable')) { - _.alert(_.label("Cannot write to upload folder.")); - return false; - } - return precheck(e); - } - }), $.extend(true, remoteOptions, { - ajax: { - url: _.getURL('dragUrl') + url - } - })); + + var folder, folder_element, dragOver, dragLeave, drop = false; + + folder = this; + folder_element = $(folder); + + dragOver = function(e) { + $(folder).children('span.folder').addClass('context'); + return folderDrag(e); + }; + + dragLeave = function(e) { + $(folder).children('span.folder').removeClass('context'); + return folderDrag(e); + }; + + drop = function(e) { + $(folder).children('span.folder').removeClass('context'); + return folderDrop(e, folder); + }; + + if (!folder_element.data('dropupload_handlers')) { + + // Remove Current Handlers + this.removeEventListener('dragover', dragOver, false); + this.removeEventListener('dragenter', folderDrag, false); + this.removeEventListener('dragleave', dragLeave, false); + this.removeEventListener('drop', drop, false); + + // Folder Drag, Drop etc + this.addEventListener('dragover', dragOver, false); + this.addEventListener('dragenter', folderDrag, false); + this.addEventListener('dragleave', dragLeave, false); + this.addEventListener('drop', drop, false); + + // Notify JS that we have already assigned HANDLERS for the FILES + folder_element.data('dropupload_handlers', true); + + }; + }); -}; + + function updateProgress(evt) { + var progress = evt.lengthComputable ? + Math.round((evt.loaded * 100) / evt.total) + '%' : + Math.round(evt.loaded / 1024) + " KB"; + $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { + number: filesCount - uploadQueue.length, + count: filesCount, + progress: progress + })); + } + + function processUploadQueue() { + + if (uploadInProgress) { + return false; + } + + if (uploadQueue && uploadQueue.length) { + var file = uploadQueue.shift(); + currentFile = file; + $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { + number: filesCount - uploadQueue.length, + count: filesCount, + progress: "" + })).show(); + + var reader = new FileReader(); + reader.thisFileName = file.name; + reader.thisFileType = file.type; + reader.thisFileSize = file.size; + reader.thisTargetDir = file.thisTargetDir; + + reader.onload = function(evt) { + uploadInProgress = true; + + var postbody = '--' + boundary + '\r\nContent-Disposition: form-data; name="upload[]"'; + if (evt.target.thisFileName) + postbody += '; filename="' + $.$.utf8encode(evt.target.thisFileName) + '"'; + postbody += '\r\n'; + if (evt.target.thisFileSize) + postbody += "Content-Length: " + evt.target.thisFileSize + "\r\n"; + postbody += "Content-Type: " + evt.target.thisFileType + "\r\n\r\n" + evt.target.result + "\r\n--" + boundary + '\r\nContent-Disposition: form-data; name="dir"\r\n\r\n' + $.$.utf8encode(evt.target.thisTargetDir) + "\r\n--" + boundary + "\r\n--" + boundary + "--\r\n"; + + var xhr = new XMLHttpRequest(); + xhr.thisFileName = evt.target.thisFileName; + + if (xhr.upload) { + xhr.upload.thisFileName = evt.target.thisFileName; + xhr.upload.addEventListener("progress", updateProgress, false); + } + xhr.open('post', _.getURL('upload'), true); + xhr.setRequestHeader('Content-Type', "multipart/form-data; boundary=" + boundary); + //xhr.setRequestHeader('Content-Length', postbody.length); + + xhr.onload = function(e) { + $('#loading').hide(); + if (_.dir == reader.thisTargetDir) + _.fadeFiles(); + uploadInProgress = false; + processUploadQueue(); + if (xhr.responseText.substr(0, 1) != "/") + errors[errors.length] = xhr.responseText; + }; + + xhr.sendAsBinary(postbody); + }; + + reader.onerror = function(evt) { + $('#loading').hide(); + uploadInProgress = false; + processUploadQueue(); + errors[errors.length] = _.label("Failed to upload {filename}!", { + filename: evt.target.thisFileName + }); + }; + + reader.readAsBinaryString(file); + + } else { + + filesCount = 0; + var loop = setInterval(function() { + if (uploadInProgress) return; + boundary = "------multipartdropuploadboundary" + (new Date).getTime(); + uploadQueue = []; + clearInterval(loop); + if (currentFile.thisTargetDir == _.dir) + _.refresh(); + if (errors.length) { + errors = errors.join("\n"); + if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) + _.alert(errors); + errors = []; + } + }, 333); + + }; + + }; + +}; \ No newline at end of file diff --git a/js/120.misc.js b/js/120.misc.js index c3a2c48..f716178 100644 --- a/js/120.misc.js +++ b/js/120.misc.js @@ -77,10 +77,8 @@ _.humanSize = function(size) { return size; }; -_.getURL = function(act, lang) { - if (!lang) - lang = _.lang; - var url = "browse.php?type=" + encodeURIComponent(_.type) + "&lng=" + encodeURIComponent(lang); +_.getURL = function(act) { + var url = "browse.php?type=" + encodeURIComponent(_.type) + "&lng=" + encodeURIComponent(_.lang); if (_.opener.name) url += "&opener=" + encodeURIComponent(_.opener.name); if (act) diff --git a/js/index.php b/js/index.php index 962e48e..627bae5 100644 --- a/js/index.php +++ b/js/index.php @@ -18,3 +18,5 @@ require "core/autoload.php"; $min = new minifier("js"); $min->minify("cache/base.js"); + +?> \ No newline at end of file diff --git a/js_localize.php b/js_localize.php index 3ac3c76..d84df78 100644 --- a/js_localize.php +++ b/js_localize.php @@ -44,3 +44,5 @@ } echo "}"; + +?> diff --git a/lang/af.php b/lang/af.php index 86c2eb7..0dd3a25 100644 --- a/lang/af.php +++ b/lang/af.php @@ -4,9 +4,6 @@ */ $lang = array( - - '_lang' => "Afrikaans", - '_native' => "Afrikaans", '_locale' => "af-ZA.UTF-8", '_charset' => "utf-8", @@ -244,3 +241,5 @@ "Select Thumbnails" => "Kies duimnaels", "Download files" => "Laai lêers af", ); + +?> \ No newline at end of file diff --git a/lang/bg.php b/lang/bg.php index 2aa78a0..0215916 100644 --- a/lang/bg.php +++ b/lang/bg.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Bulgarian", - '_native' => "Български", '_locale' => "bg_BG.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -262,17 +260,11 @@ "Failed to upload {filename}!" => "Несполучливо качване на {filename}!", // SINCE 3.0 - "Close" => "Затвори", "Previous" => "Предишно", "Next" => "Следващо", "Confirmation" => "Потвърждение", - "Warning" => "Внимание", - - // SINCE 3.20 - - "Uploading files" => "Качване на файлове", - "Uploading file {current} of {count}" => "Качване на файл {current} от общо {count}", - "Uploaded {uploaded} of {total}" => "Качено {uploaded} от общо {total}", - "Errors:" => "Грешки:" + "Warning" => "Внимание" ); + +?> \ No newline at end of file diff --git a/lang/ca.php b/lang/ca.php index 2cf49f3..9e9c6c2 100644 --- a/lang/ca.php +++ b/lang/ca.php @@ -7,8 +7,6 @@ $lang = array( - '_lang' => "Catalan", - '_native' => "Català", '_locale' => "ca_ES.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -126,3 +124,5 @@ "Uploading file {number} of {count}... {progress}" => "Carregant arxiu {number} de {count}... {progress}", "Failed to upload {filename}!" => "Error al carregar {filename}", ); + +?> \ No newline at end of file diff --git a/lang/cs.php b/lang/cs.php index a7efad2..bd672ea 100644 --- a/lang/cs.php +++ b/lang/cs.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Czech", - '_native' => "Čeština", '_locale' => "cs_CZ.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -130,3 +128,5 @@ "Confirmation" => "Potvrzení", "Warning" => "Varování", ); + +?> \ No newline at end of file diff --git a/lang/da.php b/lang/da.php index 13759cc..e6b1840 100644 --- a/lang/da.php +++ b/lang/da.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Danish", - '_native' => "Dansk", '_locale' => "da_DK.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Uploader fil {number} af {count} ... {progress}", "Failed to upload {filename}!" => "Kunne ikke uploade {filename}!", ); + +?> \ No newline at end of file diff --git a/lang/de.php b/lang/de.php index 9027bec..42a4ae6 100644 --- a/lang/de.php +++ b/lang/de.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "German", - '_native' => "Deutsch", '_locale' => "de_DE.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -130,3 +128,5 @@ "Confirmation" => "Bestätigung", "Warning" => "Warnung" ); + +?> \ No newline at end of file diff --git a/lang/el.php b/lang/el.php index c550b8a..e5fcfd9 100644 --- a/lang/el.php +++ b/lang/el.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Greek", - '_native' => "Ελληνικά", '_locale' => "el_GR.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -130,3 +128,5 @@ "Confirmation" => "Επιβεβαίωση", "Warning" => "Προειδοποίηση", ); + +?> \ No newline at end of file diff --git a/lang/en.php b/lang/en.php index c66f2d3..d520800 100644 --- a/lang/en.php +++ b/lang/en.php @@ -13,8 +13,6 @@ */ $lang = array( - '_lang' => "English", - '_native' => "English", '_locale' => "en_US.UTF-8", '_charset' => "utf-8", @@ -23,3 +21,5 @@ '_dateTimeMid' => "%a %b %e %Y %I:%M %p", '_dateTimeSmall' => "%m/%d/%Y %I:%M %p", ); + +?> \ No newline at end of file diff --git a/lang/es.php b/lang/es.php index 5ff6d06..edb98f0 100644 --- a/lang/es.php +++ b/lang/es.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Spanish", - '_native' => "Español", '_locale' => "es_ES.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Cargando archivo {number} de {count}... {progress}", "Failed to upload {filename}!" => "¡No se pudo cargar el archivo {filename}!", ); + +?> diff --git a/lang/et.php b/lang/et.php index ba7e6e1..3553b16 100644 --- a/lang/et.php +++ b/lang/et.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Estonian", - '_native' => "Eesti", '_locale' => "et_EE.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Laen üles faili {number} {count}-st... {progress}", "Failed to upload {filename}!" => "{filename} üleslaadimine ebaõnnestus!", ); + +?> \ No newline at end of file diff --git a/lang/fa.php b/lang/fa.php index 429749c..3f63f77 100644 --- a/lang/fa.php +++ b/lang/fa.php @@ -13,8 +13,6 @@ */ $lang = array( - '_lang' => "Persian", - '_native' => "فارسى", '_locale' => "fa_IR.UTF-8", '_charset' => "utf-8", @@ -265,3 +263,5 @@ "Failed to upload {filename}!" => "! {filename} خطا در ارسال" ); + +?> diff --git a/lang/fi.php b/lang/fi.php index 788f825..ab17048 100644 --- a/lang/fi.php +++ b/lang/fi.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Finnish", - '_native' => "Suomi", '_locale' => "fi_FI.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Siirretään tiedostoa {number}/{count} ... {progress}", "Failed to upload {filename}!" => "Siirto epäonnistui {filename}!", ); + +?> \ No newline at end of file diff --git a/lang/fr.php b/lang/fr.php index 82b5daf..b55500e 100644 --- a/lang/fr.php +++ b/lang/fr.php @@ -7,8 +7,6 @@ $lang = array( - '_lang' => "French", - '_native' => "Français", '_locale' => "fr_FR.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -131,3 +129,5 @@ "Confirmation" => "Confirmation", "Warning" => "Avertissement", ); + +?> diff --git a/lang/he.php b/lang/he.php index 387b5f3..56b31a2 100644 --- a/lang/he.php +++ b/lang/he.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Hebrew", - '_native' => "עברית", '_locale' => "he_IL.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "מעלה קובץ {number} מתוך {count}... {progress}", "Failed to upload {filename}!" => "העלאת הקובץ נכשלה!", ); + +?> \ No newline at end of file diff --git a/lang/hu.php b/lang/hu.php index 77973a6..0387860 100644 --- a/lang/hu.php +++ b/lang/hu.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Hungarian", - '_native' => "Magyar", '_locale' => "hu_HU.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -130,3 +128,5 @@ "Confirmation" => "Megerősítés", "Warning" => "Figyelem" ); + +?> \ No newline at end of file diff --git a/lang/id.php b/lang/id.php index 24a8e7d..6e8311c 100644 --- a/lang/id.php +++ b/lang/id.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Indonesian", - '_native' => "Indonesia", '_locale' => "id_ID.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Mengunggah file {number} of {count}... {progress}", "Failed to upload {filename}!" => "Gagal untuk mengunggah {filename}", ); + +?> \ No newline at end of file diff --git a/lang/it.php b/lang/it.php index 377e56c..e56482b 100644 --- a/lang/it.php +++ b/lang/it.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Italian", - '_native' => "Italiano", '_locale' => "it_IT.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -130,3 +128,5 @@ "Confirmation" => "Conferma", "Warning" => "Attenzione", ); + +?> \ No newline at end of file diff --git a/lang/ja.php b/lang/ja.php index bde1a72..8509596 100644 --- a/lang/ja.php +++ b/lang/ja.php @@ -1,7 +1,7 @@ "Japanese", - '_native' => "日本語", '_locale' => "ja_JP.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -131,3 +129,5 @@ "Uploading file {number} of {count}... {progress}" => "ファイルをアップロード中({number}/{count})... {progress}", "Failed to upload {filename}!" => "{filename}のアップロードに失敗しました", ); + +?> diff --git a/lang/lt.php b/lang/lt.php index dfa92d6..cded0e6 100644 --- a/lang/lt.php +++ b/lang/lt.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Lithuanian", - '_native' => "Lietuvių", '_locale' => "lt_LT.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset diff --git a/lang/lv.php b/lang/lv.php index d3abaab..a6be842 100644 --- a/lang/lv.php +++ b/lang/lv.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Latvian", - '_native' => "Latviešu", '_locale' => "lv_LV.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Augšupielādējot failu {number} no {count}... {progress}", "Failed to upload {filename}!" => "Neizdevās augšupielādēt {filename}!", ); + +?> \ No newline at end of file diff --git a/lang/nl.php b/lang/nl.php index 6d3e9a3..434ca85 100644 --- a/lang/nl.php +++ b/lang/nl.php @@ -7,8 +7,6 @@ $lang = array( - '_lang' => "Dutch", - '_native' => "Nederlands", '_locale' => "nl_NL.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -131,3 +129,5 @@ "Confirmation" => "Bevestiging", "Warning" => "Waarschuwing", ); + +?> diff --git a/lang/no.php b/lang/no.php index 3482ef5..80aaf6a 100644 --- a/lang/no.php +++ b/lang/no.php @@ -7,8 +7,6 @@ $lang = array( - '_lang' => "Norwegian", - '_native' => "Norsk", '_locale' => "nb_NO.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -240,3 +238,5 @@ "Select Thumbnails" => "Velg miniatyrbilde", "Download files" => "Last ned filer", ); + +?> \ No newline at end of file diff --git a/lang/pl.php b/lang/pl.php index afbe644..413b5f9 100644 --- a/lang/pl.php +++ b/lang/pl.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Polish", - '_native' => "Polski", '_locale' => "pl_PL.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Wysyłanie pliku nr {number} spośród {count} ... {progress}", "Failed to upload {filename}!" => "Wysyłanie pliku {filename} nie powiodło się!", ); + +?> \ No newline at end of file diff --git a/lang/pt-br.php b/lang/pt-br.php index 4acdec5..8d60953 100644 --- a/lang/pt-br.php +++ b/lang/pt-br.php @@ -9,8 +9,6 @@ $lang = array( - '_lang' => "Brazilian Portuguese", - '_native' => "Português do Brasil", '_locale' => "pt_BR.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -128,3 +126,5 @@ "Uploading file {number} of {count}... {progress}" => "Enviando arquivo {number} de {count}... {progress}", "Failed to upload {filename}!" => "Falha no envio do arquivo {filename}!", ); + +?> \ No newline at end of file diff --git a/lang/pt.php b/lang/pt.php index acd898a..0c9d4be 100644 --- a/lang/pt.php +++ b/lang/pt.php @@ -8,8 +8,6 @@ $lang = array( - '_lang' => "Portuguese", - '_native' => "Português", '_locale' => "pt_PT.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -241,3 +239,5 @@ "Select Thumbnails" => "Seleccionar miniaturas", "Download files" => "Sacar ficheiros", ); + +?> diff --git a/lang/ro.php b/lang/ro.php index 63f4955..ecbe6ac 100644 --- a/lang/ro.php +++ b/lang/ro.php @@ -5,8 +5,6 @@ $lang = array( - '_lang' => "Romanian", - '_native' => "Română", '_locale' => "ro_RO.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -124,3 +122,5 @@ "Uploading file {number} of {count}... {progress}" => "Încărcare fișier {number} din {count}... {progress}", "Failed to upload {filename}!" => "Încărcare {filename} eșuată!", ); + +?> \ No newline at end of file diff --git a/lang/ru.php b/lang/ru.php index f9ada3c..7450932 100644 --- a/lang/ru.php +++ b/lang/ru.php @@ -7,8 +7,6 @@ $lang = array( - '_lang' => "Russian", - '_native' => "Русский", '_locale' => "ru_RU.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -131,3 +129,5 @@ "Confirmation" => "Подтверждение", "Warning" => "Предупреждение", ); + +?> diff --git a/lang/sk.php b/lang/sk.php index 4262b02..330fb7f 100644 --- a/lang/sk.php +++ b/lang/sk.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Slovak", - '_native' => "Slovenčina", '_locale' => "sk_SK.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Nahrávam súbor {number} z {count}... {progress}", "Failed to upload {filename}!" => "Nepodarilo sa nahrať súbor {filename}!", ); + +?> \ No newline at end of file diff --git a/lang/sv.php b/lang/sv.php index 7241cea..7a5f806 100644 --- a/lang/sv.php +++ b/lang/sv.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Swedish", - '_native' => "Svensk", '_locale' => "sv_SE.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -125,3 +123,5 @@ "Uploading file {number} of {count}... {progress}" => "Ladda upp fil {number} av {count} ... {progress}", "Failed to upload {filename}!" => "Uppladdning misslyckad {filename}!", ); + +?> \ No newline at end of file diff --git a/lang/tr.php b/lang/tr.php index 645c476..48833f7 100644 --- a/lang/tr.php +++ b/lang/tr.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Turkish", - '_native' => "Türkçe", '_locale' => "en_US.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -130,3 +128,5 @@ "Confirmation" => "Onay", "Warning" => "Uyarı", ); + +?> diff --git a/lang/uk.php b/lang/uk.php index a619c06..5caa120 100644 --- a/lang/uk.php +++ b/lang/uk.php @@ -7,8 +7,6 @@ $lang = array( - '_lang' => "Ukrainian", - '_native' => "Українська", '_locale' => "uk_UA.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -126,3 +124,5 @@ "Uploading file {number} of {count}... {progress}" => "Завантаження файлу {number} з {count}... {progress}", "Failed to upload {filename}!" => "Помилка завантаження {filename}!", ); + +?> \ No newline at end of file diff --git a/lang/vi.php b/lang/vi.php index 7974066..fd4c0c7 100644 --- a/lang/vi.php +++ b/lang/vi.php @@ -6,8 +6,6 @@ $lang = array( - '_lang' => "Vietnamese", - '_native' => "Việt", '_locale' => "vi_VN.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -128,5 +126,6 @@ "Previous" => "Trước", "Next" => "Sau", "Confirmation" => "Xác nhận", - "Warning" => "Cảnh báo", -); + "Warning" => "Cảnh báo",); + +?> diff --git a/lang/zh-cn.php b/lang/zh-cn.php index 1e53969..ac68e2e 100644 --- a/lang/zh-cn.php +++ b/lang/zh-cn.php @@ -9,8 +9,6 @@ $lang = array( - '_lang' => "Chinese Simplified", - '_native' => "中国简体", '_locale' => "zh_CN.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset @@ -128,3 +126,5 @@ "Uploading file {number} of {count}... {progress}" => "正在上传文件{number} / {count}... {progress}", "Failed to upload {filename}!" => "上传失败{filename}!", ); + +?> \ No newline at end of file diff --git a/lib/class_image.php b/lib/class_image.php index 0e6666e..4905652 100644 --- a/lib/class_image.php +++ b/lib/class_image.php @@ -239,3 +239,5 @@ abstract protected function getBlankImage($width, $height); abstract protected function getImage($image, &$width, &$height); } + +?> \ No newline at end of file diff --git a/lib/class_image_gd.php b/lib/class_image_gd.php index 98f79be..0598d9f 100644 --- a/lib/class_image_gd.php +++ b/lib/class_image_gd.php @@ -263,8 +263,18 @@ protected function output_png(array $options=array()) { $file = isset($options['file']) ? $options['file'] : null; $quality = isset($options['quality']) ? $options['quality'] : null; $filters = isset($options['filters']) ? $options['filters'] : null; - if (($file === null) && !headers_sent()) - header("Content-Type: image/png"); + + if (($file === null) && !headers_sent()) { + header("Content-Type: image/png"); + } + + // Compression must be between 0-9 - 2/02/2016 + if($quality && is_numeric($quality)) { + $quality = $quality < 100 ? round(($quality / 100) * 10) : null; + } else { + $quality = null; + } + return imagepng($this->image, $file, $quality, $filters); } @@ -350,3 +360,5 @@ protected function imageCopyResampled( return imageCopyResampled($this->image, $src, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH); } } + +?> \ No newline at end of file diff --git a/lib/class_image_gmagick.php b/lib/class_image_gmagick.php index 41ef437..f49b0f1 100644 --- a/lib/class_image_gmagick.php +++ b/lib/class_image_gmagick.php @@ -300,3 +300,5 @@ protected function optimize_jpeg(array $options=array()) { } } + +?> \ No newline at end of file diff --git a/lib/class_image_imagick.php b/lib/class_image_imagick.php index 59bc39d..e3dfa33 100644 --- a/lib/class_image_imagick.php +++ b/lib/class_image_imagick.php @@ -303,3 +303,5 @@ protected function optimize_jpeg(array $options=array()) { } } + +?> \ No newline at end of file diff --git a/lib/class_zipFolder.php b/lib/class_zipFolder.php index 64b446e..7dc6e64 100644 --- a/lib/class_zipFolder.php +++ b/lib/class_zipFolder.php @@ -58,3 +58,5 @@ function zip($folder, $parent=null) { } } } + +?> \ No newline at end of file diff --git a/lib/helper_dir.php b/lib/helper_dir.php index a197a27..dcc057f 100644 --- a/lib/helper_dir.php +++ b/lib/helper_dir.php @@ -154,3 +154,5 @@ static function fileSort($a, $b) { return ($a < $b) ? -1 : 1; } } + +?> \ No newline at end of file diff --git a/lib/helper_file.php b/lib/helper_file.php index 5c3c34f..4119ec9 100644 --- a/lib/helper_file.php +++ b/lib/helper_file.php @@ -212,3 +212,5 @@ static function normalizeFilename($filename) { } } + +?> \ No newline at end of file diff --git a/lib/helper_httpCache.php b/lib/helper_httpCache.php index 24e022a..8d51e8c 100644 --- a/lib/helper_httpCache.php +++ b/lib/helper_httpCache.php @@ -96,3 +96,5 @@ static function checkMTime($mtime, $sendHeaders=null) { } } + +?> \ No newline at end of file diff --git a/lib/helper_path.php b/lib/helper_path.php index e2e085a..9a34913 100644 --- a/lib/helper_path.php +++ b/lib/helper_path.php @@ -29,7 +29,7 @@ static function rel2abs_url($path) { return false; $dir = self::normalize($dir); - $doc_root = self::normalize(realpath($_SERVER['DOCUMENT_ROOT'])); + $doc_root = self::normalize($_SERVER['DOCUMENT_ROOT']); if (substr($dir, 0, strlen($doc_root)) != $doc_root) return false; @@ -62,7 +62,7 @@ static function url2fullPath($url) { } if (isset($_SERVER['DOCUMENT_ROOT'])) { - return self::normalize(realpath($_SERVER['DOCUMENT_ROOT']) . "/$url"); + return self::normalize($_SERVER['DOCUMENT_ROOT'] . "/$url"); } else { if ($uri === false) return false; @@ -145,3 +145,5 @@ static function urlPathDecode($path) { } } + +?> \ No newline at end of file diff --git a/lib/helper_phpGet.php b/lib/helper_phpGet.php deleted file mode 100644 index 3b6c83b..0000000 --- a/lib/helper_phpGet.php +++ /dev/null @@ -1,158 +0,0 @@ - - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -namespace kcfinder; - -class phpGet { - - static public $methods = array('curl', 'fopen', 'http', 'socket'); - static public $urlExpr = '/^([a-z]+):\/\/((([\p{L}\d\-]+\.)+[\p{L}]{1,4})(\:(\d{1,6}))?(\/.*)*)?$/u'; - static public $socketExpr = '/^[A-Z]+\/\d+(\.\d+)\s+\d+\s+OK\s*([a-zA-Z0-9\-]+\:\s*[^\n]*\n)*\s*([a-f0-9]+\r?\n)?(.*)$/s'; - - static public function get($url, $file=null, $method=null) { - if ($file === true) - $file = basename($url); - if ($file !== null) { - if (is_dir($file)) - $file = rtrim($file, '/') . '/' . basename($url); - $exists = file_exists($file); - if (!@touch($file)) - return false; - if (!$exists) - @unlink($file); - } - - if (in_array($method, self::$methods, true)) { - $check = "check_$method"; - $get = "get_$method"; - if (self::$check()) - $content = self::$get($url); - else - return false; - } else { - - foreach (self::$methods as $m) { - $check = "check_$m"; - $get = "get_$m"; - if (self::$check()) { - $content = self::$get($url); - if ((($method !== true) && (strtolower($method) != "all")) || - ($content !== false) - ) - break; - } - } - if (!isset($content)) - return false; - } - - return ($file !== null) - ? @file_put_contents($file, $content) - : $content; - } - - static public function get_fopen($url) { - return @file_get_contents($url); - } - - static public function get_curl($url) { - return ( - (false !== ( $curl = @curl_init($url) )) && - ( @ob_start() || (@curl_close($curl) && false)) && - ( @curl_exec($curl) || (@curl_close($curl) && false)) && - ((false !== ( $content = @ob_get_clean() )) || (@curl_close($curl) && false)) && - ( @curl_close($curl) || true) - ) - ? $content - : false; - } - - static public function get_http($url) { - return ( - (false !== ($content = @http_get($url))) && - ( - ( - preg_match(self::$socketExpr, $content, $match) && - false !== ($content = $match[4]) - ) || true - ) - ) - ? $content - : false; - } - - static public function get_socket($url) { - if (!preg_match(self::$urlExpr, $url, $match)) - return false; - - $protocol = $match[1]; - $host = $match[3]; - $port = strlen($match[6]) ? $match[6] : 80; - $path = strlen($match[7]) ? $match[7] : "/"; - - $cmd = - "GET $path " . strtoupper($protocol) . "/1.1\r\n" . - "Host: $host\r\n" . - "Connection: Close\r\n\r\n"; - - if ((false !== ( $socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP) )) && - (false !== @socket_connect($socket, $host, $port) ) && - (false !== @socket_write($socket, $cmd, strlen($cmd)) ) && - (false !== ( $content = @socket_read($socket, 2048) )) - ) { - do { - $piece = @socket_read($socket, 2048); - $content .= $piece; - } while ($piece); - - $content = preg_match(self::$socketExpr, $content, $match) - ? $match[4] : false; - } - - if (isset($socket) && is_resource($socket)) - @socket_close($socket); - else - return false; - - return isset($content) ? $content : false; - } - - static private function check_fopen() { - return - ini_get('allow_url_fopen') && - function_exists('file_get_contents'); - } - - static private function check_curl() { - return - function_exists('curl_init') && - function_exists('curl_exec') && - function_exists('curl_close') && - function_exists('ob_start') && - function_exists('ob_get_clean'); - } - - static private function check_http() { - return function_exists('http_get'); - } - - static private function check_socket() { - return - function_exists('socket_create') && - function_exists('socket_connect') && - function_exists('socket_write') && - function_exists('socket_read') && - function_exists('socket_close'); - } -} diff --git a/lib/helper_text.php b/lib/helper_text.php index d750e5e..15fcae2 100644 --- a/lib/helper_text.php +++ b/lib/helper_text.php @@ -51,3 +51,5 @@ static function jsValue($string) { } } + +?> \ No newline at end of file diff --git a/themes/dark/01.ui.css b/themes/dark/01.ui.css index ca54ed5..2d56d38 100644 --- a/themes/dark/01.ui.css +++ b/themes/dark/01.ui.css @@ -1403,8 +1403,501 @@ fieldset.sh-uniform legend { padding: 0; } +/*** Uniform */ +/* Remove default webkit and possible mozilla .search styles. + * Keeping this as :active to remove browser styles */ +div.checker input, +input[type="search"], +input[type="search"]:active { + -moz-appearance: none; + -webkit-appearance: none; +} + +div.selector, +div.selector span, +div.checker span, +div.radio span, +div.uploader, +div.uploader +span.action, +div.button, +div.button span { + -webkit-font-smoothing: antialiased; +} + +div.selector, +div.checker, +div.button, +div.radio, +div.uploader { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + vertical-align: middle; +} + +div.checker span, +div.checker input, +div.radio span, +div.radio input, +div.button span { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + text-align: center; +} + +div.selector select, +div.checker input, +div.button button, +div.button input, +div.button a, +div.radio input, +div.uploader input, +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + outline: 0; +} + +div.selector, +div.selector *, +div.radio, +div.radio *, +div.checker, +div.checker *, +div.uploader, +div.uploader *, +div.button, +div.button * { + margin: 0; + padding: 0; +} + +/* Select */ +div.selector { + padding: 0 1.9em 0 0; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.selector span { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + padding:6px 0 6px 10px; + cursor: pointer; + width: 100%; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.selector .ui-icon { + background: url(img/ui-icons_grey.png) -65px -16px; +} +div.selector select { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + height: 50px; + bottom: 0; + width: 100%; + cursor: pointer; +} + +/* Checkbox */ +div.checker { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 4px; +} +div.checker, +div.checker span, +div.checker input { + width: 15px; + height: 15px; +} +div.checker span.checked { + background: url(img/ui-icons_grey.png) -64px -145px; +} +div.checker input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + cursor: pointer; +} + +/* Radio */ +div.radio { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 9px; +} +div.radio, +div.radio span, +div.radio input { + width: 15px; + height: 15px; +} +div.radio span.checked { + background: url(img/ui-icons_grey.png) -80px -145px; +} +div.radio input { + opacity: 0; + border: 0; + background: none; + cursor: pointer; +} + +/* Upload */ +div.uploader { + cursor: pointer; + position: relative; + overflow: hidden; + border-radius: 4px; +} +div.uploader span.action { + text-align: center; + float: left; + display: inline; + overflow: hidden; + cursor: pointer; + padding: 6px 10px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +div.uploader span.filename { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + float: left; + padding: 6px 10px; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.uploader input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + top: 0; + right: 0; + float: right; + cursor: pointer; + font-size: 100px; +} +div.uploader input::-webkit-file-upload-button { + cursor: pointer; +} +div.uploader.active span.filename, +div.uploader.focus span.filename { + border-right: 1px solid; +} + +/* Button */ +div.button { + cursor: pointer; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.button a, +div.button button, +div.button input { + opacity: 0; + filter: alpha(opacity=0); + display: block; + left: 0; + top: 0; + position: absolute; + margin: 0; + padding: 0; + font-size: 1000px; + cursor: pointer; +} +div.button span { + padding: 0; + margin: 6px 10px; +} + +/* Text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + margin: 0; + border: 1px solid; + border-radius: 4px; +} +input.uniform-input, +textarea.uniform { + padding: 6px 10px; +} +textarea.uniform { + overflow: auto; +} +select.uniform-multiselect { + padding: 5px; +} + + +/** Colorize elements */ + +div.uploader { + border: 1px solid #aaa; +} +div.uploader.active, +div.uploader.focus { + border-color: #184977; +} + +/* Default - text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform, +div.uploader span.filename, +div.selector span { + border-color: #666; + box-shadow: inset 0 0 4px #555; + background: #000; + background: -webkit-linear-gradient(top, #111, #333); + background: -moz-linear-gradient(top, #111, #333); + background: -ms-linear-gradient(top, #111, #333); + background: -o-linear-gradient(top, #111, #333); + background: linear-gradient(to bottom, #111, #333); + color: #aaa; +} + +select.uniform-multiselect option { + color: #aaa; +} + +select.uniform-multiselect.focus option { + color: #000; +} + +/* Focus - text fields */ +input.uniform-input.focus, +select.uniform-multiselect.focus, +textarea.uniform.focus, +div.uploader.active span.filename, +div.uploader.focus span.filename, +div.selector.active span, +div.selector.focus span { + border-color: #4d637c; + box-shadow: inset 0 0 4px #4d637c; + color: #fff; + background: #202D3E; + background: -webkit-linear-gradient(top, #131427, #273446); + background: -moz-linear-gradient(top, #131427, #273446); + background: -ms-linear-gradient(top, #131427, #273446); + background: -o-linear-gradient(top, #131427, #273446); + background: linear-gradient(to bottom, #131427, #273446); +} + +/* Read-only - text fields */ +input.uniform-input[readonly], +textarea.uniform[readonly], +input.uniform-input[readonly]:focus, +textarea.uniform[readonly]:focus { + color: #808080; + border-color: #a5a5a5; + box-shadow: inset 0 0 4px #a5a5a5; + background: -webkit-linear-gradient(top, #ddd, #fff); + background: -moz-linear-gradient(top, #ddd, #fff); + background: -ms-linear-gradient(top, #ddd, #fff); + background: -o-linear-gradient(top, #ddd, #fff); + background: linear-gradient(to bottom, #ddd, #fff); +} + +/* Default - buttons */ +div.selector, +div.button, +div.uploader span.action, +div.radio, +div.checker { + border-color: #555; + background: #333; + background: -webkit-linear-gradient(top, #555, #111); + background: -moz-linear-gradient(top, #555, #111); + background: -ms-linear-gradient(top, #555, #111); + background: -o-linear-gradient(top, #555, #111); + background: linear-gradient(to bottom, #555, #111); + box-shadow: inset 0 0 7px #555, inset 0 0 3px #555, 0 0 3px #000, 0 0 6px #000; +} + +/* Hover - buttons */ +div.selector.hover, +div.button.hover, +div.uploader.hover span.action, +div.radio.hover, +div.checker.hover { + background: #333; + background: -webkit-linear-gradient(top, #111, #555); + background: -moz-linear-gradient(top, #111, #555); + background: -ms-linear-gradient(top, #111, #555); + background: -o-linear-gradient(top, #111, #555); + background: linear-gradient(to bottom, #111, #555); +} + +/* Focus - buttons */ +div.selector.focus, +div.button.focus, +div.uploader.focus span.action, +div.radio.focus, +div.checker.focus { + color: #fff; + border-color: #4685b3; + background: #4685b3; + background: -webkit-linear-gradient(top, #4685b3, #184977); + background: -moz-linear-gradient(top, #4685b3, #184977); + background: -ms-linear-gradient(top, #4685b3, #184977); + background: -o-linear-gradient(top, #4685b3, #184977); + background: linear-gradient(to bottom, #4685b3, #184977); + box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4, 0 0 3px #000, 0 0 6px #000; +} + +/* Active - buttons */ +div.button.active, +div.button.active.hover, +div.button.focus.hover, +div.uploader.active span.action, +div.uploader.active.hover span.action, +div.uploader.focus.hover span.action, +div.radio.active, +div.radio.active.hover, +div.radio.focus.hover, +div.checker.active, +div.checker.active.hover, +div.checker.focus.hover, +div.selector.active, +div.selector.active.hover { + color: #fff; + border-color: #4685b3; + background: #184977; + background: -webkit-linear-gradient(top, #184977, #4685b3); + background: -moz-linear-gradient(top, #184977, #4685b3); + background: -ms-linear-gradient(top, #184977, #4685b3); + background: -o-linear-gradient(top, #184977, #4685b3); + background: linear-gradient(to bottom, #184977, #4685b3); + box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4, 0 0 3px #000, 0 0 6px #000; +} + +div.selector.focus .ui-icon, +div.checker.focus span.checked, +div.radio.focus span.checked, +div.selector.active .ui-icon, +div.checker.active span.checked, +div.radio.active span.checked { + background-image: url(img/ui-icons_white.png); +} + +/* Disabled */ +input.uniform-input[disabled], +select.uniform-multiselect[disabled], +textarea.uniform[disabled], +div.button.disabled, +div.uploader.disabled, +div.radio.disabled, +div.checker.disabled, +div.selector.disabled, +div.selector.disabled.active{ + opacity: .5; + filter: alpha(opacity=50); + cursor: default; +} + +div.selector.disabled select, +div.uploader.disabled input, +div.button.disabled input, +div.button.disabled button, +div.button.disabled a, +div.radio.disabled input, +div.checker.disabled input { + cursor: default; +} + +/* Buttons text */ +div.button span, +div.uploader span.action { + font-weight: bold; + color: #aaa; + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +/* Placeholder colors */ +input.uniform-input::-webkit-input-placeholder, +textarea.uniform::-webkit-input-placeholder { + color: #ababab; +} +input.uniform-input:-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #aaa; +} +input.uniform-input::-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #aaa; +} +input.uniform-input:-ms-input-placeholder, +textarea.uniform:-ms-input-placeholder{ + color: #ababab; +} +input.uniform-input:focus::-webkit-input-placeholder, +textarea.uniform:focus::-webkit-input-placeholder{ + color: #184977; +} +input.uniform-input:focus:-moz-placeholder, +textarea.uniform:focus:-moz-placeholder { + color: #184977; +} +input.uniform-input:focus::-moz-placeholder, +textarea.uniform:focus::-moz-placeholder { + color: #184977; +} +input.uniform-input:focus:-ms-input-placeholder, +textarea.uniform:focus:-ms-input-placeholder { + color: #184977; +} + +/** sh-uniform elements (a shUniform patch must be applied) */ + +fieldset.sh-uniform { + color: #aaa; + border: 1px solid #425064; + border-radius: 4px; + background: #202d3e; + box-shadow: inset 0 0 3px #000, inset 0 0 6px #000, 0 0 3px #425064, 0 0 2px #425064; + margin: 0 10px 10px 0; + padding: 10px; +} +fieldset.sh-uniform legend { + font-weight: bold; + color: #aaa; +} +label.sh-uniform { + color: #aaa; +} + /*** shCheckset */ -/* + .shcs { margin: 0; } @@ -1495,5 +1988,4 @@ fieldset.sh-uniform legend { position:relative; margin-left:5px; top:1px; -} -*/ \ No newline at end of file +} \ No newline at end of file diff --git a/themes/dark/03.misc.css b/themes/dark/02.misc.css similarity index 92% rename from themes/dark/03.misc.css rename to themes/dark/02.misc.css index a2a77b3..cb45671 100644 --- a/themes/dark/03.misc.css +++ b/themes/dark/02.misc.css @@ -23,7 +23,6 @@ fieldset td { span.current, span.regular:hover, span.context, -a.drag > span.folder, #clipboard div:hover, div.file:hover, #files div.selected, @@ -77,6 +76,7 @@ tr.selected:hover > td, display: block; float: left; border-radius: 4px; + transition: .3s; padding:0; } #toolbar a > span { @@ -96,6 +96,7 @@ tr.selected:hover > td, background: -o-linear-gradient(top, #4685b3, #184977); background: linear-gradient(to bottom, #4685b3, #184977); box-shadow: inset 0 0 3px #88b9da; + transition: .3s; } #toolbar a[href="kcact:upload"] span { background-image: url(img/icons/upload.png); @@ -165,7 +166,7 @@ span.regular { background-image: url(img/tree/folder.png); background-color: transparent; } -span.regular:hover, span.context, a.drag > span.folder, #clipboard div:hover { +span.regular:hover, span.context, #clipboard div:hover { transition: .3s; background-color: #333; border-color: #777; @@ -387,40 +388,15 @@ a.denied:hover { /* IMAGE VIEWER */ -.kcfImageViewer .ui-dialog-content { +.ui-dialog-content.kcfImageViewer { background: #000; cursor: pointer; } .kcfImageViewer .img { background: url(img/bg_transparent.png); } -.ui-dialog-titlebar.loading { - background: url(img/loading.gif); - box-shadow: inset 0 0 3px #000, inset 0 0 6px #000; - border-color: #425064; -} - -.ui-dialog-titlebar.loading .ui-dialog-title { - color: #aaa; - font-weight: normal; -} - -.ui-dialog-titlebar.loading .ui-dialog-titlebar-close .ui-button-icon-primary.ui-icon.ui-icon-closethick { - background-image: url(img/ui-icons_grey.png); -} /* MISC */ -#settings .tf-select { - margin: 3px 5px 6px 0; -} -#settings .tf-selected { - padding-top: 10px; - padding-bottom: 11px; -} -#settings .tf-select .tf-button { - padding-top: 7px; - padding-bottom: 8px; -} #loading { margin-right: 5px; @@ -435,10 +411,6 @@ a.denied:hover { background: #fff; } -div.selector#uniform-lang { - margin: 8px 6px 6px 0; -} - /* FIX FIELDSET BORDER RADIUS BUG ON IE */ body.msie fieldset, body.trident.rv fieldset { diff --git a/themes/dark/02.transForm.css b/themes/dark/02.transForm.css deleted file mode 100644 index e07f37e..0000000 --- a/themes/dark/02.transForm.css +++ /dev/null @@ -1,539 +0,0 @@ -/* COMMON - BEGIN */ - -/* FONT SETTINGS */ -.tf-select, -.tf-input, -.tf-textarea, -.tf-multiple, -.tf-label, -.tf-fieldset legend, -.tf-file, -.tf-file input, -.tf-radio, -.tf-checkbox, -.tf-button, -.tf-input.tf-color, -.tf-input.tf-range { - font-size: 13px; - cursor: pointer; -} - -/* FIELD - NORMAL */ -.tf-select .tf-selected, -.tf-input, -.tf-multiple, -.tf-textarea, -.tf-file .tf-info, -.tf-radio, -.tf-checkbox { - background: #000; - background: -webkit-linear-gradient(top, #111, #333); - background: -moz-linear-gradient(top, #111, #333); - background: -ms-linear-gradient(top, #111, #333); - background: -o-linear-gradient(top, #111, #333); - background: linear-gradient(to bottom, #111, #333); - box-shadow: inset 0 0 4px #555; - border: 1px solid #666; - color: #aaa; - border-radius: 4px; - color: #6b6b6b; - padding: 6px 10px; -} - -/* FIELD - FOCUSED */ -.tf-select.tf-focused .tf-selected, -.tf-select .tf-menu, -.tf-multiple.tf-focused, -.tf-input:focus, .tf-textarea:focus, -.tf-file.tf-focused .tf-info, -.tf-radio.tf-focused, -.tf-checkbox.tf-focused { - background: #202D3E; - background: -webkit-linear-gradient(top, #131427, #273446); - background: -moz-linear-gradient(top, #131427, #273446); - background: -ms-linear-gradient(top, #131427, #273446); - background: -o-linear-gradient(top, #131427, #273446); - background: linear-gradient(to bottom, #131427, #273446); - box-shadow: inset 0 0 4px #4d637c; - border: 1px solid #4d637c; - color: #fff; -} - -/* BUTTON - NORMAL */ -.tf-button, -.tf-file .tf-button { - background: #333; - background: -webkit-linear-gradient(top, #555, #111); - background: -moz-linear-gradient(top, #555, #111); - background: -ms-linear-gradient(top, #555, #111); - background: -o-linear-gradient(top, #555, #111); - background: linear-gradient(to bottom, #555, #111); - box-shadow: inset 0 0 7px #555, inset 0 0 3px #555, 0 0 3px #000, 0 0 6px #000; - border: 1px solid #555; - border-radius: 4px; - padding: 6px 10px; -} -.tf-file .tf-button, -.tf-select .tf-button { - box-shadow: inset 0 0 7px #555, inset 0 0 3px #555; -} - -/* BUTTON - FOCUSED */ -.tf-file.tf-focused .tf-button, -.tf-button.tf-focused, -.tf-select.tf-focused .tf-button { - background: #4685b3; - background: -webkit-linear-gradient(top, #4685b3, #184977); - background: -moz-linear-gradient(top, #4685b3, #184977); - background: -ms-linear-gradient(top, #4685b3, #184977); - background: -o-linear-gradient(top, #4685b3, #184977); - background: linear-gradient(to bottom, #4685b3, #184977); - box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4, 0 0 3px #000, 0 0 6px #000; - border-color: #4685b3; - color: #fff; -} -.tf-file.tf-focused .tf-button, -.tf-select.tf-focused .tf-button { - box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4; -} - -/* BLACK OUTLINE, WHITE TEXT */ -.tf-select .tf-menu .tf-hover, -.tf-multiple .tf-hover, -.tf-multiple .tf-selected, -.tf-button { - color: #fff; - text-shadow: - 1px 0 rgba(0,0,0,.2), - -1px 0 rgba(0,0,0,.2), - 0 -1px rgba(0,0,0,.2), - 0 1px rgba(0,0,0,.2), - 1px 1px rgba(0,0,0,.2), - -1px -1px rgba(0,0,0,.2), - 1px -1px rgba(0,0,0,.2), - -1px 1px rgba(0,0,0,.2); -} - -/* COMMON - END */ - -/* SELECT BOX - BEGIN */ - -.tf-select .tf-selected { - border-radius: 4px 0 0 4px; -} -.tf-select .tf-button { - border-left: none; - border-radius: 0 4px 4px 0; -} - -.tf-select .tf-button span { - display: block; - background: url('img/ui-icons_grey.png') -64px -15px; - width: 16px; - margin-left: 4px; - margin-right: 5px; -} -.tf-select.tf-focused .tf-button span { - background-image: url('img/ui-icons_white.png'); -} -.tf-select .tf-menu { - border-radius: 0 0 4px 4px; -} -.tf-select .tf-menu div, -.tf-multiple div { - border: 1px solid transparent; - border-left-width: 0; - border-right-width: 0; - padding: 6px 10px; - margin-top: -1px; -} -.tf-select .tf-menu .tf-hover, -.tf-multiple.tf-focused .tf-hover, -.tf-multiple.tf-focused .tf-selected, -.tf-select.tf-opened.tf-focused .tf-button { - border-color: #4685b3; - background: #4685b3; - background: -webkit-linear-gradient(top, #184977, #4685b3); - background: -moz-linear-gradient(top, #184977, #4685b3); - background: -ms-linear-gradient(top, #184977, #4685b3); - background: -o-linear-gradient(top, #184977, #4685b3); - background: linear-gradient(to bottom, #184977, #4685b3); - box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4; -} -.tf-select.tf-opened .tf-button { - background: #111; - background: -webkit-linear-gradient(top, #555, #111); - background: -moz-linear-gradient(top, #555, #111); - background: -ms-linear-gradient(top, #555, #111); - background: -o-linear-gradient(top, #555, #111); - background: linear-gradient(to bottom, #555, #111); - box-shadow: inset 0 0 7px #555, inset 0 0 3px #555; -} -.tf-select .tf-menu .tf-group-last, -.tf-select .tf-menu div.tf-last { - border-bottom-width: 0; -} -.tf-select .tf-menu ul { - overflow: hidden; -} -.tf-select .tf-menu li.tf-last { - margin-bottom: -1px; -} -.tf-select .tf-menu .tf-last { - border-radius: 0 0 4px 4px; -} -.tf-select.tf-opened .tf-selected { - border-radius: 4px 0 0 0; -} -.tf-select.tf-opened .tf-button { - border-radius: 0 4px 0 0; -} -.tf-select .tf-menu li, -.tf-multiple.tf-focused li { - border-bottom: 1px solid #54b0e0; - border-top: 1px solid #54b0e0; - margin: -1px 0; -} -.tf-select .tf-menu li > span, -.tf-multiple li > span, -.tf-multiple.tf-focused li > span { - display: block; - padding: 6px 10px; - text-align: center; - font-weight: bold; - color: #6b6b6b; - background: #a7deff; - border-bottom: 1px solid #54b0e0; - cursor: default; - white-space: nowrap; -} - -/* SELECT BOX - END */ - -/* MULTIPLE SELECT BOX - BEGIN */ - -.tf-multiple { - padding: 0; -} -.tf-multiple li { - border: 1px solid #54b0e0; - border-right: none; - border-left: none; - margin: -1px 0; -} -.tf-multiple li > span { - color: #70a5d1; - border-color: #54b0e0; - background: #c1ddf5; -} -.tf-multiple .tf-hover, -.tf-multiple .tf-selected, -.tf-multiple.tf-focused .tf-hover { - background: #4685b3; - background: -webkit-linear-gradient(top, #184977, #4685b3); - background: -moz-linear-gradient(top, #184977, #4685b3); - background: -ms-linear-gradient(top, #184977, #4685b3); - background: -o-linear-gradient(top, #184977, #4685b3); - background: linear-gradient(to bottom, #184977, #4685b3); - box-shadow: inset 0 0 7px #4e9ed4, inset 0 0 3px #4e9ed4; - border-color: #4685b3; -} -.tf-multiple .tf-hover, -.tf-multiple .tf-selected { - border: 1px solid #54b0e0; - border-left: none; - border-right: none; -} -.tf-multiple div.tf-first { - border-top: none; - border-radius: 4px 4px 0 0; - margin-top: 0; -} -.tf-multiple div.tf-last { - border-bottom: none; - border-radius: 0 0 4px 4px; -} -.tf-multiple .tf-group-first { - border-top: none; - margin-top: 0; -} -.tf-multiple li.tf-last, -.tf-multiple .tf-group-last { - border-bottom: none; -} - -/* MULTIPLE SELECT BOX - END */ - -/* FILE UPLOAD BOX - BEGIN */ - -.tf-file { - width: 200px; - padding: 0; - overflow: auto; -} -.tf-file .tf-info, .tf-file.tf-focused .tf-info { - padding: 6px 10px; - border-radius: 4px 0 0 4px; - border-right: none; -} -.tf-file .tf-button { - border-radius: 0 4px 4px 0; - color: transparent; - text-shadow: none; - padding: 6px 8px; -} -.tf-file .tf-button span { - margin: 0 0 0 -4px; - width: 16px; - height: 16px; - display: block; - overflow: hidden; - background: url('img/ui-icons_grey.png') -16px -96px; -} -.tf-file .tf-button:after { - content: "\00a0"; -} -.tf-file input::-webkit-file-upload-button { - cursor: pointer; -} - -/* FILE UPLOAD BOX - END */ - -/* RADIO BUTTON - BEGIN */ - -.tf-radio { - width: 15px; - height: 15px; - padding: 0; - border-radius: 8px; -} -.tf-radio input { - width: 17px; - height: 17px; - margin: -1px 0 0 -1px; - cursor: pointer; -} -.tf-radio span { - width: 15px; - height: 15px; - display: block; - float: right; -} -.tf-radio.tf-checked span { - background: url('img/ui-icons_grey.png') -80px -145px; -} -.tf-radio.tf-checked.tf-focused span { - background-image: url('img/ui-icons_white.png'); -} - -/* RADIO BUTTON - END */ - -/* CHECK BOX - BEGIN */ - -.tf-checkbox { - padding: 0; - width: 15px; - height: 15px; - border-radius: 3px; -} -.tf-checkbox input { - width: 17px; - height: 17px; - margin: -1px 0 0 -1px; - cursor: pointer; -} -.tf-checkbox.tf-checked span { - width: 15px; - height: 15px; - display: block; - background: url('img/ui-icons_grey.png') -64px -145px; - float: right; -} -.tf-checkbox.tf-focused.tf-checked span { - background-image: url('img/ui-icons_white.png'); -} - - -/* CHECK BX - END */ - -/* BUTTON */ -.tf-button { - overflow: hidden; - padding: 0; -} -.tf-button span { - margin: 3px 7px; - float: right; -} -.tf-button input, -.tf-button button { - cursor: pointer; -} - -/* TEXT & TEXTAREA - BEGIN */ - -.tf-input, .tf-textarea { - outline: none; - cursor: text; - margin: 0; -} -/*.tf-input.tf-readOnly, -.tf-textarea.tf-readOnly, -.tf-input.tf-readOnly:focus, -.tf-textarea.tf-readOnly:focus { - background: #e4e4e4; - background: -webkit-linear-gradient(top, #e4e4e4, #fff); - background: -moz-linear-gradient(top, #e4e4e4, #fff); - background: -ms-linear-gradient(top, #e4e4e4, #fff); - background: -o-linear-gradient(top, #e4e4e4, #fff); - background: linear-gradient(to bottom, #e4e4e4, #fff); - box-shadow: inset 0 0 2px #a2a2a2; - border: 1px solid #a2a2a2; - border-radius: 4px; - color: #888; - padding: 6px 10px; -}*/ - -/* PLACEHOLDER COLORS */ - -.tf-input::-webkit-input-placeholder, -.tf-textarea::-webkit-input-placeholder { - color: #aaa; -} -.tf-input:-moz-placeholder, -.tf-textarea:-moz-placeholder { - color: #aaa; -} -.tf-input::-moz-placeholder, -.tf-textarea::-moz-placeholder { - color: #aaa; -} -.tf-input:-ms-input-placeholder, -.tf-textarea:-ms-input-placeholder { - color: #aaa; -} -.tf-input:focus::-webkit-input-placeholder, -.tf-textarea:focus::-webkit-input-placeholder { - color: #184977; -} -.tf-input:focus:-moz-placeholder, -.tf-textarea:focus:-moz-placeholder { - color: #184977; -} -.tf-input:focus::-moz-placeholder, -.tf-textarea:focus::-moz-placeholder { - color: #184977; -} -.tf-input:focus:-ms-input-placeholder, -.tf-textarea:focus:-ms-input-placeholder { - color: #184977; -} - -/* READ-ONLY PLACEHOLDERS */ -/* -.tf-input.tf-readOnly::-webkit-input-placeholder, -.tf-textarea.tf-readOnly::-webkit-input-placeholder { - color: #d4d4d4; -} -.tf-input.tf-readOnly:-moz-placeholder, -.tf-textarea.tf-readOnly:-moz-placeholder { - color: #dedede; -} -.tf-input.tf-readOnly::-moz-placeholder, -.tf-textarea.tf-readOnly::-moz-placeholder { - color: #dedede; -} -.tf-input.tf-readOnly:-ms-input-placeholder, -.tf-textarea.tf-readOnly:-ms-input-placeholder { - color: #d4d4d4; -} -.tf-input.tf-readOnly:focus::-webkit-input-placeholder, -.tf-textarea.tf-readOnly:focus::-webkit-input-placeholder { - color: #d4d4d4; -} -.tf-input.tf-readOnly:focus:-moz-placeholder, -.tf-textarea.tf-readOnly:focus:-moz-placeholder { - color: #dedede; -} -.tf-input.tf-readOnly:focus::-moz-placeholder, -.tf-textarea.tf-readOnly:focus::-moz-placeholder { - color: #dedede; -} -.tf-input.tf-readOnly:focus:-ms-input-placeholder, -.tf-textarea.tf-readOnly:focus:-ms-input-placeholder { - color: #d4d4d4; -} -*/ -/* TEXT & TEXTAREA - END */ - -/* FIELD SET */ -.tf-fieldset { - color: #aaa; - border: 1px solid #425064; - border-radius: 4px; - background: #202d3e; - box-shadow: inset 0 0 3px #000, inset 0 0 6px #000, 0 0 3px #425064, 0 0 2px #425064; - margin: 0 10px 10px 0; - padding: 10px; -} -.tf-fieldset legend { - font-weight: bold; - color: #aaa; -} -.tf-label { - color: #aaa; -} -.tf-label.tf-focused { - color: #fff; -} - -/* MISC */ - -.tf-disabled { - opacity: .5; - filter: alpha(opacity=50); -} -.tf-disabled, -.tf-disabled input, -.tf-disabled button, -.tf-disabled * -*.tf-disabled { - cursor: default; -} -.tf-file.tf-disabled input::-webkit-file-upload-button { - cursor: pointer; -} -.tf-fieldset.tf-disabled, -.tf-form.tf-disabled { - opacity: 1; - filter: alpha(opacity=100); -} - -.tf-input.tf-color { - width: 30px; - padding: 0; - height: 24px; -} -.tf-input.tf-number { - text-align: right; -} -.tf-input.tf-range { - height: 9px; - margin: 8px 0 7px 0; -} -.tf-input.tf-search, -.tf-input.tf-search.tf-readOnly{ - border-radius: 11px; -} -.tf-input.tf-datetime, -.tf-input.tf-datetime-local, -.tf-input.tf-month, -.tf-input.tf-time, -.tf-input.tf-week, -.tf-input.tf-datetime:focus, -.tf-input.tf-datetime-local:focus, -.tf-input.tf-month:focus, -.tf-input.tf-time:focus, -.tf-input.tf-week:focus { - padding: 1px 5px; -} \ No newline at end of file diff --git a/themes/dark/css.php b/themes/dark/css.php index 247857b..569abc7 100644 --- a/themes/dark/css.php +++ b/themes/dark/css.php @@ -8,3 +8,5 @@ $theme = basename(dirname(__FILE__)); $min = new minifier("css"); $min->minify("cache/theme_$theme.css"); + +?> \ No newline at end of file diff --git a/themes/dark/img/bg_transparent.png b/themes/dark/img/bg_transparent.png index 08a9d43..3200632 100644 Binary files a/themes/dark/img/bg_transparent.png and b/themes/dark/img/bg_transparent.png differ diff --git a/themes/dark/init.js b/themes/dark/init.js index e658eda..35e2fbf 100644 --- a/themes/dark/init.js +++ b/themes/dark/init.js @@ -1,9 +1 @@ -// Preload some images -$.each([ - "loading.gif", - "ui-icons_black.png", - "ui-icons_grey.png", - "ui-icons_white.png" -], function(i, img) { - new Image().src = "themes/dark/img/" + img; -}); +new Image().src = 'themes/dark/img/loading.gif'; // preload animated gif diff --git a/themes/dark/js.php b/themes/dark/js.php index b60b450..32245b6 100644 --- a/themes/dark/js.php +++ b/themes/dark/js.php @@ -8,3 +8,5 @@ $theme = basename(dirname(__FILE__)); $min = new minifier("js"); $min->minify("cache/theme_$theme.js"); + +?> \ No newline at end of file diff --git a/themes/default/01.ui.css b/themes/default/01.ui.css index 0d08ed6..49a7f30 100644 --- a/themes/default/01.ui.css +++ b/themes/default/01.ui.css @@ -1426,9 +1426,503 @@ body .ui-tooltip { padding: 0; } +/*** Uniform */ +/* Remove default webkit and possible mozilla .search styles. + * Keeping this as :active to remove browser styles */ +div.checker input, +input[type="search"], +input[type="search"]:active { + -moz-appearance: none; + -webkit-appearance: none; +} + +div.selector, +div.selector span, +div.checker span, +div.radio span, +div.uploader, +div.uploader +span.action, +div.button, +div.button span { + -webkit-font-smoothing: antialiased; +} + +div.selector, +div.checker, +div.button, +div.radio, +div.uploader { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + vertical-align: middle; +} + +div.checker span, +div.checker input, +div.radio span, +div.radio input, +div.button span { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + text-align: center; +} + +div.selector select, +div.checker input, +div.button button, +div.button input, +div.button a, +div.radio input, +div.uploader input, +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + outline: 0; +} + +div.selector, +div.selector *, +div.radio, +div.radio *, +div.checker, +div.checker *, +div.uploader, +div.uploader *, +div.button, +div.button * { + margin: 0; + padding: 0; +} + +/* Select */ +div.selector { + padding: 0 1.9em 0 0; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.selector span { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + padding:6px 0 6px 10px; + cursor: pointer; + width: 100%; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.selector .ui-icon { + background: url(img/ui-icons_white.png) -65px -16px; +} +div.selector select { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + height: 50px; + bottom: 0; + width: 100%; + cursor: pointer; +} + +/* Checkbox */ +div.checker { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 4px; +} +div.checker, +div.checker span, +div.checker input { + width: 15px; + height: 15px; +} +div.checker span.checked { + background: url(img/ui-icons_white.png) -64px -145px; +} +div.checker input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + cursor: pointer; +} + +/* Radio */ +div.radio { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 9px; +} +div.radio, +div.radio span, +div.radio input { + width: 15px; + height: 15px; +} +div.radio span.checked { + background: url(img/ui-icons_white.png) -80px -145px; +} +div.radio input { + opacity: 0; + border: 0; + background: none; + cursor: pointer; +} + +/* Upload */ +div.uploader { + cursor: pointer; + position: relative; + overflow: hidden; + border-radius: 4px; +} +div.uploader span.action { + text-align: center; + float: left; + display: inline; + overflow: hidden; + cursor: pointer; + padding: 6px 10px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +div.uploader span.filename { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + float: left; + padding: 6px 10px; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.uploader input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + top: 0; + right: 0; + float: right; + cursor: pointer; + font-size: 100px; +} +div.uploader input::-webkit-file-upload-button { + cursor: pointer; +} +div.uploader.active span.filename, +div.uploader.focus span.filename { + border-right: 1px solid; +} + +/* Button */ +div.button { + cursor: pointer; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.button a, +div.button button, +div.button input { + opacity: 0; + filter: alpha(opacity=0); + display: block; + left: 0; + top: 0; + position: absolute; + margin: 0; + padding: 0; + font-size: 1000px; + cursor: pointer; +} +div.button span { + padding: 0; + margin: 6px 10px; +} + +/* Text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + margin: 0; + border: 1px solid; + border-radius: 4px; +} +input.uniform-input, +textarea.uniform { + padding: 6px 10px; +} +textarea.uniform { + overflow: auto; +} +select.uniform-multiselect { + padding: 5px; +} + + +/** Colorize elements */ + +div.uploader { + border: 1px solid #6b6b6b; +} +div.uploader.active, +div.uploader.focus { + border-color: #1b79b8; +} + +/* Default - text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform, +div.uploader span.filename, +div.selector span { + border-color: #6b6b6b; + box-shadow: inset 0 0 4px #6b6b6b; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); + color: #6b6b6b; +} + +select.uniform-multiselect option { + color: #6b6b6b; +} + +select.uniform-multiselect.focus option { + color: #000; +} + +/* Focus - text fields */ +input.uniform-input.focus, +select.uniform-multiselect.focus, +textarea.uniform.focus, +div.uploader.active span.filename, +div.uploader.focus span.filename, +div.selector.active span, +div.selector.focus span { + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + color: #000; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} + +/* Read-only - text fields */ +input.uniform-input[readonly], +textarea.uniform[readonly], +input.uniform-input[readonly]:focus, +textarea.uniform[readonly]:focus { + color: #808080; + border-color: #a5a5a5; + box-shadow: inset 0 0 4px #a5a5a5; + background: -webkit-linear-gradient(top, #ddd, #fff); + background: -moz-linear-gradient(top, #ddd, #fff); + background: -ms-linear-gradient(top, #ddd, #fff); + background: -o-linear-gradient(top, #ddd, #fff); + background: linear-gradient(to bottom, #ddd, #fff); +} + +/* Default - buttons */ +div.selector, +div.button, +div.uploader span.action, +div.radio, +div.checker { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #ababab, #6b6b6b); + background: -moz-linear-gradient(top, #ababab, #6b6b6b); + background: -ms-linear-gradient(top, #ababab, #6b6b6b); + background: -o-linear-gradient(top, #ababab, #6b6b6b); + background: linear-gradient(to bottom, #ababab, #6b6b6b); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} + +/* Hover - buttons */ +div.selector.hover, +div.button.hover, +div.uploader.hover span.action, +div.radio.hover, +div.checker.hover { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); +} + +/* Focus - buttons */ +div.selector.focus, +div.button.focus, +div.uploader.focus span.action, +div.radio.focus, +div.checker.focus { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); + background: -moz-linear-gradient(top, #59b5f2, #1b79b8); + background: -ms-linear-gradient(top, #59b5f2, #1b79b8); + background: -o-linear-gradient(top, #59b5f2, #1b79b8); + background: linear-gradient(to bottom, #59b5f2, #1b79b8); +} + +/* Active - buttons */ +div.button.active, +div.button.active.hover, +div.button.focus.hover, +div.uploader.active span.action, +div.uploader.active.hover span.action, +div.uploader.focus.hover span.action, +div.radio.active, +div.radio.active.hover, +div.radio.focus.hover, +div.checker.active, +div.checker.active.hover, +div.checker.focus.hover, +div.selector.active, +div.selector.active.hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); +} + +/* Disabled */ +input.uniform-input[disabled], +select.uniform-multiselect[disabled], +textarea.uniform[disabled], +div.button.disabled, +div.uploader.disabled, +div.radio.disabled, +div.checker.disabled, +div.selector.disabled, +div.selector.disabled.active{ + opacity: .5; + filter: alpha(opacity=50); + cursor: default; +} + +div.selector.disabled select, +div.uploader.disabled input, +div.button.disabled input, +div.button.disabled button, +div.button.disabled a, +div.radio.disabled input, +div.checker.disabled input { + cursor: default; +} + +/* Buttons text */ +div.button span, +div.uploader span.action { + font-weight: bold; + color: #fff; + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +/* Placeholder colors */ +input.uniform-input::-webkit-input-placeholder, +textarea.uniform::-webkit-input-placeholder { + color: #ababab; +} +input.uniform-input:-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #6b6b6b; +} +input.uniform-input::-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #6b6b6b; +} +input.uniform-input:-ms-input-placeholder, +textarea.uniform:-ms-input-placeholder{ + color: #ababab; +} +input.uniform-input:focus::-webkit-input-placeholder, +textarea.uniform:focus::-webkit-input-placeholder{ + color: #59b5f2; +} +input.uniform-input:focus:-moz-placeholder, +textarea.uniform:focus:-moz-placeholder { + color: #1b79b8; +} +input.uniform-input:focus::-moz-placeholder, +textarea.uniform:focus::-moz-placeholder { + color: #1b79b8; +} +input.uniform-input:focus:-ms-input-placeholder, +textarea.uniform:focus:-ms-input-placeholder { + color: #59b5f2; +} + +/** sh-uniform elements (a shUniform patch must be applied) */ + +fieldset.sh-uniform { + border: 1px solid #6B6B6B; + box-shadow: inset 0 0 4px #6B6B6B; + border-radius: 4px; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); + margin: 0 10px 10px 0; + padding: 10px; +} +fieldset.sh-uniform legend { + font-weight: bold; + color: #6B6B6B; + text-shadow: + 1px 0 rgba(255,255,255,.5), + -1px 0 rgba(255,255,255,.5), + 0 -1px rgba(255,255,255,.5), + 0 1px rgba(255,255,255,.5), + 1px 1px rgba(255,255,255,.5), + -1px -1px rgba(255,255,255,.5), + 1px -1px rgba(255,255,255,.5), + -1px 1px rgba(255,255,255,.5), + 0 0 5px #fff; +} +label.sh-uniform { + color: #6b6b6b; +} /*** shCheckset */ -/* + .shcs { margin: 0; } @@ -1519,4 +2013,4 @@ body .ui-tooltip { position:relative; margin-left:5px; top:1px; -}*/ \ No newline at end of file +} \ No newline at end of file diff --git a/themes/default/03.misc.css b/themes/default/02.misc.css similarity index 93% rename from themes/default/03.misc.css rename to themes/default/02.misc.css index 550d0bc..0535604 100644 --- a/themes/default/03.misc.css +++ b/themes/default/02.misc.css @@ -23,7 +23,6 @@ fieldset td { span.current, span.regular:hover, span.context, -a.drag > span.folder, #clipboard div:hover, div.file:hover, #files div.selected, @@ -70,6 +69,7 @@ tr.selected:hover > td, display: block; float: left; border-radius: 4px; + transition: .3s; padding:0; background: #E0E0E0; } @@ -90,6 +90,10 @@ tr.selected:hover > td, background: linear-gradient(to bottom, #59b5f2, #1b79b8); box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; } +#toolbar a:hover, +#toolbar a.hover { + transition: .3s; +} #toolbar a[href="kcact:upload"] span { background-image: url(img/icons/upload.png); } @@ -118,6 +122,20 @@ tr.selected:hover > td, margin-top:-5px; padding:6px; } +#settings fieldset:hover { + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + background: #dfeef8; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} +#settings fieldset:hover legend, +#settings fieldset:hover label { + color: #215b82; +} /* FOLDERS */ @@ -158,7 +176,7 @@ span.regular { background-image: url(img/tree/folder.png); background-color: transparent; } -span.regular:hover, span.context, a.drag > span.folder, #clipboard div:hover { +span.regular:hover, span.context, #clipboard div:hover { transition: .3s; background-color: #c6c6c6; border-color: #c6c6c6; @@ -380,25 +398,13 @@ a.denied:hover { /* IMAGE VIEWER */ -.kcfImageViewer .ui-dialog-content { +.ui-dialog-content.kcfImageViewer { + background: #000; cursor: pointer; } .kcfImageViewer .img { background: url(img/bg_transparent.png); } -.ui-dialog-titlebar.loading { - background: url(img/loading.gif); -} - -.ui-dialog-titlebar.loading .ui-dialog-title { - color: #6b6b6b; - text-shadow:none; - font-weight: normal; -} -.ui-dialog-titlebar.loading .ui-dialog-titlebar-close .ui-button-icon-primary.ui-icon.ui-icon-closethick { - background-image: url(img/ui-icons_black.png); -} - /* MISC */ @@ -412,18 +418,6 @@ a.denied:hover { background: #ddebf8; } -#settings .tf-select { - margin: 3px 5px 6px 0; -} -#settings .tf-selected { - padding-top: 10px; - padding-bottom: 11px; -} -#settings .tf-select .tf-button { - padding-top: 7px; - padding-bottom: 8px; -} - /* FIX FIELDSET BORDER RADIUS BUG ON IE */ body.msie fieldset, body.trident.rv fieldset { diff --git a/themes/default/02.transForm.css b/themes/default/02.transForm.css deleted file mode 100644 index f3fb9c4..0000000 --- a/themes/default/02.transForm.css +++ /dev/null @@ -1,543 +0,0 @@ - -/* COMMON - BEGIN */ - -/* FONT SETTINGS */ -.tf-select, -.tf-input, -.tf-textarea, -.tf-multiple, -.tf-label, -.tf-fieldset legend, -.tf-file, -.tf-file input, -.tf-radio, -.tf-checkbox, -.tf-button, -.tf-input.tf-color, -.tf-input.tf-range { - font-size: 13px; - cursor: pointer; -} - -/* FIELD - NORMAL */ -.tf-select .tf-selected, -.tf-input, -.tf-multiple, -.tf-textarea, -.tf-file .tf-info, -.tf-radio, -.tf-checkbox { - background: #f0f0f0; - background: -webkit-linear-gradient(top, #e3e3e3, #fff); - background: -moz-linear-gradient(top, #e3e3e3, #fff); - background: -ms-linear-gradient(top, #e3e3e3, #fff); - background: -o-linear-gradient(top, #e3e3e3, #fff); - background: linear-gradient(to bottom, #e3e3e3, #fff); - box-shadow: inset 0 0 2px #6b6b6b; - border: 1px solid #6b6b6b; - border-radius: 4px; - color: #6b6b6b; - padding: 6px 10px; -} - -/* FIELD - FOCUSED */ -.tf-select.tf-focused .tf-selected, -.tf-select .tf-menu, -.tf-multiple.tf-focused, -.tf-input:focus, .tf-textarea:focus, -.tf-file.tf-focused .tf-info, -.tf-radio.tf-focused, -.tf-checkbox.tf-focused { - background: #d2eaf6; - background: -webkit-linear-gradient(top, #d2eaf6, #fff); - background: -moz-linear-gradient(top, #d2eaf6, #fff); - background: -ms-linear-gradient(top, #d2eaf6, #fff); - background: -o-linear-gradient(top, #d2eaf6, #fff); - background: linear-gradient(to bottom, #d2eaf6, #fff); - box-shadow: inset 0 0 2px #1b79b8; - border: 1px solid #1b79b8; - color: #1b79b8; -} - -/* BUTTON - NORMAL */ -.tf-button, -.tf-file .tf-button { - background: #6b6b6b; - background: -webkit-linear-gradient(top, #ababab, #6b6b6b); - background: -moz-linear-gradient(top, #ababab, #6b6b6b); - background: -ms-linear-gradient(top, #ababab, #6b6b6b); - background: -o-linear-gradient(top, #ababab, #6b6b6b); - background: linear-gradient(to bottom, #ababab, #6b6b6b); - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; - border: 1px solid #6b6b6b; - border-radius: 4px; - padding: 6px 10px; -} - -/* BUTTON - FOCUSED */ -.tf-file.tf-focused .tf-button, -.tf-button.tf-focused, -.tf-select.tf-focused .tf-button{ - background: #1b79b8; - background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); - background: -moz-linear-gradient(top, #59b5f2, #1b79b8); - background: -ms-linear-gradient(top, #59b5f2, #1b79b8); - background: -o-linear-gradient(top, #59b5f2, #1b79b8); - background: linear-gradient(to bottom, #59b5f2, #1b79b8); - border-color: #1b79b8; -} - -/* BLACK OUTLINE, WHITE TEXT */ -.tf-select .tf-menu .tf-hover, -.tf-multiple .tf-hover, -.tf-multiple .tf-selected, -.tf-button { - color: #fff; - text-shadow: - 1px 0 rgba(0,0,0,.2), - -1px 0 rgba(0,0,0,.2), - 0 -1px rgba(0,0,0,.2), - 0 1px rgba(0,0,0,.2), - 1px 1px rgba(0,0,0,.2), - -1px -1px rgba(0,0,0,.2), - 1px -1px rgba(0,0,0,.2), - -1px 1px rgba(0,0,0,.2); -} - -/* COMMON - END */ - -/* SELECT BOX - BEGIN */ - -.tf-select .tf-selected { - border-radius: 4px 0 0 4px; -} -.tf-select .tf-button { - border-left: none; - border-radius: 0 4px 4px 0; -} - -.tf-select .tf-button span { - display: block; - background: url('img/ui-icons_white.png') -64px -15px; - width: 16px; - margin-left: 4px; - margin-right: 5px; -} -.tf-select .tf-menu { - border-radius: 0 0 4px 4px; -} -.tf-select .tf-menu div, -.tf-multiple div { - border: 1px solid transparent; - border-left-width: 0; - border-right-width: 0; - padding: 6px 10px; - margin-top: -1px; -} -.tf-select .tf-menu .tf-hover, -.tf-multiple.tf-focused .tf-hover, -.tf-multiple.tf-focused .tf-selected, -.tf-select.tf-opened.tf-focused .tf-button { - border-color: #1b79b8; - background: #59b5f2; - background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); - background: -moz-linear-gradient(top, #1b79b8, #59b5f2); - background: -ms-linear-gradient(top, #1b79b8, #59b5f2); - background: -o-linear-gradient(top, #1b79b8, #59b5f2); - background: linear-gradient(to bottom, #1b79b8, #59b5f2); - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} -.tf-select.tf-opened .tf-button { - background: #ababab; - background: -webkit-linear-gradient(top, #6b6b6b, #ababab); - background: -moz-linear-gradient(top, #6b6b6b, #ababab); - background: -ms-linear-gradient(top, #6b6b6b, #ababab); - background: -o-linear-gradient(top, #6b6b6b, #ababab); - background: linear-gradient(to bottom, #6b6b6b, #ababab); -} -.tf-select.tf-opened .tf-button { - -} -.tf-select .tf-menu .tf-group-last, -.tf-select .tf-menu div.tf-last { - border-bottom-width: 0; -} -.tf-select .tf-menu ul { - overflow: hidden; -} -.tf-select .tf-menu li.tf-last { - margin-bottom: -1px; -} -.tf-select .tf-menu .tf-last { - border-radius: 0 0 4px 4px; -} -.tf-select.tf-opened .tf-selected { - border-radius: 4px 0 0 0; -} -.tf-select.tf-opened .tf-button { - border-radius: 0 4px 0 0; -} -.tf-select .tf-menu li, -.tf-multiple.tf-focused li { - border-bottom: 1px solid #54b0e0; - border-top: 1px solid #54b0e0; - margin: -1px 0; -} -.tf-select .tf-menu li > span, -.tf-multiple li > span, -.tf-multiple.tf-focused li > span { - display: block; - padding: 6px 10px; - text-align: center; - font-weight: bold; - color: #6b6b6b; - background: #a7deff; - border-bottom: 1px solid #54b0e0; - cursor: default; - white-space: nowrap; -} - -/* SELECT BOX - END */ - -/* MULTIPLE SELECT BOX - BEGIN */ - -.tf-multiple { - padding: 0; -} -.tf-multiple li { - border: 1px solid #54b0e0; - border-right: none; - border-left: none; - margin: -1px 0; -} -.tf-multiple li > span { - color: #70a5d1; - border-color: #54b0e0; - background: #c1ddf5; -} -.tf-multiple .tf-hover, -.tf-multiple .tf-selected, -.tf-multiple.tf-focused .tf-hover { - background: #b7def2; - background: -webkit-linear-gradient(top, #54b0e0, #b7def2); - background: -moz-linear-gradient(top, #54b0e0, #b7def2); - background: -ms-linear-gradient(top, #54b0e0, #b7def2); - background: -o-linear-gradient(top, #54b0e0, #b7def2); - background: linear-gradient(to bottom, #54b0e0, #b7def2); - box-shadow: inset 0 0 2px #fff, inset 0 0 2px #fff; - border-color: #54b0e0; -} -.tf-multiple .tf-hover, -.tf-multiple .tf-selected { - border: 1px solid #54b0e0; - border-left: none; - border-right: none; -} -.tf-multiple div.tf-first { - border-top: none; - border-radius: 4px 4px 0 0; - margin-top: 0; -} -.tf-multiple div.tf-last { - border-bottom: none; - border-radius: 0 0 4px 4px; -} -.tf-multiple .tf-group-first { - border-top: none; - margin-top: 0; -} -.tf-multiple li.tf-last, -.tf-multiple .tf-group-last { - border-bottom: none; -} - -/* MULTIPLE SELECT BOX - END */ - -/* FILE UPLOAD BOX - BEGIN */ - -.tf-file { - width: 200px; - padding: 0; - overflow: auto; -} -.tf-file .tf-info, .tf-file.tf-focused .tf-info { - padding: 6px 10px; - border-radius: 4px 0 0 4px; - border-right: none; -} -.tf-file .tf-button { - border-radius: 0 4px 4px 0; - color: transparent; - text-shadow: none; - padding: 6px 8px; -} -.tf-file .tf-button span { - margin: 0 0 0 -4px; - width: 16px; - height: 16px; - display: block; - overflow: hidden; - background: url('img/ui-icons_white.png') -16px -96px; -} -.tf-file .tf-button:after { - content: "\00a0"; -} -.tf-file input::-webkit-file-upload-button { - cursor: pointer; -} - -/* FILE UPLOAD BOX - END */ - -/* RADIO BUTTON - BEGIN */ - -.tf-radio { - width: 15px; - height: 15px; - padding: 0; - border-radius: 8px; -} -.tf-radio input { - width: 17px; - height: 17px; - margin: -1px 0 0 -1px; - cursor: pointer; -} -.tf-radio span { - width: 15px; - height: 15px; - display: block; - float: right; -} -.tf-radio.tf-checked span { - background: url('img/ui-icons_black.png') -80px -145px; -} -.tf-radio.tf-checked.tf-focused span { - background-image: url('img/ui-icons_blue.png'); -} - -/* RADIO BUTTON - END */ - -/* CHECK BOX - BEGIN */ - -.tf-checkbox { - padding: 0; - width: 15px; - height: 15px; - border-radius: 3px; -} -.tf-checkbox input { - width: 17px; - height: 17px; - margin: -1px 0 0 -1px; - cursor: pointer; -} -.tf-checkbox.tf-checked span { - width: 15px; - height: 15px; - display: block; - background: url('img/ui-icons_black.png') -64px -145px; - float: right; -} -.tf-checkbox.tf-focused.tf-checked span { - background-image: url('img/ui-icons_blue.png'); -} - - -/* CHECK BX - END */ - -/* BUTTON */ -.tf-button { - overflow: hidden; - padding: 0; -} -.tf-button span { - margin: 3px 7px; - float: right; -} -.tf-button input, -.tf-button button { - cursor: pointer; -} - -/* TEXT & TEXTAREA - BEGIN */ - -.tf-input, .tf-textarea { - outline: none; - cursor: text; - margin: 0; -} -/*.tf-input.tf-readOnly, -.tf-textarea.tf-readOnly, -.tf-input.tf-readOnly:focus, -.tf-textarea.tf-readOnly:focus { - background: #e4e4e4; - background: -webkit-linear-gradient(top, #e4e4e4, #fff); - background: -moz-linear-gradient(top, #e4e4e4, #fff); - background: -ms-linear-gradient(top, #e4e4e4, #fff); - background: -o-linear-gradient(top, #e4e4e4, #fff); - background: linear-gradient(to bottom, #e4e4e4, #fff); - box-shadow: inset 0 0 2px #a2a2a2; - border: 1px solid #a2a2a2; - border-radius: 4px; - color: #888; - padding: 6px 10px; -}*/ - -/* PLACEHOLDER COLORS */ - -.tf-input::-webkit-input-placeholder, -.tf-textarea::-webkit-input-placeholder { - color: #bbb; -} -.tf-input:-moz-placeholder, -.tf-textarea:-moz-placeholder { - color: #aaa; -} -.tf-input::-moz-placeholder, -.tf-textarea::-moz-placeholder { - color: #aaa; -} -.tf-input:-ms-input-placeholder, -.tf-textarea:-ms-input-placeholder { - color: #bbb; -} -.tf-input:focus::-webkit-input-placeholder, -.tf-textarea:focus::-webkit-input-placeholder { - color: #abc7d6; -} -.tf-input:focus:-moz-placeholder, -.tf-textarea:focus:-moz-placeholder { - color: #54B0E0; -} -.tf-input:focus::-moz-placeholder, -.tf-textarea:focus::-moz-placeholder { - color: #54B0E0; -} -.tf-input:focus:-ms-input-placeholder, -.tf-textarea:focus:-ms-input-placeholder { - color: #abc7d6; -} - -/* READ-ONLY PLACEHOLDERS */ - -.tf-input.tf-readOnly::-webkit-input-placeholder, -.tf-textarea.tf-readOnly::-webkit-input-placeholder { - color: #d4d4d4; -} -.tf-input.tf-readOnly:-moz-placeholder, -.tf-textarea.tf-readOnly:-moz-placeholder { - color: #dedede; -} -.tf-input.tf-readOnly::-moz-placeholder, -.tf-textarea.tf-readOnly::-moz-placeholder { - color: #dedede; -} -.tf-input.tf-readOnly:-ms-input-placeholder, -.tf-textarea.tf-readOnly:-ms-input-placeholder { - color: #d4d4d4; -} -.tf-input.tf-readOnly:focus::-webkit-input-placeholder, -.tf-textarea.tf-readOnly:focus::-webkit-input-placeholder { - color: #d4d4d4; -} -.tf-input.tf-readOnly:focus:-moz-placeholder, -.tf-textarea.tf-readOnly:focus:-moz-placeholder { - color: #dedede; -} -.tf-input.tf-readOnly:focus::-moz-placeholder, -.tf-textarea.tf-readOnly:focus::-moz-placeholder { - color: #dedede; -} -.tf-input.tf-readOnly:focus:-ms-input-placeholder, -.tf-textarea.tf-readOnly:focus:-ms-input-placeholder { - color: #d4d4d4; -} - -/* TEXT & TEXTAREA - END */ - -/* FIELD SET */ -.tf-fieldset { -border: 1px solid #6B6B6B; - box-shadow: inset 0 0 4px #6B6B6B; - border-radius: 4px; - background: #fff; - background: -webkit-linear-gradient(top, #e3e3e3, #fff); - background: -moz-linear-gradient(top, #e3e3e3, #fff); - background: -ms-linear-gradient(top, #e3e3e3, #fff); - background: -o-linear-gradient(top, #e3e3e3, #fff); - background: linear-gradient(to bottom, #e3e3e3, #fff); - margin: 0 10px 10px 0; - padding: 10px; -} -.tf-fieldset legend { - font-weight: bold; - color: #6B6B6B; - text-shadow: - 1px 0 rgba(255,255,255,.5), - -1px 0 rgba(255,255,255,.5), - 0 -1px rgba(255,255,255,.5), - 0 1px rgba(255,255,255,.5), - 1px 1px rgba(255,255,255,.5), - -1px -1px rgba(255,255,255,.5), - 1px -1px rgba(255,255,255,.5), - -1px 1px rgba(255,255,255,.5), - 0 0 5px #fff; -} - -/* MISC */ - -.tf-label { - color: #6b6b6b; - margin: 0 3px; -} -.tf-label.tf-focused { - color: #1b79b8; -} -.tf-disabled { - opacity: .5; - filter: alpha(opacity=50); -} -.tf-disabled, -.tf-disabled input, -.tf-disabled button, -.tf-disabled * -*.tf-disabled { - cursor: default; -} -.tf-file.tf-disabled input::-webkit-file-upload-button { - cursor: pointer; -} -.tf-fieldset.tf-disabled, -.tf-form.tf-disabled { - opacity: 1; - filter: alpha(opacity=100); -} - -.tf-input.tf-color { - width: 30px; - padding: 0; - height: 24px; -} -.tf-input.tf-number { - text-align: right; -} -.tf-input.tf-range { - height: 9px; - margin: 8px 0 7px 0; -} -.tf-input.tf-search, -.tf-input.tf-search.tf-readOnly{ - border-radius: 11px; -} -.tf-input.tf-datetime, -.tf-input.tf-datetime-local, -.tf-input.tf-month, -.tf-input.tf-time, -.tf-input.tf-week, -.tf-input.tf-datetime:focus, -.tf-input.tf-datetime-local:focus, -.tf-input.tf-month:focus, -.tf-input.tf-time:focus, -.tf-input.tf-week:focus { - padding: 1px 5px; -} \ No newline at end of file diff --git a/themes/default/css.php b/themes/default/css.php index 247857b..569abc7 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -8,3 +8,5 @@ $theme = basename(dirname(__FILE__)); $min = new minifier("css"); $min->minify("cache/theme_$theme.css"); + +?> \ No newline at end of file diff --git a/themes/default/img/ui-icons_blue.png b/themes/default/img/ui-icons_blue.png deleted file mode 100644 index 33a3f3f..0000000 Binary files a/themes/default/img/ui-icons_blue.png and /dev/null differ diff --git a/themes/default/init.js b/themes/default/init.js index 5cc0b16..518f854 100644 --- a/themes/default/init.js +++ b/themes/default/init.js @@ -1,9 +1 @@ -// Preload some images -$.each([ - "loading.gif", - "ui-icons_black.png", - "ui-icons_blue.png", - "ui-icons_white.png" -], function(i, img) { - new Image().src = "themes/default/img/" + img; -}); +new Image().src = 'themes/default/img/loading.gif'; // preload animated gif diff --git a/themes/default/js.php b/themes/default/js.php index b60b450..32245b6 100644 --- a/themes/default/js.php +++ b/themes/default/js.php @@ -8,3 +8,5 @@ $theme = basename(dirname(__FILE__)); $min = new minifier("js"); $min->minify("cache/theme_$theme.js"); + +?> \ No newline at end of file diff --git a/tpl/tpl_browser.php b/tpl/tpl_browser.php index 536413b..cc9bfda 100644 --- a/tpl/tpl_browser.php +++ b/tpl/tpl_browser.php @@ -75,10 +75,6 @@
              -
              - -
              -
              diff --git a/tpl/tpl_javascript.php b/tpl/tpl_javascript.php index 208664f..e7fe87c 100644 --- a/tpl/tpl_javascript.php +++ b/tpl/tpl_javascript.php @@ -29,8 +29,6 @@ _.thumbsURL = _.uploadURL + "/config['thumbsDir']) ?>"; _.opener = opener) ?>; _.cms = "cms) ?>"; -_.dropUploadMaxFilesize = config['_dropUploadMaxFilesize']) ? intVal($this->config['_dropUploadMaxFilesize']) : "10485760" ?>; -_.langs = getLangs()) ?>; $.$.kuki.domain = "config['cookieDomain']) ?>"; $.$.kuki.path = "config['cookiePath']) ?>"; $.$.kuki.prefix = "config['cookiePrefix']) ?>"; diff --git a/upload.php b/upload.php index 5a86e60..dd6cfb2 100644 --- a/upload.php +++ b/upload.php @@ -16,3 +16,5 @@ $uploader = "kcfinder\\uploader"; // To execute core/bootstrap.php on older $uploader = new $uploader(); // PHP versions (even PHP 4) $uploader->upload(); + +?> \ No newline at end of file