Changeset 650 for CMESS/mediaplayer/branches
- Timestamp:
- 27.07.2009 09:13:57 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMESS/mediaplayer/branches/3.1/com/zms/mediaplayer/mediaplayer.metaobj.xml
r648 r650 1 <?xml version="1.0" encoding=" UTF-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <list> 3 3 <item type="dictionary"><dictionary> … … 867 867 </list> 868 868 </item> 869 <item key="delete_custom" />869 <item key="delete_custom"></item> 870 870 <item key="edit" type="list"><list> 871 871 </list> 872 872 </item> 873 <item key="edit_custom" />873 <item key="edit_custom"></item> 874 874 <item key="insert" type="list"><list> 875 875 </list> 876 876 </item> 877 <item key="insert_custom" />877 <item key="insert_custom"></item> 878 878 </dictionary> 879 879 </item> … … 1447 1447 <item type="dictionary"><dictionary> 1448 1448 <item key="custom"> 1449 <data content_type="text/x-c" filename="handleImageImport.js" type="file"><![CDATA[var temp_crop_api = null; 1450 var temp_crop_items = null; 1451 var temp_item_max_count = 0; 1452 var temp_items_handled = false; 1453 var temp_resize_items = null; 1454 1455 var $temp_crop = null; 1456 var $temp_dialog = null; 1457 var $temp_form = null; 1458 var $temp_table = null; 1459 1460 function changeDimensionSettings(ignore_settings) 1461 { 1462 var temp_icon = null; 1463 var temp_info_obj = null; 1464 var temp_info = null; 1465 var temp_text = ''; 1466 var temp_tds = null; 1467 var temp_trs = getTableRows(false); 1468 var $temp_info = null; 1469 var $temp_td = null; 1470 1471 for (var i = 0; i < temp_trs.length; i++) 1472 { 1473 temp_info_obj = createInfoObj(); 1474 1475 temp_tds = $(temp_trs[i]).children('td:gt(0):lt(3)'); 1476 1477 for (var j = 0; j < temp_tds.length; j++) 1478 { 1479 $temp_td = $(temp_tds[j]); 1480 1481 getCellInfo($temp_td, temp_info_obj, ignore_settings); 1482 1483 if ($temp_td.children('input[name="resize_needful"]').val() == '1') 1484 { 1485 if (ignore_settings) 1486 $temp_td.children('span').replaceWith('<span>' + $temp_td.children('input[name="orig_dim"]').val().split(',').join('x') + '</span>'); 1487 else 1488 $temp_td.children('span').replaceWith('<span style="color:blue;">' + $temp_td.children('input[name="resize_dim"]').val().split(',').join('x') + '</em>'); 1489 } 1490 } 1491 1492 if ((temp_info_obj['filename_large'] == null) && (temp_info_obj['filename_medium'] == null)) 1493 { 1494 temp_info = text_insufficient; 1495 temp_icon = filename_icon_cross; 1496 } 1497 else if (temp_info_obj['infos'].length > 0) 1498 { 1499 temp_info = temp_info_obj['infos'].join('; '); 1500 temp_icon = filename_icon_info; 1501 } 1502 else 1503 { 1504 temp_info = null; 1505 temp_icon = filename_icon_tick; 1506 } 1507 1508 $temp_info = $(temp_trs[i]).children('td:last').eq(0).children('img').eq(0); 1509 $temp_info.attr('src', icon_base + temp_icon); 1510 if (temp_info == null) 1511 $temp_info.removeAttr('title'); 1512 else 1513 $temp_info.attr('title', temp_info); 1514 } 1515 } 1516 1517 function createInfoObj() 1518 { 1519 var temp_result = new Object(); 1520 1521 temp_result['filename_large'] = null; 1522 temp_result['filename_medium'] = null; 1523 temp_result['filename_small'] = null; 1524 temp_result['infos'] = new Array(); 1525 1526 return temp_result; 1527 } 1528 1529 function cropImages() 1530 { 1531 var temp_dim = null; 1532 var temp_filename = null; 1533 var temp_ignore_settings = $('#gallery_ignore_dim').attr('checked') 1534 var temp_length = null; 1535 var temp_trs = getTableRows(true); 1536 var temp_tds = null; 1537 var $temp_td = null; 1538 1539 for (var i = 0; i < temp_trs.length; i++) 1540 { 1541 $temp_td = $(temp_trs[i]).children('td:gt(0)').eq(0); 1542 1543 if ($temp_td.children('input[name="crop_needful"]').val() == '1') 1544 { 1545 if (temp_crop_items == null) 1546 temp_crop_items = new Array(); 1547 1548 temp_src_filename = $temp_td.next('td').eq(0).children('input[name="filename"]').val(); 1549 if ((temp_ignore_settings) || ($temp_td.next('td').eq(0).children('input[name="resize_needful"]').val() == '0')) 1550 temp_dim = $temp_td.next('td').eq(0).children('input[name="orig_dim"]').val().split(','); 1551 else 1552 temp_dim = $temp_td.next('td').eq(0).children('input[name="resize_dim"]').val().split(','); 1553 1554 temp_crop_items.push(new Object()); 1555 temp_length = temp_crop_items.length - 1; 1556 1557 temp_crop_items[temp_length]['src_filename'] = temp_src_filename; 1558 temp_crop_items[temp_length]['src_width'] = temp_dim[0]; 1559 temp_crop_items[temp_length]['src_height'] = temp_dim[1]; 1560 temp_crop_items[temp_length]['src_item'] = $temp_td; 1561 } 1562 } 1563 1564 temp_item_max_count = temp_crop_items.length; 1565 if (temp_item_max_count > 0) 1566 handleCropItems(); 1567 } 1568 1569 function getCellInfo($table_cell, info_obj, ignore_settings) 1570 { 1571 if (($table_cell != null) && (info_obj != null)) 1572 { 1573 var temp_type = $table_cell.children('input[name="type"]').eq(0).val(); 1574 1575 info_obj['filename_' + temp_type] = $table_cell.children('input[name="filename"]').eq(0).val(); 1576 1577 if ($table_cell.children('input[name="auto_created"]').eq(0).val() == 1) 1578 info_obj['infos'].push(temp_type + text_auto_created); 1579 if ($table_cell.children('input[name="auto_resized"]').eq(0).val() == 1) 1580 info_obj['infos'].push(temp_type + text_auto_resized); 1581 if ($table_cell.children('input[name="crop_needful"]').eq(0).val() == 1) 1582 info_obj['infos'].push(temp_type + text_crop_needful); 1583 1584 if (!ignore_settings) 1585 { 1586 if ($table_cell.children('input[name="resize_needful"]').eq(0).val() == 1) 1587 info_obj['infos'].push(temp_type + text_resize_needful); 1588 } 1589 } 1590 } 1591 1592 function getTableRows(drop_insufficient) 1593 { 1594 var temp_trs = $temp_table.find('tr:gt(0)'); 1595 1596 if (drop_insufficient) 1597 temp_trs = jQuery.grep(temp_trs, function(item, index) 1598 { 1599 if ($(item).find('input[name="insufficient"]').val() == '0') 1600 return true; 1601 else 1602 return false; 1603 }); 1604 1605 return temp_trs 1606 } 1607 1608 function handleCropItems() 1609 { 1610 if (temp_crop_items.length > 0) 1611 { 1612 if (temp_crop_api != null) 1613 temp_crop_api.destroy(); 1614 1615 $temp_crop.attr('src', image_root_url + '/' + temp_crop_items[0]['src_filename']); 1616 $temp_crop.attr('width', temp_crop_items[0]['src_width']); 1617 $temp_crop.attr('height', temp_crop_items[0]['src_height']); 1618 1619 $temp_dialog.find('th').text((temp_item_max_count - temp_crop_items.length + 1) + ' of ' + temp_item_max_count); 1620 1621 $temp_dialog.dialog('open'); 1622 1623 temp_crop_api = $.Jcrop('#gallery_crop', 1624 { 1625 //allowResize : true, 1626 allowSelect : false, 1627 aspectRatio : thumb_max_width/thumb_max_height, 1628 minSize : [thumb_max_width, thumb_max_height], 1629 //maxSize : [thumb_max_width, thumb_max_height], 1630 handles : true 1631 }); 1632 temp_crop_api.setSelect([0, 0, thumb_max_width, thumb_max_height]); 1633 temp_crop_api.setOptions({ allowResize: true }); 1634 temp_crop_api.focus(); 1635 } 1636 } 1637 1638 function handleResizeItems() 1639 { 1640 if (temp_resize_items.length > 0) 1641 jQuery.post(resize_url + '/ZMSGallery_requestResize', temp_resize_items[0]['json'], receiveResizeData, "json"); 1642 } 1643 1644 function receiveResizeData(data, text_status) 1645 { 1646 if ((text_status == 'success') && (data['filename'] != null)) 1647 for (var i = 0; i < temp_resize_items.length; i++) 1648 if (temp_resize_items[i]['filename'] == data['filename']) 1649 { 1650 temp_resize_items.splice(i, 1); 1651 1652 break; 1653 } 1654 1655 if (temp_resize_items.length > 0) 1656 handleResizeItems(); 1657 else 1658 cropImages(); 1659 } 1660 1661 function resizeImages() 1662 { 1663 var temp_dim = null; 1664 var temp_filename = null; 1665 var temp_ignore_settings = $('#gallery_ignore_dim').attr('checked') 1666 var temp_trs = getTableRows(true); 1667 var temp_tds = null; 1668 var $temp_td = null; 1669 1670 if (temp_ignore_settings) 1671 { 1672 cropImages(); 1673 } 1674 else 1675 { 1676 for (var i = 0; i < temp_trs.length; i++) 1677 { 1678 temp_tds = $(temp_trs[i]).children('td:gt(0):lt(3)'); 1679 1680 for (var j = 0; j < temp_tds.length; j++) 1681 { 1682 $temp_td = $(temp_tds[j]); 1683 1684 if ($temp_td.children('input[name="resize_needful"]').val() == '1') 1685 { 1686 if (temp_resize_items == null) 1687 temp_resize_items = new Array(); 1688 1689 temp_dim = $temp_td.children('input[name="resize_dim"]').val().split(','); 1690 temp_filename = $temp_td.children('input[name="filename"]').val(); 1691 1692 temp_resize_items.push(new Object()); 1693 temp_resize_items[temp_resize_items.length - 1]['filename'] = temp_filename; 1694 temp_resize_items[temp_resize_items.length - 1]['json'] = 1695 {src_filename : temp_filename, dest_width : temp_dim[0], dest_height : temp_dim[1]}; 1696 } 1697 } 1698 } 1699 1700 if (temp_resize_items.length > 0) 1701 handleResizeItems(); 1702 else 1703 cropImages(); 1704 } 1705 } 1706 1707 function submitForm(event) 1708 { 1709 var temp_action = $(event.target).val(); 1710 1711 if ((temp_action == 'import') && (!temp_items_handled)) 1712 resizeImages(false); 1713 else 1714 { 1715 $temp_form.find('input[name="import_action"]').val(temp_action); 1716 1717 $temp_form.submit(); 1718 } 1719 } 1720 1721 function writeSubmitData() 1722 { 1723 var $temp_td = null; 1724 1725 var temp_data = null; 1726 var temp_tds = null; 1727 var temp_trs = getTableRows(true); 1728 var temp_xml = ''; 1729 1730 temp_xml += '<list>\n'; 1731 1732 // convert items into xml 1733 for (var i = 0; i < temp_trs.length; i++) 1734 { 1735 temp_xml += "<item type=\"dictionary\"><dictionary>\n"; 1736 1737 temp_tds = $(temp_trs[i]).children('td:gt(0):lt(3)'); 1738 1739 for (var j = 0; j < temp_tds.length; j++) 1740 { 1741 $temp_td = $(temp_tds[j]); 1742 1743 temp_xml += '<item key="' + $temp_td.children('input[name="type"]').eq(0).val() + '" type=\"dictionary\">\n' 1744 temp_xml += "<dictionary>\n"; 1745 1746 // add filename 1747 temp_data = $temp_td.children('input[name="filename"]').eq(0).val(); 1748 if ((temp_data != 'null') && (temp_data != undefined)) 1749 { 1750 temp_xml += '<item key="filename">\n' 1751 temp_xml += '<![CDATA' + '[' + temp_data + ']' + ']>'; 1752 temp_xml += '</item>\n'; 1753 } 1754 // add crop-data 1755 temp_data = $temp_td.children('input[name="crop"]').eq(0).val(); 1756 if ((temp_data != 'null') && (temp_data != undefined)) 1757 { 1758 temp_xml += '<item key="crop">' 1759 temp_xml += '<![CDATA' + '[' + temp_data + ']' + ']>'; 1760 temp_xml += '</item>\n'; 1761 } 1762 1763 temp_xml += '</dictionary>\n'; 1764 temp_xml += '</item>\n'; 1765 } 1766 1767 temp_xml += '</dictionary></item>\n'; 1768 } 1769 1770 temp_xml += '</list>\n'; 1771 1772 $temp_form.children('input[name="import_files_xml"]').eq(0).val(temp_xml); 1773 } 1774 1775 $('document').ready(function() 1776 { 1777 $temp_crop = $('#gallery_crop'); 1778 $temp_dialog = $('#gallery_dialog'); 1779 $temp_form = $('#gallery_import_form'); 1780 $temp_table = $('#gallery_import_table'); 1781 1782 $('#gallery_ignore_dim').change(function() 1783 { 1784 changeDimensionSettings(this.checked); 1785 }); 1786 $('#gallery_button_crop').click(function() 1787 { 1788 var temp_coords = temp_crop_api.tellSelect(); 1789 1790 temp_crop_items[0]['src_item'].append('<input type="hidden" name="crop" value="' + 1791 temp_coords.x + ',' + temp_coords.y + ',' + temp_coords.x2 + ',' + temp_coords.y2 + '" />'); 1792 1793 temp_crop_items.shift(); 1794 1795 if (temp_crop_items.length > 0) 1796 handleCropItems(); 1797 else 1798 { 1799 writeSubmitData(); 1800 temp_items_handled = true; 1801 1802 if ($temp_dialog.dialog('isOpen')) 1803 $temp_dialog.dialog('close'); 1804 1805 $('#gallery_import_form > input[value="import"]').click(); 1806 } 1807 }); 1808 1809 $temp_dialog.dialog( 1810 { 1811 autoOpen: false, 1812 height : 450, 1813 modal : true, 1814 title : 'Crop Thumb', 1815 width : 450 1816 }); 1817 1818 $temp_form.children('input:button').click(submitForm); 1819 });]]></data></item> 1449 <data content_type="application/x-javascript" filename="handleImageImport.js" type="file">7661722074656d705f63726f705f617069090909093d206e756c6c3b0a7661722074656d705f63726f705f6974656d730909093d206e756c6c3b0a7661722074656d705f6974656d5f6d61785f636f756e74093d20303b0a7661722074656d705f6974656d735f68616e646c6564093d2066616c73653b0a7661722074656d705f726573697a655f6974656d7320093d206e756c6c3b0a0a766172202474656d705f63726f7009093d206e756c6c3b0a766172202474656d705f6469616c6f67093d206e756c6c3b0a766172202474656d705f666f726d09093d206e756c6c3b0a766172202474656d705f7461626c6509093d206e756c6c3b0a0a66756e6374696f6e206368616e676544696d656e73696f6e53657474696e67732869676e6f72655f73657474696e6773290a7b0a097661722074656d705f69636f6e0909093d206e756c6c3b0a097661722074656d705f696e666f5f6f626a093d206e756c6c3b0a097661722074656d705f696e666f0909093d206e756c6c3b0a097661722074656d705f746578740909093d2027273b0a097661722074656d705f7464730909093d206e756c6c3b0a097661722074656d705f7472730909093d206765745461626c65526f77732866616c7365293b0a09766172202474656d705f696e666f09093d206e756c6c3b0909090a09766172202474656d705f74640909093d206e756c6c3b0a090a09666f7220287661722069203d20303b2069203c2074656d705f7472732e6c656e6774683b20692b2b290a097b0a090974656d705f696e666f5f6f626a203d20637265617465496e666f4f626a28293b0a09090a090974656d705f746473203d20242874656d705f7472735b695d292e6368696c6472656e282774643a67742830293a6c7428332927293b0a09090a0909666f722028766172206a203d20303b206a203c2074656d705f7464732e6c656e6774683b206a2b2b290a09097b0a0909092474656d705f7464203d20242874656d705f7464735b6a5d293b0a0909090a09090967657443656c6c496e666f282474656d705f74642c2074656d705f696e666f5f6f626a2c2069676e6f72655f73657474696e6773293b0a0909090a090909696620282474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f6e65656466756c225d27292e76616c2829203d3d20273127290a0909097b0a090909096966202869676e6f72655f73657474696e6773290a09090909092474656d705f74642e6368696c6472656e28277370616e27292e7265706c6163655769746828273c7370616e3e27202b202474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d226f7269675f64696d225d27292e76616c28292e73706c697428272c27292e6a6f696e2827782729202b20273c2f7370616e3e27293b0a09090909656c73650a09090909092474656d705f74642e6368696c6472656e28277370616e27292e7265706c6163655769746828273c7370616e207374796c653d22636f6c6f723a626c75653b223e27202b202474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f64696d225d27292e76616c28292e73706c697428272c27292e6a6f696e2827782729202b20273c2f656d3e27293b0a0909097d0a09097d0a09090a0909696620282874656d705f696e666f5f6f626a5b2766696c656e616d655f6c61726765275d203d3d206e756c6c29202626202874656d705f696e666f5f6f626a5b2766696c656e616d655f6d656469756d275d203d3d206e756c6c29290a09097b0a09090974656d705f696e666f203d20746578745f696e73756666696369656e743b0a09090974656d705f69636f6e093d2066696c656e616d655f69636f6e5f63726f73733b0a09097d0a0909656c7365206966202874656d705f696e666f5f6f626a5b27696e666f73275d2e6c656e677468203e2030290a09097b0a09090974656d705f696e666f203d2074656d705f696e666f5f6f626a5b27696e666f73275d2e6a6f696e28273b2027293b0a09090974656d705f69636f6e203d2066696c656e616d655f69636f6e5f696e666f3b0a09097d0a0909656c73650a09097b0a09090974656d705f696e666f203d206e756c6c3b0a09090974656d705f69636f6e203d2066696c656e616d655f69636f6e5f7469636b3b0a09097d0a09090a09092474656d705f696e666f203d20242874656d705f7472735b695d292e6368696c6472656e282774643a6c61737427292e65712830292e6368696c6472656e2827696d6727292e65712830293b0a09092474656d705f696e666f2e617474722827737263272c2069636f6e5f62617365202b2074656d705f69636f6e293b0a09096966202874656d705f696e666f203d3d206e756c6c290a0909092474656d705f696e666f2e72656d6f76654174747228277469746c6527293b0a0909656c73650a0909092474656d705f696e666f2e6174747228277469746c65272c2074656d705f696e666f293b0a097d0a7d0a0a66756e6374696f6e20637265617465496e666f4f626a28290a7b0a097661722074656d705f726573756c74203d206e6577204f626a65637428293b0a090a0974656d705f726573756c745b2766696c656e616d655f6c61726765275d09093d206e756c6c3b0a0974656d705f726573756c745b2766696c656e616d655f6d656469756d275d093d206e756c6c3b0a0974656d705f726573756c745b2766696c656e616d655f736d616c6c275d09093d206e756c6c3b0a0974656d705f726573756c745b27696e666f73275d0909090909093d206e657720417272617928293b0a090a0972657475726e2074656d705f726573756c743b0a7d0a0a66756e6374696f6e2063726f70496d6167657328290a7b0a097661722074656d705f64696d090909090909093d206e756c6c3b0a097661722074656d705f66696c656e616d6509090909093d206e756c6c3b0a097661722074656d705f69676e6f72655f73657474696e6773093d202428272367616c6c6572795f69676e6f72655f64696d27292e617474722827636865636b656427290a097661722074656d705f6c656e6774680909090909093d206e756c6c3b0a097661722074656d705f747273090909090909093d206765745461626c65526f77732874727565293b0a097661722074656d705f746473090909090909093d206e756c6c3b0a09766172202474656d705f7464090909090909093d206e756c6c3b0a090a0974656d705f63726f705f6974656d73203d206e657720417272617928293b0a090a09666f7220287661722069203d20303b2069203c2074656d705f7472732e6c656e6774683b20692b2b290a097b0a09092474656d705f7464203d20242874656d705f7472735b695d292e6368696c6472656e282774643a677428302927292e65712830293b0a09090a0909696620282474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d2263726f705f6e65656466756c225d27292e76616c2829203d3d20273127290a09097b0a09090974656d705f7372635f66696c656e616d65093d202474656d705f74642e6e6578742827746427292e65712830292e6368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e76616c28293b0a090909696620282874656d705f69676e6f72655f73657474696e677329207c7c20282474656d705f74642e6e6578742827746427292e65712830292e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f6e65656466756c225d27292e76616c2829203d3d202730272929200a0909090974656d705f64696d203d202474656d705f74642e6e6578742827746427292e65712830292e6368696c6472656e2827696e7075745b6e616d653d226f7269675f64696d225d27292e76616c28292e73706c697428272c27293b0a090909656c73650a0909090974656d705f64696d203d202474656d705f74642e6e6578742827746427292e65712830292e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f64696d225d27292e76616c28292e73706c697428272c27293b0a0909090a09090974656d705f63726f705f6974656d732e70757368286e6577204f626a6563742829293b0a09090974656d705f6c656e677468203d2074656d705f63726f705f6974656d732e6c656e677468202d20313b0a0909090a09090974656d705f63726f705f6974656d735b74656d705f6c656e6774685d5b277372635f66696c656e616d65275d093d2074656d705f7372635f66696c656e616d653b0a09090974656d705f63726f705f6974656d735b74656d705f6c656e6774685d5b277372635f7769647468275d0909093d2074656d705f64696d5b305d3b0a09090974656d705f63726f705f6974656d735b74656d705f6c656e6774685d5b277372635f686569676874275d09093d2074656d705f64696d5b315d3b0a09090974656d705f63726f705f6974656d735b74656d705f6c656e6774685d5b277372635f6974656d275d0909093d202474656d705f74643b0a09097d0a097d0a090a0974656d705f6974656d5f6d61785f636f756e74203d2074656d705f63726f705f6974656d732e6c656e6774683b0a096966202874656d705f6974656d5f6d61785f636f756e74203e2030290a090968616e646c6543726f704974656d7328293b0a7d0a0a66756e6374696f6e2067657443656c6c496e666f28247461626c655f63656c6c2c20696e666f5f6f626a2c2069676e6f72655f73657474696e6773290a7b0a096966202828247461626c655f63656c6c20213d206e756c6c292026262028696e666f5f6f626a20213d206e756c6c29290a097b0a09097661722074656d705f74797065093d20247461626c655f63656c6c2e6368696c6472656e2827696e7075745b6e616d653d2274797065225d27292e65712830292e76616c28293b0a09090a0909696e666f5f6f626a5b2766696c656e616d655f27202b2074656d705f747970655d203d20247461626c655f63656c6c2e6368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c28293b0a09090a090969662028247461626c655f63656c6c2e6368696c6472656e2827696e7075745b6e616d653d226175746f5f63726561746564225d27292e65712830292e76616c2829203d3d2031290a090909696e666f5f6f626a5b27696e666f73275d2e707573682874656d705f74797065202b20746578745f6175746f5f63726561746564293b0a090969662028247461626c655f63656c6c2e6368696c6472656e2827696e7075745b6e616d653d226175746f5f726573697a6564225d27292e65712830292e76616c2829203d3d2031290a090909696e666f5f6f626a5b27696e666f73275d2e707573682874656d705f74797065202b20746578745f6175746f5f726573697a6564293b0a090969662028247461626c655f63656c6c2e6368696c6472656e2827696e7075745b6e616d653d2263726f705f6e65656466756c225d27292e65712830292e76616c2829203d3d2031290a090909696e666f5f6f626a5b27696e666f73275d2e707573682874656d705f74797065202b20746578745f63726f705f6e65656466756c293b0a09090a0909696620282169676e6f72655f73657474696e6773290a09097b0a09090969662028247461626c655f63656c6c2e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f6e65656466756c225d27292e65712830292e76616c2829203d3d2031290a09090909696e666f5f6f626a5b27696e666f73275d2e707573682874656d705f74797065202b20746578745f726573697a655f6e65656466756c293b0a09097d0a097d0a7d0a0a66756e6374696f6e206765745461626c65526f77732864726f705f696e73756666696369656e74290a7b0a097661722074656d705f747273203d202474656d705f7461626c652e66696e64282774723a677428302927293b0a090a096966202864726f705f696e73756666696369656e74290a090974656d705f747273203d206a51756572792e677265702874656d705f7472732c2066756e6374696f6e286974656d2c20696e646578290a0909090909097b0a090909090909096966202824286974656d292e66696e642827696e7075745b6e616d653d22696e73756666696369656e74225d27292e76616c2829203d3d20273027290a090909090909090972657475726e20747275653b0a09090909090909656c73650a090909090909090972657475726e2066616c73653b0a0909090909097d293b0a090a0972657475726e2074656d705f7472730a7d0a0a66756e6374696f6e2068616e646c6543726f704974656d7328290a7b0a096966202874656d705f63726f705f6974656d732e6c656e677468203e2030290a097b0a09096966202874656d705f63726f705f61706920213d206e756c6c290a09090974656d705f63726f705f6170692e64657374726f7928293b0a0a09092474656d705f63726f702e617474722827737263272c20696d6167655f726f6f745f75726c202b20272f27202b2074656d705f63726f705f6974656d735b305d5b277372635f66696c656e616d65275d293b0a09092474656d705f63726f702e6174747228277769647468272c2074656d705f63726f705f6974656d735b305d5b277372635f7769647468275d293b0a09092474656d705f63726f702e617474722827686569676874272c2074656d705f63726f705f6974656d735b305d5b277372635f686569676874275d293b0a09090a09092474656d705f6469616c6f672e66696e642827746827292e74657874282874656d705f6974656d5f6d61785f636f756e74202d2074656d705f63726f705f6974656d732e6c656e677468202b20312920202b2027206f662027202b2074656d705f6974656d5f6d61785f636f756e74293b0a09090a09092474656d705f6469616c6f672e6469616c6f6728276f70656e27293b0a09090a090974656d705f63726f705f617069203d20242e4a63726f7028272367616c6c6572795f63726f70272c200a0909097b200a090909092f2f616c6c6f77526573697a65093a20747275652c0a09090909616c6c6f7753656c656374093a2066616c73652c0a09090909617370656374526174696f093a207468756d625f6d61785f77696474682f7468756d625f6d61785f6865696768742c0a090909096d696e53697a650909093a205b7468756d625f6d61785f77696474682c207468756d625f6d61785f6865696768745d2c0a090909092f2f6d617853697a650909093a205b7468756d625f6d61785f77696474682c207468756d625f6d61785f6865696768745d2c0a0909090968616e646c65730909093a20747275650a0909097d293b0a090974656d705f63726f705f6170692e73657453656c656374285b302c20302c207468756d625f6d61785f77696474682c207468756d625f6d61785f6865696768745d293b0a090974656d705f63726f705f6170692e7365744f7074696f6e73287b20616c6c6f77526573697a653a2074727565207d293b0a090974656d705f63726f705f6170692e666f63757328293b0a097d0a7d0a0a66756e6374696f6e2068616e646c65526573697a654974656d7328290a7b0a096966202874656d705f726573697a655f6974656d732e6c656e677468203e2030290a09096a51756572792e706f737428726573697a655f75726c202b20272f5a4d5347616c6c6572795f72657175657374526573697a65272c2074656d705f726573697a655f6974656d735b305d5b276a736f6e275d2c2072656365697665526573697a65446174612c20226a736f6e22293b0a7d0a0a66756e6374696f6e2072656365697665526573697a654461746128646174612c20746578745f737461747573290a7b0a096966202828746578745f737461747573203d3d20277375636365737327292026262028646174615b2766696c656e616d65275d20213d206e756c6c29290a0909666f7220287661722069203d20303b2069203c2074656d705f726573697a655f6974656d732e6c656e6774683b20692b2b290a0909096966202874656d705f726573697a655f6974656d735b695d5b2766696c656e616d65275d203d3d20646174615b2766696c656e616d65275d290a0909097b0a0909090974656d705f726573697a655f6974656d732e73706c69636528692c2031293b0a090909090a09090909627265616b3b0a0909097d0a090a096966202874656d705f726573697a655f6974656d732e6c656e677468203e2030290a090968616e646c65526573697a654974656d7328293b0a09656c73650a090963726f70496d6167657328293b0a7d0a0a66756e6374696f6e20726573697a65496d6167657328290a7b0a097661722074656d705f64696d090909090909093d206e756c6c3b0a097661722074656d705f66696c656e616d6509090909093d206e756c6c3b0a097661722074656d705f69676e6f72655f73657474696e6773093d202428272367616c6c6572795f69676e6f72655f64696d27292e617474722827636865636b656427290a097661722074656d705f747273090909090909093d206765745461626c65526f77732874727565293b0a097661722074656d705f746473090909090909093d206e756c6c3b0a09766172202474656d705f7464090909090909093d206e756c6c3b0a090a096966202874656d705f69676e6f72655f73657474696e6773290a097b0a090963726f70496d6167657328293b0a097d0a09656c73650a097b0a0909666f7220287661722069203d20303b2069203c2074656d705f7472732e6c656e6774683b20692b2b290a09097b0a09090974656d705f746473203d20242874656d705f7472735b695d292e6368696c6472656e282774643a67742830293a6c7428332927293b0a0909090a090909666f722028766172206a203d20303b206a203c2074656d705f7464732e6c656e6774683b206a2b2b290a0909097b0a090909092474656d705f7464203d20242874656d705f7464735b6a5d293b0a090909090a09090909696620282474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f6e65656466756c225d27292e76616c2829203d3d20273127290a090909097b0a09090909096966202874656d705f726573697a655f6974656d73203d3d206e756c6c290a09090909090974656d705f726573697a655f6974656d73203d206e657720417272617928293b0a09090909090a090909090974656d705f64696d0909093d202474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d22726573697a655f64696d225d27292e76616c28292e73706c697428272c27293b0a090909090974656d705f66696c656e616d65093d202474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e76616c28293b0a09090909090a090909090974656d705f726573697a655f6974656d732e70757368286e6577204f626a6563742829293b0a090909090974656d705f726573697a655f6974656d735b74656d705f726573697a655f6974656d732e6c656e677468202d20315d5b2766696c656e616d65275d203d2074656d705f66696c656e616d653b0a090909090974656d705f726573697a655f6974656d735b74656d705f726573697a655f6974656d732e6c656e677468202d20315d5b276a736f6e275d0909093d200a090909090909097b7372635f66696c656e616d65203a2074656d705f66696c656e616d652c20646573745f7769647468203a2074656d705f64696d5b305d2c20646573745f686569676874203a2074656d705f64696d5b315d7d3b0a090909097d0a0909097d0a09097d0a09090a09096966202874656d705f726573697a655f6974656d732e6c656e677468203e2030290a09090968616e646c65526573697a654974656d7328293b0a0909656c73650a09090963726f70496d6167657328293b0a097d0a7d0a0a66756e6374696f6e207375626d6974466f726d286576656e74290a7b0a097661722074656d705f616374696f6e203d2024286576656e742e746172676574292e76616c28293b0a090a09696620282874656d705f616374696f6e203d3d2027696d706f7274272920262620282174656d705f6974656d735f68616e646c656429290a0909726573697a65496d616765732866616c7365293b0a09656c73650a097b0a09092474656d705f666f726d2e66696e642827696e7075745b6e616d653d22696d706f72745f616374696f6e225d27292e76616c2874656d705f616374696f6e293b0a09090a09092474656d705f666f726d2e7375626d697428293b0a097d0a7d0a0a66756e6374696f6e2077726974655375626d69744461746128290a7b0a09766172202474656d705f7464093d206e756c6c3b0a090a097661722074656d705f64617461093d206e756c6c3b0a097661722074656d705f746473093d206e756c6c3b0a097661722074656d705f747273093d206765745461626c65526f77732874727565293b0a097661722074656d705f786d6c093d2027273b0a090a0974656d705f786d6c202b3d20273c6c6973743e5c6e273b0a090a092f2f20636f6e76657274206974656d7320696e746f20786d6c0a09666f7220287661722069203d20303b2069203c2074656d705f7472732e6c656e6774683b20692b2b290a097b0a090974656d705f786d6c202b3d20223c6974656d20747970653d5c2264696374696f6e6172795c223e3c64696374696f6e6172793e5c6e223b0a09090a090974656d705f746473203d20242874656d705f7472735b695d292e6368696c6472656e282774643a67742830293a6c7428332927293b0a0909090a0909666f722028766172206a203d20303b206a203c2074656d705f7464732e6c656e6774683b206a2b2b290a09097b0a0909092474656d705f7464203d20242874656d705f7464735b6a5d293b0a09090a09090974656d705f786d6c202b3d20273c6974656d206b65793d2227202b202474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d2274797065225d27292e65712830292e76616c2829202b20272220747970653d5c2264696374696f6e6172795c223e5c6e270a09090974656d705f786d6c202b3d20223c64696374696f6e6172793e5c6e223b0a0909090a0909092f2f206164642066696c656e616d650a09090974656d705f64617461203d202474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d2266696c656e616d65225d27292e65712830292e76616c28293b0a090909696620282874656d705f6461746120213d20276e756c6c2729202626202874656d705f6461746120213d20756e646566696e656429290a0909097b0a0909090974656d705f786d6c202b3d20273c6974656d206b65793d2266696c656e616d65223e5c6e270a0909090974656d705f786d6c202b3d20273c215b434441544127202b20275b27202b2074656d705f64617461202b20275d27202b20275d3e273b0a0909090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0a0909097d0a0909092f2f206164642063726f702d646174610a09090974656d705f64617461203d202474656d705f74642e6368696c6472656e2827696e7075745b6e616d653d2263726f70225d27292e65712830292e76616c28293b0a090909696620282874656d705f6461746120213d20276e756c6c2729202626202874656d705f6461746120213d20756e646566696e656429290a0909097b0a0909090974656d705f786d6c202b3d20273c6974656d206b65793d2263726f70223e270a0909090974656d705f786d6c202b3d20273c215b434441544127202b20275b27202b2074656d705f64617461202b20275d27202b20275d3e273b0a0909090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0a0909097d0a0909090a09090974656d705f786d6c202b3d20273c2f64696374696f6e6172793e5c6e273b0a09090974656d705f786d6c202b3d20273c2f6974656d3e5c6e273b0a09097d0a09090a090974656d705f786d6c202b3d20273c2f64696374696f6e6172793e3c2f6974656d3e5c6e273b0a097d0a090a0974656d705f786d6c202b3d20273c2f6c6973743e5c6e273b0a090a092474656d705f666f726d2e6368696c6472656e2827696e7075745b6e616d653d22696d706f72745f66696c65735f786d6c225d27292e65712830292e76616c2874656d705f786d6c293b0a7d0a0a242827646f63756d656e7427292e72656164792866756e6374696f6e28290a7b0a092474656d705f63726f702009093d202428272367616c6c6572795f63726f7027293b0a092474656d705f6469616c6f67093d202428272367616c6c6572795f6469616c6f6727293b0a092474656d705f666f726d09093d202428272367616c6c6572795f696d706f72745f666f726d27293b0a092474656d705f7461626c6509093d202428272367616c6c6572795f696d706f72745f7461626c6527293b0a090a092428272367616c6c6572795f69676e6f72655f64696d27292e6368616e67652866756e6374696f6e28290a097b0a09096368616e676544696d656e73696f6e53657474696e677328746869732e636865636b6564293b0a097d293b0a092428272367616c6c6572795f627574746f6e5f63726f7027292e636c69636b2866756e6374696f6e28290a097b0a09097661722074656d705f636f6f726473203d2074656d705f63726f705f6170692e74656c6c53656c65637428293b0a09090a090974656d705f63726f705f6974656d735b305d5b277372635f6974656d275d2e617070656e6428273c696e70757420747970653d2268696464656e22206e616d653d2263726f70222076616c75653d2227202b200a0909090974656d705f636f6f7264732e78202b20272c27202b2074656d705f636f6f7264732e79202b20272c27202b2074656d705f636f6f7264732e7832202b20272c27202b2074656d705f636f6f7264732e7932202b202722202f3e27293b0a0909090a090974656d705f63726f705f6974656d732e736869667428293b0a09090a09096966202874656d705f63726f705f6974656d732e6c656e677468203e2030290a09090968616e646c6543726f704974656d7328293b0a0909656c73650a09097b0a09090977726974655375626d69744461746128293b0a09090974656d705f6974656d735f68616e646c6564203d20747275653b0a0909090a090909696620282474656d705f6469616c6f672e6469616c6f67282769734f70656e2729290a090909092474656d705f6469616c6f672e6469616c6f672827636c6f736527293b0a0909090a0909092428272367616c6c6572795f696d706f72745f666f726d203e20696e7075745b76616c75653d22696d706f7274225d27292e636c69636b28293b0a09097d0a097d293b0a090a092474656d705f7461626c652e66696e64282774626f647927292e736f727461626c65280a097b0a090963616e63656c3a20277468272c0a090968616e646c653a20242827747227292c0a09096f7061636974793a20302e372c0a09097363726f6c6c3a20747275650a097d293b0a092474656d705f7461626c652e66696e64282774626f647927292e64697361626c6553656c656374696f6e28293b0a090a092474656d705f6469616c6f672e6469616c6f67280a097b0a09096175746f4f70656e3a2066616c73652c0a0909686569676874093a203435302c0a09096d6f64616c09093a20747275652c0a09097469746c6509093a202743726f70205468756d62272c0a0909776964746809093a203435300a097d293b0a090a092474656d705f666f726d2e6368696c6472656e2827696e7075743a627574746f6e27292e636c69636b287375626d6974466f726d293b0a7d293b</data></item> 1820 1450 <item key="id"><![CDATA[handleImageImport.js]]></item> 1821 1451 <item key="mandatory" type="int">0</item> … … 1828 1458 <item type="dictionary"><dictionary> 1829 1459 <item key="custom"><![CDATA[<dtml-var manage_page_header> 1830 <script type="text/javascript" src="metaobj_manager/ZMSMediaPlayerLib.ui.core.js"></script> 1831 <script type="text/javascript" src="metaobj_manager/ZMSMediaPlayerLib.ui.dialog.js"></script> 1460 <script type="text/javascript" src="metaobj_manager/ZMSMediaPlayerLib.jquery.ui.js"></script> 1832 1461 <script type="text/javascript" src="metaobj_manager/ZMSMediaPlayerLib.jquery.Jcrop.js"></script> 1833 1462 … … 2254 1883 </list> 2255 1884 </item> 2256 <item key="delete_custom" />1885 <item key="delete_custom"></item> 2257 1886 <item key="edit" type="list"><list> 2258 1887 <item><![CDATA[ZMSAdministrator]]></item> … … 2261 1890 </list> 2262 1891 </item> 2263 <item key="edit_custom" />1892 <item key="edit_custom"></item> 2264 1893 <item key="insert" type="list"><list> 2265 1894 <item><![CDATA[ZMSAdministrator]]></item> … … 2275 1904 <item key="name"><![CDATA[ZMSGallery]]></item> 2276 1905 <item key="package"><![CDATA[com.zms.mediaplayer]]></item> 2277 <item key="revision"><![CDATA[2.1. 7]]></item>1906 <item key="revision"><![CDATA[2.1.8]]></item> 2278 1907 <item key="type"><![CDATA[ZMSObject]]></item> 2279 1908 </dictionary> … … 3626 3255 <item type="dictionary"><dictionary> 3627 3256 <item key="custom"> 3628 <data content_type="text/x-c" filename=" ui.core.js" type="file"><![CDATA[/*3629 * jQuery UI 1. 6rc63257 <data content_type="text/x-c" filename="jquery.ui.js" type="file"><![CDATA[/* 3258 * jQuery UI 1.7.2 3630 3259 * 3631 * Copyright (c) 2009 AUTHORS.txt (http:// ui.jquery.com/about)3260 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 3632 3261 * Dual licensed under the MIT (MIT-LICENSE.txt) 3633 3262 * and GPL (GPL-LICENSE.txt) licenses. … … 3635 3264 * http://docs.jquery.com/UI 3636 3265 */ 3637 ;(function($) { 3638 3639 var _remove = $.fn.remove, 3640 isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9); 3641 3642 //Helper functions and ui object 3643 $.ui = { 3644 version: "1.6rc6", 3645 3646 // $.ui.plugin is deprecated. Use the proxy pattern instead. 3647 plugin: { 3648 add: function(module, option, set) { 3649 var proto = $.ui[module].prototype; 3650 for(var i in set) { 3651 proto.plugins[i] = proto.plugins[i] || []; 3652 proto.plugins[i].push([option, set[i]]); 3653 } 3654 }, 3655 call: function(instance, name, args) { 3656 var set = instance.plugins[name]; 3657 if(!set) { return; } 3658 3659 for (var i = 0; i < set.length; i++) { 3660 if (instance.options[set[i][0]]) { 3661 set[i][1].apply(instance.element, args); 3662 } 3663 } 3664 } 3665 }, 3666 3667 contains: function(a, b) { 3668 return document.compareDocumentPosition 3669 ? a.compareDocumentPosition(b) & 16 3670 : a !== b && a.contains(b); 3671 }, 3672 3673 cssCache: {}, 3674 css: function(name) { 3675 if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; } 3676 var tmp = $('<div class="ui-gen"></div>').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body'); 3677 3678 //if (!$.browser.safari) 3679 //tmp.appendTo('body'); 3680 3681 //Opera and Safari set width and height to 0px instead of auto 3682 //Safari returns rgba(0,0,0,0) when bgcolor is not set 3683 $.ui.cssCache[name] = !!( 3684 (!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) || 3685 !(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))) 3686 ); 3687 try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){} 3688 return $.ui.cssCache[name]; 3689 }, 3690 3691 hasScroll: function(el, a) { 3692 3693 //If overflow is hidden, the element might have extra content, but the user wants to hide it 3694 if ($(el).css('overflow') == 'hidden') { return false; } 3695 3696 var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop', 3697 has = false; 3698 3699 if (el[scroll] > 0) { return true; } 3700 3701 // TODO: determine which cases actually cause this to happen 3702 // if the element doesn't have the scroll set, see if it's possible to 3703 // set the scroll 3704 el[scroll] = 1; 3705 has = (el[scroll] > 0); 3706 el[scroll] = 0; 3707 return has; 3708 }, 3709 3710 isOverAxis: function(x, reference, size) { 3711 //Determines when x coordinate is over "b" element axis 3712 return (x > reference) && (x < (reference + size)); 3713 }, 3714 3715 isOver: function(y, x, top, left, height, width) { 3716 //Determines when x, y coordinates is over "b" element 3717 return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width); 3718 }, 3719 3720 keyCode: { 3721 BACKSPACE: 8, 3722 CAPS_LOCK: 20, 3723 COMMA: 188, 3724 CONTROL: 17, 3725 DELETE: 46, 3726 DOWN: 40, 3727 END: 35, 3728 ENTER: 13, 3729 ESCAPE: 27, 3730 HOME: 36, 3731 INSERT: 45, 3732 LEFT: 37, 3733 NUMPAD_ADD: 107, 3734 NUMPAD_DECIMAL: 110, 3735 NUMPAD_DIVIDE: 111, 3736 NUMPAD_ENTER: 108, 3737 NUMPAD_MULTIPLY: 106, 3738 NUMPAD_SUBTRACT: 109, 3739 PAGE_DOWN: 34, 3740 PAGE_UP: 33, 3741 PERIOD: 190, 3742 RIGHT: 39, 3743 SHIFT: 16, 3744 SPACE: 32, 3745 TAB: 9, 3746 UP: 38 3747 } 3748 }; 3749 3750 // WAI-ARIA normalization 3751 if (isFF2) { 3752 var attr = $.attr, 3753 removeAttr = $.fn.removeAttr, 3754 ariaNS = "http://www.w3.org/2005/07/aaa", 3755 ariaState = /^aria-/, 3756 ariaRole = /^wairole:/; 3757 3758 $.attr = function(elem, name, value) { 3759 var set = value !== undefined; 3760 3761 return (name == 'role' 3762 ? (set 3763 ? attr.call(this, elem, name, "wairole:" + value) 3764 : (attr.apply(this, arguments) || "").replace(ariaRole, "")) 3765 : (ariaState.test(name) 3766 ? (set 3767 ? elem.setAttributeNS(ariaNS, 3768 name.replace(ariaState, "aaa:"), value) 3769 : attr.call(this, elem, name.replace(ariaState, "aaa:"))) 3770 : attr.apply(this, arguments))); 3771 }; 3772 3773 $.fn.removeAttr = function(name) { 3774 return (ariaState.test(name) 3775 ? this.each(function() { 3776 this.removeAttributeNS(ariaNS, name.replace(ariaState, "")); 3777 }) : removeAttr.call(this, name)); 3778 }; 3779 } 3780 3781 //jQuery plugins 3782 $.fn.extend({ 3783 remove: function() { 3784 // Safari has a native remove event which actually removes DOM elements, 3785 // so we have to use triggerHandler instead of trigger (#3037). 3786 $("*", this).add(this).each(function() { 3787 $(this).triggerHandler("remove"); 3788 }); 3789 return _remove.apply(this, arguments ); 3790 }, 3791 3792 enableSelection: function() { 3793 return this 3794 .attr('unselectable', 'off') 3795 .css('MozUserSelect', '') 3796 .unbind('selectstart.ui'); 3797 }, 3798 3799 disableSelection: function() { 3800 return this 3801 .attr('unselectable', 'on') 3802 .css('MozUserSelect', 'none') 3803 .bind('selectstart.ui', function() { return false; }); 3804 }, 3805 3806 scrollParent: function() { 3807 var scrollParent; 3808 if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) { 3809 scrollParent = this.parents().filter(function() { 3810 return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); 3811 }).eq(0); 3812 } else { 3813 scrollParent = this.parents().filter(function() { 3814 return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); 3815 }).eq(0); 3816 } 3817 3818 return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent; 3819 } 3820 }); 3821 3822 3823 //Additional selectors 3824 $.extend($.expr[':'], { 3825 data: function(elem, i, match) { 3826 return !!$.data(elem, match[3]); 3827 }, 3828 3829 focusable: function(element) { 3830 var nodeName = element.nodeName.toLowerCase(), 3831 tabIndex = $.attr(element, 'tabindex'); 3832 return (/input|select|textarea|button|object/.test(nodeName) 3833 ? !element.disabled 3834 : 'a' == nodeName || 'area' == nodeName 3835 ? element.href || !isNaN(tabIndex) 3836 : !isNaN(tabIndex)) 3837 // the element and all of its ancestors must be visible 3838 // the browser may report that the area is hidden 3839 && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length; 3840 }, 3841 3842 tabbable: function(element) { 3843 var tabIndex = $.attr(element, 'tabindex'); 3844 return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable'); 3845 } 3846 }); 3847 3848 3849 // $.widget is a factory to create jQuery plugins 3850 // taking some boilerplate code out of the plugin code 3851 function getter(namespace, plugin, method, args) { 3852 function getMethods(type) { 3853 var methods = $[namespace][plugin][type] || []; 3854 return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods); 3855 } 3856 3857 var methods = getMethods('getter'); 3858 if (args.length == 1 && typeof args[0] == 'string') { 3859 methods = methods.concat(getMethods('getterSetter')); 3860 } 3861 return ($.inArray(method, methods) != -1); 3862 } 3863 3864 $.widget = function(name, prototype) { 3865 var namespace = name.split(".")[0]; 3866 name = name.split(".")[1]; 3867 3868 // create plugin method 3869 $.fn[name] = function(options) { 3870 var isMethodCall = (typeof options == 'string'), 3871 args = Array.prototype.slice.call(arguments, 1); 3872 3873 // prevent calls to internal methods 3874 if (isMethodCall && options.substring(0, 1) == '_') { 3875 return this; 3876 } 3877 3878 // handle getter methods 3879 if (isMethodCall && getter(namespace, name, options, args)) { 3880 var instance = $.data(this[0], name); 3881 return (instance ? instance[options].apply(instance, args) 3882 : undefined); 3883 } 3884 3885 // handle initialization and non-getter methods 3886 return this.each(function() { 3887 var instance = $.data(this, name); 3888 3889 // constructor 3890 (!instance && !isMethodCall && 3891 $.data(this, name, new $[namespace][name](this, options))._init()); 3892 3893 // method call 3894 (instance && isMethodCall && $.isFunction(instance[options]) && 3895 instance[options].apply(instance, args)); 3896 }); 3897 }; 3898 3899 // create widget constructor 3900 $[namespace] = $[namespace] || {}; 3901 $[namespace][name] = function(element, options) { 3902 var self = this; 3903 3904 this.namespace = namespace; 3905 this.widgetName = name; 3906 this.widgetEventPrefix = $[namespace][name].eventPrefix || name; 3907 this.widgetBaseClass = namespace + '-' + name; 3908 3909 this.options = $.extend({}, 3910 $.widget.defaults, 3911 $[namespace][name].defaults, 3912 $.metadata && $.metadata.get(element)[name], 3913 options); 3914 3915 this.element = $(element) 3916 .bind('setData.' + name, function(event, key, value) { 3917 if (event.target == element) { 3918 return self._setData(key, value); 3919 } 3920 }) 3921 .bind('getData.' + name, function(event, key) { 3922 if (event.target == element) { 3923 return self._getData(key); 3924 } 3925 }) 3926 .bind('remove', function() { 3927 return self.destroy(); 3928 }); 3929 }; 3930 3931 // add widget prototype 3932 $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype); 3933 3934 // TODO: merge getter and getterSetter properties from widget prototype 3935 // and plugin prototype 3936 $[namespace][name].getterSetter = 'option'; 3937 }; 3938 3939 $.widget.prototype = { 3940 _init: function() {}, 3941 destroy: function() { 3942 this.element.removeData(this.widgetName) 3943 .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled') 3944 .removeAttr('aria-disabled'); 3945 }, 3946 3947 option: function(key, value) { 3948 var options = key, 3949 self = this; 3950 3951 if (typeof key == "string") { 3952 if (value === undefined) { 3953 return this._getData(key); 3954 } 3955 options = {}; 3956 options[key] = value; 3957 } 3958 3959 $.each(options, function(key, value) { 3960 self._setData(key, value); 3961 }); 3962 }, 3963 _getData: function(key) { 3964 return this.options[key]; 3965 }, 3966 _setData: function(key, value) { 3967 this.options[key] = value; 3968 3969 if (key == 'disabled') { 3970 this.element 3971 [value ? 'addClass' : 'removeClass']( 3972 this.widgetBaseClass + '-disabled' + ' ' + 3973 this.namespace + '-state-disabled') 3974 .attr("aria-disabled", value); 3975 } 3976 }, 3977 3978 enable: function() { 3979 this._setData('disabled', false); 3980 }, 3981 disable: function() { 3982 this._setData('disabled', true); 3983 }, 3984 3985 _trigger: function(type, event, data) { 3986 var callback = this.options[type], 3987 eventName = (type == this.widgetEventPrefix 3988 ? type : this.widgetEventPrefix + type); 3989 3990 event = $.Event(event); 3991 event.type = eventName; 3992 3993 // copy original event properties over to the new event 3994 // this would happen if we could call $.event.fix instead of $.Event 3995 // but we don't have a way to force an event to be fixed multiple times 3996 if (event.originalEvent) { 3997 for (var i = $.event.props.length, prop; i;) { 3998 prop = $.event.props[--i]; 3999 event[prop] = event.originalEvent[prop]; 4000 } 4001 } 4002 4003 this.element.trigger(event, data); 4004 4005 return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false 4006 || event.isDefaultPrevented()); 4007 } 4008 }; 4009 4010 $.widget.defaults = { 4011 disabled: false 4012 }; 4013 4014 4015 /** Mouse Interaction Plugin **/ 4016 4017 $.ui.mouse = { 4018 _mouseInit: function() { 4019 var self = this; 4020 4021 this.element 4022 .bind('mousedown.'+this.widgetName, function(event) { 4023 return self._mouseDown(event); 4024 }) 4025 .bind('click.'+this.widgetName, function(event) { 4026 if(self._preventClickEvent) { 4027 self._preventClickEvent = false; 4028 return false; 4029 } 4030 }); 4031 4032 // Prevent text selection in IE 4033 if ($.browser.msie) { 4034 this._mouseUnselectable = this.element.attr('unselectable'); 4035 this.element.attr('unselectable', 'on'); 4036 } 4037 4038 this.started = false; 4039 }, 4040 4041 // TODO: make sure destroying one instance of mouse doesn't mess with 4042 // other instances of mouse 4043 _mouseDestroy: function() { 4044 this.element.unbind('.'+this.widgetName); 4045 4046 // Restore text selection in IE 4047 ($.browser.msie 4048 && this.element.attr('unselectable', this._mouseUnselectable)); 4049 }, 4050 4051 _mouseDown: function(event) { 4052 // don't let more than one widget handle mouseStart 4053 if (event.originalEvent.mouseHandled) { return; } 4054 4055 // we may have missed mouseup (out of window) 4056 (this._mouseStarted && this._mouseUp(event)); 4057 4058 this._mouseDownEvent = event; 4059 4060 var self = this, 4061 btnIsLeft = (event.which == 1), 4062 elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false); 4063 if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { 4064 return true; 4065 } 4066 4067 this.mouseDelayMet = !this.options.delay; 4068 if (!this.mouseDelayMet) { 4069 this._mouseDelayTimer = setTimeout(function() { 4070 self.mouseDelayMet = true; 4071 }, this.options.delay); 4072 } 4073 4074 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 4075 this._mouseStarted = (this._mouseStart(event) !== false); 4076 if (!this._mouseStarted) { 4077 event.preventDefault(); 4078 return true; 4079 } 4080 } 4081 4082 // these delegates are required to keep context 4083 this._mouseMoveDelegate = function(event) { 4084 return self._mouseMove(event); 4085 }; 4086 this._mouseUpDelegate = function(event) { 4087 return self._mouseUp(event); 4088 }; 4089 $(document) 4090 .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) 4091 .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); 4092 4093 // preventDefault() is used to prevent the selection of text here - 4094 // however, in Safari, this causes select boxes not to be selectable 4095 // anymore, so this fix is needed 4096 ($.browser.safari || event.preventDefault()); 4097 4098 event.originalEvent.mouseHandled = true; 4099 return true; 4100 }, 4101 4102 _mouseMove: function(event) { 4103 // IE mouseup check - mouseup happened when mouse was out of window 4104 if ($.browser.msie && !event.button) { 4105 return this._mouseUp(event); 4106 } 4107 4108 if (this._mouseStarted) { 4109 this._mouseDrag(event); 4110 return event.preventDefault(); 4111 } 4112 4113 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 4114 this._mouseStarted = 4115 (this._mouseStart(this._mouseDownEvent, event) !== false); 4116 (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); 4117 } 4118 4119 return !this._mouseStarted; 4120 }, 4121 4122 _mouseUp: function(event) { 4123 $(document) 4124 .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) 4125 .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); 4126 4127 if (this._mouseStarted) { 4128 this._mouseStarted = false; 4129 this._preventClickEvent = true; 4130 this._mouseStop(event); 4131 } 4132 4133 return false; 4134 }, 4135 4136 _mouseDistanceMet: function(event) { 4137 return (Math.max( 4138 Math.abs(this._mouseDownEvent.pageX - event.pageX), 4139 Math.abs(this._mouseDownEvent.pageY - event.pageY) 4140 ) >= this.options.distance 4141 ); 4142 }, 4143 4144 _mouseDelayMet: function(event) { 4145 return this.mouseDelayMet; 4146 }, 4147 4148 // These are placeholder methods, to be overriden by extending plugin 4149 _mouseStart: function(event) {}, 4150 _mouseDrag: function(event) {}, 4151 _mouseStop: function(event) {}, 4152 _mouseCapture: function(event) { return true; } 4153 }; 4154 4155 $.ui.mouse.defaults = { 4156 cancel: null, 4157 distance: 1, 4158 delay: 0 4159 }; 4160 4161 })(jQuery); 4162 ]]></data></item> 4163 <item key="id"><![CDATA[ui.core.js]]></item> 4164 <item key="mandatory" type="int">0</item> 4165 <item key="multilang" type="int">0</item> 4166 <item key="name"><![CDATA[jQuery UI Core-1.6rc6]]></item> 4167 <item key="repetitive" type="int">0</item> 4168 <item key="type"><![CDATA[resource]]></item> 4169 </dictionary> 4170 </item> 4171 <item type="dictionary"><dictionary> 4172 <item key="custom"> 4173 <data content_type="text/x-c" filename="ui.dialog.js" type="file"><![CDATA[/* 4174 * jQuery UI Dialog 1.6rc6 3266 jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* 3267 * jQuery UI Draggable 1.7.2 4175 3268 * 4176 * Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about) 3269 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 3270 * Dual licensed under the MIT (MIT-LICENSE.txt) 3271 * and GPL (GPL-LICENSE.txt) licenses. 3272 * 3273 * http://docs.jquery.com/UI/Draggables 3274 * 3275 * Depends: 3276 * ui.core.js 3277 */ 3278 (function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;/* 3279 * jQuery UI Resizable 1.7.2 3280 * 3281 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 3282 * Dual licensed under the MIT (MIT-LICENSE.txt) 3283 * and GPL (GPL-LICENSE.txt) licenses. 3284 * 3285 * http://docs.jquery.com/UI/Resizables 3286 * 3287 * Depends: 3288 * ui.core.js 3289 */ 3290 (function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/* 3291 * jQuery UI Sortable 1.7.2 3292 * 3293 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 3294 * Dual licensed under the MIT (MIT-LICENSE.txt) 3295 * and GPL (GPL-LICENSE.txt) licenses. 3296 * 3297 * http://docs.jquery.com/UI/Sortables 3298 * 3299 * Depends: 3300 * ui.core.js 3301 */ 3302 (function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/* 3303 * jQuery UI Dialog 1.7.2 3304 * 3305 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 4177 3306 * Dual licensed under the MIT (MIT-LICENSE.txt) 4178 3307 * and GPL (GPL-LICENSE.txt) licenses. … … 4185 3314 * ui.resizable.js 4186 3315 */ 4187 (function($) { 4188 4189 var setDataSwitch = { 4190 dragStart: "start.draggable", 4191 drag: "drag.draggable", 4192 dragStop: "stop.draggable", 4193 maxHeight: "maxHeight.resizable", 4194 minHeight: "minHeight.resizable", 4195 maxWidth: "maxWidth.resizable", 4196 minWidth: "minWidth.resizable", 4197 resizeStart: "start.resizable", 4198 resize: "drag.resizable", 4199 resizeStop: "stop.resizable" 4200 }; 4201 4202 $.widget("ui.dialog", { 4203 4204 _init: function() { 4205 this.originalTitle = this.element.attr('title'); 4206 4207 var self = this, 4208 options = this.options, 4209 4210 title = options.title || this.originalTitle || ' ', 4211 titleId = $.ui.dialog.getTitleId(this.element), 4212 4213 uiDialog = (this.uiDialog = $('<div/>')) 4214 .appendTo(document.body) 4215 .hide() 4216 .addClass( 4217 'ui-dialog ' + 4218 'ui-widget ' + 4219 'ui-widget-content ' + 4220 'ui-corner-all ' + 4221 options.dialogClass 4222 ) 4223 .css({ 4224 position: 'absolute', 4225 overflow: 'hidden', 4226 zIndex: options.zIndex 4227 }) 4228 // setting tabIndex makes the div focusable 4229 // setting outline to 0 prevents a border on focus in Mozilla 4230 .attr('tabIndex', -1).css('outline', 0).keydown(function(event) { 4231 (options.closeOnEscape && event.keyCode 4232 && event.keyCode == $.ui.keyCode.ESCAPE && self.close(event)); 4233 }) 4234 .attr({ 4235 role: 'dialog', 4236 'aria-labelledby': titleId 4237 }) 4238 .mousedown(function(event) { 4239 self.moveToTop(event); 4240 }), 4241 4242 uiDialogContent = this.element 4243 .show() 4244 .removeAttr('title') 4245 .addClass( 4246 'ui-dialog-content ' + 4247 'ui-widget-content') 4248 .appendTo(uiDialog), 4249 4250 uiDialogTitlebar = (this.uiDialogTitlebar = $('<div></div>')) 4251 .addClass( 4252 'ui-dialog-titlebar ' + 4253 'ui-widget-header ' + 4254 'ui-corner-all ' + 4255 'ui-helper-clearfix' 4256 ) 4257 .prependTo(uiDialog), 4258 4259 uiDialogTitlebarClose = $('<a href="#"/>') 4260 .addClass( 4261 'ui-dialog-titlebar-close ' + 4262 'ui-corner-all' 4263 ) 4264 .attr('role', 'button') 4265 .hover( 4266 function() { 4267 uiDialogTitlebarClose.addClass('ui-state-hover'); 4268 }, 4269 function() { 4270 uiDialogTitlebarClose.removeClass('ui-state-hover'); 4271 } 4272 ) 4273 .focus(function() { 4274 uiDialogTitlebarClose.addClass('ui-state-focus'); 4275 }) 4276 .blur(function() { 4277 uiDialogTitlebarClose.removeClass('ui-state-focus'); 4278 }) 4279 .mousedown(function(ev) { 4280 ev.stopPropagation(); 4281 }) 4282 .click(function(event) { 4283 self.close(event); 4284 return false; 4285 }) 4286 .appendTo(uiDialogTitlebar), 4287 4288 uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('<span/>')) 4289 .addClass( 4290 'ui-icon ' + 4291 'ui-icon-closethick' 4292 ) 4293 .text(options.closeText) 4294 .appendTo(uiDialogTitlebarClose), 4295 4296 uiDialogTitle = $('<span/>') 4297 .addClass('ui-dialog-title') 4298 .attr('id', titleId) 4299 .html(title) 4300 .prependTo(uiDialogTitlebar); 4301 4302 uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection(); 4303 4304 (options.draggable && $.fn.draggable && this._makeDraggable()); 4305 (options.resizable && $.fn.resizable && this._makeResizable()); 4306 4307 this._createButtons(options.buttons); 4308 this._isOpen = false; 4309 4310 (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe()); 4311 (options.autoOpen && this.open()); 4312 4313 }, 4314 4315 destroy: function() { 4316 (this.overlay && this.overlay.destroy()); 4317 (this.shadow && this._destroyShadow()); 4318 this.uiDialog.hide(); 4319 this.element 4320 .unbind('.dialog') 4321 .removeData('dialog') 4322 .removeClass('ui-dialog-content ui-widget-content') 4323 .hide().appendTo('body'); 4324 this.uiDialog.remove(); 4325 4326 (this.originalTitle && this.element.attr('title', this.originalTitle)); 4327 }, 4328 4329 close: function(event) { 4330 if (false === this._trigger('beforeclose', event)) { 4331 return; 4332 } 4333 4334 (this.overlay && this.overlay.destroy()); 4335 (this.shadow && this._destroyShadow()); 4336 this.uiDialog 4337 .hide(this.options.hide) 4338 .unbind('keypress.ui-dialog'); 4339 4340 this._trigger('close', event); 4341 $.ui.dialog.overlay.resize(); 4342 4343 this._isOpen = false; 4344 }, 4345 4346 isOpen: function() { 4347 return this._isOpen; 4348 }, 4349 4350 // the force parameter allows us to move modal dialogs to their correct 4351 // position on open 4352 moveToTop: function(force, event) { 4353 4354 if ((this.options.modal && !force) 4355 || (!this.options.stack && !this.options.modal)) { 4356 return this._trigger('focus', event); 4357 } 4358 4359 var maxZ = this.options.zIndex, options = this.options; 4360 $('.ui-dialog:visible').each(function() { 4361 maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10) || options.zIndex); 4362 }); 4363 (this.overlay && this.overlay.$el.css('z-index', ++maxZ)); 4364 (this.shadow && this.shadow.css('z-index', ++maxZ)); 4365 4366 //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed. 4367 // http://ui.jquery.com/bugs/ticket/3193 4368 var saveScroll = { scrollTop: this.element.attr('scrollTop'), scrollLeft: this.element.attr('scrollLeft') }; 4369 this.uiDialog.css('z-index', ++maxZ); 4370 this.element.attr(saveScroll); 4371 this._trigger('focus', event); 4372 }, 4373 4374 open: function(event) { 4375 if (this._isOpen) { return; } 4376 4377 var options = this.options, 4378 uiDialog = this.uiDialog; 4379 4380 this.overlay = options.modal ? new $.ui.dialog.overlay(this) : null; 4381 (uiDialog.next().length && uiDialog.appendTo('body')); 4382 this._size(); 4383 this._position(options.position); 4384 uiDialog.show(options.show); 4385 this.moveToTop(true, event); 4386 4387 // prevent tabbing out of modal dialogs 4388 (options.modal && uiDialog.bind('keypress.ui-dialog', function(event) { 4389 if (event.keyCode != $.ui.keyCode.TAB) { 4390 return; 4391 } 4392 4393 var tabbables = $(':tabbable', this), 4394 first = tabbables.filter(':first')[0], 4395 last = tabbables.filter(':last')[0]; 4396 4397 if (event.target == last && !event.shiftKey) { 4398 setTimeout(function() { 4399 first.focus(); 4400 }, 1); 4401 } else if (event.target == first && event.shiftKey) { 4402 setTimeout(function() { 4403 last.focus(); 4404 }, 1); 4405 } 4406 })); 4407 4408 // set focus to the first tabbable element in: 4409 // - content area 4410 // - button pane 4411 // - title bar 4412 $([]) 4413 .add(uiDialog.find('.ui-dialog-content :tabbable:first')) 4414 .add(uiDialog.find('.ui-dialog-buttonpane :tabbable:first')) 4415 .add(uiDialog.find('.ui-dialog-titlebar :tabbable:first')) 4416 .filter(':first') 4417 .focus(); 4418 4419 if(options.shadow) 4420 this._createShadow(); 4421 4422 this._trigger('open', event); 4423 this._isOpen = true; 4424 }, 4425 4426 _createButtons: function(buttons) { 4427 var self = this, 4428 hasButtons = false, 4429 uiDialogButtonPane = $('<div></div>') 4430 .addClass( 4431 'ui-dialog-buttonpane ' + 4432 'ui-widget-content ' + 4433 'ui-helper-clearfix' 4434 ); 4435 4436 // if we already have a button pane, remove it 4437 this.uiDialog.find('.ui-dialog-buttonpane').remove(); 4438 4439 (typeof buttons == 'object' && buttons !== null && 4440 $.each(buttons, function() { return !(hasButtons = true); })); 4441 if (hasButtons) { 4442 $.each(buttons, function(name, fn) { 4443 $('<button type="button"></button>') 4444 .addClass( 4445 'ui-state-default ' + 4446 'ui-corner-all' 4447 ) 4448 .text(name) 4449 .click(function() { fn.apply(self.element[0], arguments); }) 4450 .hover( 4451 function() { 4452 $(this).addClass('ui-state-hover'); 4453 }, 4454 function() { 4455 $(this).removeClass('ui-state-hover'); 4456 } 4457 ) 4458 .focus(function() { 4459 $(this).addClass('ui-state-focus'); 4460 }) 4461 .blur(function() { 4462 $(this).removeClass('ui-state-focus'); 4463 }) 4464 .appendTo(uiDialogButtonPane); 4465 }); 4466 uiDialogButtonPane.appendTo(this.uiDialog); 4467 } 4468 }, 4469 4470 _makeDraggable: function() { 4471 var self = this, 4472 options = this.options; 4473 4474 this.uiDialog.draggable({ 4475 cancel: '.ui-dialog-content', 4476 helper: options.dragHelper, 4477 handle: '.ui-dialog-titlebar', 4478 containment: 'document', 4479 start: function() { 4480 (options.dragStart && options.dragStart.apply(self.element[0], arguments)); 4481 if($.browser.msie && $.browser.version < 7 && self.shadow) self.shadow.hide(); 4482 }, 4483 drag: function() { 4484 (options.drag && options.drag.apply(self.element[0], arguments)); 4485 self._refreshShadow(1); 4486 }, 4487 stop: function() { 4488 (options.dragStop && options.dragStop.apply(self.element[0], arguments)); 4489 $.ui.dialog.overlay.resize(); 4490 if($.browser.msie && $.browser.version < 7 && self.shadow) self.shadow.show(); 4491 self._refreshShadow(); 4492 } 4493 }); 4494 }, 4495 4496 _makeResizable: function(handles) { 4497 handles = (handles === undefined ? this.options.resizable : handles); 4498 var self = this, 4499 options = this.options, 4500 resizeHandles = typeof handles == 'string' 4501 ? handles 4502 : 'n,e,s,w,se,sw,ne,nw'; 4503 4504 this.uiDialog.resizable({ 4505 cancel: '.ui-dialog-content', 4506 alsoResize: this.element, 4507 helper: options.resizeHelper, 4508 maxWidth: options.maxWidth, 4509 maxHeight: options.maxHeight, 4510 minWidth: options.minWidth, 4511 minHeight: options.minHeight, 4512 start: function() { 4513 (options.resizeStart && options.resizeStart.apply(self.element[0], arguments)); 4514 if($.browser.msie && $.browser.version < 7 && self.shadow) self.shadow.hide(); 4515 }, 4516 resize: function() { 4517 (options.resize && options.resize.apply(self.element[0], arguments)); 4518 self._refreshShadow(1); 4519 }, 4520 handles: resizeHandles, 4521 stop: function() { 4522 (options.resizeStop && options.resizeStop.apply(self.element[0], arguments)); 4523 $.ui.dialog.overlay.resize(); 4524 if($.browser.msie && $.browser.version < 7 && self.shadow) self.shadow.show(); 4525 self._refreshShadow(); 4526 } 4527 }) 4528 .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se'); 4529 }, 4530 4531 _position: function(pos) { 4532 var wnd = $(window), doc = $(document), 4533 pTop = doc.scrollTop(), pLeft = doc.scrollLeft(), 4534 minTop = pTop; 4535 4536 if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) { 4537 pos = [ 4538 pos == 'right' || pos == 'left' ? pos : 'center', 4539 pos == 'top' || pos == 'bottom' ? pos : 'middle' 4540 ]; 4541 } 4542 if (pos.constructor != Array) { 4543 pos = ['center', 'middle']; 4544 } 4545 if (pos[0].constructor == Number) { 4546 pLeft += pos[0]; 4547 } else { 4548 switch (pos[0]) { 4549 case 'left': 4550 pLeft += 0; 4551 break; 4552 case 'right': 4553 pLeft += wnd.width() - this.uiDialog.outerWidth(); 4554 break; 4555 default: 4556 case 'center': 4557 pLeft += (wnd.width() - this.uiDialog.outerWidth()) / 2; 4558 } 4559 } 4560 if (pos[1].constructor == Number) { 4561 pTop += pos[1]; 4562 } else { 4563 switch (pos[1]) { 4564 case 'top': 4565 pTop += 0; 4566 break; 4567 case 'bottom': 4568 pTop += wnd.height() - this.uiDialog.outerHeight(); 4569 break; 4570 default: 4571 case 'middle': 4572 pTop += (wnd.height() - this.uiDialog.outerHeight()) / 2; 4573 } 4574 } 4575 4576 // prevent the dialog from being too high (make sure the titlebar 4577 // is accessible) 4578 pTop = Math.max(pTop, minTop); 4579 this.uiDialog.css({top: pTop, left: pLeft}); 4580 }, 4581 4582 _setData: function(key, value){ 4583 (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value)); 4584 switch (key) { 4585 case "buttons": 4586 this._createButtons(value); 4587 break; 4588 case "closeText": 4589 this.uiDialogTitlebarCloseText.text(value); 4590 break; 4591 case "draggable": 4592 (value 4593 ? this._makeDraggable() 4594 : this.uiDialog.draggable('destroy')); 4595 break; 4596 case "height": 4597 this.uiDialog.height(value); 4598 break; 4599 case "position": 4600 this._position(value); 4601 break; 4602 case "resizable": 4603 var uiDialog = this.uiDialog, 4604 isResizable = this.uiDialog.is(':data(resizable)'); 4605 4606 // currently resizable, becoming non-resizable 4607 (isResizable && !value && uiDialog.resizable('destroy')); 4608 4609 // currently resizable, changing handles 4610 (isResizable && typeof value == 'string' && 4611 uiDialog.resizable('option', 'handles', value)); 4612 4613 // currently non-resizable, becoming resizable 4614 (isResizable || this._makeResizable(value)); 4615 4616 break; 4617 case "title": 4618 $(".ui-dialog-title", this.uiDialogTitlebar).html(value || ' '); 4619 break; 4620 case "width": 4621 this.uiDialog.width(value); 4622 break; 4623 } 4624 4625 $.widget.prototype._setData.apply(this, arguments); 4626 }, 4627 4628 _size: function() { 4629 /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content 4630 * divs will both have width and height set, so we need to reset them 4631 */ 4632 var options = this.options; 4633 4634 // reset content sizing 4635 this.element.css({ 4636 height: 0, 4637 minHeight: 0, 4638 width: 'auto' 4639 }); 4640 4641 // reset wrapper sizing 4642 // determine the height of all the non-content elements 4643 var nonContentHeight = this.uiDialog.css({ 4644 height: 'auto', 4645 width: options.width 4646 }) 4647 .height(); 4648 4649 this.element 4650 .css({ 4651 minHeight: Math.max(options.minHeight - nonContentHeight, 0), 4652 height: options.height == 'auto' 4653 ? 'auto' 4654 : options.height - nonContentHeight 4655 }); 4656 }, 4657 4658 _createShadow: function() { 4659 this.shadow = $('<div class="ui-widget-shadow"></div>').css('position', 'absolute').appendTo(document.body); 4660 this._refreshShadow(); 4661 return this.shadow; 4662 }, 4663 4664 _refreshShadow: function(dragging) { 4665 // IE6 is simply to slow to handle the reflow in a good way, so 4666 // resizing only happens on stop, and the shadow is hidden during drag/resize 4667 if(dragging && $.browser.msie && $.browser.version < 7) return; 4668 4669 var offset = this.uiDialog.offset(); 4670 this.shadow.css({ 4671 left: offset.left, 4672 top: offset.top, 4673 width: this.uiDialog.outerWidth(), 4674 height: this.uiDialog.outerHeight() 4675 }); 4676 }, 4677 4678 _destroyShadow: function() { 4679 this.shadow.remove(); 4680 this.shadow = null; 4681 } 4682 4683 }); 4684 4685 $.extend($.ui.dialog, { 4686 version: "1.6rc6", 4687 defaults: { 4688 autoOpen: true, 4689 bgiframe: false, 4690 buttons: {}, 4691 closeOnEscape: true, 4692 closeText: 'close', 4693 draggable: true, 4694 height: 'auto', 4695 minHeight: 150, 4696 minWidth: 150, 4697 modal: false, 4698 position: 'center', 4699 resizable: true, 4700 shadow: true, 4701 stack: true, 4702 title: '', 4703 width: 300, 4704 zIndex: 1000 4705 }, 4706 4707 getter: 'isOpen', 4708 4709 uuid: 0, 4710 4711 getTitleId: function($el) { 4712 return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid); 4713 }, 4714 4715 overlay: function(dialog) { 4716 this.$el = $.ui.dialog.overlay.create(dialog); 4717 } 4718 }); 4719 4720 $.extend($.ui.dialog.overlay, { 4721 instances: [], 4722 events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','), 4723 function(event) { return event + '.dialog-overlay'; }).join(' '), 4724 create: function(dialog) { 4725 if (this.instances.length === 0) { 4726 // prevent use of anchors and inputs 4727 // we use a setTimeout in case the overlay is created from an 4728 // event that we're going to be cancelling (see #2804) 4729 setTimeout(function() { 4730 $('a, :input').bind($.ui.dialog.overlay.events, function() { 4731 // allow use of the element if inside a dialog and 4732 // - there are no modal dialogs 4733 // - there are modal dialogs, but we are in front of the topmost modal 4734 var allow = false; 4735 var $dialog = $(this).parents('.ui-dialog'); 4736 if ($dialog.length) { 4737 var $overlays = $('.ui-dialog-overlay'); 4738 if ($overlays.length) { 4739 var maxZ = parseInt($overlays.css('z-index'), 10); 4740 $overlays.each(function() { 4741 maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10)); 4742 }); 4743 allow = parseInt($dialog.css('z-index'), 10) > maxZ; 4744 } else { 4745 allow = true; 4746 } 4747 } 4748 return allow; 4749 }); 4750 }, 1); 4751 4752 // allow closing by pressing the escape key 4753 $(document).bind('keydown.dialog-overlay', function(event) { 4754 (dialog.options.closeOnEscape && event.keyCode 4755 && event.keyCode == $.ui.keyCode.ESCAPE && dialog.close(event)); 4756 }); 4757 4758 // handle window resize 4759 $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize); 4760 } 4761 4762 var $el = $('<div></div>').appendTo(document.body) 4763 .addClass('ui-widget-overlay').css({ 4764 width: this.width(), 4765 height: this.height() 4766 }); 4767 4768 (dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe()); 4769 4770 this.instances.push($el); 4771 return $el; 4772 }, 4773 4774 destroy: function($el) { 4775 this.instances.splice($.inArray(this.instances, $el), 1); 4776 4777 if (this.instances.length === 0) { 4778 $('a, :input').add([document, window]).unbind('.dialog-overlay'); 4779 } 4780 4781 $el.remove(); 4782 }, 4783 4784 height: function() { 4785 // handle IE 6 4786 if ($.browser.msie && $.browser.version < 7) { 4787 var scrollHeight = Math.max( 4788 document.documentElement.scrollHeight, 4789 document.body.scrollHeight 4790 ); 4791 var offsetHeight = Math.max( 4792 document.documentElement.offsetHeight, 4793 document.body.offsetHeight 4794 ); 4795 4796 if (scrollHeight < offsetHeight) { 4797 return $(window).height() + 'px'; 4798 } else { 4799 return scrollHeight + 'px'; 4800 } 4801 // handle "good" browsers 4802 } else { 4803 return $(document).height() + 'px'; 4804 } 4805 }, 4806 4807 width: function() { 4808 // handle IE 6 4809 if ($.browser.msie && $.browser.version < 7) { 4810 var scrollWidth = Math.max( 4811 document.documentElement.scrollWidth, 4812 document.body.scrollWidth 4813 ); 4814 var offsetWidth = Math.max( 4815 document.documentElement.offsetWidth, 4816 document.body.offsetWidth 4817 ); 4818 4819 if (scrollWidth < offsetWidth) { 4820 return $(window).width() + 'px'; 4821 } else { 4822 return scrollWidth + 'px'; 4823 } 4824 // handle "good" browsers 4825 } else { 4826 return $(document).width() + 'px'; 4827 } 4828 }, 4829 4830 resize: function() { 4831 /* If the dialog is draggable and the user drags it past the 4832 * right edge of the window, the document becomes wider so we 4833 * need to stretch the overlay. If the user then drags the 4834 * dialog back to the left, the document will become narrower, 4835 * so we need to shrink the overlay to the appropriate size. 4836 * This is handled by shrinking the overlay before setting it 4837 * to the full document size. 4838 */ 4839 var $overlays = $([]); 4840 $.each($.ui.dialog.overlay.instances, function() { 4841 $overlays = $overlays.add(this); 4842 }); 4843 4844 $overlays.css({ 4845 width: 0, 4846 height: 0 4847 }).css({ 4848 width: $.ui.dialog.overlay.width(), 4849 height: $.ui.dialog.overlay.height() 4850 }); 4851 } 4852 }); 4853 4854 $.extend($.ui.dialog.overlay.prototype, { 4855 destroy: function() { 4856 $.ui.dialog.overlay.destroy(this.$el); 4857 } 4858 }); 4859 4860 })(jQuery); 4861 ]]></data></item> 4862 <item key="id"><![CDATA[ui.dialog.js]]></item> 4863 <item key="mandatory" type="int">0</item> 4864 <item key="multilang" type="int">0</item> 4865 <item key="name"><![CDATA[jQuery UI Dialog-1.6rc6]]></item> 3316 (function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||" ",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||" ");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;]]></data></item> 3317 <item key="id"><![CDATA[jquery.ui.js]]></item> 3318 <item key="mandatory" type="int">0</item> 3319 <item key="multilang" type="int">0</item> 3320 <item key="name"><![CDATA[jQuery UI-1.7.2]]></item> 4866 3321 <item key="repetitive" type="int">0</item> 4867 3322 <item key="type"><![CDATA[resource]]></item> … … 5747 4202 </list> 5748 4203 </item> 5749 <item key="delete_custom" />4204 <item key="delete_custom"></item> 5750 4205 <item key="edit" type="list"><list> 5751 4206 </list> 5752 4207 </item> 5753 <item key="edit_custom" />4208 <item key="edit_custom"></item> 5754 4209 <item key="insert" type="list"><list> 5755 4210 </list> 5756 4211 </item> 5757 <item key="insert_custom" />4212 <item key="insert_custom"></item> 5758 4213 </dictionary> 5759 4214 </item> … … 5762 4217 <item key="name"><![CDATA[Library]]></item> 5763 4218 <item key="package"><![CDATA[com.zms.mediaplayer]]></item> 5764 <item key="revision"><![CDATA[2.1. 2]]></item>4219 <item key="revision"><![CDATA[2.1.3]]></item> 5765 4220 <item key="type"><![CDATA[ZMSLibrary]]></item> 5766 4221 </dictionary> … … 5996 4451 </list> 5997 4452 </item> 5998 <item key="delete_custom" />4453 <item key="delete_custom"></item> 5999 4454 <item key="edit" type="list"><list> 6000 4455 <item><![CDATA[ZMSAdministrator]]></item> … … 6003 4458 </list> 6004 4459 </item> 6005 <item key="edit_custom" />4460 <item key="edit_custom"></item> 6006 4461 <item key="insert" type="list"><list> 6007 4462 <item><![CDATA[ZMSAdministrator]]></item> … … 6175 4630 </list> 6176 4631 </item> 6177 <item key="delete_custom" />4632 <item key="delete_custom"></item> 6178 4633 <item key="edit" type="list"><list> 6179 4634 <item><![CDATA[ZMSAdministrator]]></item> … … 6182 4637 </list> 6183 4638 </item> 6184 <item key="edit_custom" />4639 <item key="edit_custom"></item> 6185 4640 <item key="insert" type="list"><list> 6186 4641 <item><![CDATA[ZMSAdministrator]]></item> … … 6395 4850 </list> 6396 4851 </item> 6397 <item key="delete_custom" />4852 <item key="delete_custom"></item> 6398 4853 <item key="edit" type="list"><list> 6399 4854 <item><![CDATA[ZMSAdministrator]]></item> … … 6402 4857 </list> 6403 4858 </item> 6404 <item key="edit_custom" />4859 <item key="edit_custom"></item> 6405 4860 <item key="insert" type="list"><list> 6406 4861 <item><![CDATA[ZMSAdministrator]]></item> … … 6432 4887 </list> 6433 4888 </item> 6434 <item key="delete_custom" />4889 <item key="delete_custom"></item> 6435 4890 <item key="edit" type="list"><list> 6436 4891 </list> 6437 4892 </item> 6438 <item key="edit_custom" />4893 <item key="edit_custom"></item> 6439 4894 <item key="insert" type="list"><list> 6440 4895 </list> 6441 4896 </item> 6442 <item key="insert_custom" />4897 <item key="insert_custom"></item> 6443 4898 </dictionary> 6444 4899 </item> … … 6446 4901 <item key="id"><![CDATA[com.zms.mediaplayer]]></item> 6447 4902 <item key="name"><![CDATA[com.zms.mediaplayer]]></item> 6448 <item key="package" />4903 <item key="package"></item> 6449 4904 <item key="revision"><![CDATA[3.1.0]]></item> 6450 4905 <item key="type"><![CDATA[ZMSPackage]]></item>
Note: See TracChangeset
for help on using the changeset viewer.
