NextGEN Gallery – WordPress Gallery Plugin - Version 1.9.3

Version Description

  • 26.02.2012 =
  • Bugfix : Ensure to set the slug for "all" albums
  • Bugfix : Updated german translation ( THX to Roger Hunziker )
  • Bugfix : Ensure error checking on IPTC array (THX to Kristian Edlund)
  • Bugfix : Handle IE8 cached images better in slideshow
  • Bugfix : Show album preview image if selected (THX to Kristian Edlund)
Download this release

Release Info

Developer photocrati
Plugin Icon 128x128 NextGEN Gallery – WordPress Gallery Plugin
Version 1.9.3
Comparing to
See all releases

Code changes from version 1.9.2 to 1.9.3

admin/admin.php CHANGED
@@ -260,18 +260,10 @@ class nggAdminPanel{
260
  wp_enqueue_script( 'shutter' );
261
  break;
262
  case "nggallery-manage-album" :
263
- if ( version_compare( $wp_version, '3.0.999', '>' ) ) {
264
- wp_enqueue_script( 'jquery-ui-autocomplete' );
265
- wp_enqueue_script( 'jquery-ui-dialog' );
266
- wp_enqueue_script( 'jquery-ui-sortable' );
267
- wp_enqueue_script( 'ngg-autocomplete', NGGALLERY_URLPATH .'admin/js/ngg.autocomplete.js', array('jquery-ui-autocomplete'), '1.0.1');
268
- } else {
269
- // Due to script conflict with jQuery UI 1.8.6
270
- wp_deregister_script( 'jquery-ui-sortable' );
271
- // Package included sortable, dialog, autocomplete, tabs
272
- wp_enqueue_script('jquery-ui', NGGALLERY_URLPATH .'admin/js/jquery-ui-1.8.6.min.js', array('jquery'), '1.8.6');
273
- wp_enqueue_script('ngg-autocomplete', NGGALLERY_URLPATH .'admin/js/ngg.autocomplete.js', array('jquery-ui'), '1.0.1');
274
- }
275
  break;
276
  case "nggallery-options" :
277
  wp_enqueue_script( 'jquery-ui-tabs' );
@@ -534,6 +526,4 @@ function wpmu_enable_function($value) {
534
  }
535
  // if this is not WPMU, enable it !
536
  return true;
537
- }
538
-
539
- ?>
260
  wp_enqueue_script( 'shutter' );
261
  break;
262
  case "nggallery-manage-album" :
263
+ wp_enqueue_script( 'jquery-ui-autocomplete' );
264
+ wp_enqueue_script( 'jquery-ui-dialog' );
265
+ wp_enqueue_script( 'jquery-ui-sortable' );
266
+ wp_enqueue_script( 'ngg-autocomplete', NGGALLERY_URLPATH .'admin/js/ngg.autocomplete.js', array('jquery-ui-autocomplete'), '1.0.1');
 
 
 
 
 
 
 
 
267
  break;
268
  case "nggallery-options" :
269
  wp_enqueue_script( 'jquery-ui-tabs' );
526
  }
527
  // if this is not WPMU, enable it !
528
  return true;
529
+ }
 
 
admin/js/jquery-ui-1.8.6.min.js DELETED
@@ -1,391 +0,0 @@
1
- /*!
2
- * jQuery UI 1.8.6
3
- *
4
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI
9
- */
10
- (function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.6",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
11
- NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
12
- "position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
13
- if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
14
- "border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
15
- d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
16
- c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
17
- b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
18
- ;/*!
19
- * jQuery UI Widget 1.8.6
20
- *
21
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
22
- * Dual licensed under the MIT or GPL Version 2 licenses.
23
- * http://jquery.org/license
24
- *
25
- * http://docs.jquery.com/UI/Widget
26
- */
27
- (function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
28
- a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
29
- e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
30
- this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
31
- widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
32
- enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
33
- ;/*!
34
- * jQuery UI Mouse 1.8.6
35
- *
36
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
37
- * Dual licensed under the MIT or GPL Version 2 licenses.
38
- * http://jquery.org/license
39
- *
40
- * http://docs.jquery.com/UI/Mouse
41
- *
42
- * Depends:
43
- * jquery.ui.widget.js
44
- */
45
- (function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&
46
- this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();
47
- return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&
48
- this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-
49
- a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
50
- ;/*
51
- * jQuery UI Position 1.8.6
52
- *
53
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
54
- * Dual licensed under the MIT or GPL Version 2 licenses.
55
- * http://jquery.org/license
56
- *
57
- * http://docs.jquery.com/UI/Position
58
- */
59
- (function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
60
- left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
61
- k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+parseInt(c.curCSS(this,"marginRight",true))||0,w=m+q+parseInt(c.curCSS(this,"marginBottom",true))||0,i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=m/2;
62
- i.left=parseInt(i.left);i.top=parseInt(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=d>0?
63
- b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
64
- a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
65
- g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
66
- ;/*
67
- * jQuery UI Draggable 1.8.6
68
- *
69
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
70
- * Dual licensed under the MIT or GPL Version 2 licenses.
71
- * http://jquery.org/license
72
- *
73
- * http://docs.jquery.com/UI/Draggables
74
- *
75
- * Depends:
76
- * jquery.ui.core.js
77
- * jquery.ui.mouse.js
78
- * jquery.ui.widget.js
79
- */
80
- (function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
81
- "original"&&!/^(?: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(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
82
- this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
83
- this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
84
- d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
85
- this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,
86
- b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
87
- a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
88
- 0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
89
- this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
90
- (parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else 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}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment==
91
- "parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&
92
- a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),
93
- 10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
94
- this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
95
- f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+
96
- this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+
97
- Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-
98
- this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=
99
- this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.6"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");
100
- if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;
101
- c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=
102
- 1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;
103
- this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=
104
- this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=
105
- d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;
106
- if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!=
107
- "HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-
108
- b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-
109
- c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,
110
- width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&
111
- o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=
112
- p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&
113
- (p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),
114
- 10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
115
- ;/*
116
- * jQuery UI Droppable 1.8.6
117
- *
118
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
119
- * Dual licensed under the MIT or GPL Version 2 licenses.
120
- * http://jquery.org/license
121
- *
122
- * http://docs.jquery.com/UI/Droppables
123
- *
124
- * Depends:
125
- * jquery.ui.core.js
126
- * jquery.ui.widget.js
127
- * jquery.ui.mouse.js
128
- * jquery.ui.draggable.js
129
- */
130
- (function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);
131
- a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&
132
- this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
133
- this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
134
- d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
135
- a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.6"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
136
- switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
137
- i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!=
138
- "none";if(c[f].visible){c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight};e=="mousedown"&&c[f]._activate.call(c[f],b)}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||
139
- a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=
140
- d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
141
- ;/*
142
- * jQuery UI Resizable 1.8.6
143
- *
144
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
145
- * Dual licensed under the MIT or GPL Version 2 licenses.
146
- * http://jquery.org/license
147
- *
148
- * http://docs.jquery.com/UI/Resizables
149
- *
150
- * Depends:
151
- * jquery.ui.core.js
152
- * jquery.ui.mouse.js
153
- * jquery.ui.widget.js
154
- */
155
- (function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
156
- _proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
157
- top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;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=
158
- 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=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{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",
159
- nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
160
- String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
161
- this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
162
- if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
163
- d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=
164
- this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
165
- this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
166
- b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;
167
- f={width:c.size.width-(f?0:c.sizeDiff.width),height:c.size.height-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",
168
- b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=
169
- a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,
170
- k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),
171
- c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=
172
- this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+
173
- a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,
174
- arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,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}}});e.extend(e.ui.resizable,
175
- {version:"1.8.6"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,
176
- function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=
177
- (q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=
178
- false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-
179
- a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",
180
- b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top",
181
- "Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,
182
- f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=
183
- a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+
184
- a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&
185
- e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",
186
- height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=
187
- d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
188
- ;/*
189
- * jQuery UI Selectable 1.8.6
190
- *
191
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
192
- * Dual licensed under the MIT or GPL Version 2 licenses.
193
- * http://jquery.org/license
194
- *
195
- * http://docs.jquery.com/UI/Selectables
196
- *
197
- * Depends:
198
- * jquery.ui.core.js
199
- * jquery.ui.mouse.js
200
- * jquery.ui.widget.js
201
- */
202
- (function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
203
- selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
204
- c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting",
205
- c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d=
206
- this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");
207
- a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&
208
- !a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=
209
- e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.6"})})(jQuery);
210
- ;/*
211
- * jQuery UI Sortable 1.8.6
212
- *
213
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
214
- * Dual licensed under the MIT or GPL Version 2 licenses.
215
- * http://jquery.org/license
216
- *
217
- * http://docs.jquery.com/UI/Sortables
218
- *
219
- * Depends:
220
- * jquery.ui.core.js
221
- * jquery.ui.mouse.js
222
- * jquery.ui.widget.js
223
- */
224
- (function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
225
- this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,
226
- arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=
227
- c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);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};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,
228
- {click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();
229
- if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",
230
- a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");
231
- if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+
232
- this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+
233
- b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+
234
- "px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,
235
- c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==
236
- document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",
237
- null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):
238
- d(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||
239
- "id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?j:g<b+
240
- this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?c&&c=="right"||a=="down"?2:1:a&&(a=="down"?
241
- 2:1)},_intersectsWithSides:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},
242
- _getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=
243
- this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=
244
- this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");
245
- if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=
246
- 0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=
247
- this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},
248
- update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=
249
- null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));
250
- this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,
251
- null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||
252
- d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[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")};if(a[0].style.width==""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a==
253
- "string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==
254
- "absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==
255
- "relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else 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()}},
256
- _setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
257
- this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),
258
- 10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?
259
- this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=
260
- this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+
261
- this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?
262
- g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
263
- e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==
264
- f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",
265
- f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",
266
- g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=
267
- 0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
268
- this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});
269
- d.extend(d.ui.sortable,{version:"1.8.6"})})(jQuery);
270
- ;/*
271
- * jQuery UI Autocomplete 1.8.6
272
- *
273
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
274
- * Dual licensed under the MIT or GPL Version 2 licenses.
275
- * http://jquery.org/license
276
- *
277
- * http://docs.jquery.com/UI/Autocomplete
278
- *
279
- * Depends:
280
- * jquery.ui.core.js
281
- * jquery.ui.widget.js
282
- * jquery.ui.position.js
283
- */
284
- (function(e){e.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var a=this,b=this.element[0].ownerDocument,f;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){f=false;var d=e.ui.keyCode;switch(c.keyCode){case d.PAGE_UP:a._move("previousPage",
285
- c);break;case d.PAGE_DOWN:a._move("nextPage",c);break;case d.UP:a._move("previous",c);c.preventDefault();break;case d.DOWN:a._move("next",c);c.preventDefault();break;case d.ENTER:case d.NUMPAD_ENTER:if(a.menu.active){f=true;c.preventDefault()}case d.TAB:if(!a.menu.active)return;a.menu.select(c);break;case d.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);
286
- break}}}).bind("keypress.autocomplete",function(c){if(f){f=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||
287
- "body",b)[0]).mousedown(function(c){var d=a.menu.element[0];e(c.target).closest(".ui-menu-item").length||setTimeout(function(){e(document).one("mousedown",function(g){g.target!==a.element[0]&&g.target!==d&&!e.ui.contains(d,g.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,d){d=d.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:d})&&/^key/.test(c.originalEvent.type)&&a.element.val(d.value)},selected:function(c,d){d=d.item.data("item.autocomplete");
288
- var g=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=g;setTimeout(function(){a.previous=g},1)}false!==a._trigger("select",c,{item:d})&&a.element.val(d.value);a.term=a.element.val();a.close(c);a.selectedItem=d},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");e.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
289
- this.menu.element.remove();e.Widget.prototype.destroy.call(this)},_setOption:function(a,b){e.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(e(b||"body",this.element[0].ownerDocument)[0])},_initSource:function(){var a=this,b,f;if(e.isArray(this.options.source)){b=this.options.source;this.source=function(c,d){d(e.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){f=this.options.source;this.source=
290
- function(c,d){a.xhr&&a.xhr.abort();a.xhr=e.getJSON(f,c,function(g,i,h){h===a.xhr&&d(g);a.xhr=null})}}else this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==false)return this._search(a)},_search:function(a){this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){if(a&&a.length){a=
291
- this._normalize(a);this._suggest(a);this._trigger("open")}else this.close();this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",a);this.menu.element.hide();this.menu.deactivate()}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return e.map(a,function(b){if(typeof b===
292
- "string")return{label:b,value:b};return e.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(a){this._renderMenu(this.menu.element.empty().zIndex(this.element.zIndex()+1),a);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(e.extend({of:this.element},this.options.position));this._resizeMenu()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var f=
293
- this;e.each(b,function(c,d){f._renderItem(a,d)})},_renderItem:function(a,b){return e("<li></li>").data("item.autocomplete",b).append(e("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});e.extend(e.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
294
- "\\$&")},filter:function(a,b){var f=new RegExp(e.ui.autocomplete.escapeRegex(b),"i");return e.grep(a,function(c){return f.test(c.label||c.value||c)})}})})(jQuery);
295
- (function(e){e.widget("ui.menu",{_create:function(){var a=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(b){if(e(b.target).closest(".ui-menu-item a").length){b.preventDefault();a.select(b)}});this.refresh()},refresh:function(){var a=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
296
- -1).mouseenter(function(b){a.activate(b,e(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var f=b.offset().top-this.element.offset().top,c=this.element.attr("scrollTop"),d=this.element.height();if(f<0)this.element.attr("scrollTop",c+f);else f>=d&&this.element.attr("scrollTop",c+f-d+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:b})},
297
- deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,f){if(this.active){a=this.active[a+"All"](".ui-menu-item").eq(0);
298
- a.length?this.activate(f,a):this.activate(f,this.element.children(b))}else this.activate(f,this.element.children(b))},nextPage:function(a){if(this.hasScroll())if(!this.active||this.last())this.activate(a,this.element.children(".ui-menu-item:first"));else{var b=this.active.offset().top,f=this.element.height(),c=this.element.children(".ui-menu-item").filter(function(){var d=e(this).offset().top-b-f+e(this).height();return d<10&&d>-10});c.length||(c=this.element.children(".ui-menu-item:last"));this.activate(a,
299
- c)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(".ui-menu-item:last"));else{var b=this.active.offset().top,f=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var c=e(this).offset().top-b+f-e(this).height();return c<10&&c>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
300
- this.activate(a,result)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})})(jQuery);
301
- ;/*
302
- * jQuery UI Dialog 1.8.6
303
- *
304
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
305
- * Dual licensed under the MIT or GPL Version 2 licenses.
306
- * http://jquery.org/license
307
- *
308
- * http://docs.jquery.com/UI/Dialog
309
- *
310
- * Depends:
311
- * jquery.ui.core.js
312
- * jquery.ui.widget.js
313
- * jquery.ui.button.js
314
- * jquery.ui.draggable.js
315
- * jquery.ui.mouse.js
316
- * jquery.ui.position.js
317
- * jquery.ui.resizable.js
318
- */
319
- (function(c,j){var k={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},l={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(a){var b=c(this).css(a).offset().top;
320
- b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||"&#160;",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",
321
- -1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
322
- "button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=
323
- b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&&
324
- a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0])d=Math.max(d,c(this).css("z-index"))});
325
- c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);
326
- d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();
327
- a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;f=c('<button type="button"></button>').attr(h,true).unbind("click").click(function(){h.click.apply(b.element[0],
328
- arguments)}).appendTo(g);c.fn.button&&f.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,
329
- h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize,position:f.position,size:f.size}}a=a===j?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";
330
- d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",
331
- g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,
332
- a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(a);e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);if(g in k)e=true;if(g in l)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);
333
- break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");
334
- g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||"&#160;"));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=this.options,b,d;this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,
335
- height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.6",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});
336
- c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)return false})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&
337
- d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){this.oldInstances.push(this.instances.splice(c.inArray(a,this.instances),1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");
338
- a.remove();var b=0;c.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollWidth,
339
- document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
340
- ;/*
341
- * jQuery UI Tabs 1.8.6
342
- *
343
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
344
- * Dual licensed under the MIT or GPL Version 2 licenses.
345
- * http://jquery.org/license
346
- *
347
- * http://docs.jquery.com/UI/Tabs
348
- *
349
- * Depends:
350
- * jquery.ui.core.js
351
- * jquery.ui.widget.js
352
- */
353
- (function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&&
354
- e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=
355
- d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
356
- (q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a._sanitizeSelector(i));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=d("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
357
- this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
358
- this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
359
- if(c.selected>=0&&this.anchors.length){d(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],d(a._sanitizeSelector(a.anchors[c.selected].hash))))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
360
- this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
361
- g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
362
- function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};
363
- this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=d(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=-1;c.cookie&&
364
- a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
365
- d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
366
- d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,
367
- e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=d("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);
368
- j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
369
- if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,
370
- this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
371
- load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){d(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,"cache.tabs",
372
- true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(b,
373
- e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.6"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&a.rotate(null)}:
374
- function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
375
- ;/*
376
- * jQuery UI Progressbar 1.8.6
377
- *
378
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
379
- * Dual licensed under the MIT or GPL Version 2 licenses.
380
- * http://jquery.org/license
381
- *
382
- * http://docs.jquery.com/UI/Progressbar
383
- *
384
- * Depends:
385
- * jquery.ui.core.js
386
- * jquery.ui.widget.js
387
- */
388
- (function(b,c){b.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").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");
389
- this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===c)return this._value();this._setOption("value",a);return this},_setOption:function(a,d){if(a==="value"){this.options.value=d;this._refreshValue();this._trigger("change");this._value()===this.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.max,Math.max(this.min,a))},_refreshValue:function(){var a=
390
- this.value();this.valueDiv.toggleClass("ui-corner-right",a===this.max).width(a+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.6"})})(jQuery);
391
- ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/tinymce/window.php CHANGED
@@ -15,7 +15,10 @@ global $wpdb, $nggdb;
15
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
16
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
17
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/jquery.js"></script>
18
- <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/js/jquery-ui-1.8.6.min.js"></script>
 
 
 
19
  <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/js/ngg.autocomplete.js"></script>
20
  <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/tinymce/tinymce.js"></script>
21
  <link rel="stylesheet" type="text/css" href="<?php echo NGGALLERY_URLPATH ?>admin/css/jquery.ui.css" media="all" />
15
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
16
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
17
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/jquery.js"></script>
18
+ <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/ui/jquery.ui.core.min.js"></script>
19
+ <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/ui/jquery.ui.widget.min.js"></script>
20
+ <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/ui/jquery.ui.position.min.js"></script>
21
+ <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js"></script>
22
  <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/js/ngg.autocomplete.js"></script>
23
  <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/tinymce/tinymce.js"></script>
24
  <link rel="stylesheet" type="text/css" href="<?php echo NGGALLERY_URLPATH ?>admin/css/jquery.ui.css" media="all" />
changelog.txt CHANGED
@@ -1,6 +1,13 @@
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
 
 
 
 
 
 
 
4
  = V1.9.2 - 17.01.2012 =
5
  * NEW : Added more XMLRPC commands (THX to Vladimir Vinogradsky)
6
  * Changed : Rework Post-thumbnail function (THX to Kristian Edlund)
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
+ = V1.9.3 - 26.02.2012 =
5
+ * Bugfix : Ensure to set the slug for "all" albums
6
+ * Bugfix : Updated german translation ( THX to Roger Hunziker )
7
+ * Bugfix : Ensure error checking on IPTC array (THX to Kristian Edlund)
8
+ * Bugfix : Handle IE8 cached images better in slideshow
9
+ * Bugfix : Show album preview image if selected (THX to Kristian Edlund)
10
+
11
  = V1.9.2 - 17.01.2012 =
12
  * NEW : Added more XMLRPC commands (THX to Vladimir Vinogradsky)
13
  * Changed : Rework Post-thumbnail function (THX to Kristian Edlund)
js/ngg.slideshow.js CHANGED
@@ -1,7 +1,7 @@
1
  /*!
2
  * NextGEN Slideshow based on jQuery Cycle Plugin
3
- * Copyright (c) 2010-2011 Alex Rabe
4
- * Version: 1.0.5
5
  * Requires: jQuery v1.2.6 or later
6
  */
7
  jQuery.fn.nggSlideshow = function ( args ) {
@@ -47,7 +47,10 @@ jQuery.fn.nggSlideshow = function ( args ) {
47
  img.src = stack.shift();
48
  stackLength--;
49
  // wait to append image until the load is complete
50
- jQuery( img ).bind('load', function() { appendImage(img, num); });
 
 
 
51
  }
52
  }
53
 
1
  /*!
2
  * NextGEN Slideshow based on jQuery Cycle Plugin
3
+ * Copyright (c) 2010-2012 Alex Rabe
4
+ * Version: 1.0.6
5
  * Requires: jQuery v1.2.6 or later
6
  */
7
  jQuery.fn.nggSlideshow = function ( args ) {
47
  img.src = stack.shift();
48
  stackLength--;
49
  // wait to append image until the load is complete
50
+ jQuery( img ).one('load', function() { appendImage(img, num); }).each(function(){
51
+ // IE browser : in case it's already cached
52
+ if(this.complete) jQuery(this).trigger('load');
53
+ });
54
  }
55
  }
56
 
js/ngg.slideshow.min.js CHANGED
@@ -1,9 +1 @@
1
- jQuery.fn.nggSlideshow=function(args){var defaults={id:1,width:320,height:240,fx:'fade',domain:'',timeout:5000};var s=jQuery.extend({},defaults,args);var obj=this.selector;var stack=[];var url=s.domain+'index.php?callback=json&api_key=true&format=json&method=gallery&id='+s.id;var stackLength=0;jQuery.getJSON(url,function(r){if(r.stat=="ok"){for(img in r.images){var photo=r.images[img];stack.push(decodeURI(photo['imageURL']));}
2
- stackLength=stack.length;loadImage(1);}});function loadImage(num){if(stackLength>0&&num<=3){var img=new Image();img.src=stack.shift();stackLength--;jQuery(img).bind('load',function(){appendImage(img,num);});}}
3
- function appendImage(img,num){jQuery(img).hide();jQuery(obj).append(imageResize(img,s.width,s.height));if(num==3||stackLength==0){startSlideshow();}else{loadImage(++num);}}
4
- function startSlideshow(){jQuery(obj+'-loader').empty().remove();jQuery(obj+' img:first').fadeIn(1000,function(){jQuery(obj).cycle({fx:s.fx,containerResize:1,fit:1,timeout:s.timeout,next:obj,before:jCycle_onBefore});});}
5
- function imageResize(img,maxWidth,maxHeight){if(!img.complete)
6
- jQuery(img).bind('load',function(){imageResize(img,maxWidth,maxHeight)});if(img.height==0||img.width==0)
7
- return img;var width,height;if(img.width*maxHeight>img.height*maxWidth){if(img.width>maxWidth){width=maxWidth;height=Math.round(img.height/img.width*maxWidth);}}else{if(img.height>maxHeight){height=maxHeight;width=Math.round(img.width/img.height*maxHeight);}}
8
- jQuery(img).css({'height':height,'width':width});return img;};function jCycle_onBefore(curr,next,opts){if(opts.addSlide)
9
- if(stackLength>0){var img=new Image();img.src=stack.shift();stackLength--;jQuery(img).bind('load',function(){opts.addSlide(imageResize(this,s.width,s.height));});}};}
1
+ jQuery.fn.nggSlideshow=function(args){var defaults={id:1,width:320,height:240,fx:'fade',domain:'',timeout:5000};var s=jQuery.extend({},defaults,args);var obj=this.selector;var stack=[];var url=s.domain+'index.php?callback=json&api_key=true&format=json&method=gallery&id='+s.id;var stackLength=0;jQuery.getJSON(url,function(r){if(r.stat=="ok"){for(img in r.images){var photo=r.images[img];stack.push(decodeURI(photo['imageURL']))}stackLength=stack.length;loadImage(1)}});function loadImage(num){if(stackLength>0&&num<=3){var img=new Image();img.src=stack.shift();stackLength--;jQuery(img).one('load',function(){appendImage(img,num)}).each(function(){if(this.complete)jQuery(this).trigger('load')})}}function appendImage(img,num){jQuery(img).hide();jQuery(obj).append(imageResize(img,s.width,s.height));if(num==3||stackLength==0){startSlideshow()}else{loadImage(++num)}}function startSlideshow(){jQuery(obj+'-loader').empty().remove();jQuery(obj+' img:first').fadeIn(1000,function(){jQuery(obj).cycle({fx:s.fx,containerResize:1,fit:1,timeout:s.timeout,next:obj,before:jCycle_onBefore})})}function imageResize(img,maxWidth,maxHeight){if(!img.complete)jQuery(img).bind('load',function(){imageResize(img,maxWidth,maxHeight)});if(img.height==0||img.width==0)return img;var width,height;if(img.width*maxHeight>img.height*maxWidth){if(img.width>maxWidth){width=maxWidth;height=Math.round(img.height/img.width*maxWidth)}}else{if(img.height>maxHeight){height=maxHeight;width=Math.round(img.width/img.height*maxHeight)}}jQuery(img).css({'height':height,'width':width});return img};function jCycle_onBefore(curr,next,opts){if(opts.addSlide)if(stackLength>0){var img=new Image();img.src=stack.shift();stackLength--;jQuery(img).bind('load',function(){opts.addSlide(imageResize(this,s.width,s.height))})}}}
 
 
 
 
 
 
 
 
lang/nggallery-de_DE.mo CHANGED
Binary file
lang/nggallery-de_DE.po CHANGED
@@ -3,7 +3,7 @@ msgstr ""
3
  "Project-Id-Version: NextGEN Gallery\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2011-10-23 18:03+0100\n"
6
- "PO-Revision-Date: 2011-10-30 21:01+0100\n"
7
  "Last-Translator: Alex Rabe\n"
8
  "Language-Team: Alex Rabe\n"
9
  "MIME-Version: 1.0\n"
@@ -28,7 +28,7 @@ msgstr "Sollten jemand Rechtschreibfehler, Deppenapostrophe oder andere deutsche
28
 
29
  #: ../nggallery.php:205
30
  msgid "Sorry, NextGEN Gallery works only with a Memory Limit of 16 MB or higher"
31
- msgstr "Tut mir leid, aber NextGEN-Galerie benötigt minimum 16MB Speicher (Memory Limit) oder mehr"
32
 
33
  #: ../nggallery.php:225
34
  msgid "Please update the database of NextGEN Gallery."
@@ -353,7 +353,7 @@ msgstr "Importieren aus Server-Pfad:"
353
 
354
  #: ../admin/addgallery.php:468
355
  msgid "Note : Change the default path in the gallery settings"
356
- msgstr "Hinweis : Der Default-Pfad kann in den Einstellungen angepasst werden"
357
 
358
  #: ../admin/addgallery.php:470
359
  msgid " Please note : For safe-mode = ON you need to add the subfolder thumbs manually"
@@ -377,7 +377,7 @@ msgstr "Wähle Datei"
377
 
378
  #: ../admin/addgallery.php:498
379
  msgid "Or you can drop the files into this window."
380
- msgstr "Du kannst auch die Bilder per Darg & Drop in den Browser schieben."
381
 
382
  #: ../admin/addgallery.php:501
383
  #, php-format
@@ -523,7 +523,7 @@ msgstr "Die Datei ist zu groß. "
523
 
524
  #: ../admin/admin.php:226
525
  msgid "An error occurred in the upload. Please try again later."
526
- msgstr "Ein Fehler trat während dem uplaod auf. Bitte verusche es später nochmal."
527
 
528
  #: ../admin/admin.php:227
529
  msgid "There was a configuration error. Please contact the server administrator."
@@ -667,7 +667,7 @@ msgstr "Lade Deine Sprachdatei"
667
 
668
  #: ../admin/admin.php:409
669
  msgid "Contribute development"
670
- msgstr "Entwicklung helfen"
671
 
672
  #: ../admin/admin.php:410
673
  msgid "Download latest version"
@@ -968,7 +968,7 @@ msgstr "Konnte Originalbild nicht wiederherstellen"
968
 
969
  #: ../admin/functions.php:682
970
  msgid "(Error : Couldn't not update data base)"
971
- msgstr "(Fehler : Konnte Datenbank nicht updaten)"
972
 
973
  #: ../admin/functions.php:689
974
  msgid "(Error : Couldn't not update meta data)"
@@ -1211,7 +1211,7 @@ msgstr "Keine Einträge gefunden"
1211
  #: ../admin/manage-galleries.php:308
1212
  #: ../admin/manage-images.php:589
1213
  msgid "Resize Images to"
1214
- msgstr "Verkleiner Bilder auf"
1215
 
1216
  #: ../admin/manage-galleries.php:312
1217
  #: ../admin/manage-images.php:593
@@ -1481,7 +1481,7 @@ msgstr "Sortierung speichern"
1481
 
1482
  #: ../admin/manage-sort.php:69
1483
  msgid "Back to gallery"
1484
- msgstr "Zurück zur Galerie"
1485
 
1486
  #: ../admin/manage-sort.php:74
1487
  msgid "Presort"
@@ -1555,7 +1555,7 @@ msgstr "erstellt"
1555
 
1556
  #: ../admin/manage.php:468
1557
  msgid "Published a new post"
1558
- msgstr "Verföffentliche einen neuen Beitrag"
1559
 
1560
  #: ../admin/manage.php:582
1561
  #, php-format
@@ -1723,7 +1723,7 @@ msgstr "Es konnte ein Bild erstellt werden"
1723
 
1724
  #: ../admin/overview.php:308
1725
  msgid "Couldn't create image, check your memory limit"
1726
- msgstr "Konne kein Bild erzeugen, überprüfe dein Speicherlimit (Server)"
1727
 
1728
  #: ../admin/overview.php:311
1729
  msgid "Check theme compatibility"
@@ -2888,7 +2888,7 @@ msgstr "Schlagwörter setzen:"
2888
 
2889
  #: ../admin/upgrade.php:22
2890
  msgid "Upgrade database structure..."
2891
- msgstr "Aktualisiere die Datenbank-Struturen..."
2892
 
2893
  #: ../admin/upgrade.php:108
2894
  #: ../admin/upgrade.php:119
@@ -3483,7 +3483,7 @@ msgstr "[Mit PicLens anzeigen]"
3483
  #: ../view/imagebrowser-exif.php:30
3484
  #: ../view/imagebrowser.php:26
3485
  msgid "Back"
3486
- msgstr "Zurück"
3487
 
3488
  #: ../view/imagebrowser-caption.php:29
3489
  #: ../view/imagebrowser-exif.php:33
@@ -3850,7 +3850,7 @@ msgstr "Ungültiger Media-RSS-Befehl"
3850
 
3851
  #~ msgid "Sorry, NextGEN Gallery works only under WordPress 2.5 or higher"
3852
  #~ msgstr ""
3853
- #~ "Tut mir leid aber NextGEN Galerie arbeitet nur ab WordPress 2.5 und "
3854
  #~ "aufwärts"
3855
 
3856
  #~ msgid "Watch gallery"
@@ -3893,7 +3893,7 @@ msgstr "Ungültiger Media-RSS-Befehl"
3893
  #~ msgstr "Beschreibung"
3894
 
3895
  #~ msgid "Import a folder with images. Please note :"
3896
- #~ msgstr "Importiere ein Verzeichniss mit Bildern. Bitte beachte:"
3897
 
3898
  #~ msgid "For safe-mode = ON you need to add the subfolder thumbs manually"
3899
  #~ msgstr ""
3
  "Project-Id-Version: NextGEN Gallery\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2011-10-23 18:03+0100\n"
6
+ "PO-Revision-Date: 2012-02-17 17:07+0100\n"
7
  "Last-Translator: Alex Rabe\n"
8
  "Language-Team: Alex Rabe\n"
9
  "MIME-Version: 1.0\n"
28
 
29
  #: ../nggallery.php:205
30
  msgid "Sorry, NextGEN Gallery works only with a Memory Limit of 16 MB or higher"
31
+ msgstr "Tut mir leid, aber NextGEN-Galerie benötigt mindestens 16MB Speicher (Memory Limit) oder mehr"
32
 
33
  #: ../nggallery.php:225
34
  msgid "Please update the database of NextGEN Gallery."
353
 
354
  #: ../admin/addgallery.php:468
355
  msgid "Note : Change the default path in the gallery settings"
356
+ msgstr "Hinweis : Der Standard-Pfad kann in den Einstellungen angepasst werden"
357
 
358
  #: ../admin/addgallery.php:470
359
  msgid " Please note : For safe-mode = ON you need to add the subfolder thumbs manually"
377
 
378
  #: ../admin/addgallery.php:498
379
  msgid "Or you can drop the files into this window."
380
+ msgstr "Du kannst auch die Bilder per Drag & Drop in den Browser schieben."
381
 
382
  #: ../admin/addgallery.php:501
383
  #, php-format
523
 
524
  #: ../admin/admin.php:226
525
  msgid "An error occurred in the upload. Please try again later."
526
+ msgstr "Währende dem upload trat ein Fehler. Bitte verusche es später nochmal."
527
 
528
  #: ../admin/admin.php:227
529
  msgid "There was a configuration error. Please contact the server administrator."
667
 
668
  #: ../admin/admin.php:409
669
  msgid "Contribute development"
670
+ msgstr "Bei der Entwicklung helfen"
671
 
672
  #: ../admin/admin.php:410
673
  msgid "Download latest version"
968
 
969
  #: ../admin/functions.php:682
970
  msgid "(Error : Couldn't not update data base)"
971
+ msgstr "(Fehler : Konnte Datenbank nicht aktualisieren)"
972
 
973
  #: ../admin/functions.php:689
974
  msgid "(Error : Couldn't not update meta data)"
1211
  #: ../admin/manage-galleries.php:308
1212
  #: ../admin/manage-images.php:589
1213
  msgid "Resize Images to"
1214
+ msgstr "Verkleinere Bilder auf"
1215
 
1216
  #: ../admin/manage-galleries.php:312
1217
  #: ../admin/manage-images.php:593
1481
 
1482
  #: ../admin/manage-sort.php:69
1483
  msgid "Back to gallery"
1484
+ msgstr "Zurueck zur Galerie"
1485
 
1486
  #: ../admin/manage-sort.php:74
1487
  msgid "Presort"
1555
 
1556
  #: ../admin/manage.php:468
1557
  msgid "Published a new post"
1558
+ msgstr "Veröffentliche einen neuen Beitrag"
1559
 
1560
  #: ../admin/manage.php:582
1561
  #, php-format
1723
 
1724
  #: ../admin/overview.php:308
1725
  msgid "Couldn't create image, check your memory limit"
1726
+ msgstr "Konnte kein Bild erzeugen, überprüfe dein Speicherlimit (Server)"
1727
 
1728
  #: ../admin/overview.php:311
1729
  msgid "Check theme compatibility"
2888
 
2889
  #: ../admin/upgrade.php:22
2890
  msgid "Upgrade database structure..."
2891
+ msgstr "Aktualisiere die Datenbank-Strukturen..."
2892
 
2893
  #: ../admin/upgrade.php:108
2894
  #: ../admin/upgrade.php:119
3483
  #: ../view/imagebrowser-exif.php:30
3484
  #: ../view/imagebrowser.php:26
3485
  msgid "Back"
3486
+ msgstr "Zurueck"
3487
 
3488
  #: ../view/imagebrowser-caption.php:29
3489
  #: ../view/imagebrowser-exif.php:33
3850
 
3851
  #~ msgid "Sorry, NextGEN Gallery works only under WordPress 2.5 or higher"
3852
  #~ msgstr ""
3853
+ #~ "Tut mir leid aber NextGEN Gallery arbeitet nur ab WordPress 2.5 und "
3854
  #~ "aufwärts"
3855
 
3856
  #~ msgid "Watch gallery"
3893
  #~ msgstr "Beschreibung"
3894
 
3895
  #~ msgid "Import a folder with images. Please note :"
3896
+ #~ msgstr "Importiere ein Verzeichnis mit Bildern. Bitte beachte:"
3897
 
3898
  #~ msgid "For safe-mode = ON you need to add the subfolder thumbs manually"
3899
  #~ msgstr ""
lib/meta.php CHANGED
@@ -5,7 +5,7 @@
5
  * nggmeta.lib.php
6
  *
7
  * @author Alex Rabe
8
- * @copyright Copyright 2007-2011
9
  *
10
  */
11
 
@@ -255,7 +255,7 @@ class nggMeta{
255
 
256
  // return one element if requested
257
  if ($object)
258
- return $this->iptc_array[$object];
259
 
260
  // on request sanitize the output
261
  if ( $this->sanitize == true )
@@ -580,4 +580,4 @@ class nggMeta{
580
 
581
  }
582
 
583
- ?>
5
  * nggmeta.lib.php
6
  *
7
  * @author Alex Rabe
8
+ * @copyright Copyright 2007-2012
9
  *
10
  */
11
 
255
 
256
  // return one element if requested
257
  if ($object)
258
+ return (isset($this->iptc_array[$object])) ? $this->iptc_array[$object] : NULL;
259
 
260
  // on request sanitize the output
261
  if ( $this->sanitize == true )
580
 
581
  }
582
 
583
+ ?>
lib/ngg-db.php CHANGED
@@ -145,6 +145,7 @@ class nggdb {
145
  $this->galleries[$key]->counter = 0;
146
  $this->galleries[$key]->title = stripslashes($this->galleries[$key]->title);
147
  $this->galleries[$key]->galdesc = stripslashes($this->galleries[$key]->galdesc);
 
148
  wp_cache_add($key, $this->galleries[$key], 'ngg_gallery');
149
  }
150
 
@@ -161,7 +162,7 @@ class nggdb {
161
  // add the counter to the gallery objekt
162
  foreach ($picturesCounter as $key => $value) {
163
  $this->galleries[$value->galleryid]->counter = $value->counter;
164
- wp_cache_add($value->galleryid, $this->galleries[$value->galleryid], 'ngg_gallery');
165
  }
166
 
167
  return $this->galleries;
@@ -1107,4 +1108,4 @@ if ( ! isset($GLOBALS['nggdb']) ) {
1107
  unset($GLOBALS['nggdb']);
1108
  $GLOBALS['nggdb'] = new nggdb() ;
1109
  }
1110
- ?>
145
  $this->galleries[$key]->counter = 0;
146
  $this->galleries[$key]->title = stripslashes($this->galleries[$key]->title);
147
  $this->galleries[$key]->galdesc = stripslashes($this->galleries[$key]->galdesc);
148
+ $this->galleries[$key]->abspath = WINABSPATH . $this->galleries[$key]->path;
149
  wp_cache_add($key, $this->galleries[$key], 'ngg_gallery');
150
  }
151
 
162
  // add the counter to the gallery objekt
163
  foreach ($picturesCounter as $key => $value) {
164
  $this->galleries[$value->galleryid]->counter = $value->counter;
165
+ wp_cache_set($value->galleryid, $this->galleries[$value->galleryid], 'ngg_gallery');
166
  }
167
 
168
  return $this->galleries;
1108
  unset($GLOBALS['nggdb']);
1109
  $GLOBALS['nggdb'] = new nggdb() ;
1110
  }
1111
+ ?>
nggallery.php CHANGED
@@ -4,11 +4,11 @@ Plugin Name: NextGEN Gallery
4
  Plugin URI: http://alexrabe.de/?page_id=80
5
  Description: A NextGENeration Photo Gallery for WordPress
6
  Author: Alex Rabe
7
- Version: 1.9.2
8
 
9
  Author URI: http://alexrabe.de/
10
 
11
- Copyright 2007-2011 by Alex Rabe & NextGEN DEV-Team
12
 
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License as published by
@@ -34,9 +34,9 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
34
  if (!class_exists('nggLoader')) {
35
  class nggLoader {
36
 
37
- var $version = '1.9.2';
38
  var $dbversion = '1.8.0';
39
- var $minium_WP = '3.1';
40
  var $donators = 'http://nextgen.boelinger.com/donators.php';
41
  var $options = '';
42
  var $manage_page;
@@ -162,14 +162,14 @@ class nggLoader {
162
  global $wp_version;
163
 
164
  // Check for WP version installation
165
- $wp_ok = version_compare($wp_version, $this->minium_WP, '>=');
166
 
167
  if ( ($wp_ok == FALSE) ) {
168
  add_action(
169
  'admin_notices',
170
  create_function(
171
  '',
172
- 'global $ngg; printf (\'<div id="message" class="error"><p><strong>\' . __(\'Sorry, NextGEN Gallery works only under WordPress %s or higher\', "nggallery" ) . \'</strong></p></div>\', $ngg->minium_WP );'
173
  )
174
  );
175
  return false;
@@ -362,7 +362,7 @@ class nggLoader {
362
  wp_enqueue_script('swfobject', NGGALLERY_URLPATH .'admin/js/swfobject.js', FALSE, '2.2');
363
  else {
364
  wp_register_script('jquery-cycle', NGGALLERY_URLPATH .'js/jquery.cycle.all.min.js', array('jquery'), '2.9995');
365
- wp_enqueue_script('ngg-slideshow', NGGALLERY_URLPATH .'js/ngg.slideshow.min.js', array('jquery-cycle'), '1.05');
366
 
367
  }
368
 
4
  Plugin URI: http://alexrabe.de/?page_id=80
5
  Description: A NextGENeration Photo Gallery for WordPress
6
  Author: Alex Rabe
7
+ Version: 1.9.3
8
 
9
  Author URI: http://alexrabe.de/
10
 
11
+ Copyright 2007-2012 by Alex Rabe & NextGEN DEV-Team
12
 
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License as published by
34
  if (!class_exists('nggLoader')) {
35
  class nggLoader {
36
 
37
+ var $version = '1.9.3';
38
  var $dbversion = '1.8.0';
39
+ var $minimum_WP = '3.2';
40
  var $donators = 'http://nextgen.boelinger.com/donators.php';
41
  var $options = '';
42
  var $manage_page;
162
  global $wp_version;
163
 
164
  // Check for WP version installation
165
+ $wp_ok = version_compare($wp_version, $this->minimum_WP, '>=');
166
 
167
  if ( ($wp_ok == FALSE) ) {
168
  add_action(
169
  'admin_notices',
170
  create_function(
171
  '',
172
+ 'global $ngg; printf (\'<div id="message" class="error"><p><strong>\' . __(\'Sorry, NextGEN Gallery works only under WordPress %s or higher\', "nggallery" ) . \'</strong></p></div>\', $ngg->minimum_WP );'
173
  )
174
  );
175
  return false;
362
  wp_enqueue_script('swfobject', NGGALLERY_URLPATH .'admin/js/swfobject.js', FALSE, '2.2');
363
  else {
364
  wp_register_script('jquery-cycle', NGGALLERY_URLPATH .'js/jquery.cycle.all.min.js', array('jquery'), '2.9995');
365
+ wp_enqueue_script('ngg-slideshow', NGGALLERY_URLPATH .'js/ngg.slideshow.min.js', array('jquery-cycle'), '1.06');
366
 
367
  }
368
 
nggfunctions.php CHANGED
@@ -448,6 +448,9 @@ function nggShowAlbum($albumID, $template = 'extend', $gallery_template = '') {
448
  // still no success ? , die !
449
  if( !$album )
450
  return __('[Album not found]','nggallery');
 
 
 
451
 
452
  if ( is_array($album->gallery_ids) )
453
  $out = nggCreateAlbum( $album->gallery_ids, $template, $album );
@@ -516,10 +519,14 @@ function nggCreateAlbum( $galleriesID, $template = 'extend', $album = 0) {
516
 
517
  //populate the sub album values
518
  $galleries[$key]->counter = 0;
519
- if ($subalbum->previewpic > 0)
 
 
520
  $image = $nggdb->find_image( $subalbum->previewpic );
521
- $galleries[$key]->previewpic = $subalbum->previewpic;
522
- $galleries[$key]->previewurl = isset($image->thumbURL) ? $image->thumbURL : '';
 
 
523
  $galleries[$key]->previewname = $subalbum->name;
524
 
525
  //link to the subalbum
@@ -540,7 +547,13 @@ function nggCreateAlbum( $galleriesID, $template = 'extend', $album = 0) {
540
  // If a gallery is not found it should be ignored
541
  if (!$unsort_galleries[$key])
542
  continue;
543
-
 
 
 
 
 
 
544
  // Add the counter value if avaible
545
  $galleries[$key] = $unsort_galleries[$key];
546
 
@@ -550,9 +563,11 @@ function nggCreateAlbum( $galleriesID, $template = 'extend', $album = 0) {
550
  $galleries[$key]->previewurl = site_url().'/' . $galleries[$key]->path . '/thumbs/thumbs_' . $albumPreview[$galleries[$key]->previewpic]->filename;
551
  } else {
552
  $first_image = $wpdb->get_row('SELECT * FROM '. $wpdb->nggpictures .' WHERE exclude != 1 AND galleryid = '. $key .' ORDER by pid DESC limit 0,1');
553
- $galleries[$key]->previewpic = $first_image->pid;
554
- $galleries[$key]->previewname = $first_image->filename;
555
- $galleries[$key]->previewurl = site_url() . '/' . $galleries[$key]->path . '/thumbs/thumbs_' . $first_image->filename;
 
 
556
  }
557
 
558
  // choose between variable and page link
@@ -1133,4 +1148,4 @@ function nggTagCloud($args ='', $template = '') {
1133
 
1134
  return $out;
1135
  }
1136
- ?>
448
  // still no success ? , die !
449
  if( !$album )
450
  return __('[Album not found]','nggallery');
451
+
452
+ // ensure to set the slug for "all" albums
453
+ $album->slug = ($albumID == 'all') ? $album->id : $album->slug;
454
 
455
  if ( is_array($album->gallery_ids) )
456
  $out = nggCreateAlbum( $album->gallery_ids, $template, $album );
519
 
520
  //populate the sub album values
521
  $galleries[$key]->counter = 0;
522
+ $galleries[$key]->previewurl = '';
523
+ // ensure that album contain a preview image
524
+ if ($subalbum->previewpic > 0){
525
  $image = $nggdb->find_image( $subalbum->previewpic );
526
+ $galleries[$key]->previewurl = isset($image->thumbURL) ? $image->thumbURL : '';
527
+ }
528
+
529
+ $galleries[$key]->previewpic = $subalbum->previewpic;
530
  $galleries[$key]->previewname = $subalbum->name;
531
 
532
  //link to the subalbum
547
  // If a gallery is not found it should be ignored
548
  if (!$unsort_galleries[$key])
549
  continue;
550
+
551
+ // No images found, set counter to 0
552
+ if (!isset($galleries[$key]->counter)){
553
+ $galleries[$key]->counter = 0;
554
+ $galleries[$key]->previewurl = '';
555
+ }
556
+
557
  // Add the counter value if avaible
558
  $galleries[$key] = $unsort_galleries[$key];
559
 
563
  $galleries[$key]->previewurl = site_url().'/' . $galleries[$key]->path . '/thumbs/thumbs_' . $albumPreview[$galleries[$key]->previewpic]->filename;
564
  } else {
565
  $first_image = $wpdb->get_row('SELECT * FROM '. $wpdb->nggpictures .' WHERE exclude != 1 AND galleryid = '. $key .' ORDER by pid DESC limit 0,1');
566
+ if (isset($first_image)) {
567
+ $galleries[$key]->previewpic = $first_image->pid;
568
+ $galleries[$key]->previewname = $first_image->filename;
569
+ $galleries[$key]->previewurl = site_url() . '/' . $galleries[$key]->path . '/thumbs/thumbs_' . $first_image->filename;
570
+ }
571
  }
572
 
573
  // choose between variable and page link
1148
 
1149
  return $out;
1150
  }
1151
+ ?>
readme.txt CHANGED
@@ -1,314 +1,383 @@
1
- === NextGEN Gallery ===
2
- Contributors: alexrabe
3
- Donate link: http://alexrabe.de/donation/
4
- Tags: photos,flash,slideshow,images,gallery,media,admin,post,photo-albums,pictures,widgets,photo,picture,image,nextgen-gallery,nextgen gallery
5
- Requires at least: 3.2
6
- Tested up to: 3.3
7
- Stable tag: trunk
8
-
9
- NextGEN Gallery is a full integrated Image Gallery plugin for WordPress with dozens of options and features.
10
-
11
- == Description ==
12
-
13
- NextGEN Gallery is a full integrated Image Gallery plugin for WordPress with a slideshow option. Before I started writing the plugin I studied all the existing image and gallery plugins for WordPress.
14
- Some of them are really good and well designed, but the gap I filled was a simple administration system at the back end which can also handle multiple galleries.
15
-
16
- [Demonstration](http://nextgen-gallery.com/) |
17
- [FAQ](http://alexrabe.de/wordpress-plugins/nextgen-gallery/faq/)|
18
- [Support](http://wordpress.org/tags/nextgen-gallery?forum_id=10)|
19
- [Translations](http://code.google.com/p/nextgen-gallery/downloads/list?q=label:Translation)
20
-
21
- = Features =
22
-
23
- * Templates : You can add custom templates for your theme.
24
- * Media RSS feed : Add the Cooliris Effect to your gallery
25
- * Role settings : Each gallery has a author
26
- * AJAX based thumbnail generator : No more server limitation during the batch process
27
- * Copy/Move : Copy or move images between galleries
28
- * Sortable Albums : Create your own sets of images
29
- * Upload or pictures via a zip-file (Not in Safe-mode)
30
- * Watermark function : You can add a watermark image or text
31
- * JavaScript Effect : Use any available popular image effect : Shutter, Thickbox, Lightbox or Highslide
32
- * Multiple CSS Stylesheet : Use a nice shadow effect for your thumbnails with your own CSS file
33
- * Slideshow : Full integrated slideshow as jQuery or Flash solution
34
- * TinyMCE : Button integration for easy adding the gallery tags
35
- * Sidebar Widget : Show a slideshow, random or recent picture at your sidebar
36
- * Language support : Translated in more than 30 languages
37
- * Translation downloader : Download with one click the new translation file
38
- * Upload tab integration : You have access to all pictures via the upload tab
39
- * Tag support for images : Append related images to your post, create a image tag-cloud
40
- * Meta data support : Import EXIF, IPTC or XMP meta data
41
- * Sort images feature
42
- * Support for XML Sitemaps : Add Images to your sitemaps with the <a href="http://wordpress.org/extend/plugins/wordpress-seo/" title="WordPress SEO by Yoast plugin">WordPress SEO by Yoast plugin</a>
43
-
44
- == Credits ==
45
-
46
- Copyright 2007-2012 by Alex Rabe & NextGEN DEV-Team
47
-
48
- This program is free software; you can redistribute it and/or modify
49
- it under the terms of the GNU General Public License as published by
50
- the Free Software Foundation; either version 2 of the License, or
51
- (at your option) any later version.
52
-
53
- This program is distributed in the hope that it will be useful,
54
- but WITHOUT ANY WARRANTY; without even the implied warranty of
55
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56
- GNU General Public License for more details.
57
-
58
- You should have received a copy of the GNU General Public License
59
- along with this program; if not, write to the Free Software
60
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
61
-
62
- ** Please note **
63
-
64
- The JW Image Rotator (Flash Slideshow) is not part of this license and is available
65
- under a Creative Commons License, which allowing you to use, modify and redistribute
66
- them for noncommercial purposes.
67
-
68
- For commercial use please look at the Jeroen's homepage : http://www.longtailvideo.com/
69
-
70
- == Installation ==
71
-
72
- 1. Install & Activate the plugin
73
-
74
- 2. Add a gallery and upload some images (the main gallery folder must have write permission)
75
-
76
- 3. Go to your post/page an enter the tag '[nggallery id=x]' or '[slideshow id=x]'. See more tags in the FAQ section
77
-
78
- That's it ... Have fun
79
-
80
- http://www.youtube.com/watch?v=Le_ZsNSuIvM
81
-
82
- == Screenshots ==
83
-
84
- 1. Screenshot Admin Area
85
- 2. Screenshot Album Selection
86
- 3. Screenshot Shutter Effect
87
- 4. Screenshot Watermark function
88
- 5. Screenshot Flexible template layout
89
- 6. Screenshot Show Exif data
90
-
91
- == Frequently Asked Questions ==
92
-
93
- When writing a page/post, you can use the follow tags:
94
-
95
- For a slideshow : **[slideshow id=x w=width h=height]**
96
-
97
- Example : http://nextgen-gallery.com/slideshow/
98
-
99
- For a album : **[album id=x template=extend]** or **[album id=x template=compact]**
100
-
101
- Example : http://nextgen-gallery.com/album/
102
-
103
- For a gallery : **[nggallery id=x]**
104
-
105
- Example : http://nextgen-gallery.com/gallery-page/
106
-
107
- For a single picture : **[singlepic id=x w=width h=height mode=web20|watermark float=left|right]**
108
-
109
- Example : http://nextgen-gallery.com/singlepic/
110
-
111
- For a image browser : **[imagebrowser id=x]**
112
-
113
- Example : http://nextgen-gallery.com/image-browser/
114
-
115
- To show image sorted by tags : **[nggtags gallery=mytag,wordpress,... ]**
116
-
117
- Example : http://nextgen-gallery.com/gallery-tags/
118
-
119
- To show tag albums : **[nggtags album=mytag,wordpress,... ]**
120
-
121
- Example : http://nextgen-gallery.com/albumtags/
122
-
123
- To show random mages : **[random max=x ]**
124
-
125
- To show the most recent added mages : **[recent max=x ]**
126
-
127
- **A further FAQ you can found here :** http://alexrabe.de/wordpress-plugins/nextgen-gallery/faq/
128
-
129
- **And at least request your question here :** http://wordpress.org/tags/nextgen-gallery?forum_id=10
130
-
131
- == Changelog ==
132
-
133
- = V1.9.2 - 17.01.2012 =
134
- * NEW : Added more XMLRPC commands (THX to Vladimir Vinogradsky)
135
- * Changed : Rework Post-thumbnail function (THX to Kristian Edlund)
136
- * Bugfix : Check first for valid images on unzip (only Mac OS zip-files)
137
- * Bugfix : Increase z-index for twenty eleven theme
138
- * Bugfix : Support non latin chars in tagcloud
139
- * Bugfix : Allow other tinymce intance
140
- * Bugfix : Better support for WPML translation
141
-
142
- = V1.9.1 - 10.12.2011 =
143
- * Bugfix : Security hardness for untrusted filenames/meta data (THX to Brian St. Pierre)
144
- * Bugfix : Fixed security vulnerability (TXH to Jon Cave)
145
- * Bugfix : Load piclens script via other function
146
- * Bugfix : IE7 script fix for add gallery
147
- * Bugfix : IE7/IE8 width set correctly for edit album autocomplete field
148
-
149
- = V1.9.0 - 27.11.2011 =
150
- * NEW : Keep images transparency for PNG and GIF format
151
- * NEW : Switch to Plupload, support now HTML5 Upload (only with WordPress 3.3)
152
- * NEW : Added client side resize feature (only with WordPress 3.3)
153
- * NEW : Support for gallery templates in album shortcodes [ album id=x template="name" gallery="templatename" ]
154
- * NEW : Added new hook ngg_delete_picture
155
- * Changed : Updated to jQuery Cycle Version 2.9995
156
- * Changed : Always cache the single pictures, remove option
157
- * Bugfix : Couldn't use bulk operation for search results
158
- * Bugfix : Bugfix for Edit thumbnails under IE 8 + 9
159
- * Bugfix : Allow empty altext in ngg.editImage
160
- * Bugfix : Various PHP notice fixes
161
- * Bugfix : Resize fix for Shutter effect and mobile Browser
162
- * Bugfix : FTP Import missing slug field into database
163
- * Bugfix : Check also EXIF field "DateTimeOriginal" for timestamp
164
-
165
- = V1.8.4 - 26.10.2011 =
166
- * Bugfix : Fixed security vulnerability (TXH to Alain Schneider)
167
-
168
- = V1.8.3 - 07.08.2011 =
169
- * Changed : Support for simple custom permalink structures (i.e. /%category%/%postname%/)
170
- * Bugfix : Sub-Albums in Albums didn't create the correct link
171
- * Bugfix : AJAX Pagination didn't work anymore
172
- * Bugfix : Adding index.php to home_url()
173
- * Bugfix : Preview picture lost on backend gallery page 2 or higher
174
-
175
- = V1.8.2 - 12.07.2011 =
176
- * Bugfix : Set pagination variables for search result, otherwise update failed
177
- * Bugfix : Update failed for paged galleries since WordPress 3.2
178
-
179
- = V1.8.1 - 18.06.2011 =
180
- * Bugfix : Special case for pagination, instead of showing page-1, we show the clean url
181
- * Bugfix : Various PHP notice fixes
182
- * Bugfix : Typo in rewrite rules
183
- * Bugfix : Flush rewrite rules during upgrade later
184
-
185
- = V1.8.0 - 12.06.2011 =
186
- * NEW : Full rework of permalink url structure
187
- * NEW : Adding Google Sitemaps for Images (require WordPress SEO plugin by YOAST )
188
- * NEW : Support for WPML ( WordPress Multilingual Plugin )
189
- * NEW : Adding support for arrow key in shutter effect (THX to Flyvans)
190
- * NEW : Adding sort operation for galleries overview page
191
- * Changed : Updated pagination to new WP3.1 style
192
- * Bugfix : Create unique slug in a better way
193
- * Bugfix : Rework screen options filter for gallery and image table
194
- * Bugfix : Empty values in XMLRPC update calls are ignored
195
- * Bugfix : Create gallery failed when safe-mode on
196
- * Bugfix : Permalink didn't work in combination with album & imagebrowser
197
-
198
- = V1.7.4 - 15.02.2011 =
199
- * Bugfix : Disallow direct call of ajax file to avoid path disclosure (THX to High-Tech Bridge SA)
200
- * Bugfix : Rework jQuery Cycle slideshow for IE compat reason (THX to Justin Dickenson)
201
- * Bugfix : Resize only larger images in slideshow
202
- * Bugfix : Improved image format detection in gd.thumbnail class (THX to Kupar.b)
203
-
204
- = V1.7.3 - 20.01.2011 =
205
- * NEW : Introduce plugin health check for conflicts with other plugins/themes
206
- * NEW : Adding new XMLRPC method ngg.deleteImage
207
- * NEW : Adding new XMLRPC method ngg.editImage
208
- * Changed : Rework register script for autocomplete feature
209
- * Bugfix : Bugfix for Multisite setup and flash upload
210
- * Bugfix : WP3.1 compat issue, show site admin page only on Multisite installation
211
-
212
- = V1.7.2 - 13.12.2010 =
213
- * Bugfix : Adding images to database require slug (NOT NULL)
214
-
215
- = V1.7.1 - 13.12.2010 =
216
- * Changed : Disable upgrade for PHP4 user
217
- * Changed : Disable colorpicker for option page
218
- * Bugfix : Compat fix for upgrade
219
-
220
- = V1.7.0 - 11.12.2010 =
221
- * NEW : Publish a new post direct from the gallery admin page
222
- * NEW : Added filter hook 'ngg_get_image_metadata' to add more exif/iptc information
223
- * NEW : Adding Autocomplete field to TinyMCE Popup and Album page
224
- * NEW : More methods for XMLRPC interface
225
- * Changed : New hooks for gallery table (THX to Alexander Schneider)
226
- * Changed : Introduce jQuery dialog as new UI element
227
- * Changed : Call TinyMCE window via admin-ajax
228
- * Bugfix : Better support for SSL blogs
229
- * Bugfix : Install/Upgrade failed when table prefix contain captial letters
230
- * Bugfix : Fix validation issues in Media-RSS
231
- * Bugfix : Empty tags in XMP Meta causes PHP error
232
- * Bugfix : Rework load mechanism for slideshow
233
- * Bugfix : Copy meta data when image is copied
234
- * Bugfix : Icon Support for Ozh' Admin Drop Down Menu
235
- * Bugfix : Use correct sort order in slideshow
236
-
237
- = V1.6.2 - 19.09.2010 =
238
- * NEW : Added constant NGG_SKIP_LOAD_SCRIPTS to avoid script load
239
- * Bugfix : Load Tags library with core files
240
- * Bugfix : Slideshow script failed in IE7, load script now in header
241
- * Bugfix : Load slideshow widget always
242
- * Changed : New admin notice for database upgrade
243
- * Changed : Rework crop feature for featured images
244
- * Changed : Use site_url() instead get_option ('siteurl'), required for SSL support
245
-
246
- = V1.6.1 - 08.09.2010 =
247
- * Bugfix : Script load of swfobject.js failed
248
- * Bugfix : Show sideshow also with 1 or 2 images
249
- * Bugfix : Rework null byte check in zip upload
250
-
251
- = V1.6.0 - 07.09.2010 =
252
- * NEW : Wordpress 3.0 Network (Multi-Site) support
253
- * NEW : Integrate jQuery Cycle as NON-Flash slideshow
254
- * NEW : Adding jQuery File Tree for import folder (THX to Sergey Pasyuk )
255
- * NEW : Added action hook 'ngg_show_imagebrowser_first' on custom request
256
- * NEW : Added filter hook 'ngg_slideshow_size' to resize sildeshow for mobile browser plugins
257
- * Changed : Reorder tabs for upload
258
- * Changed : New menu icon and screen icon (THX to Ben Dunkle)
259
- * Changed : Load frontend libs always
260
- * Changed : Rework of overview page
261
- * Bugfix : Security bugfix for Zip-Upload (THX to Dominic Szablewski)
262
- * Bugfix : Allow JPG, PNG, GIF extension
263
- * Bugfix : New German translation (THX to Martin Kramarz)
264
- * Bugfix : Copy/Move also backup file
265
- * Bugfix : Calculate correct ratio for fix thumbnail size (THX to Alekz Keck)
266
-
267
- = V1.5.5 - 14.06.2010 =
268
- * Bugfix : Compat issue for post thumbnails with WP2.9
269
- * NEW : Adding more hooks for custom fields plugin
270
-
271
- = V1.5.4 - 14.06.2010 =
272
- * Bugfix : No resize of smaller images
273
- * Bugfix : Compat issues for Post Thumbnails under WP3.0
274
- * Bugfix : Esc_URL in Media RSS
275
-
276
- = V1.5.3 - 11.04.2010 =
277
- * New : Adding pagination to footer
278
- * Changed : Perpare new filter to replace slideshow
279
- * Bugfix : Remove non-breaking space from navigation
280
- * Bugfix : Pagination of galleries
281
- * Bugfix : Fixed brackets position for old shortcode query
282
- * Bugfix : Slideshow option 'Show next image on click" has wrong default value
283
-
284
- = V1.5.2 - 25.03.2010 =
285
- * Bugfix : XSS security vulnerability (THX to Core Security Advisories Team , Pedro Varangot)
286
- * Bugfix : Missing $wpdb in shortcodes.php
287
-
288
- = V1.5.1 - 23.03.2010 =
289
- * Bugfix : PHP4 compat issue for Add gallery & options page
290
- * Bugfix : Gallery widget can now have a empty title
291
- * Bugfix : Adding correct stripslash for gallery title
292
-
293
- = V1.5.0 - 18.03.2010 =
294
- * NEW : Support for Post thumbnail feature
295
- * NEW : Backup and Recover function for images (THX to Simone Fumagalli)
296
- * NEW : Resize images after upload (THX to Simone Fumagalli)
297
- * NEW : Added a JSON class for fetching galleries in a RESTful way (see xml/json.php)
298
- * NEW : Adding various new capabilities for user roles
299
- * NEW : Auto downloader for translation file
300
- * Changed : Rename query var from slideshow to callback for compat reason with other plugin
301
- * Changed : Convert widget function to new WP structure
302
- * Changed : Include lookup for tags into the backend search
303
- * Changed : Restructure addgallery and settings page to enable custom tabs
304
- * Bugfix : Select album preview from gallery preview pics instead random list
305
- * Bugfix : Keep fix dimension in edit thumbnail operation
306
- * Bugfix : Import meta data didn't work correct for existing images
307
- * Bugfix : Fix onload bug for Chrome 4 in Shutter script
308
- * Bugfix : Remove various PHP notices for a better world
309
- * Removed : Canonical link is now part of Wordpress 2.9
310
-
311
- == Upgrade Notice ==
312
-
313
- = 1.5.5 =
314
- Compat issue for post thumbnails with WP2.9 and WP3.0. No Database changes...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === NextGEN Gallery ===
2
+ Contributors: photocrati
3
+ Tags: photos,flash,slideshow,images,gallery,media,admin,post,photo-albums,pictures,widgets,photo,picture,image,nextgen-gallery,nextgen gallery
4
+ Requires at least: 3.2
5
+ Tested up to: 3.3
6
+ Stable tag: trunk
7
+ License: GPLv2
8
+
9
+ NextGEN Gallery is a fully integrated image gallery plugin for WordPress with dozens of options and features.
10
+
11
+ == Description ==
12
+
13
+ NextGEN Gallery is the most popular photo gallery plugin for WordPress, and one of the most popular WordPress plugins of any kind with over 5 million downloads.
14
+
15
+ It provides a powerful engine for uploading and managing galleries of images, with the ability to batch upload, import meta data, add/delete/rearrange/sort images, edit thumbnails, group galleries into albums, and more. It also provides two front-end display styles (slideshows and thumbnail galleries), both of which come with a wide array of options for controlling size, style, timing, transitions, controls, lightbox effects, and more.
16
+
17
+ *NextGEN Gallery is now proudly maintained by <a href='http://www.photocrati.com'>Photocrati Media</a>. Special thanks to Alex Rabe who created and maintained the plugin from 2007 through 2011.*
18
+
19
+
20
+ = Features =
21
+
22
+
23
+ *Upload Galleries*
24
+
25
+ * NextGEN Galleries offers diverse and powerful functionality for getting images from your desktop to your website. You can easily upload batches of images via a standard WordPress-style uploader, or upload images via zip file or FTP. NextGEN will automatically import your images’ meta data.
26
+
27
+
28
+ *Manage Galleries*
29
+
30
+ * Centralized gallery management. Enjoy a single location where you can see and manage all your galleries.
31
+ * Edit galleries. Add or exclude images, change gallery title and description, reorder of images, resize thumbnails.
32
+ * Thumbnail Management. Turn thumbnail cropping on off, customize how individual thumbnails are cropped, and bulk resize thumbnails across one more galleries.
33
+ * Edit Individual Images. Edit meta data and image tags, rotate images, exclude images.
34
+ * Watermarks. Quickly add watermarks to batches or galleries of images.
35
+ * Albums. Create and organize collections of galleries (“albums”), and display them in either compact or extended format.
36
+
37
+
38
+ *Display Galleries*
39
+
40
+ * Two Gallery Types. Choose between two main display styles: Slideshow and Thumbnail, and allow visitors to toggle between the two.
41
+ * Slideshow Galleries. Choose from a vast array of options for slideshows, including slideshow size, transition style, speed, image order, optional navigation bar.
42
+ * Thumbnail Galleries. Choose from a wide range of options to customize thumbnail galleries, including 5 different lightboxs for individual images, optional thumbnails cropping and editing, thumbnail styles, captions, and more.
43
+ * Single Image Displays. Display and format single images.
44
+ * Work with Options Panel or ShortCodes.
45
+
46
+
47
+ = Further Resources =
48
+
49
+ *<a href="http://www.nextgen-gallery.com/nextgen-gallery-demos/" target="_blank">Demo</a><br>
50
+ *<a href="http://wordpress.org/tags/nextgen-gallery?forum_id=10" target="_blank">Support</a><br>
51
+ *<a href="http://www.nextgen-gallery.com/languages/" target="_blank">Translations</a><br>
52
+ *<a href="http://www.nextgen-gallery.com" target="_blank">NextGEN Gallery Official Website</a><br>
53
+ *<a href="http://www.photocrati.com" target="_blank">Author Website - Photocrati Media</a><br>
54
+ *Follow NextGEN Gallery on <a title="Follow NextGEN Gallery on Facebook" href="http://www.facebook.com/NextGENGallery" target="_blank">Facebook</a>, <a title="Follow NextGEN Gallery on Twitter" href="http://twitter.com/NextGENGallery" target="_blank">Twitter</a>, and <a title="Follow NextGEN Gallery on Google +" href="http://plus.google.com/101643895780935290171" target="_blank">Google +</a><br>
55
+
56
+
57
+ == Credits ==
58
+
59
+ Copyright:<br>
60
+ Photocrati Media 2012<br>
61
+ Alex Rabe 2007-2011
62
+
63
+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
64
+
65
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
66
+
67
+ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
68
+
69
+ ** Please note **
70
+
71
+ The JW Image Rotator (Flash Slideshow) is not part of this license and is available under a Creative Commons License, which allowing you to use, modify and redistribute them for noncommercial purposes.
72
+
73
+ For commercial use please look at the Jeroen's homepage : http://www.longtailvideo.com/
74
+
75
+ == Installation ==
76
+
77
+ 1. Download, install, and activate the NextGEN Gallery plugin.
78
+
79
+ 2. From your Wordpress Dashboard, go to Gallery > Add Gallery/Images > Follow the on-screen cues.
80
+
81
+ 3. Go to a post/page, and select the NextGEN Gallery button from the Kitchen Sink. Follow the on-screen cues to select, adjust, and publish your gallery.
82
+
83
+ That's it ... Have fun
84
+
85
+ http://www.youtube.com/watch?v=Le_ZsNSuIvM
86
+
87
+ == Screenshots ==
88
+
89
+ 1. Screenshot Admin Area
90
+ 2. Screenshot Album Selection
91
+ 3. Screenshot Shutter Effect
92
+ 4. Screenshot Watermark function
93
+ 5. Screenshot Flexible template layout
94
+ 6. Screenshot Show Exif data
95
+
96
+ == Shortcode ==
97
+
98
+ = Examples =
99
+
100
+ *Use Image Tags to Create Galleries/Albums* - [ nggtags album=WordPress,Cologne,Ireland ]
101
+
102
+ *Display Captions in Thumbnail Galleries* - [ nggallery id=1 template=caption ]
103
+
104
+ *Basic Filmstrip Galleries* - [ nggallery id=2 template=carousel images=7 ]
105
+
106
+ *Display Exif Data* - [ imagebrowser id=28 template=exif ]
107
+
108
+ *Sort Images in a Gallery Based on Their Tags* - [ nggtags gallery=cologne,wordpress,.. ]
109
+
110
+ *Add Tag Clouds* - [ tagcloud]
111
+
112
+ *Single Pic Options* - [ singlepic id=x w=width h=height mode=web20|watermark float=left|right ]
113
+
114
+ *Template Engine for Gallery Types*<br>
115
+ [ nggallery id=1 template=sample1 ]<br>
116
+ [ nggallery id=1 template=sample2 ]<br>
117
+ [ nggallery id=1 template=sample3 ]<br>
118
+ [ nggallery id=1 template=sample4 ]<br>
119
+ [ nggallery id=1 template=sample5 ]<br>
120
+ [ nggallery id=1 template=sample6 ]<br>
121
+
122
+ *Integration with Third Party Plugins*<br>
123
+ [ monoslideshow id=1 w=450 h=350 ]<br>
124
+ [ nggallery id=1 template=galleryview images=0 ]<br>
125
+ [ media id=6 width=320 height=240 plugins=revolt-1 ]<br>
126
+ [ media id=3 width=320 height=240 plugins=rateit-2 ]<br>
127
+
128
+ == Frequently Asked Questions ==
129
+
130
+ = Will NextGEN Gallery work with my theme? =
131
+
132
+ Part of what makes NextGEN so popular is its flexibility - it works with the vast majority of premium and free themes, without requiring any coding.
133
+
134
+
135
+ = Are the galleries flash based? =
136
+
137
+ No, NextGEN Gallery uses Javascript (J-Query) based displays to ensure compatibility across the widest range of displays possible.
138
+
139
+
140
+ = Are the galleries mobile friendly? =
141
+
142
+ Yes, since we use Javascript rather than flash, NextGEN Gallery is compatible with Android, iOS, and Blackberry.
143
+
144
+
145
+ = What is the difference between a gallery and an album? =
146
+
147
+ In the simplest of terms, Galleries contain your images and Albums contain your Galleries. Albums act as links and placeholders to quickly and easily navigate your galleries - Galleries will actually display your images.
148
+
149
+
150
+ = Can I upload multiple images at once? =
151
+
152
+ Yes, you can batch upload entire galleries at a time.
153
+
154
+
155
+ = Can I password protect galleries? =
156
+
157
+ Yes, Wordpress allows you to password protect pages by default - which includes all galleries and content for the entire page. Password protection of pages can be turned on and off at any time, with just a few clicks.
158
+
159
+
160
+ = Can I add a watermark to the images/slideshows? =
161
+
162
+ Yes, you can add text or image watermarks to your gallery images.
163
+
164
+
165
+ = Can I crop thumbnails? =
166
+
167
+ Yes, each thumbnail image can be individually adjusted to suit your needs.
168
+
169
+
170
+ = Is there pagination for galleries? =
171
+
172
+ Yes, and you can adjust the amount of images to be shown on a page at any time.
173
+
174
+
175
+ = Can I customize the lightbox? =
176
+
177
+ Yes, the lightbox can be configured with multiple options directly from the Dashboard, and there are multiple CSS styles which can be applied and modified as well.
178
+
179
+
180
+ = Can I add HTML to the captions? =
181
+
182
+ Yes, caption areas are fully HMTL capable.
183
+
184
+
185
+ = Can I add an external links to galleries? =
186
+
187
+ Since the captions are fully HTML capable, you can add external links and any other type of mark up you wish.
188
+
189
+ = Is NextGEN Gallery available in foreign languages? =
190
+
191
+ Yes, NextGEN Gallery has been translated into dozens of languages - <a href="http://www.nextgen-gallery.com/languages/" target="_blank">click here to find out more.</a>
192
+
193
+ == Changelog ==
194
+
195
+ = V1.9.3 - 26.02.2012 =
196
+ * Bugfix : Ensure to set the slug for "all" albums
197
+ * Bugfix : Updated german translation ( THX to Roger Hunziker )
198
+ * Bugfix : Ensure error checking on IPTC array (THX to Kristian Edlund)
199
+ * Bugfix : Handle IE8 cached images better in slideshow
200
+ * Bugfix : Show album preview image if selected (THX to Kristian Edlund)
201
+
202
+ = V1.9.2 - 17.01.2012 =
203
+ * NEW : Added more XMLRPC commands (THX to Vladimir Vinogradsky)
204
+ * Changed : Rework Post-thumbnail function (THX to Kristian Edlund)
205
+ * Bugfix : Check first for valid images on unzip (only Mac OS zip-files)
206
+ * Bugfix : Increase z-index for twenty eleven theme
207
+ * Bugfix : Support non latin chars in tagcloud
208
+ * Bugfix : Allow other tinymce intance
209
+ * Bugfix : Better support for WPML translation
210
+
211
+ = V1.9.1 - 10.12.2011 =
212
+ * Bugfix : Security hardness for untrusted filenames/meta data (THX to Brian St. Pierre)
213
+ * Bugfix : Fixed security vulnerability (TXH to Jon Cave)
214
+ * Bugfix : Load piclens script via other function
215
+ * Bugfix : IE7 script fix for add gallery
216
+ * Bugfix : IE7/IE8 width set correctly for edit album autocomplete field
217
+
218
+ = V1.9.0 - 27.11.2011 =
219
+ * NEW : Keep images transparency for PNG and GIF format
220
+ * NEW : Switch to Plupload, support now HTML5 Upload (only with WordPress 3.3)
221
+ * NEW : Added client side resize feature (only with WordPress 3.3)
222
+ * NEW : Support for gallery templates in album shortcodes [ album id=x template="name" gallery="templatename" ]
223
+ * NEW : Added new hook ngg_delete_picture
224
+ * Changed : Updated to jQuery Cycle Version 2.9995
225
+ * Changed : Always cache the single pictures, remove option
226
+ * Bugfix : Couldn't use bulk operation for search results
227
+ * Bugfix : Bugfix for Edit thumbnails under IE 8 + 9
228
+ * Bugfix : Allow empty altext in ngg.editImage
229
+ * Bugfix : Various PHP notice fixes
230
+ * Bugfix : Resize fix for Shutter effect and mobile Browser
231
+ * Bugfix : FTP Import missing slug field into database
232
+ * Bugfix : Check also EXIF field "DateTimeOriginal" for timestamp
233
+
234
+ = V1.8.4 - 26.10.2011 =
235
+ * Bugfix : Fixed security vulnerability (TXH to Alain Schneider)
236
+
237
+ = V1.8.3 - 07.08.2011 =
238
+ * Changed : Support for simple custom permalink structures (i.e. /%category%/%postname%/)
239
+ * Bugfix : Sub-Albums in Albums didn't create the correct link
240
+ * Bugfix : AJAX Pagination didn't work anymore
241
+ * Bugfix : Adding index.php to home_url()
242
+ * Bugfix : Preview picture lost on backend gallery page 2 or higher
243
+
244
+ = V1.8.2 - 12.07.2011 =
245
+ * Bugfix : Set pagination variables for search result, otherwise update failed
246
+ * Bugfix : Update failed for paged galleries since WordPress 3.2
247
+
248
+ = V1.8.1 - 18.06.2011 =
249
+ * Bugfix : Special case for pagination, instead of showing page-1, we show the clean url
250
+ * Bugfix : Various PHP notice fixes
251
+ * Bugfix : Typo in rewrite rules
252
+ * Bugfix : Flush rewrite rules during upgrade later
253
+
254
+ = V1.8.0 - 12.06.2011 =
255
+ * NEW : Full rework of permalink url structure
256
+ * NEW : Adding Google Sitemaps for Images (require WordPress SEO plugin by YOAST )
257
+ * NEW : Support for WPML ( WordPress Multilingual Plugin )
258
+ * NEW : Adding support for arrow key in shutter effect (THX to Flyvans)
259
+ * NEW : Adding sort operation for galleries overview page
260
+ * Changed : Updated pagination to new WP3.1 style
261
+ * Bugfix : Create unique slug in a better way
262
+ * Bugfix : Rework screen options filter for gallery and image table
263
+ * Bugfix : Empty values in XMLRPC update calls are ignored
264
+ * Bugfix : Create gallery failed when safe-mode on
265
+ * Bugfix : Permalink didn't work in combination with album & imagebrowser
266
+
267
+ = V1.7.4 - 15.02.2011 =
268
+ * Bugfix : Disallow direct call of ajax file to avoid path disclosure (THX to High-Tech Bridge SA)
269
+ * Bugfix : Rework jQuery Cycle slideshow for IE compat reason (THX to Justin Dickenson)
270
+ * Bugfix : Resize only larger images in slideshow
271
+ * Bugfix : Improved image format detection in gd.thumbnail class (THX to Kupar.b)
272
+
273
+ = V1.7.3 - 20.01.2011 =
274
+ * NEW : Introduce plugin health check for conflicts with other plugins/themes
275
+ * NEW : Adding new XMLRPC method ngg.deleteImage
276
+ * NEW : Adding new XMLRPC method ngg.editImage
277
+ * Changed : Rework register script for autocomplete feature
278
+ * Bugfix : Bugfix for Multisite setup and flash upload
279
+ * Bugfix : WP3.1 compat issue, show site admin page only on Multisite installation
280
+
281
+ = V1.7.2 - 13.12.2010 =
282
+ * Bugfix : Adding images to database require slug (NOT NULL)
283
+
284
+ = V1.7.1 - 13.12.2010 =
285
+ * Changed : Disable upgrade for PHP4 user
286
+ * Changed : Disable colorpicker for option page
287
+ * Bugfix : Compat fix for upgrade
288
+
289
+ = V1.7.0 - 11.12.2010 =
290
+ * NEW : Publish a new post direct from the gallery admin page
291
+ * NEW : Added filter hook 'ngg_get_image_metadata' to add more exif/iptc information
292
+ * NEW : Adding Autocomplete field to TinyMCE Popup and Album page
293
+ * NEW : More methods for XMLRPC interface
294
+ * Changed : New hooks for gallery table (THX to Alexander Schneider)
295
+ * Changed : Introduce jQuery dialog as new UI element
296
+ * Changed : Call TinyMCE window via admin-ajax
297
+ * Bugfix : Better support for SSL blogs
298
+ * Bugfix : Install/Upgrade failed when table prefix contain captial letters
299
+ * Bugfix : Fix validation issues in Media-RSS
300
+ * Bugfix : Empty tags in XMP Meta causes PHP error
301
+ * Bugfix : Rework load mechanism for slideshow
302
+ * Bugfix : Copy meta data when image is copied
303
+ * Bugfix : Icon Support for Ozh' Admin Drop Down Menu
304
+ * Bugfix : Use correct sort order in slideshow
305
+
306
+ = V1.6.2 - 19.09.2010 =
307
+ * NEW : Added constant NGG_SKIP_LOAD_SCRIPTS to avoid script load
308
+ * Bugfix : Load Tags library with core files
309
+ * Bugfix : Slideshow script failed in IE7, load script now in header
310
+ * Bugfix : Load slideshow widget always
311
+ * Changed : New admin notice for database upgrade
312
+ * Changed : Rework crop feature for featured images
313
+ * Changed : Use site_url() instead get_option ('siteurl'), required for SSL support
314
+
315
+ = V1.6.1 - 08.09.2010 =
316
+ * Bugfix : Script load of swfobject.js failed
317
+ * Bugfix : Show sideshow also with 1 or 2 images
318
+ * Bugfix : Rework null byte check in zip upload
319
+
320
+ = V1.6.0 - 07.09.2010 =
321
+ * NEW : Wordpress 3.0 Network (Multi-Site) support
322
+ * NEW : Integrate jQuery Cycle as NON-Flash slideshow
323
+ * NEW : Adding jQuery File Tree for import folder (THX to Sergey Pasyuk )
324
+ * NEW : Added action hook 'ngg_show_imagebrowser_first' on custom request
325
+ * NEW : Added filter hook 'ngg_slideshow_size' to resize sildeshow for mobile browser plugins
326
+ * Changed : Reorder tabs for upload
327
+ * Changed : New menu icon and screen icon (THX to Ben Dunkle)
328
+ * Changed : Load frontend libs always
329
+ * Changed : Rework of overview page
330
+ * Bugfix : Security bugfix for Zip-Upload (THX to Dominic Szablewski)
331
+ * Bugfix : Allow JPG, PNG, GIF extension
332
+ * Bugfix : New German translation (THX to Martin Kramarz)
333
+ * Bugfix : Copy/Move also backup file
334
+ * Bugfix : Calculate correct ratio for fix thumbnail size (THX to Alekz Keck)
335
+
336
+ = V1.5.5 - 14.06.2010 =
337
+ * Bugfix : Compat issue for post thumbnails with WP2.9
338
+ * NEW : Adding more hooks for custom fields plugin
339
+
340
+ = V1.5.4 - 14.06.2010 =
341
+ * Bugfix : No resize of smaller images
342
+ * Bugfix : Compat issues for Post Thumbnails under WP3.0
343
+ * Bugfix : Esc_URL in Media RSS
344
+
345
+ = V1.5.3 - 11.04.2010 =
346
+ * New : Adding pagination to footer
347
+ * Changed : Perpare new filter to replace slideshow
348
+ * Bugfix : Remove non-breaking space from navigation
349
+ * Bugfix : Pagination of galleries
350
+ * Bugfix : Fixed brackets position for old shortcode query
351
+ * Bugfix : Slideshow option 'Show next image on click" has wrong default value
352
+
353
+ = V1.5.2 - 25.03.2010 =
354
+ * Bugfix : XSS security vulnerability (THX to Core Security Advisories Team , Pedro Varangot)
355
+ * Bugfix : Missing $wpdb in shortcodes.php
356
+
357
+ = V1.5.1 - 23.03.2010 =
358
+ * Bugfix : PHP4 compat issue for Add gallery & options page
359
+ * Bugfix : Gallery widget can now have a empty title
360
+ * Bugfix : Adding correct stripslash for gallery title
361
+
362
+ = V1.5.0 - 18.03.2010 =
363
+ * NEW : Support for Post thumbnail feature
364
+ * NEW : Backup and Recover function for images (THX to Simone Fumagalli)
365
+ * NEW : Resize images after upload (THX to Simone Fumagalli)
366
+ * NEW : Added a JSON class for fetching galleries in a RESTful way (see xml/json.php)
367
+ * NEW : Adding various new capabilities for user roles
368
+ * NEW : Auto downloader for translation file
369
+ * Changed : Rename query var from slideshow to callback for compat reason with other plugin
370
+ * Changed : Convert widget function to new WP structure
371
+ * Changed : Include lookup for tags into the backend search
372
+ * Changed : Restructure addgallery and settings page to enable custom tabs
373
+ * Bugfix : Select album preview from gallery preview pics instead random list
374
+ * Bugfix : Keep fix dimension in edit thumbnail operation
375
+ * Bugfix : Import meta data didn't work correct for existing images
376
+ * Bugfix : Fix onload bug for Chrome 4 in Shutter script
377
+ * Bugfix : Remove various PHP notices for a better world
378
+ * Removed : Canonical link is now part of Wordpress 2.9
379
+
380
+ == Upgrade Notice ==
381
+
382
+ = 1.5.5 =
383
+ * Compat issue for post thumbnails with WP2.9 and WP3.0. No Database changes...