Ignore:
Timestamp:
02.07.2009 16:09:14 (3 years ago)
Author:
mike
Message:

3.1.0

  • auto create medium image from large if no medium was uploaded
  • calculates resize-dimensions to resize images
  • switch button to use/ignore calculated dimensions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMESS/mediaplayer/branches/3.1/com/zms/mediaplayer/mediaplayer.metaobj.xml

    r616 r620  
    16591659<item key="multilang" type="int">0</item> 
    16601660<item key="name"><![CDATA[ui.core.js]]></item> 
    1661 <item key="repetitive" type="int">0</item> 
    1662 <item key="type"><![CDATA[resource]]></item> 
    1663 </dictionary> 
    1664 </item> 
    1665 <item type="dictionary"><dictionary> 
    1666 <item key="custom"> 
    1667 <data content_type="text/x-c" filename="ui.draggable.js" type="file"><![CDATA[/* 
    1668  * jQuery UI Draggable 1.6rc6 
    1669  * 
    1670  * Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about) 
    1671  * Dual licensed under the MIT (MIT-LICENSE.txt) 
    1672  * and GPL (GPL-LICENSE.txt) licenses. 
    1673  * 
    1674  * http://docs.jquery.com/UI/Draggables 
    1675  * 
    1676  * Depends: 
    1677  *      ui.core.js 
    1678  */ 
    1679 (function($) { 
    1680  
    1681 $.widget("ui.draggable", $.extend({}, $.ui.mouse, { 
    1682  
    1683         _init: function() { 
    1684  
    1685                 if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position"))) 
    1686                         this.element[0].style.position = 'relative'; 
    1687  
    1688                 (this.options.cssNamespace && this.element.addClass(this.options.cssNamespace+"-draggable")); 
    1689                 (this.options.disabled && this.element.addClass(this.options.cssNamespace+'-draggable-disabled')); 
    1690  
    1691                 this._mouseInit(); 
    1692  
    1693         }, 
    1694  
    1695         destroy: function() { 
    1696                 if(!this.element.data('draggable')) return; 
    1697                 this.element.removeData("draggable").unbind(".draggable").removeClass(this.options.cssNamespace+'-draggable '+this.options.cssNamespace+'-draggable-dragging '+this.options.cssNamespace+'-draggable-disabled'); 
    1698                 this._mouseDestroy(); 
    1699         }, 
    1700  
    1701         _mouseCapture: function(event) { 
    1702  
    1703                 var o = this.options; 
    1704  
    1705                 if (this.helper || o.disabled || $(event.target).is('.'+this.options.cssNamespace+'-resizable-handle')) 
    1706                         return false; 
    1707  
    1708                 //Quit if we're not on a valid handle 
    1709                 this.handle = this._getHandle(event); 
    1710                 if (!this.handle) 
    1711                         return false; 
    1712  
    1713                 return true; 
    1714  
    1715         }, 
    1716  
    1717         _mouseStart: function(event) { 
    1718  
    1719                 var o = this.options; 
    1720  
    1721                 //Create and append the visible helper 
    1722                 this.helper = this._createHelper(event); 
    1723  
    1724                 //Cache the helper size 
    1725                 this._cacheHelperProportions(); 
    1726  
    1727                 //If ddmanager is used for droppables, set the global draggable 
    1728                 if($.ui.ddmanager) 
    1729                         $.ui.ddmanager.current = this; 
    1730  
    1731                 /* 
    1732                  * - Position generation - 
    1733                  * This block generates everything position related - it's the core of draggables. 
    1734                  */ 
    1735  
    1736                 //Cache the margins of the original element 
    1737                 this._cacheMargins(); 
    1738  
    1739                 //Store the helper's css position 
    1740                 this.cssPosition = this.helper.css("position"); 
    1741                 this.scrollParent = this.helper.scrollParent(); 
    1742  
    1743                 //The element's absolute position on the page minus margins 
    1744                 this.offset = this.element.offset(); 
    1745                 this.offset = { 
    1746                         top: this.offset.top - this.margins.top, 
    1747                         left: this.offset.left - this.margins.left 
    1748                 }; 
    1749  
    1750                 $.extend(this.offset, { 
    1751                         click: { //Where the click happened, relative to the element 
    1752                                 left: event.pageX - this.offset.left, 
    1753                                 top: event.pageY - this.offset.top 
    1754                         }, 
    1755                         parent: this._getParentOffset(), 
    1756                         relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper 
    1757                 }); 
    1758  
    1759                 //Generate the original position 
    1760                 this.originalPosition = this._generatePosition(event); 
    1761                 this.originalPageX = event.pageX; 
    1762                 this.originalPageY = event.pageY; 
    1763  
    1764                 //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied 
    1765                 if(o.cursorAt) 
    1766                         this._adjustOffsetFromHelper(o.cursorAt); 
    1767  
    1768                 //Set a containment if given in the options 
    1769                 if(o.containment) 
    1770                         this._setContainment(); 
    1771  
    1772                 //Call plugins and callbacks 
    1773                 this._trigger("start", event); 
    1774  
    1775                 //Recache the helper size 
    1776                 this._cacheHelperProportions(); 
    1777  
    1778                 //Prepare the droppable offsets 
    1779                 if ($.ui.ddmanager && !o.dropBehaviour) 
    1780                         $.ui.ddmanager.prepareOffsets(this, event); 
    1781  
    1782                 this.helper.addClass(o.cssNamespace+"-draggable-dragging"); 
    1783                 this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position 
    1784                 return true; 
    1785         }, 
    1786  
    1787         _mouseDrag: function(event, noPropagation) { 
    1788  
    1789                 //Compute the helpers position 
    1790                 this.position = this._generatePosition(event); 
    1791                 this.positionAbs = this._convertPositionTo("absolute"); 
    1792  
    1793                 //Call plugins and callbacks and use the resulting position if something is returned 
    1794                 if (!noPropagation) { 
    1795                         var ui = this._uiHash(); 
    1796                         this._trigger('drag', event, ui); 
    1797                         this.position = ui.position; 
    1798                 } 
    1799  
    1800                 if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; 
    1801                 if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; 
    1802                 if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); 
    1803  
    1804                 return false; 
    1805         }, 
    1806  
    1807         _mouseStop: function(event) { 
    1808  
    1809                 //If we are using droppables, inform the manager about the drop 
    1810                 var dropped = false; 
    1811                 if ($.ui.ddmanager && !this.options.dropBehaviour) 
    1812                         dropped = $.ui.ddmanager.drop(this, event); 
    1813  
    1814                 //if a drop comes from outside (a sortable) 
    1815                 if(this.dropped) { 
    1816                         dropped = this.dropped; 
    1817                         this.dropped = false; 
    1818                 } 
    1819  
    1820                 if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { 
    1821                         var self = this; 
    1822                         $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { 
    1823                                 self._trigger("stop", event); 
    1824                                 self._clear(); 
    1825                         }); 
    1826                 } else { 
    1827                         this._trigger("stop", event); 
    1828                         this._clear(); 
    1829                 } 
    1830  
    1831                 return false; 
    1832         }, 
    1833  
    1834         _getHandle: function(event) { 
    1835  
    1836                 var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false; 
    1837                 $(this.options.handle, this.element) 
    1838                         .find("*") 
    1839                         .andSelf() 
    1840                         .each(function() { 
    1841                                 if(this == event.target) handle = true; 
    1842                         }); 
    1843  
    1844                 return handle; 
    1845  
    1846         }, 
    1847  
    1848         _createHelper: function(event) { 
    1849  
    1850                 var o = this.options; 
    1851                 var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone() : this.element); 
    1852  
    1853                 if(!helper.parents('body').length) 
    1854                         helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); 
    1855  
    1856                 if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) 
    1857                         helper.css("position", "absolute"); 
    1858  
    1859                 return helper; 
    1860  
    1861         }, 
    1862  
    1863         _adjustOffsetFromHelper: function(obj) { 
    1864                 if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left; 
    1865                 if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 
    1866                 if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top; 
    1867                 if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 
    1868         }, 
    1869  
    1870         _getParentOffset: function() { 
    1871  
    1872                 //Get the offsetParent and cache its position 
    1873                 this.offsetParent = this.helper.offsetParent(); 
    1874                 var po = this.offsetParent.offset(); 
    1875  
    1876                 // This is a special case where we need to modify a offset calculated on start, since the following happened: 
    1877                 // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent 
    1878                 // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that 
    1879                 //    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag 
    1880                 if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) { 
    1881                         po.left += this.scrollParent.scrollLeft(); 
    1882                         po.top += this.scrollParent.scrollTop(); 
    1883                 } 
    1884  
    1885                 if((this.offsetParent[0] == document.body && $.browser.mozilla) //Ugly FF3 fix 
    1886                 || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix 
    1887                         po = { top: 0, left: 0 }; 
    1888  
    1889                 return { 
    1890                         top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), 
    1891                         left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) 
    1892                 }; 
    1893  
    1894         }, 
    1895  
    1896         _getRelativeOffset: function() { 
    1897  
    1898                 if(this.cssPosition == "relative") { 
    1899                         var p = this.element.position(); 
    1900                         return { 
    1901                                 top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), 
    1902                                 left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() 
    1903                         }; 
    1904                 } else { 
    1905                         return { top: 0, left: 0 }; 
    1906                 } 
    1907  
    1908         }, 
    1909  
    1910         _cacheMargins: function() { 
    1911                 this.margins = { 
    1912                         left: (parseInt(this.element.css("marginLeft"),10) || 0), 
    1913                         top: (parseInt(this.element.css("marginTop"),10) || 0) 
    1914                 }; 
    1915         }, 
    1916  
    1917         _cacheHelperProportions: function() { 
    1918                 this.helperProportions = { 
    1919                         width: this.helper.outerWidth(), 
    1920                         height: this.helper.outerHeight() 
    1921                 }; 
    1922         }, 
    1923  
    1924         _setContainment: function() { 
    1925  
    1926                 var o = this.options; 
    1927                 if(o.containment == 'parent') o.containment = this.helper[0].parentNode; 
    1928                 if(o.containment == 'document' || o.containment == 'window') this.containment = [ 
    1929                         0 - this.offset.relative.left - this.offset.parent.left, 
    1930                         0 - this.offset.relative.top - this.offset.parent.top, 
    1931                         $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left, 
    1932                         ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top 
    1933                 ]; 
    1934  
    1935                 if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) { 
    1936                         var ce = $(o.containment)[0]; if(!ce) return; 
    1937                         var co = $(o.containment).offset(); 
    1938                         var over = ($(ce).css("overflow") != 'hidden'); 
    1939  
    1940                         this.containment = [ 
    1941                                 co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, 
    1942                                 co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, 
    1943                                 co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, 
    1944                                 co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top 
    1945                         ]; 
    1946                 } else if(o.containment.constructor == Array) { 
    1947                         this.containment = o.containment; 
    1948                 } 
    1949  
    1950         }, 
    1951  
    1952         _convertPositionTo: function(d, pos) { 
    1953  
    1954                 if(!pos) pos = this.position; 
    1955                 var mod = d == "absolute" ? 1 : -1; 
    1956                 var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); 
    1957  
    1958                 return { 
    1959                         top: ( 
    1960                                 pos.top                                                                                                                                 // The absolute mouse position 
    1961                                 + this.offset.relative.top * mod                                                                                // Only for relative positioned nodes: Relative offset from element to offset parent 
    1962                                 + this.offset.parent.top * mod                                                                                  // The offsetParent's offset without borders (offset + border) 
    1963                                 - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod 
    1964                         ), 
    1965                         left: ( 
    1966                                 pos.left                                                                                                                                // The absolute mouse position 
    1967                                 + this.offset.relative.left * mod                                                                               // Only for relative positioned nodes: Relative offset from element to offset parent 
    1968                                 + this.offset.parent.left * mod                                                                                 // The offsetParent's offset without borders (offset + border) 
    1969                                 - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod 
    1970                         ) 
    1971                 }; 
    1972  
    1973         }, 
    1974  
    1975         _generatePosition: function(event) { 
    1976  
    1977                 var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); 
    1978  
    1979                 // This is another very weird special case that only happens for relative elements: 
    1980                 // 1. If the css position is relative 
    1981                 // 2. and the scroll parent is the document or similar to the offset parent 
    1982                 // we have to refresh the relative offset during the scroll so there are no jumps 
    1983                 if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { 
    1984                         this.offset.relative = this._getRelativeOffset(); 
    1985                 } 
    1986  
    1987                 var pageX = event.pageX; 
    1988                 var pageY = event.pageY; 
    1989  
    1990                 /* 
    1991                  * - Position constraining - 
    1992                  * Constrain the position to a mix of grid, containment. 
    1993                  */ 
    1994  
    1995                 if(this.originalPosition) { //If we are not dragging yet, we won't check for options 
    1996  
    1997                         if(this.containment) { 
    1998                                 if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left; 
    1999                                 if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top; 
    2000                                 if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left; 
    2001                                 if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top; 
    2002                         } 
    2003  
    2004                         if(o.grid) { 
    2005                                 var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; 
    2006                                 pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; 
    2007  
    2008                                 var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; 
    2009                                 pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; 
    2010                         } 
    2011  
    2012                 } 
    2013  
    2014                 return { 
    2015                         top: ( 
    2016                                 pageY                                                                                                                           // The absolute mouse position 
    2017                                 - this.offset.click.top                                                                                                 // Click offset (relative to the element) 
    2018                                 - this.offset.relative.top                                                                                              // Only for relative positioned nodes: Relative offset from element to offset parent 
    2019                                 - this.offset.parent.top                                                                                                // The offsetParent's offset without borders (offset + border) 
    2020                                 + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) 
    2021                         ), 
    2022                         left: ( 
    2023                                 pageX                                                                                                                           // The absolute mouse position 
    2024                                 - this.offset.click.left                                                                                                // Click offset (relative to the element) 
    2025                                 - this.offset.relative.left                                                                                             // Only for relative positioned nodes: Relative offset from element to offset parent 
    2026                                 - this.offset.parent.left                                                                                               // The offsetParent's offset without borders (offset + border) 
    2027                                 + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) 
    2028                         ) 
    2029                 }; 
    2030  
    2031         }, 
    2032  
    2033         _clear: function() { 
    2034                 this.helper.removeClass(this.options.cssNamespace+"-draggable-dragging"); 
    2035                 if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove(); 
    2036                 //if($.ui.ddmanager) $.ui.ddmanager.current = null; 
    2037                 this.helper = null; 
    2038                 this.cancelHelperRemoval = false; 
    2039         }, 
    2040  
    2041         // From now on bulk stuff - mainly helpers 
    2042  
    2043         _trigger: function(type, event, ui) { 
    2044                 ui = ui || this._uiHash(); 
    2045                 $.ui.plugin.call(this, type, [event, ui]); 
    2046                 if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins 
    2047                 return $.widget.prototype._trigger.call(this, type, event, ui); 
    2048         }, 
    2049  
    2050         plugins: {}, 
    2051  
    2052         _uiHash: function(event) { 
    2053                 return { 
    2054                         helper: this.helper, 
    2055                         position: this.position, 
    2056                         absolutePosition: this.positionAbs, //deprecated 
    2057                         offset: this.positionAbs 
    2058                 }; 
    2059         } 
    2060  
    2061 })); 
    2062  
    2063 $.extend($.ui.draggable, { 
    2064         version: "1.6rc6", 
    2065         eventPrefix: "drag", 
    2066         defaults: { 
    2067                 appendTo: "parent", 
    2068                 axis: false, 
    2069                 cancel: ":input,option", 
    2070                 connectToSortable: false, 
    2071                 containment: false, 
    2072                 cssNamespace: "ui", 
    2073                 cursor: "default", 
    2074                 cursorAt: false, 
    2075                 delay: 0, 
    2076                 distance: 1, 
    2077                 grid: false, 
    2078                 handle: false, 
    2079                 helper: "original", 
    2080                 iframeFix: false, 
    2081                 opacity: false, 
    2082                 refreshPositions: false, 
    2083                 revert: false, 
    2084                 revertDuration: 500, 
    2085                 scope: "default", 
    2086                 scroll: true, 
    2087                 scrollSensitivity: 20, 
    2088                 scrollSpeed: 20, 
    2089                 snap: false, 
    2090                 snapMode: "both", 
    2091                 snapTolerance: 20, 
    2092                 stack: false, 
    2093                 zIndex: false 
    2094         } 
    2095 }); 
    2096  
    2097 $.ui.plugin.add("draggable", "connectToSortable", { 
    2098         start: function(event, ui) { 
    2099  
    2100                 var inst = $(this).data("draggable"), o = inst.options; 
    2101                 inst.sortables = []; 
    2102                 $(o.connectToSortable).each(function() { 
    2103                         // 'this' points to a string, and should therefore resolved as query, but instead, if the string is assigned to a variable, it loops through the strings properties, 
    2104                         // so we have to append '' to make it anonymous again 
    2105                         $(typeof this == 'string' ? this+'': this).each(function() { 
    2106                                 if($.data(this, 'sortable')) { 
    2107                                         var sortable = $.data(this, 'sortable'); 
    2108                                         inst.sortables.push({ 
    2109                                                 instance: sortable, 
    2110                                                 shouldRevert: sortable.options.revert 
    2111                                         }); 
    2112                                         sortable._refreshItems();       //Do a one-time refresh at start to refresh the containerCache 
    2113                                         sortable._trigger("activate", event, inst); 
    2114                                 } 
    2115                         }); 
    2116                 }); 
    2117  
    2118         }, 
    2119         stop: function(event, ui) { 
    2120  
    2121                 //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper 
    2122                 var inst = $(this).data("draggable"); 
    2123  
    2124                 $.each(inst.sortables, function() { 
    2125                         if(this.instance.isOver) { 
    2126  
    2127                                 this.instance.isOver = 0; 
    2128  
    2129                                 inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance 
    2130                                 this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) 
    2131  
    2132                                 //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid' 
    2133                                 if(this.shouldRevert) this.instance.options.revert = true; 
    2134  
    2135                                 //Trigger the stop of the sortable 
    2136                                 this.instance._mouseStop(event); 
    2137  
    2138                                 this.instance.options.helper = this.instance.options._helper; 
    2139  
    2140                                 //If the helper has been the original item, restore properties in the sortable 
    2141                                 if(inst.options.helper == 'original') 
    2142                                         this.instance.currentItem.css({ top: 'auto', left: 'auto' }); 
    2143  
    2144                         } else { 
    2145                                 this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance 
    2146                                 this.instance._trigger("deactivate", event, inst); 
    2147                         } 
    2148  
    2149                 }); 
    2150  
    2151         }, 
    2152         drag: function(event, ui) { 
    2153  
    2154                 var inst = $(this).data("draggable"), self = this; 
    2155  
    2156                 var checkPos = function(o) { 
    2157                         var dyClick = this.offset.click.top, dxClick = this.offset.click.left; 
    2158                         var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left; 
    2159                         var itemHeight = o.height, itemWidth = o.width; 
    2160                         var itemTop = o.top, itemLeft = o.left; 
    2161  
    2162                         return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth); 
    2163                 }; 
    2164  
    2165                 $.each(inst.sortables, function(i) { 
    2166  
    2167                         if(checkPos.call(inst, this.instance.containerCache)) { 
    2168  
    2169                                 //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once 
    2170                                 if(!this.instance.isOver) { 
    2171                                         this.instance.isOver = 1; 
    2172                                         //Now we fake the start of dragging for the sortable instance, 
    2173                                         //by cloning the list group item, appending it to the sortable and using it as inst.currentItem 
    2174                                         //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) 
    2175                                         this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true); 
    2176                                         this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it 
    2177                                         this.instance.options.helper = function() { return ui.helper[0]; }; 
    2178  
    2179                                         event.target = this.instance.currentItem[0]; 
    2180                                         this.instance._mouseCapture(event, true); 
    2181                                         this.instance._mouseStart(event, true, true); 
    2182  
    2183                                         //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes 
    2184                                         this.instance.offset.click.top = inst.offset.click.top; 
    2185                                         this.instance.offset.click.left = inst.offset.click.left; 
    2186                                         this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; 
    2187                                         this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; 
    2188  
    2189                                         inst._trigger("toSortable", event); 
    2190                                         inst.dropped = this.instance.element; //draggable revert needs that 
    2191                                         this.instance.fromOutside = inst; //Little hack so receive/update callbacks work 
    2192  
    2193                                 } 
    2194  
    2195                                 //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable 
    2196                                 if(this.instance.currentItem) this.instance._mouseDrag(event); 
    2197  
    2198                         } else { 
    2199  
    2200                                 //If it doesn't intersect with the sortable, and it intersected before, 
    2201                                 //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval 
    2202                                 if(this.instance.isOver) { 
    2203                                         this.instance.isOver = 0; 
    2204                                         this.instance.cancelHelperRemoval = true; 
    2205                                         this.instance.options.revert = false; //No revert here 
    2206                                         this.instance._mouseStop(event, true); 
    2207                                         this.instance.options.helper = this.instance.options._helper; 
    2208  
    2209                                         //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size 
    2210                                         this.instance.currentItem.remove(); 
    2211                                         if(this.instance.placeholder) this.instance.placeholder.remove(); 
    2212  
    2213                                         inst._trigger("fromSortable", event); 
    2214                                         inst.dropped = false; //draggable revert needs that 
    2215                                 } 
    2216  
    2217                         }; 
    2218  
    2219                 }); 
    2220  
    2221         } 
    2222 }); 
    2223  
    2224 $.ui.plugin.add("draggable", "cursor", { 
    2225         start: function(event, ui) { 
    2226                 var t = $('body'), o = $(this).data('draggable').options; 
    2227                 if (t.css("cursor")) o._cursor = t.css("cursor"); 
    2228                 t.css("cursor", o.cursor); 
    2229         }, 
    2230         stop: function(event, ui) { 
    2231                 var o = $(this).data('draggable').options; 
    2232                 if (o._cursor) $('body').css("cursor", o._cursor); 
    2233         } 
    2234 }); 
    2235  
    2236 $.ui.plugin.add("draggable", "iframeFix", { 
    2237         start: function(event, ui) { 
    2238                 var o = $(this).data('draggable').options; 
    2239                 $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { 
    2240                         $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>') 
    2241                         .css({ 
    2242                                 width: this.offsetWidth+"px", height: this.offsetHeight+"px", 
    2243                                 position: "absolute", opacity: "0.001", zIndex: 1000 
    2244                         }) 
    2245                         .css($(this).offset()) 
    2246                         .appendTo("body"); 
    2247                 }); 
    2248         }, 
    2249         stop: function(event, ui) { 
    2250                 $("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers 
    2251         } 
    2252 }); 
    2253  
    2254 $.ui.plugin.add("draggable", "opacity", { 
    2255         start: function(event, ui) { 
    2256                 var t = $(ui.helper), o = $(this).data('draggable').options; 
    2257                 if(t.css("opacity")) o._opacity = t.css("opacity"); 
    2258                 t.css('opacity', o.opacity); 
    2259         }, 
    2260         stop: function(event, ui) { 
    2261                 var o = $(this).data('draggable').options; 
    2262                 if(o._opacity) $(ui.helper).css('opacity', o._opacity); 
    2263         } 
    2264 }); 
    2265  
    2266 $.ui.plugin.add("draggable", "scroll", { 
    2267         start: function(event, ui) { 
    2268                 var i = $(this).data("draggable"); 
    2269                 if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset(); 
    2270         }, 
    2271         drag: function(event, ui) { 
    2272  
    2273                 var i = $(this).data("draggable"), o = i.options, scrolled = false; 
    2274  
    2275                 if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') { 
    2276  
    2277                         if(!o.axis || o.axis != 'x') { 
    2278                                 if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) 
    2279                                         i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; 
    2280                                 else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) 
    2281                                         i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; 
    2282                         } 
    2283  
    2284                         if(!o.axis || o.axis != 'y') { 
    2285                                 if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) 
    2286                                         i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; 
    2287                                 else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) 
    2288                                         i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; 
    2289                         } 
    2290  
    2291                 } else { 
    2292  
    2293                         if(!o.axis || o.axis != 'x') { 
    2294                                 if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) 
    2295                                         scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); 
    2296                                 else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) 
    2297                                         scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); 
    2298                         } 
    2299  
    2300                         if(!o.axis || o.axis != 'y') { 
    2301                                 if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) 
    2302                                         scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); 
    2303                                 else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) 
    2304                                         scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); 
    2305                         } 
    2306  
    2307                 } 
    2308  
    2309                 if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) 
    2310                         $.ui.ddmanager.prepareOffsets(i, event); 
    2311  
    2312         } 
    2313 }); 
    2314  
    2315 $.ui.plugin.add("draggable", "snap", { 
    2316         start: function(event, ui) { 
    2317  
    2318                 var i = $(this).data("draggable"), o = i.options; 
    2319                 i.snapElements = []; 
    2320  
    2321                 $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() { 
    2322                         var $t = $(this); var $o = $t.offset(); 
    2323                         if(this != i.element[0]) i.snapElements.push({ 
    2324                                 item: this, 
    2325                                 width: $t.outerWidth(), height: $t.outerHeight(), 
    2326                                 top: $o.top, left: $o.left 
    2327                         }); 
    2328                 }); 
    2329  
    2330         }, 
    2331         drag: function(event, ui) { 
    2332  
    2333                 var inst = $(this).data("draggable"), o = inst.options; 
    2334                 var d = o.snapTolerance; 
    2335  
    2336                 var x1 = ui.absolutePosition.left, x2 = x1 + inst.helperProportions.width, 
    2337                         y1 = ui.absolutePosition.top, y2 = y1 + inst.helperProportions.height; 
    2338  
    2339                 for (var i = inst.snapElements.length - 1; i >= 0; i--){ 
    2340  
    2341                         var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width, 
    2342                                 t = inst.snapElements[i].top, b = t + inst.snapElements[i].height; 
    2343  
    2344                         //Yes, I know, this is insane ;) 
    2345                         if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) { 
    2346                                 if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); 
    2347                                 inst.snapElements[i].snapping = false; 
    2348                                 continue; 
    2349                         } 
    2350  
    2351                         if(o.snapMode != 'inner') { 
    2352                                 var ts = Math.abs(t - y2) <= d; 
    2353                                 var bs = Math.abs(b - y1) <= d; 
    2354                                 var ls = Math.abs(l - x2) <= d; 
    2355                                 var rs = Math.abs(r - x1) <= d; 
    2356                                 if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; 
    2357                                 if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; 
    2358                                 if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; 
    2359                                 if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; 
    2360                         } 
    2361  
    2362                         var first = (ts || bs || ls || rs); 
    2363  
    2364                         if(o.snapMode != 'outer') { 
    2365                                 var ts = Math.abs(t - y1) <= d; 
    2366                                 var bs = Math.abs(b - y2) <= d; 
    2367                                 var ls = Math.abs(l - x1) <= d; 
    2368                                 var rs = Math.abs(r - x2) <= d; 
    2369                                 if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; 
    2370                                 if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; 
    2371                                 if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; 
    2372                                 if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; 
    2373                         } 
    2374  
    2375                         if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) 
    2376                                 (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); 
    2377                         inst.snapElements[i].snapping = (ts || bs || ls || rs || first); 
    2378  
    2379                 }; 
    2380  
    2381         } 
    2382 }); 
    2383  
    2384 $.ui.plugin.add("draggable", "stack", { 
    2385         start: function(event, ui) { 
    2386  
    2387                 var o = $(this).data("draggable").options; 
    2388  
    2389                 var group = $.makeArray($(o.stack.group)).sort(function(a,b) { 
    2390                         return (parseInt($(a).css("zIndex"),10) || o.stack.min) - (parseInt($(b).css("zIndex"),10) || o.stack.min); 
    2391                 }); 
    2392  
    2393                 $(group).each(function(i) { 
    2394                         this.style.zIndex = o.stack.min + i; 
    2395                 }); 
    2396  
    2397                 this[0].style.zIndex = o.stack.min + group.length; 
    2398  
    2399         } 
    2400 }); 
    2401  
    2402 $.ui.plugin.add("draggable", "zIndex", { 
    2403         start: function(event, ui) { 
    2404                 var t = $(ui.helper), o = $(this).data("draggable").options; 
    2405                 if(t.css("zIndex")) o._zIndex = t.css("zIndex"); 
    2406                 t.css('zIndex', o.zIndex); 
    2407         }, 
    2408         stop: function(event, ui) { 
    2409                 var o = $(this).data("draggable").options; 
    2410                 if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex); 
    2411         } 
    2412 }); 
    2413  
    2414 })(jQuery); 
    2415 ]]></data></item> 
    2416 <item key="id"><![CDATA[ui.draggable.js]]></item> 
    2417 <item key="mandatory" type="int">0</item> 
    2418 <item key="multilang" type="int">0</item> 
    2419 <item key="name"><![CDATA[ui.draggable.js]]></item> 
    2420 <item key="repetitive" type="int">0</item> 
    2421 <item key="type"><![CDATA[resource]]></item> 
    2422 </dictionary> 
    2423 </item> 
    2424 <item type="dictionary"><dictionary> 
    2425 <item key="custom"> 
    2426 <data content_type="text/x-c" filename="ui.droppable.js" type="file"><![CDATA[/* 
    2427  * jQuery UI Droppable 1.6rc6 
    2428  * 
    2429  * Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about) 
    2430  * Dual licensed under the MIT (MIT-LICENSE.txt) 
    2431  * and GPL (GPL-LICENSE.txt) licenses. 
    2432  * 
    2433  * http://docs.jquery.com/UI/Droppables 
    2434  * 
    2435  * Depends: 
    2436  *      ui.core.js 
    2437  *      ui.draggable.js 
    2438  */ 
    2439 (function($) { 
    2440  
    2441 $.widget("ui.droppable", { 
    2442  
    2443         _init: function() { 
    2444  
    2445                 var o = this.options, accept = o.accept; 
    2446                 this.isover = 0; this.isout = 1; 
    2447  
    2448                 this.options.accept = this.options.accept && $.isFunction(this.options.accept) ? this.options.accept : function(d) { 
    2449                         return d.is(accept); 
    2450                 }; 
    2451  
    2452                 //Store the droppable's proportions 
    2453                 this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; 
    2454  
    2455                 // Add the reference and positions to the manager 
    2456                 $.ui.ddmanager.droppables[this.options.scope] = $.ui.ddmanager.droppables[this.options.scope] || []; 
    2457                 $.ui.ddmanager.droppables[this.options.scope].push(this); 
    2458  
    2459                 (this.options.cssNamespace && this.element.addClass(this.options.cssNamespace+"-droppable")); 
    2460  
    2461         }, 
    2462  
    2463         destroy: function() { 
    2464                 var drop = $.ui.ddmanager.droppables[this.options.scope]; 
    2465                 for ( var i = 0; i < drop.length; i++ ) 
    2466                         if ( drop[i] == this ) 
    2467                                 drop.splice(i, 1); 
    2468  
    2469                 this.element 
    2470                         .removeClass(this.options.cssNamespace+"-droppable "+this.options.cssNamespace+"-droppable-disabled") 
    2471                         .removeData("droppable") 
    2472                         .unbind(".droppable"); 
    2473         }, 
    2474  
    2475         _setData: function(key, value) { 
    2476  
    2477                 if(key == 'accept') { 
    2478                         this.options.accept = value && $.isFunction(value) ? value : function(d) { 
    2479                                 return d.is(accept); 
    2480                         }; 
    2481                 } else { 
    2482                         $.widget.prototype._setData.apply(this, arguments); 
    2483                 } 
    2484  
    2485         }, 
    2486  
    2487         _activate: function(event) { 
    2488                 var draggable = $.ui.ddmanager.current; 
    2489                 if(this.options.activeClass) this.element.addClass(this.options.activeClass); 
    2490                 (draggable && this._trigger('activate', event, this.ui(draggable))); 
    2491         }, 
    2492  
    2493         _deactivate: function(event) { 
    2494                 var draggable = $.ui.ddmanager.current; 
    2495                 if(this.options.activeClass) this.element.removeClass(this.options.activeClass); 
    2496                 (draggable && this._trigger('deactivate', event, this.ui(draggable))); 
    2497         }, 
    2498  
    2499         _over: function(event) { 
    2500  
    2501                 var draggable = $.ui.ddmanager.current; 
    2502                 if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element 
    2503  
    2504                 if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { 
    2505                         if(this.options.hoverClass) this.element.addClass(this.options.hoverClass); 
    2506                         this._trigger('over', event, this.ui(draggable)); 
    2507                 } 
    2508  
    2509         }, 
    2510  
    2511         _out: function(event) { 
    2512  
    2513                 var draggable = $.ui.ddmanager.current; 
    2514                 if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element 
    2515  
    2516                 if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { 
    2517                         if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); 
    2518                         this._trigger('out', event, this.ui(draggable)); 
    2519                 } 
    2520  
    2521         }, 
    2522  
    2523         _drop: function(event,custom) { 
    2524  
    2525                 var draggable = custom || $.ui.ddmanager.current; 
    2526                 if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element 
    2527  
    2528                 var childrenIntersection = false; 
    2529                 this.element.find(":data(droppable)").not("."+draggable.options.cssNamespace+"-draggable-dragging").each(function() { 
    2530                         var inst = $.data(this, 'droppable'); 
    2531                         if(inst.options.greedy && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) { 
    2532                                 childrenIntersection = true; return false; 
    2533                         } 
    2534                 }); 
    2535                 if(childrenIntersection) return false; 
    2536  
    2537                 if(this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { 
    2538                         if(this.options.activeClass) this.element.removeClass(this.options.activeClass); 
    2539                         if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); 
    2540                         this._trigger('drop', event, this.ui(draggable)); 
    2541                         return this.element; 
    2542                 } 
    2543  
    2544                 return false; 
    2545  
    2546         }, 
    2547  
    2548         ui: function(c) { 
    2549                 return { 
    2550                         draggable: (c.currentItem || c.element), 
    2551                         helper: c.helper, 
    2552                         position: c.position, 
    2553                         absolutePosition: c.positionAbs, //deprecated 
    2554                         offset: c.positionAbs 
    2555                 }; 
    2556         } 
    2557  
    2558 }); 
    2559  
    2560 $.extend($.ui.droppable, { 
    2561         version: "1.6rc6", 
    2562         eventPrefix: 'drop', 
    2563         defaults: { 
    2564                 accept: '*', 
    2565                 activeClass: false, 
    2566                 cssNamespace: 'ui', 
    2567                 greedy: false, 
    2568                 hoverClass: false, 
    2569                 scope: 'default', 
    2570                 tolerance: 'intersect' 
    2571         } 
    2572 }); 
    2573  
    2574 $.ui.intersect = function(draggable, droppable, toleranceMode) { 
    2575  
    2576         if (!droppable.offset) return false; 
    2577  
    2578         var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width, 
    2579                 y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height; 
    2580         var l = droppable.offset.left, r = l + droppable.proportions.width, 
    2581                 t = droppable.offset.top, b = t + droppable.proportions.height; 
    2582  
    2583         switch (toleranceMode) { 
    2584                 case 'fit': 
    2585                         return (l < x1 && x2 < r 
    2586                                 && t < y1 && y2 < b); 
    2587                         break; 
    2588                 case 'intersect': 
    2589                         return (l < x1 + (draggable.helperProportions.width / 2) // Right Half 
    2590                                 && x2 - (draggable.helperProportions.width / 2) < r // Left Half 
    2591                                 && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half 
    2592                                 && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half 
    2593                         break; 
    2594                 case 'pointer': 
    2595                         var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left), 
    2596                                 draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top), 
    2597                                 isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width); 
    2598                         return isOver; 
    2599                         break; 
    2600                 case 'touch': 
    2601                         return ( 
    2602                                         (y1 >= t && y1 <= b) || // Top edge touching 
    2603                                         (y2 >= t && y2 <= b) || // Bottom edge touching 
    2604                                         (y1 < t && y2 > b)              // Surrounded vertically 
    2605                                 ) && ( 
    2606                                         (x1 >= l && x1 <= r) || // Left edge touching 
    2607                                         (x2 >= l && x2 <= r) || // Right edge touching 
    2608                                         (x1 < l && x2 > r)              // Surrounded horizontally 
    2609                                 ); 
    2610                         break; 
    2611                 default: 
    2612                         return false; 
    2613                         break; 
    2614                 } 
    2615  
    2616 }; 
    2617  
    2618 /* 
    2619         This manager tracks offsets of draggables and droppables 
    2620 */ 
    2621 $.ui.ddmanager = { 
    2622         current: null, 
    2623         droppables: { 'default': [] }, 
    2624         prepareOffsets: function(t, event) { 
    2625  
    2626                 var m = $.ui.ddmanager.droppables[t.options.scope]; 
    2627                 var type = event ? event.type : null; // workaround for #2317 
    2628                 var list = (t.currentItem || t.element).find(":data(droppable)").andSelf(); 
    2629  
    2630                 droppablesLoop: for (var i = 0; i < m.length; i++) { 
    2631  
    2632                         if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element[0],(t.currentItem || t.element)))) continue;   //No disabled and non-accepted 
    2633                         for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item 
    2634                         m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue;                                                                       //If the element is not visible, continue 
    2635  
    2636                         m[i].offset = m[i].element.offset(); 
    2637                         m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight }; 
    2638  
    2639                         if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables 
    2640  
    2641                 } 
    2642  
    2643         }, 
    2644         drop: function(draggable, event) { 
    2645  
    2646                 var dropped = false; 
    2647                 $.each($.ui.ddmanager.droppables[draggable.options.scope], function() { 
    2648  
    2649                         if(!this.options) return; 
    2650                         if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) 
    2651                                 dropped = this._drop.call(this, event); 
    2652  
    2653                         if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { 
    2654                                 this.isout = 1; this.isover = 0; 
    2655                                 this._deactivate.call(this, event); 
    2656                         } 
    2657  
    2658                 }); 
    2659                 return dropped; 
    2660  
    2661         }, 
    2662         drag: function(draggable, event) { 
    2663  
    2664                 //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. 
    2665                 if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event); 
    2666  
    2667                 //Run through all droppables and check their positions based on specific tolerance options 
    2668  
    2669                 $.each($.ui.ddmanager.droppables[draggable.options.scope], function() { 
    2670  
    2671                         if(this.options.disabled || this.greedyChild || !this.visible) return; 
    2672                         var intersects = $.ui.intersect(draggable, this, this.options.tolerance); 
    2673  
    2674                         var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null); 
    2675                         if(!c) return; 
    2676  
    2677                         var parentInstance; 
    2678                         if (this.options.greedy) { 
    2679                                 var parent = this.element.parents(':data(droppable):eq(0)'); 
    2680                                 if (parent.length) { 
    2681                                         parentInstance = $.data(parent[0], 'droppable'); 
    2682                                         parentInstance.greedyChild = (c == 'isover' ? 1 : 0); 
    2683                                 } 
    2684                         } 
    2685  
    2686                         // we just moved into a greedy child 
    2687                         if (parentInstance && c == 'isover') { 
    2688                                 parentInstance['isover'] = 0; 
    2689                                 parentInstance['isout'] = 1; 
    2690                                 parentInstance._out.call(parentInstance, event); 
    2691                         } 
    2692  
    2693                         this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0; 
    2694                         this[c == "isover" ? "_over" : "_out"].call(this, event); 
    2695  
    2696                         // we just moved out of a greedy child 
    2697                         if (parentInstance && c == 'isout') { 
    2698                                 parentInstance['isout'] = 0; 
    2699                                 parentInstance['isover'] = 1; 
    2700                                 parentInstance._over.call(parentInstance, event); 
    2701                         } 
    2702                 }); 
    2703  
    2704         } 
    2705 }; 
    2706  
    2707 })(jQuery); 
    2708 ]]></data></item> 
    2709 <item key="id"><![CDATA[ui.droppable.js]]></item> 
    2710 <item key="mandatory" type="int">0</item> 
    2711 <item key="multilang" type="int">0</item> 
    2712 <item key="name"><![CDATA[ui.droppable.js]]></item> 
    27131661<item key="repetitive" type="int">0</item> 
    27141662<item key="type"><![CDATA[resource]]></item> 
     
    46243572<item type="dictionary"><dictionary> 
    46253573<item key="custom"> 
    4626 <data content_type="application/x-javascript" filename="import.js" type="file">766172202474656d705f6469616c6f6709090909093d206e756c6c3b0d0a766172202474656d705f6974656d5f636f6e7461696e6572093d206e756c6c3b0d0a7661722074656d705f656d7074795f696d67090909093d2027656d7074792e706e67273b0d0a7661722074656d705f6e6f5f7468756d625f6c69737409093d206e756c6c3b0d0a7661722074656d705f6e6f745f617661696c61626c6509093d20276e6f7420617661696c61626c65273b0d0a7661722074656d705f70617468090909090909093d206e756c6c3b0d0a7661722074656d705f7468756d626c6573735f6974656d73093d206e756c6c3b0d0a0d0a7661722074656d705f63726f705f61706909090909093d206e756c6c3b0d0a766172202474656d705f63726f700909090909093d206e756c6c3b0d0a0d0a66756e6374696f6e20636865636b4974656d28246f626a290d0a7b0d0a0969662028246f626a2e617474722827636c61737327292e696e6465784f662827696d706f72745f66696c652729203e202d31290d0a0909246f626a203d20246f626a2e706172656e747328272e696d706f72745f6f626a65637427292e65712830293b0d0a0d0a0969662028246f626a2e617474722827636c61737327292e696e6465784f662827696d706f72745f6f626a6563742729203e202d31290d0a097b0d0a09097661722074656d705f66696c6573203d20246f626a2e6368696c6472656e28276469765b636c6173732a3d22696d706f72745f66696c65225d3a6c7428332927293b0d0a09090d0a090974656d705f66696c65732e656163682866756e6374696f6e28696e6465782c206f626a290d0a0909097b0d0a0909090976617220246f626a203d2024286f626a293b0d0a090909090d0a0909090969662028246f626a2e6368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c2829203d3d20274e6f6e6527290d0a090909097b0d0a0909090909246f626a2e647261676761626c65282764697361626c6527293b0d0a0909090909246f626a2e64726f707061626c652827656e61626c6527293b0d0a090909097d0d0a09090909656c73650d0a090909097b0d0a0909090909246f626a2e647261676761626c652827656e61626c6527293b0d0a0909090909246f626a2e64726f707061626c65282764697361626c6527293b0d0a090909097d0d0a0909097d293b0d0a0909090d0a09096966202874656d705f66696c65732e6c656e677468203d3d20246f626a2e6368696c6472656e28272e75692d647261676761626c652d64697361626c656427292e6c656e677468290d0a09097b0d0a090909246f626a2e647261676761626c65282764657374726f7927293b0d0a09090964656c6574654974656d28246f626a2e706172656e747328276c692729293b0d0a09097d0d0a097d0d0a7d0d0a0d0a66756e6374696f6e20636c6561724f626a28246f626a290d0a7b0d0a092f2f20636c6561722068696464656e2076616c7565730d0a09246f626a2e6368696c6472656e2827696e7075743a68696464656e27292e76616c28274e6f6e6527293b0d0a092f2f20636c6561722066696c656e616d650d0a09246f626a2e6368696c6472656e28277370616e27292e746578742874656d705f6e6f745f617661696c61626c65293b0d0a092f2f2073657420696d61676520746f20656d7074792d696d670d0a09246f626a2e6368696c6472656e2827696d6727292e65712830292e617474722827737263272c2074656d705f656d7074795f696d67293b0d0a7d0d0a0d0a66756e6374696f6e20636f70794461746128247372632c202464657374290d0a7b0d0a0924646573742e617070656e6428247372632e6368696c6472656e2827696e7075743a68696464656e27292e636c6f6e652829293b0d0a0924646573742e617070656e6428247372632e6368696c6472656e28277370616e27292e636c6f6e652829293b0d0a0924646573742e617070656e6428247372632e6368696c6472656e2827696d6727292e636c6f6e652829293b0d0a7d0d0a0d0a66756e6374696f6e20636f707944617461546f54726173682824737263290d0a7b0d0a09766172202474656d705f6c69203d202428646f63756d656e742e637265617465456c656d656e7428276c692729293b0d0a090d0a09636f70794461746128247372632c202474656d705f6c69293b0d0a090d0a092f2f20696e6974206e6577206974656d20617320647261676761626c650d0a09696e697454726173684974656d282474656d705f6c69293b0d0a090d0a092f2f20617070656e6420696d706f72745f66696c6520746f2074726173680d0a092428272366696c655f74726173685f66696c657327292e617070656e64282474656d705f6c69293b0d0a090d0a09636c6561724f626a2824737263293b0d0a7d0d0a0d0a66756e6374696f6e206372656174655468756d627328290d0a7b0d0a0974656d705f7468756d626c6573735f6974656d73203d206765745468756d626c6573734974656d7328293b0d0a090d0a0968616e646c655468756d626c6573734974656d7328293b0d0a7d0d0a0d0a66756e6374696f6e2064656c6574654974656d28246f626a290d0a7b0d0a09246f626a2e666164654f75742827736c6f77272c2066756e6374696f6e2829207b20242874686973292e72656d6f766528293b207d20290d0a7d0d0a0d0a66756e6374696f6e2064726f704974656d546f496d706f727446696c6528652c207569290d0a7b0d0a097661722074656d705f7479706509090909093d20242874686973292e6368696c6472656e28273a68656164657227292e65712830292e7465787428292e7265706c616365282f5b3a5c735d2f672c202727293b0d0a09766172202474656d705f646573745f686561646572093d20242874686973292e6368696c6472656e28273a68656164657227292e65712830292e636c6f6e6528293b0d0a09766172202474656d705f646573745f706172656e74093d206e756c6c3b0d0a09766172202474656d705f64657374090909093d206e756c6c3b0d0a09766172202474656d705f73726320090909093d2075692e647261676761626c653b0d0a090d0a0976617220646573745f69735f6e657709093d20242874686973292e706172656e747328272366696c655f6e657727292e6c656e677468203e20303b0d0a09766172207372635f69735f7472617368093d2075692e647261676761626c652e706172656e747328272366696c655f747261736827292e6c656e677468203e20303b0d0a090d0a092474656d705f646573745f706172656e74203d20646573745f69735f6e6577203f20242874686973292e706172656e747328276c6927292e65712830292e636c6f6e652829203a20242874686973292e706172656e747328276c6927292e65712830293b0d0a092474656d705f64657374090909093d202474656d705f646573745f706172656e742e6368696c6472656e282764697627292e65712830292e6368696c6472656e28276469765b6e616d653d27202b2074656d705f74797065202b20275d27292e65712830293b0d0a090d0a0969662028646573745f69735f6e6577290d0a097b0d0a09092f2f20617070656e6420636c6f6e6520696e2066696c655f696d706f7274206c6973740d0a09092428272366696c655f696d706f7274203e20756c27292e65712830292e617070656e64282474656d705f646573745f706172656e74293b0d0a09092f2f2073657420696d706f72745f6f626a656374206e616d650d0a09092474656d705f646573742e7369626c696e677328277027292e65712830292e74657874282474656d705f7372632e6368696c6472656e28277370616e27292e65712830292e746578742829293b0d0a097d0d0a090d0a092474656d705f646573742e656d70747928293b0d0a092f2f20636f7079206461746120696e746f206e657720696d706f72745f66696c650d0a09636f707944617461282474656d705f7372632c202474656d705f64657374293b0d0a092f2f20636f70792068656164657220696e746f20696d706f72745f66696c6520286974207761732064656c65746564207768696c6520656d7074792d696e67290d0a092474656d705f646573742e6368696c6472656e2827696e7075743a6c61737427292e6166746572282474656d705f646573745f686561646572293b0d0a090d0a0969662028646573745f69735f6e6577290d0a0909696e69744974656d282474656d705f646573745f706172656e742e6368696c6472656e282764697627292e6571283029293b0d0a090d0a09636865636b4974656d282474656d705f646573745f706172656e742e6368696c6472656e28276469765b636c6173732a3d22696d706f72745f6f626a656374225d27292e6571283029293b0d0a0d0a09696620287372635f69735f7472617368290d0a097b0d0a09092f2f2064656c657465207472617368206974656d0d0a090964656c6574654974656d282474656d705f737263293b0d0a097d0d0a09656c73650d0a097b0d0a0909636c6561724f626a282474656d705f737263293b0d0a0909636865636b4974656d282474656d705f737263293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e206765745468756d626c6573734974656d7328290d0a7b0d0a097661722074656d705f726573756c74203d206e657720417272617928293b0d0a090d0a092474656d705f6974656d5f636f6e7461696e65722e6368696c6472656e28276c6927292e656163682866756e6374696f6e28696e6465782c206974656d290d0a097b0d0a09096966202824286974656d292e6368696c6472656e282764697627292e65712830292e6368696c6472656e28276469763a5b6e616d653d22736d616c6c225d27292e65712830292e0d0a09090909096368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c2829203d3d20274e6f6e6527290d0a09090974656d705f726573756c742e707573682824286974656d292e6368696c6472656e282764697627292e6571283029293b0d0a097d293b0d0a090d0a0972657475726e2074656d705f726573756c743b0d0a7d0d0a0d0a66756e6374696f6e2068616e646c655468756d626c6573734974656d7328290d0a7b0d0a096966202874656d705f7468756d626c6573735f6974656d732e6c656e677468203e2030290d0a097b0d0a09096966202874656d705f63726f705f61706920213d206e756c6c290d0a09090974656d705f63726f705f6170692e64657374726f7928293b0d0a0d0a09092474656d705f63726f702e617474722827737263272c2074656d705f70617468202b20272f27202b2074656d705f7468756d626c6573735f6974656d735b305d2e6368696c6472656e28276469763a5b6e616d653d226d656469756d225d27292e65712830292e0d0a09090909090909090909090909096368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c2829293b0d0a09090d0a09092474656d705f6469616c6f672e6469616c6f6728276f70656e27293b0d0a09090d0a090974656d705f63726f705f617069203d20242e4a63726f7028272367616c6c6572795f63726f70272c207b2068616e646c6573203a2074727565207d293b0d0a09090d0a09092f2a0d0a0909766172202474656d705f63726f70203d202428272367616c6c6572795f63726f7027293b0d0a09090d0a09092474656d705f63726f702e617474722827737263272c2074656d705f70617468202b20272f27202b20242874656d705f6e6f5f7468756d625f6c697374292e6368696c6472656e282764697627292e65712830292e6368696c6472656e28276469763a5b6e616d653d226d656469756d225d27292e65712830292e6368696c6472656e28277370616e27292e65712830292e746578742829293b0d0a09090d0a09092474656d705f63726f702e4a63726f70280d0a09097b0d0a09090968616e646c6573203a20747275650d0a09097d293b0d0a09092a2f0d0a097d0d0a7d0d0a0d0a66756e6374696f6e20696e69744974656d28246f626a290d0a7b0d0a096966202821246f626a2e686173436c6173732827696d706f72745f6f626a6563742729290d0a0909246f626a2e616464436c6173732827696d706f72745f6f626a65637427293b0d0a09246f626a2e6368696c6472656e28276469763a6e6f74285b636c6173732a3d22696d706f72745f66696c65225d2927292e616464436c6173732827696d706f72745f66696c6527293b0d0a090d0a09246f626a2e66696e6428272e696d706f72745f66696c6527292e64726f707061626c65280d0a09097b0d0a0909096163636570743a20272e696d706f72745f66696c652c202e74726173685f66696c65272c0d0a09090964726f70093a2064726f704974656d546f496d706f727446696c650d0a09097d293b0d0a09246f626a2e61646428272e696d706f72745f66696c6527292e647261676761626c65280d0a09097b0d0a09090968656c7065723a2027636c6f6e65272c200d0a0909097265766572743a2027696e76616c6964272c200d0a090909637572736f723a20276d6f7665272c200d0a09097d293b0d0a7d0d0a0d0a66756e6374696f6e20696e697454726173684974656d28246f626a290d0a7b0d0a096966202821246f626a2e686173436c617373282774726173685f66696c652729290d0a097b0d0a0909246f626a2e616464436c617373282774726173685f66696c6527293b0d0a0909246f626a2e647261676761626c65280d0a09097b0d0a09090968656c7065723a2027636c6f6e65272c200d0a0909097265766572743a2027696e76616c6964272c200d0a090909637572736f723a20276d6f7665272c200d0a09097d293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e207375626d6974466f726d28290d0a7b0d0a097661722074656d705f786d6c203d2027273b0d0a090d0a0974656d705f786d6c202b3d20273c6c6973743e5c6e273b0d0a090d0a092f2f20636f6e76657274206974656d7320696e746f20786d6c0d0a092474656d705f6974656d5f636f6e7461696e65722e6368696c6472656e28276c6927292e656163682866756e6374696f6e2028696e6465782c206f626a290d0a097b0d0a090974656d705f786d6c202b3d20223c6974656d20747970653d5c2264696374696f6e6172795c223e3c64696374696f6e6172793e5c6e223b0d0a09090d0a090924286f626a292e6368696c6472656e282764697627292e65712830292e6368696c6472656e28276469763a5b636c6173732a3d22696d706f72745f66696c65225d27292e656163682866756e6374696f6e2028696e6465782c206f626a290d0a09097b0d0a0909090974656d705f786d6c202b3d20273c6974656d206b65793d2227202b2024286f626a292e6174747228276e616d652729202b20272220747970653d5c2264696374696f6e6172795c223e5c6e270d0a0909090974656d705f786d6c202b3d20223c64696374696f6e6172793e5c6e223b0d0a090909090d0a090909092f2f206164642066696c656e616d650d0a0909090974656d705f786d6c202b3d20273c6974656d206b65793d2266696c656e616d65223e5c6e270d0a0909090974656d705f786d6c202b3d20273c215b434441544127202b20275b27202b2024286f626a292e6368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c2829202b20275d27202b20275d3e273b0d0a0909090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0d0a090909092f2f206164642063726f702d646174610d0a0909090974656d705f786d6c202b3d20273c6974656d206b65793d2263726f70223e270d0a0909090974656d705f786d6c202b3d20273c215b434441544127202b20275b27202b2024286f626a292e6368696c6472656e2827696e7075745b6e616d653d2263726f70225d27292e65712830292e76616c2829202b20275d27202b20275d3e273b0d0a0909090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0d0a090909090d0a0909090974656d705f786d6c202b3d20273c2f64696374696f6e6172793e5c6e273b0d0a0909090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0d0a09097d293b0d0a09090d0a090974656d705f786d6c202b3d20273c2f64696374696f6e6172793e3c2f6974656d3e5c6e273b0d0a097d293b0d0a090d0a0974656d705f786d6c202b3d20273c2f6c6973743e5c6e273b0d0a090d0a0924282723696d706f72745f666f726d203e20696e7075743a68696464656e27292e76616c2874656d705f786d6c293b0d0a090d0a0972657475726e20747275653b0d0a7d0d0a0d0a242827646f63756d656e7427292e72656164792866756e6374696f6e2829200d0a7b0d0a092474656d705f6469616c6f6709090909093d202428272367616c6c6572795f6469616c6f6727293b0d0a092474656d705f6974656d5f636f6e7461696e6572093d202428272366696c655f696d706f7274203e20756c3a6e6f74285b69645d2927293b0d0a0974656d705f70617468200909090909093d2024282723696d706f72745f6672616d65203e20696e7075743a68696464656e27292e65712830292e76616c28293b0d0a090d0a092428272366696c655f747261736827292e64726f707061626c65280d0a097b200d0a09096163636570743a20222e696d706f72745f6f626a6563742c202e696d706f72745f66696c65222c200d0a0909616374697665436c6173733a202764726f707061626c652d616374697665272c200d0a0909686f766572436c6173733a202764726f707061626c652d686f766572272c0d0a090964726f703a2066756e6374696f6e28652c207569290d0a0909097b200d0a090909096966202875692e647261676761626c652e706172656e747328272366696c655f696d706f727427292e6c656e677468290d0a090909097b0d0a09090909092f2f20636f7079206120636f6d706c65746520696d706f72745f6f626a65637420746f2074726173680d0a09090909096966202875692e647261676761626c652e686173436c6173732827696d706f72745f6f626a6563742729290d0a09090909097b0d0a09090909090975692e647261676761626c652e6368696c6472656e28272e696d706f72745f66696c653a6e6f74285b636c6173732a3d2275692d647261676761626c652d64697361626c6564225d2927292e656163682866756e6374696f6e28696e6465782c206f626a290d0a090909090909097b0d0a0909090909090909636f707944617461546f54726173682824286f626a29293b0d0a090909090909097d293b0d0a09090909097d0d0a09090909092f2f20636f707920612073696e676c6520696d706f72745f66696c6520746f2074726173680d0a0909090909656c73650d0a09090909097b0d0a090909090909636f707944617461546f54726173682875692e647261676761626c65293b0d0a09090909097d0d0a09090909090d0a0909090909636865636b4974656d2875692e647261676761626c65293b0d0a090909097d0d0a0909097d0d0a097d293b0d0a092f2f2064726f7020696d706f72745f66696c65206174206e65772d6f626a6563740d0a092428272366696c655f6e6577203e206c69203e20646976203e206469765b6e616d655d27292e64726f707061626c65280d0a097b0d0a09096163636570743a20272e696d706f72745f66696c652c202e74726173685f66696c65272c0d0a090964726f70093a2064726f704974656d546f496d706f727446696c650d0a097d293b0d0a090d0a092428272e696d706f72745f6f626a65637427292e656163682866756e6374696f6e28696e6465782c206f626a290d0a097b0d0a0909696e69744974656d2824286f626a29290d0a0909636865636b4974656d2824286f626a29293b0d0a097d293b0d0a090d0a092474656d705f63726f70203d202428272367616c6c6572795f63726f7027293b0d0a090d0a092428272367616c6c6572795f627574746f6e5f63726f7027292e636c69636b2866756e6374696f6e28290d0a097b0d0a09097661722074656d705f636f6f726473203d2074656d705f63726f705f6170692e74656c6c53656c65637428293b0d0a09090d0a090974656d705f7468756d626c6573735f6974656d735b305d2e6368696c6472656e28276469765b6e616d653d22736d616c6c225d27292e65712830292e6368696c6472656e2827696e7075745b6e616d653d2263726f70225d27292e65712830292e0d0a09090976616c2874656d705f636f6f7264732e78202b20272c27202b2074656d705f636f6f7264732e79202b20272c27202b2074656d705f636f6f7264732e7832202b20272c27202b2074656d705f636f6f7264732e7932293b0d0a0909090d0a090974656d705f7468756d626c6573735f6974656d732e736869667428293b0d0a09090d0a09096966202874656d705f7468756d626c6573735f6974656d732e6c656e677468203e2030290d0a09090968616e646c655468756d626c6573734974656d7328293b0d0a0909656c73650d0a09097b0d0a090909696620282474656d705f6469616c6f672e6469616c6f67282769734f70656e2729290d0a090909092474656d705f6469616c6f672e6469616c6f672827636c6f736527293b0d0a09097d0d0a097d293b0d0a090d0a092474656d705f6469616c6f672e6469616c6f67280d0a097b0d0a09096175746f4f70656e3a2066616c73652c0d0a0909686569676874093a203730302c0d0a09096d6f64616c09093a20747275652c0d0a09097469746c6509093a202743726f70205468756d62272c0d0a0909776964746809093a203835300d0a097d293b0d0a7d293b</data></item> 
     3574<data content_type="application/x-javascript" filename="import.js" type="file">766172202474656d705f6469616c6f6709090909093d206e756c6c3b0d0a766172202474656d705f6974656d5f636f6e7461696e6572093d206e756c6c3b0d0a7661722074656d705f656d7074795f696d67090909093d2027656d7074792e706e67273b0d0a7661722074656d705f6e6f5f7468756d625f6c69737409093d206e756c6c3b0d0a7661722074656d705f6e6f745f617661696c61626c6509093d20276e6f7420617661696c61626c65273b0d0a7661722074656d705f70617468090909090909093d206e756c6c3b0d0a7661722074656d705f7468756d626c6573735f6974656d73093d206e756c6c3b0d0a0d0a7661722074656d705f63726f705f61706909090909093d206e756c6c3b0d0a766172202474656d705f63726f700909090909093d206e756c6c3b0d0a0d0a66756e6374696f6e20636865636b4974656d28246f626a290d0a7b0d0a0969662028246f626a2e617474722827636c61737327292e696e6465784f662827696d706f72745f66696c652729203e202d31290d0a0909246f626a203d20246f626a2e706172656e747328272e696d706f72745f6f626a65637427292e65712830293b0d0a0d0a0969662028246f626a2e617474722827636c61737327292e696e6465784f662827696d706f72745f6f626a6563742729203e202d31290d0a097b0d0a09097661722074656d705f66696c6573203d20246f626a2e6368696c6472656e28276469765b636c6173732a3d22696d706f72745f66696c65225d3a6c7428332927293b0d0a09090d0a090974656d705f66696c65732e656163682866756e6374696f6e28696e6465782c206f626a290d0a0909097b0d0a0909090976617220246f626a203d2024286f626a293b0d0a090909090d0a0909090969662028246f626a2e6368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c2829203d3d20274e6f6e6527290d0a090909097b0d0a0909090909246f626a2e647261676761626c65282764697361626c6527293b0d0a0909090909246f626a2e64726f707061626c652827656e61626c6527293b0d0a090909097d0d0a09090909656c73650d0a090909097b0d0a0909090909246f626a2e647261676761626c652827656e61626c6527293b0d0a0909090909246f626a2e64726f707061626c65282764697361626c6527293b0d0a090909097d0d0a0909097d293b0d0a0909090d0a09096966202874656d705f66696c65732e6c656e677468203d3d20246f626a2e6368696c6472656e28272e75692d647261676761626c652d64697361626c656427292e6c656e677468290d0a09097b0d0a090909246f626a2e647261676761626c65282764657374726f7927293b0d0a09090964656c6574654974656d28246f626a2e706172656e747328276c692729293b0d0a09097d0d0a097d0d0a7d0d0a0d0a66756e6374696f6e20636c6561724f626a28246f626a290d0a7b0d0a092f2f20636c6561722068696464656e2076616c7565730d0a09246f626a2e6368696c6472656e2827696e7075743a68696464656e27292e76616c28274e6f6e6527293b0d0a092f2f20636c6561722066696c656e616d650d0a09246f626a2e6368696c6472656e28277370616e27292e746578742874656d705f6e6f745f617661696c61626c65293b0d0a092f2f2073657420696d61676520746f20656d7074792d696d670d0a09246f626a2e6368696c6472656e2827696d6727292e65712830292e617474722827737263272c2074656d705f656d7074795f696d67293b0d0a7d0d0a0d0a66756e6374696f6e20636f70794461746128247372632c202464657374290d0a7b0d0a0924646573742e617070656e6428247372632e6368696c6472656e2827696e7075743a68696464656e27292e636c6f6e652829293b0d0a0924646573742e617070656e6428247372632e6368696c6472656e28277370616e27292e636c6f6e652829293b0d0a0924646573742e617070656e6428247372632e6368696c6472656e2827696d6727292e636c6f6e652829293b0d0a7d0d0a0d0a66756e6374696f6e20636f707944617461546f54726173682824737263290d0a7b0d0a09766172202474656d705f6c69203d202428646f63756d656e742e637265617465456c656d656e7428276c692729293b0d0a090d0a09636f70794461746128247372632c202474656d705f6c69293b0d0a090d0a092f2f20696e6974206e6577206974656d20617320647261676761626c650d0a09696e697454726173684974656d282474656d705f6c69293b0d0a090d0a092f2f20617070656e6420696d706f72745f66696c6520746f2074726173680d0a092428272366696c655f74726173685f66696c657327292e617070656e64282474656d705f6c69293b0d0a090d0a09636c6561724f626a2824737263293b0d0a7d0d0a0d0a66756e6374696f6e206372656174655468756d627328290d0a7b0d0a0974656d705f7468756d626c6573735f6974656d73203d206765745468756d626c6573734974656d7328293b0d0a090d0a0968616e646c655468756d626c6573734974656d7328293b0d0a7d0d0a0d0a66756e6374696f6e2064656c6574654974656d28246f626a290d0a7b0d0a09246f626a2e666164654f75742827736c6f77272c2066756e6374696f6e2829207b20242874686973292e72656d6f766528293b207d20290d0a7d0d0a0d0a66756e6374696f6e2064726f704974656d546f496d706f727446696c6528652c207569290d0a7b0d0a097661722074656d705f7479706509090909093d20242874686973292e6368696c6472656e28273a68656164657227292e65712830292e7465787428292e7265706c616365282f5b3a5c735d2f672c202727293b0d0a09766172202474656d705f646573745f686561646572093d20242874686973292e6368696c6472656e28273a68656164657227292e65712830292e636c6f6e6528293b0d0a09766172202474656d705f646573745f706172656e74093d206e756c6c3b0d0a09766172202474656d705f64657374090909093d206e756c6c3b0d0a09766172202474656d705f73726320090909093d2075692e647261676761626c653b0d0a090d0a0976617220646573745f69735f6e657709093d20242874686973292e706172656e747328272366696c655f6e657727292e6c656e677468203e20303b0d0a09766172207372635f69735f7472617368093d2075692e647261676761626c652e706172656e747328272366696c655f747261736827292e6c656e677468203e20303b0d0a090d0a092474656d705f646573745f706172656e74203d20646573745f69735f6e6577203f20242874686973292e706172656e747328276c6927292e65712830292e636c6f6e652829203a20242874686973292e706172656e747328276c6927292e65712830293b0d0a092474656d705f64657374090909093d202474656d705f646573745f706172656e742e6368696c6472656e282764697627292e65712830292e6368696c6472656e28276469765b6e616d653d27202b2074656d705f74797065202b20275d27292e65712830293b0d0a090d0a0969662028646573745f69735f6e6577290d0a097b0d0a09092f2f20617070656e6420636c6f6e6520696e2066696c655f696d706f7274206c6973740d0a09092428272366696c655f696d706f7274203e20756c27292e65712830292e617070656e64282474656d705f646573745f706172656e74293b0d0a09092f2f2073657420696d706f72745f6f626a656374206e616d650d0a09092474656d705f646573742e7369626c696e677328277027292e65712830292e74657874282474656d705f7372632e6368696c6472656e28277370616e27292e65712830292e746578742829293b0d0a097d0d0a090d0a092474656d705f646573742e656d70747928293b0d0a092f2f20636f7079206461746120696e746f206e657720696d706f72745f66696c650d0a09636f707944617461282474656d705f7372632c202474656d705f64657374293b0d0a092f2f20636f70792068656164657220696e746f20696d706f72745f66696c6520286974207761732064656c65746564207768696c6520656d7074792d696e67290d0a092474656d705f646573742e6368696c6472656e2827696e7075743a6c61737427292e6166746572282474656d705f646573745f686561646572293b0d0a090d0a0969662028646573745f69735f6e6577290d0a0909696e69744974656d282474656d705f646573745f706172656e742e6368696c6472656e282764697627292e6571283029293b0d0a090d0a09636865636b4974656d282474656d705f646573745f706172656e742e6368696c6472656e28276469765b636c6173732a3d22696d706f72745f6f626a656374225d27292e6571283029293b0d0a0d0a09696620287372635f69735f7472617368290d0a097b0d0a09092f2f2064656c657465207472617368206974656d0d0a090964656c6574654974656d282474656d705f737263293b0d0a097d0d0a09656c73650d0a097b0d0a0909636c6561724f626a282474656d705f737263293b0d0a0909636865636b4974656d282474656d705f737263293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e206765745468756d626c6573734974656d7328290d0a7b0d0a097661722074656d705f726573756c74203d206e657720417272617928293b0d0a090d0a092474656d705f6974656d5f636f6e7461696e65722e6368696c6472656e28276c6927292e656163682866756e6374696f6e28696e6465782c206974656d290d0a097b0d0a09096966202824286974656d292e6368696c6472656e282764697627292e65712830292e6368696c6472656e28276469763a5b6e616d653d22736d616c6c225d27292e65712830292e0d0a09090909096368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c2829203d3d20274e6f6e6527290d0a09090974656d705f726573756c742e707573682824286974656d292e6368696c6472656e282764697627292e6571283029293b0d0a097d293b0d0a090d0a0972657475726e2074656d705f726573756c743b0d0a7d0d0a0d0a66756e6374696f6e2068616e646c655468756d626c6573734974656d7328290d0a7b0d0a096966202874656d705f7468756d626c6573735f6974656d732e6c656e677468203e2030290d0a097b0d0a09096966202874656d705f63726f705f61706920213d206e756c6c290d0a09090974656d705f63726f705f6170692e64657374726f7928293b0d0a0d0a09092474656d705f63726f702e617474722827737263272c2074656d705f70617468202b20272f27202b2074656d705f7468756d626c6573735f6974656d735b305d2e6368696c6472656e28276469763a5b6e616d653d226d656469756d225d27292e65712830292e0d0a09090909090909090909090909096368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c2829293b0d0a09090d0a09092474656d705f6469616c6f672e6469616c6f6728276f70656e27293b0d0a09090d0a090974656d705f63726f705f617069203d20242e4a63726f7028272367616c6c6572795f63726f70272c207b2068616e646c6573203a2074727565207d293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e20696e69744974656d28246f626a290d0a7b0d0a096966202821246f626a2e686173436c6173732827696d706f72745f6f626a6563742729290d0a0909246f626a2e616464436c6173732827696d706f72745f6f626a65637427293b0d0a09246f626a2e6368696c6472656e28276469763a6e6f74285b636c6173732a3d22696d706f72745f66696c65225d2927292e616464436c6173732827696d706f72745f66696c6527293b0d0a090d0a09246f626a2e66696e6428272e696d706f72745f66696c6527292e64726f707061626c65280d0a09097b0d0a0909096163636570743a20272e696d706f72745f66696c652c202e74726173685f66696c65272c0d0a09090964726f70093a2064726f704974656d546f496d706f727446696c650d0a09097d293b0d0a09246f626a2e61646428272e696d706f72745f66696c6527292e647261676761626c65280d0a09097b0d0a09090968656c7065723a2027636c6f6e65272c200d0a0909097265766572743a2027696e76616c6964272c200d0a090909637572736f723a20276d6f7665272c200d0a09097d293b0d0a7d0d0a0d0a66756e6374696f6e20696e697454726173684974656d28246f626a290d0a7b0d0a096966202821246f626a2e686173436c617373282774726173685f66696c652729290d0a097b0d0a0909246f626a2e616464436c617373282774726173685f66696c6527293b0d0a0909246f626a2e647261676761626c65280d0a09097b0d0a09090968656c7065723a2027636c6f6e65272c200d0a0909097265766572743a2027696e76616c6964272c200d0a090909637572736f723a20276d6f7665272c200d0a09097d293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e207375626d6974466f726d28290d0a7b0d0a097661722074656d705f786d6c203d2027273b0d0a090d0a0974656d705f786d6c202b3d20273c6c6973743e5c6e273b0d0a090d0a092f2f20636f6e76657274206974656d7320696e746f20786d6c0d0a092474656d705f6974656d5f636f6e7461696e65722e6368696c6472656e28276c6927292e656163682866756e6374696f6e2028696e6465782c206f626a290d0a097b0d0a090974656d705f786d6c202b3d20223c6974656d20747970653d5c2264696374696f6e6172795c223e3c64696374696f6e6172793e5c6e223b0d0a09090d0a090924286f626a292e6368696c6472656e282764697627292e65712830292e6368696c6472656e28276469763a5b636c6173732a3d22696d706f72745f66696c65225d27292e656163682866756e6374696f6e2028696e6465782c206f626a290d0a09097b0d0a0909090974656d705f786d6c202b3d20273c6974656d206b65793d2227202b2024286f626a292e6174747228276e616d652729202b20272220747970653d5c2264696374696f6e6172795c223e5c6e270d0a0909090974656d705f786d6c202b3d20223c64696374696f6e6172793e5c6e223b0d0a090909090d0a090909092f2f206164642066696c656e616d650d0a0909090974656d705f786d6c202b3d20273c6974656d206b65793d2266696c656e616d65223e5c6e270d0a0909090974656d705f786d6c202b3d20273c215b434441544127202b20275b27202b2024286f626a292e6368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c2829202b20275d27202b20275d3e273b0d0a0909090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0d0a090909092f2f206164642063726f702d646174610d0a0909090974656d705f786d6c202b3d20273c6974656d206b65793d2263726f70223e270d0a0909090974656d705f786d6c202b3d20273c215b434441544127202b20275b27202b2024286f626a292e6368696c6472656e2827696e7075745b6e616d653d2263726f70225d27292e65712830292e76616c2829202b20275d27202b20275d3e273b0d0a0909090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0d0a090909090d0a0909090974656d705f786d6c202b3d20273c2f64696374696f6e6172793e5c6e273b0d0a0909090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0d0a09097d293b0d0a09090d0a090974656d705f786d6c202b3d20273c2f64696374696f6e6172793e3c2f6974656d3e5c6e273b0d0a097d293b0d0a090d0a0974656d705f786d6c202b3d20273c2f6c6973743e5c6e273b0d0a090d0a0924282723696d706f72745f666f726d203e20696e7075743a68696464656e27292e76616c2874656d705f786d6c293b0d0a090d0a0972657475726e20747275653b0d0a7d0d0a0d0a242827646f63756d656e7427292e72656164792866756e6374696f6e2829200d0a7b0d0a092474656d705f6469616c6f6709090909093d202428272367616c6c6572795f6469616c6f6727293b0d0a092474656d705f6974656d5f636f6e7461696e6572093d202428272366696c655f696d706f7274203e20756c3a6e6f74285b69645d2927293b0d0a0974656d705f70617468200909090909093d2024282723696d706f72745f6672616d65203e20696e7075743a68696464656e27292e65712830292e76616c28293b0d0a090d0a092428272366696c655f747261736827292e64726f707061626c65280d0a097b200d0a09096163636570743a20222e696d706f72745f6f626a6563742c202e696d706f72745f66696c65222c200d0a0909616374697665436c6173733a202764726f707061626c652d616374697665272c200d0a0909686f766572436c6173733a202764726f707061626c652d686f766572272c0d0a090964726f703a2066756e6374696f6e28652c207569290d0a0909097b200d0a090909096966202875692e647261676761626c652e706172656e747328272366696c655f696d706f727427292e6c656e677468290d0a090909097b0d0a09090909092f2f20636f7079206120636f6d706c65746520696d706f72745f6f626a65637420746f2074726173680d0a09090909096966202875692e647261676761626c652e686173436c6173732827696d706f72745f6f626a6563742729290d0a09090909097b0d0a09090909090975692e647261676761626c652e6368696c6472656e28272e696d706f72745f66696c653a6e6f74285b636c6173732a3d2275692d647261676761626c652d64697361626c6564225d2927292e656163682866756e6374696f6e28696e6465782c206f626a290d0a090909090909097b0d0a0909090909090909636f707944617461546f54726173682824286f626a29293b0d0a090909090909097d293b0d0a09090909097d0d0a09090909092f2f20636f707920612073696e676c6520696d706f72745f66696c6520746f2074726173680d0a0909090909656c73650d0a09090909097b0d0a090909090909636f707944617461546f54726173682875692e647261676761626c65293b0d0a09090909097d0d0a09090909090d0a0909090909636865636b4974656d2875692e647261676761626c65293b0d0a090909097d0d0a0909097d0d0a097d293b0d0a092f2f2064726f7020696d706f72745f66696c65206174206e65772d6f626a6563740d0a092428272366696c655f6e6577203e206c69203e20646976203e206469765b6e616d655d27292e64726f707061626c65280d0a097b0d0a09096163636570743a20272e696d706f72745f66696c652c202e74726173685f66696c65272c0d0a090964726f70093a2064726f704974656d546f496d706f727446696c650d0a097d293b0d0a090d0a092428272e696d706f72745f6f626a65637427292e656163682866756e6374696f6e28696e6465782c206f626a290d0a097b0d0a0909696e69744974656d2824286f626a29290d0a0909636865636b4974656d2824286f626a29293b0d0a097d293b0d0a090d0a092474656d705f63726f70203d202428272367616c6c6572795f63726f7027293b0d0a090d0a092428272367616c6c6572795f627574746f6e5f63726f7027292e636c69636b2866756e6374696f6e28290d0a097b0d0a09097661722074656d705f636f6f726473203d2074656d705f63726f705f6170692e74656c6c53656c65637428293b0d0a09090d0a090974656d705f7468756d626c6573735f6974656d735b305d2e6368696c6472656e28276469765b6e616d653d22736d616c6c225d27292e65712830292e6368696c6472656e2827696e7075745b6e616d653d2263726f70225d27292e65712830292e0d0a09090976616c2874656d705f636f6f7264732e78202b20272c27202b2074656d705f636f6f7264732e79202b20272c27202b2074656d705f636f6f7264732e7832202b20272c27202b2074656d705f636f6f7264732e7932293b0d0a0909090d0a090974656d705f7468756d626c6573735f6974656d732e736869667428293b0d0a09090d0a09096966202874656d705f7468756d626c6573735f6974656d732e6c656e677468203e2030290d0a09090968616e646c655468756d626c6573734974656d7328293b0d0a0909656c73650d0a09097b0d0a090909696620282474656d705f6469616c6f672e6469616c6f67282769734f70656e2729290d0a090909092474656d705f6469616c6f672e6469616c6f672827636c6f736527293b0d0a09097d0d0a097d293b0d0a090d0a092474656d705f6469616c6f672e6469616c6f67280d0a097b0d0a09096175746f4f70656e3a2066616c73652c0d0a0909686569676874093a203730302c0d0a09096d6f64616c09093a20747275652c0d0a09097469746c6509093a202743726f70205468756d62272c0d0a0909776964746809093a203835300d0a097d293b0d0a7d293b</data></item> 
    46273575<item key="id"><![CDATA[import.js]]></item> 
    46283576<item key="mandatory" type="int">0</item> 
    46293577<item key="multilang" type="int">0</item> 
    46303578<item key="name"><![CDATA[import.js]]></item> 
     3579<item key="repetitive" type="int">0</item> 
     3580<item key="type"><![CDATA[resource]]></item> 
     3581</dictionary> 
     3582</item> 
     3583<item type="dictionary"><dictionary> 
     3584<item key="custom"> 
     3585<data content_type="application/x-javascript" filename="handleImageImport.js" type="file">766172202474656d705f6469616c6f67093d206e756c6c3b0d0a766172202474656d705f7461626c6509093d206e756c6c3b0d0a0d0a66756e6374696f6e206368616e676544696d656e73696f6e53657474696e67732869676e6f726553657474696e6773290d0a7b0d0a0976617220747273203d202474656d705f7461626c652e66696e64282774723a677428302927293b0d0a0976617220746473203d206e756c6c3b0d0a0976617220247464203d206e756c6c3b0d0a097661722074656d705f74657874203d2027273b0d0a090d0a09666f7220287661722069203d20303b2069203c207472732e6c656e6774683b20692b2b290d0a097b0d0a0909746473203d2024287472735b695d292e6368696c6472656e282774643a67742830293a6c7428332927293b0d0a09090d0a0909666f722028766172206a203d20303b206a203c207464732e6c656e6774683b206a2b2b290d0a09097b0d0a090909247464203d2024287464735b6a5d293b0d0a0909090d0a090909696620282474642e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f6e65656466756c225d27292e76616c2829203d3d20273127290d0a0909097b0d0a090909096966202869676e6f726553657474696e6773290d0a09090909092474642e6368696c6472656e2827656d27292e7265706c6163655769746828273c7370616e3e27202b202474642e6368696c6472656e2827696e7075745b6e616d653d226f7269675f64696d225d27292e76616c28292e73706c697428272c27292e6a6f696e28272078202729202b20273c2f7370616e3e27293b0d0a09090909656c73650d0a09090909092474642e6368696c6472656e28277370616e27292e7265706c6163655769746828273c656d3e27202b202474642e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f64696d225d27292e76616c28292e73706c697428272c27292e6a6f696e28272078202729202b20273c2f656d3e27293b0d0a0909097d0d0a09097d0d0a097d0d0a7d0d0a0d0a242827646f63756d656e7427292e72656164792866756e6374696f6e2829200d0a7b0d0a092474656d705f63726f702009093d202428272367616c6c6572795f63726f7027293b0d0a092474656d705f6469616c6f67093d202428272367616c6c6572795f6469616c6f6727293b0d0a092474656d705f7461626c6509093d202428272367616c6c6572795f696d706f72745f7461626c6527293b0d0a090d0a092428272367616c6c6572795f69676e6f72655f64696d27292e6368616e67652866756e6374696f6e28290d0a097b0d0a09096368616e676544696d656e73696f6e53657474696e677328746869732e636865636b6564293b0d0a097d293b0d0a092428272367616c6c6572795f627574746f6e5f63726f7027292e636c69636b2866756e6374696f6e28290d0a097b0d0a09097661722074656d705f636f6f726473203d2074656d705f63726f705f6170692e74656c6c53656c65637428293b0d0a09090d0a090974656d705f7468756d626c6573735f6974656d735b305d2e6368696c6472656e28276469765b6e616d653d22736d616c6c225d27292e65712830292e6368696c6472656e2827696e7075745b6e616d653d2263726f70225d27292e65712830292e0d0a09090976616c2874656d705f636f6f7264732e78202b20272c27202b2074656d705f636f6f7264732e79202b20272c27202b2074656d705f636f6f7264732e7832202b20272c27202b2074656d705f636f6f7264732e7932293b0d0a0909090d0a090974656d705f7468756d626c6573735f6974656d732e736869667428293b0d0a09090d0a09096966202874656d705f7468756d626c6573735f6974656d732e6c656e677468203e2030290d0a09090968616e646c655468756d626c6573734974656d7328293b0d0a0909656c73650d0a09097b0d0a090909696620282474656d705f6469616c6f672e6469616c6f67282769734f70656e2729290d0a090909092474656d705f6469616c6f672e6469616c6f672827636c6f736527293b0d0a09097d0d0a097d293b0d0a090d0a092474656d705f6469616c6f672e6469616c6f67280d0a097b0d0a09096175746f4f70656e3a2066616c73652c0d0a0909686569676874093a203730302c0d0a09096d6f64616c09093a20747275652c0d0a09097469746c6509093a202743726f70205468756d62272c0d0a0909776964746809093a203835300d0a097d293b0d0a7d293b</data></item> 
     3586<item key="id"><![CDATA[handleImageImport.js]]></item> 
     3587<item key="mandatory" type="int">0</item> 
     3588<item key="multilang" type="int">0</item> 
     3589<item key="name"><![CDATA[handleImageImport.js]]></item> 
    46313590<item key="repetitive" type="int">0</item> 
    46323591<item key="type"><![CDATA[resource]]></item> 
     
    51354094<item type="dictionary"><dictionary> 
    51364095<item key="custom"><![CDATA[# --// BO ZMSGallery_handleImgageImport //-- 
    5137 def checkFileDict(dest_folder, file_dict): 
    5138         temp_max_width = context.getObjProperty('galleryWidth', REQUEST) 
     4096def calcResizeDim(src_width, src_height, dest_width = None, dest_height = None): 
     4097        if (dest_width is None): 
     4098                dest_width = src_width 
     4099        if (dest_height is None): 
     4100                dest_height = src_height 
     4101                 
     4102        if src_width > dest_width: src_height = max(src_height * dest_width / src_width, 1); src_width = dest_width 
     4103        if src_height > dest_height: src_width = max(src_width * dest_height / src_height, 1); src_height = dest_height 
     4104         
     4105        return (src_width, src_height) 
     4106 
     4107def checkFileDict(dest_folder, file_dict, auto_resize = False): 
     4108        temp_max_width_medium = context.getObjProperty('galleryWidth', REQUEST) 
     4109        temp_max_width_small    = context.getObjProperty('galleryThumbsMaxWidth', REQUEST) 
     4110        temp_max_height_small   = context.getObjProperty('galleryThumbsMaxHeight', REQUEST) 
    51394111         
    51404112        for one_key in file_dict.keys(): 
    5141                 if (file_dict[one_key]['medium'] is None): 
    5142                         if (file_dict[one_key]['large'] is None): 
    5143                                 file_dict[one_key]['insufficient'] = True 
     4113                if ((not file_dict[one_key]['small'].has_key('filename')) or 
     4114                                (file_dict[one_key]['small']['width'] > temp_max_width_small) or  
     4115                                (file_dict[one_key]['small']['height'] > temp_max_height_small)): 
     4116                        file_dict[one_key]['small']['crop_needful'] = True 
     4117                        file_dict[one_key]['small']['resize_dim']               = '%s,%s'%(temp_max_width_small, temp_max_height_small) 
     4118                        file_dict[one_key]['icon'] = 'icon_info.png' 
     4119                        file_dict[one_key]['info'].append('small will be croped in next step') 
     4120                         
     4121                if (not file_dict[one_key]['medium'].has_key('filename')): 
     4122                        if (not file_dict[one_key]['large'].has_key('filename')): 
     4123                                file_dict[one_key]['icon']                                      = 'icon_cross.png' 
     4124                                file_dict[one_key]['insufficient']      = True 
     4125                                file_dict[one_key]['info']                                      = ['image won\'t be imported because medium and large image are not available'] 
    51444126                        else: 
    51454127                                # create medium image 
     
    51514133                                file_dict[one_key]['medium']['width']                                   = temp_image.width 
    51524134                                file_dict[one_key]['medium']['height']                          = temp_image.height 
     4135                                file_dict[one_key]['medium']['orig_dim']                        = '%s,%s'%(temp_image.width, temp_image.height) 
    51534136                                file_dict[one_key]['medium']['auto_created']    = True 
     4137                                file_dict[one_key]['icon'] = 'icon_info.png' 
     4138                                file_dict[one_key]['info'].append('medium was generated from large') 
    51544139                 
    5155                 if (file_dict[one_key]['medium'] is not None): 
    5156                         # if medium-image-width unequal max_width then resize medium-image 
    5157                         if (file_dict[one_key]['medium']['width'] != temp_max_width): 
     4140                # if medium-image-width larger then max_width then resize medium-image 
     4141                if ((file_dict[one_key]['medium'].has_key('filename')) and  
     4142                                (file_dict[one_key]['medium']['width'] > temp_max_width_medium)): 
     4143                        file_dict[one_key]['icon'] = 'icon_info.png' 
     4144                         
     4145                        if (auto_resize): 
    51584146                                temp_info = context.ZMSGallery_resize(dest_folder, file_dict[one_key]['medium']['filename'], temp_max_width, replace_source = True) 
    5159                                 file_dict[one_key]['medium']['width']           = temp_info[1] 
    5160                                 file_dict[one_key]['medium']['height']  = temp_info[2] 
    5161                                 file_dict[one_key]['medium']['resized'] = True 
     4147                                file_dict[one_key]['medium']['width']                                   = temp_info[1] 
     4148                                file_dict[one_key]['medium']['height']                          = temp_info[2] 
     4149                                file_dict[one_key]['medium']['orig_dim']                        = '%s,%s'%(temp_info[1], temp_info[2]) 
     4150                                file_dict[one_key]['medium']['auto_resized']    = True 
     4151                                file_dict[one_key]['info'].append('medium was resized') 
     4152                        else: 
     4153                                file_dict[one_key]['medium']['resize_needful']= True 
     4154                                file_dict[one_key]['medium']['resize_dim']              = '%s,%s'%calcResizeDim(file_dict[one_key]['medium']['width'], 
     4155                                                                                                                                                                                                                                                                                                                        file_dict[one_key]['medium']['height'], 
     4156                                                                                                                                                                                                                                                                                                                        temp_max_width_medium) 
     4157                                file_dict[one_key]['info'].append('medium will be resized') 
    51624158         
    51634159        return file_dict 
     
    51884184        temp_preview_data = None 
    51894185         
    5190         temp_keys = file_dict.keys() 
     4186        temp_keys = filter(lambda x: x in ('small', 'medium', 'large'), file_dict.keys()) 
    51914187        temp_keys.sort(lambda x,y: convertKeyToInt(x) - convertKeyToInt(y), reverse = True) 
    51924188         
    51934189        for one_key in temp_keys: 
    5194                 if (file_dict[one_key] is not None): 
     4190                if (file_dict[one_key].has_key('filename')): 
    51954191                        createTempImage(dest_folder, file_dict[one_key]['filename'], file_dict[one_key]['img_obj']['data']) 
    51964192                 
     
    52494245                # create empty dict entry 
    52504246                if (not temp_file_dict.has_key(temp_short_name)): 
    5251                         temp_file_dict[temp_short_name] = {'small' : None, 'medium' : None, 'large' : None} 
     4247                        temp_file_dict[temp_short_name] = {} 
     4248                        temp_file_dict[temp_short_name]['small']        = {'orig_dim' : 'null', 'resize_dim' : 'null'} 
     4249                        temp_file_dict[temp_short_name]['medium']       = {'orig_dim' : 'null', 'resize_dim' : 'null'} 
     4250                        temp_file_dict[temp_short_name]['large']        = {'orig_dim' : 'null', 'resize_dim' : 'null'} 
     4251                         
     4252                        temp_file_dict[temp_short_name]['icon'] = 'icon_tick.png' 
     4253                        temp_file_dict[temp_short_name]['info'] = [] 
    52524254                 
    52534255                # create temp-image  
     
    52614263                        temp_filename   = context.re_sub(r'(\.(jpg|png|gif))', r'_large\1', one_file['filename']) 
    52624264                 
    5263                 temp_file_dict[temp_short_name][temp_type] = {'filename'                : temp_filename, 
    5264                                                                                                                                                                                                         'height'                        : temp_image.getHeight(), 
    5265                                                                                                                                                                                                         'width'                         : temp_image.getWidth(), 
    5266                                                                                                                                                                                                         'img_obj'               : one_file} 
     4265                temp_file_dict[temp_short_name][temp_type]['filename']  = temp_filename 
     4266                temp_file_dict[temp_short_name][temp_type]['height']            = temp_image.getHeight() 
     4267                temp_file_dict[temp_short_name][temp_type]['width']             = temp_image.getWidth() 
     4268                temp_file_dict[temp_short_name][temp_type]['img_obj']   = one_file 
     4269                temp_file_dict[temp_short_name][temp_type]['orig_dim']  = '%s,%s'%(temp_file_dict[temp_short_name][temp_type]['width'],  
     4270                                                                                                                                                                                                                                                                                                temp_file_dict[temp_short_name][temp_type]['height']) 
    52674271         
    52684272        for one_key in temp_file_dict.keys(): 
     
    53204324        temp_result = '' 
    53214325         
    5322         if (len(files_dict) > 0): 
    5323                 for one_key in files_dict.keys(): 
    5324                         if (files_dict[one_key].has_key('insufficient') and files_dict[one_key]['insufficient']): 
    5325                                 temp_tr_style = ' style="background-color:f77"' 
     4326        for one_key in files_dict.keys(): 
     4327                temp_result += '<tr>\n<td>\n' 
     4328                temp_result += '<img src="%s/%s" width="25" height="25" />\n'%(img_path, files_dict[one_key]['preview_id']) 
     4329                temp_result += '<strong>%s</strong>\n'%one_key 
     4330                temp_result += '</td>\n' 
     4331                 
     4332                temp_key_list = filter(lambda x: x in ('small', 'medium', 'large'), files_dict[one_key].keys()) 
     4333                # sort keys in order small-medium-large 
     4334                temp_key_list.sort(lambda x,y: convertKeyToInt(x) - convertKeyToInt(y)) 
     4335                 
     4336                for other_key in temp_key_list: 
     4337                        temp_result += '<td>' 
     4338                        temp_result += '<input type="hidden" name="filename" value="%s" />'%(files_dict[one_key][other_key].has_key('filename') and files_dict[one_key][other_key]['filename'] or 'null') 
     4339                        temp_result += '<input type="hidden" name="auto_created" value="%i" />'%(files_dict[one_key][other_key].has_key('auto_created') and 1 or 0) 
     4340                        temp_result += '<input type="hidden" name="auto_resized" value="%i" />'%(files_dict[one_key][other_key].has_key('auto_resized') and 1 or 0) 
     4341                        temp_result += '<input type="hidden" name="crop_needful" value="%i" />'%(files_dict[one_key][other_key].has_key('crop_needful') and 1 or 0) 
     4342                        temp_result += '<input type="hidden" name="resize_needful" value="%i" />'%(files_dict[one_key][other_key].has_key('resize_needful') and 1 or 0) 
     4343                        temp_result += '<input type="hidden" name="orig_dim" value="%s" />'%files_dict[one_key][other_key]['orig_dim'] 
     4344                        temp_result += '<input type="hidden" name="resize_dim" value="%s" />'%files_dict[one_key][other_key]['resize_dim'] 
     4345                         
     4346                        if (files_dict[one_key][other_key].has_key('filename')): 
     4347                                if (files_dict[one_key][other_key].has_key('resize_needful')): 
     4348                                        temp_resize_dim = files_dict[one_key][other_key]['resize_dim'].split(',') 
     4349                                        temp_result += '<em>%s x %s</em>'%(temp_resize_dim[0], temp_resize_dim[1]) 
     4350                                else: 
     4351                                        temp_result += '%s x %s'%(files_dict[one_key][other_key]['width'], files_dict[one_key][other_key]['height']) 
    53264352                        else: 
    5327                                 temp_tr_style = '' 
     4353                                if (other_key == 'small'): 
     4354                                        temp_result += '<em>%s x %s</em>'%(context.getObjProperty('galleryThumbsMaxWidth', REQUEST),  
     4355                                                                                                                                                                                        context.getObjProperty('galleryThumbsMaxHeight', REQUEST)) 
     4356                                else: 
     4357                                        temp_result += 'not available' 
    53284358                                 
    5329                         temp_result += '<tr%s>\n'%temp_tr_style 
    5330                         temp_result += '<td>\n' 
    5331                         temp_result += '<img src="%s/%s" width="25" height="25" />\n'%(img_path, files_dict[one_key]['preview_id']) 
    5332                         temp_result += '<strong>%s</strong>\n'%one_key 
    53334359                        temp_result += '</td>\n' 
    53344360                         
    5335                         temp_key_list = filter(lambda x: x in ('small', 'medium', 'large'), files_dict[one_key].keys()) 
    5336                         # sort keys in order small-medium-large 
    5337                         temp_key_list.sort(lambda x,y: convertKeyToInt(x) - convertKeyToInt(y)) 
    5338                          
    5339                         for other_key in temp_key_list: 
    5340                                 temp_result += '<td>\n' 
    5341                                  
    5342                                 if (files_dict[one_key][other_key] is None): 
    5343                                         temp_result += 'not available' 
    5344                                 else: 
    5345                                         temp_result += '%s x %s'%(files_dict[one_key][other_key]['width'], files_dict[one_key][other_key]['height']) 
    5346                                          
    5347                                 temp_result += '</td>\n' 
    5348                          
    5349                         temp_result += '</tr>\n' 
     4361                temp_result += '<td><img src="metaobj_manager/ZMSMediaPlayerLib.%s"'%(files_dict[one_key]['icon']) 
     4362                temp_result += (len(files_dict[one_key]['info']) > 0) and ' title="%s"'%('; '.join(files_dict[one_key]['info'])) or '' 
     4363                temp_result += '></td>' 
     4364                 
     4365                temp_result += '</tr>\n' 
    53504366 
    53514367                 
     
    54134429        #temp_path                              = createTempImages(temp_file_list) 
    54144430         
    5415         temp_result += '<table border="1" cellspacing="0" cellpadding="0">\n' 
    5416         temp_result += '<tr>\n<th>&nbsp;</th>\n<th>small</th>\n<th>medium</th>\n<th>large</th>\n</tr>\n' 
     4431        temp_result = '<script type="text/javascript">\n' 
     4432        temp_result += 'var request_url = "%s";\n'%context.absolute_url() 
     4433        temp_result += '</script>\n' 
     4434         
     4435        temp_result += '<input type="hidden" name="gallery_max_width_medium" value="%s" />'%context.getObjProperty('galleryWidth', REQUEST) 
     4436        temp_result += '<input type="hidden" name="gallery_max_width_small" value="%s" />'%context.getObjProperty('galleryThumbsMaxWidth', REQUEST) 
     4437        temp_result += '<input type="hidden" name="gallery_max_height_small" value="%s" />'%context.getObjProperty('galleryThumbsMaxHeight', REQUEST) 
     4438        temp_result += '<table border="1" cellspacing="0" cellpadding="0" id="gallery_import_table">\n' 
     4439        temp_result += '<tr>\n<th>&nbsp;</th>\n<th>small</th>\n<th>medium</th>\n<th>large</th>\n<th>&nbsp;</th>\n</tr>\n' 
    54174440        temp_result += renderFiles(checkFileDict(temp_folder, getFileDict(temp_folder, getFileList())), temp_folder.absolute_url()) 
    54184441        temp_result += '</table>\n' 
     4442        temp_result += '<input type="checkbox" id="gallery_ignore_dim" />' 
     4443        temp_result += '<label for="gallery_ignore_dim">ignore dimension settings</label>' 
    54194444         
    54204445        ''' 
     
    54664491        <script type="text/javascript" src="metaobj_manager/ZMSGallery.jcrop.js"></script> 
    54674492         
    5468         <script type="text/javascript" src="metaobj_manager/ZMSGallery.import.js"></script> 
     4493        <script type="text/javascript" src="metaobj_manager/ZMSGallery.handleImageImport.js"></script> 
    54694494         
    54704495        <link type="text/css" href="<dtml-var "ZMS_COMMON">/css/jquery/cupertino/ui.all.css" rel="stylesheet" /> 
     
    56304655<item key="multilang" type="int">0</item> 
    56314656<item key="name"><![CDATA[icon]]></item> 
     4657<item key="repetitive" type="int">0</item> 
     4658<item key="type"><![CDATA[resource]]></item> 
     4659</dictionary> 
     4660</item> 
     4661<item type="dictionary"><dictionary> 
     4662<item key="custom"> 
     4663<data content_type="image/png" filename="cross.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000002214944415438cb9593eb4e135114858989c989cfa0568986c89180c41b425b0628ad0d0826d0fb855ea480b4a5eda44da136ea0f4d7c129f0b44c5deb0d299763ad3e5ae984a2d25e1c74ece64cefaf6acb5f70c0018b84cd5d742d7ce3e775f10333a2ade57ec0f72d9ed8dd76c4e432fa02dceeca295ce428b277b20755f80d703613436b6f0ebe5cae7eae2d2bd7f80bf62e4dfa145a525443437b73b10d9bbc6a93b9ad13890cba37d3e365be3e519d39553402acd5a09516bedbe013e7e8296cdb5016804425cf6f8397587b21d03e8bdec0fe078feb95a16e6ae7659d06209a6be8ea99a9801de7f809a4aa31e0c83ba43d98a02d9bd3fe78ac942e259766e88cdc8266b84d6d5667487ecbc05f6f224cc01992c648f0f9539b35a9e9e61fda7701a16935c5e0d59b2e3f6010e3720a651999dd74a4681fd7fbf0720393ded5101340dd89cc08a1dd849926f0b0a1353fc4280e47073c9e581128e0049918429204676284079d58eb2de88ef63e3fc5c40cdeee292d30d25b40ed01825870b14965a9c3268278bcb406403b517cb283c7c8cc3a161de05a0cde2d41d4af015754d40a24fa7b0d4e2a481159e4cb0a3f1476ad5640682219c58ac381a19c5c1ad41de01d06609359b034a200469d5010a4b2d3ed37702fb3632c6be0edf577f1a0548d605fc187d80fd1b3aa1cb026d96505d5842c930ad51583d691fde1d625f06efa867c53d2196f446a1f07492f5fb990e74b7d9fef59bc28563bc6cfd0672bba4c7dbedbe140000000049454e44ae426082</data></item> 
     4664<item key="id"><![CDATA[icon_cross.png]]></item> 
     4665<item key="mandatory" type="int">0</item> 
     4666<item key="multilang" type="int">0</item> 
     4667<item key="name"><![CDATA[icon_cross.png]]></item> 
     4668<item key="repetitive" type="int">0</item> 
     4669<item key="type"><![CDATA[resource]]></item> 
     4670</dictionary> 
     4671</item> 
     4672<item type="dictionary"><dictionary> 
     4673<item key="custom"> 
     4674<data content_type="image/png" filename="information.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c0000029c4944415438cba593cb6bd4571cc53f774cac644c26310a9989368fd1a82868a189522c08c54d21523b5441a22e5c74956d155cf91f080a3e56beb0a5749aae855a9a9486cea21b99c630d5c4348fd11833c924fdcddcefbdf7eb42487cb41b3dcb2f5f3e1c38e71855e57d54f3e6217375342dc11d57174e56adb4380d28a108e1a677e1cee0d94f1ebefa6f5e75f0c595918cb572b123a1c99eb6461ad6ae016021720c159e707f7a7906a3fdb9f39f65df021cbe9ccfd8486e1cda5617dfdd5acfd49ca5b810e18392a85b432ab18ec2b332033f3f5ca68653b90b87b32b80de4bf73b45dcd0a1adf1d4f6967a7263259c13f6b435812a7f8ecd6362865dc9f5fc335fe6a7bb8569347c9abb76f4510c4082ebeb68d0d48e6403c385e7d8c822d540efc7497abb5388136cd5929f2cd1be3141d7d6869446d2071003b0de9fd8d7decc587109114182c707c78fc313648727b062b1ceb214458ccf2e72606f1bc6da132b29d8c8b636d5d7509829e1bc47bca021d077b013058647a6d1100043716e91aed466d447adab0eaa160d8a53b0ae4af09e1094fce379fead38bc7578f13871382ba801bc6705007e6a6eb94273bc16a3313428c17b5e26a478710411825812f10f78b258c69830b50ab0eed6607e92b64d7108019c72647f3b3b3f6ca26e5d2dfd47f6202238113a5a120c0dfd0de8add52656a2db230fca5fa7938da99eae4dfc969fe4fb5f47f9f6de5fa83854038af2d1f62d8c971679942f4c1bb8fd5a91ba4f7f97d172e5c6e75fee8e776eace7c1e359669f97092eb0a1b18e6d5b9a192f2d71ef875f9631b5a77203df64dfaa72f7b1eb19d45e4cef4a260fec4bd3bc7e2da03c5da830f8fb2813f9c28c31b1fedcc099ec7f6e01a0e7ab2b69557f1c0d2709951634608c2902370d72e78f8173ff3fa677d10ba83f827b59b621b90000000049454e44ae426082</data></item> 
     4675<item key="id"><![CDATA[icon_info.png]]></item> 
     4676<item key="mandatory" type="int">0</item> 
     4677<item key="multilang" type="int">0</item> 
     4678<item key="name"><![CDATA[icon_info.png]]></item> 
     4679<item key="repetitive" type="int">0</item> 
     4680<item key="type"><![CDATA[resource]]></item> 
     4681</dictionary> 
     4682</item> 
     4683<item type="dictionary"><dictionary> 
     4684<item key="custom"> 
     4685<data content_type="image/png" filename="tick.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001ab4944415438cbbd93d92e436114857be738ef626ed5185342aa865427eae82945298d1baaa7ad56ab434a0cc7a5186a8ec414942012975ad58667102fa1bafc9568c285181217ffddbfd6defbdb6b0b0008fef204ff6ea05e6be25b96ea9dbf3250ad36f2a6633dfa0f5848f82aee4706ca60033f78d485d97b37bc3756e8b6d4a8f014d9be2556ac4879e3a10ed37117a6e24e746eb7a2d25b8c1287904a7f325eb2358633a6e7b358be2ce5532d4fc69c08c41c6f95cbdde244f15801951ec178c196f59e324fdcb509ecae72e85d4c60f17dfb5a04eec6e0bfb383dd54a1cc559828b2e7536988fde7dadade50fba32fcc613a360ecd962c41600dc9162553863d06bea81dde5b0e1d1b0a948e8b12625b1ef5618d3d279a4cfd611bcc5703987bf0c01bb6c278a483e9448f89b005ee5b0b9875394a9cc29742eb47717a0466474e93ca3085f46f73faa336b82266b8c26668d65a52b092222e97fa324804162d5b90a07bb71deec8281c37c3680bca40602545961cea5b4994cc57d3753395a46505d42bcd20b092c2d16cea475126fba5cb27c420b09e0bccd919bfba05028bce1fc9caf8976b7c05bea2a93c520a03480000000049454e44ae426082</data></item> 
     4686<item key="id"><![CDATA[icon_tick.png]]></item> 
     4687<item key="mandatory" type="int">0</item> 
     4688<item key="multilang" type="int">0</item> 
     4689<item key="name"><![CDATA[icon_tick.png]]></item> 
    56324690<item key="repetitive" type="int">0</item> 
    56334691<item key="type"><![CDATA[resource]]></item> 
Note: See TracChangeset for help on using the changeset viewer.