From e12efbc9b36771c873844ec936f9df5b64ce18d7 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Sat, 20 Mar 2010 12:31:28 +1300 Subject: [PATCH 01/55] Removed dependency on Google Gears to allow it to work on safari. Fixed issues with opacity on IE. There are still some issues with viewing on IE. --- .../com.google.gwt.eclipse.core.prefs | 2 +- .../com/gloopics/g3viewer/G3viewer.gwt.xml | 9 +- .../com/gloopics/g3viewer/client/Album.java | 533 +++-- .../gloopics/g3viewer/client/G3Viewer.java | 10 +- .../g3viewer/client/InformationBar.java | 9 + .../com/gloopics/g3viewer/client/Item.java | 5 +- .../com/gloopics/g3viewer/client/NoGears.java | 13 - .../g3viewer/client/UploadControl.java | 9 +- .../g3viewer/client/UploadControlNoGears.java | 53 + .../com/gloopics/g3viewer/client/View.java | 5 +- .../client/dnddesktop/DesktopDrop.java | 5 + .../client/dnddesktop/DesktopDropBase.java | 2 +- .../client/dnddesktop/DesktopDropFile.java | 7 - .../client/dnddesktop/DesktopDropFileIE.java | 1 - .../client/dnddesktop/DndDesktopFactory.java | 2 +- .../dnddesktop/DndDesktopFactoryIE.java | 2 +- .../dnddesktop/DndDesktopFactoryNoGears.java | 8 + .../com/gloopics/g3viewer/public/G3viewer.css | 6 +- modules/gwtorganise/war/.htaccess | 9 + .../com/gloopics/g3viewer/G3viewer.gwt.xml | 9 +- .../gloopics/g3viewer/client/Album$1.class | Bin 796 -> 796 bytes .../gloopics/g3viewer/client/Album$10.class | Bin 873 -> 873 bytes .../gloopics/g3viewer/client/Album$11.class | Bin 1076 -> 1076 bytes .../gloopics/g3viewer/client/Album$12.class | Bin 2509 -> 2517 bytes .../gloopics/g3viewer/client/Album$2$1.class | Bin 911 -> 911 bytes .../gloopics/g3viewer/client/Album$2.class | Bin 1659 -> 1667 bytes .../gloopics/g3viewer/client/Album$3$1.class | Bin 0 -> 1154 bytes .../gloopics/g3viewer/client/Album$3.class | Bin 924 -> 1746 bytes .../gloopics/g3viewer/client/Album$4$1.class | Bin 1154 -> 737 bytes .../gloopics/g3viewer/client/Album$4.class | Bin 1738 -> 1539 bytes .../gloopics/g3viewer/client/Album$5$1.class | Bin 737 -> 0 bytes .../gloopics/g3viewer/client/Album$5.class | Bin 1531 -> 924 bytes .../gloopics/g3viewer/client/Album$6.class | Bin 1424 -> 1424 bytes .../gloopics/g3viewer/client/Album$7.class | Bin 1090 -> 1090 bytes .../gloopics/g3viewer/client/Album$8.class | Bin 1084 -> 1084 bytes .../gloopics/g3viewer/client/Album$9.class | Bin 871 -> 871 bytes .../com/gloopics/g3viewer/client/Album.class | Bin 14397 -> 14545 bytes .../g3viewer/client/G3Viewer$1$1.class | Bin 1018 -> 1018 bytes .../gloopics/g3viewer/client/G3Viewer$1.class | Bin 2095 -> 2095 bytes .../gloopics/g3viewer/client/G3Viewer$2.class | Bin 2384 -> 2384 bytes .../gloopics/g3viewer/client/G3Viewer.class | Bin 8335 -> 8554 bytes .../g3viewer/client/InformationBar$1$1.class | Bin 841 -> 841 bytes .../g3viewer/client/InformationBar$1.class | Bin 1260 -> 1260 bytes .../g3viewer/client/InformationBar.class | Bin 2181 -> 2442 bytes .../com/gloopics/g3viewer/client/Item$3.class | Bin 790 -> 790 bytes .../gloopics/g3viewer/client/Item$4$1.class | Bin 1313 -> 1313 bytes .../com/gloopics/g3viewer/client/Item$4.class | Bin 1675 -> 1675 bytes .../gloopics/g3viewer/client/Item$5$1.class | Bin 902 -> 902 bytes .../com/gloopics/g3viewer/client/Item$5.class | Bin 1835 -> 1835 bytes .../gloopics/g3viewer/client/Item$6$1.class | Bin 771 -> 771 bytes .../com/gloopics/g3viewer/client/Item$6.class | Bin 1661 -> 1661 bytes .../gloopics/g3viewer/client/Item$7$1.class | Bin 1023 -> 1023 bytes .../com/gloopics/g3viewer/client/Item$7.class | Bin 2095 -> 2095 bytes .../gloopics/g3viewer/client/Item$8$1.class | Bin 1023 -> 1023 bytes .../com/gloopics/g3viewer/client/Item$8.class | Bin 2096 -> 2096 bytes .../com/gloopics/g3viewer/client/Item$9.class | Bin 1291 -> 1291 bytes .../com/gloopics/g3viewer/client/Item.class | Bin 12209 -> 12247 bytes .../gloopics/g3viewer/client/NoGears.class | Bin 984 -> 0 bytes .../g3viewer/client/UploadControl.class | Bin 3038 -> 3184 bytes .../client/UploadControlNoGears.class | Bin 0 -> 1731 bytes .../com/gloopics/g3viewer/client/View$1.class | Bin 899 -> 899 bytes .../com/gloopics/g3viewer/client/View.class | Bin 6632 -> 6691 bytes .../client/dnddesktop/DesktopDrop.class | Bin 0 -> 143 bytes .../client/dnddesktop/DesktopDropBase.class | Bin 2043 -> 2102 bytes .../client/dnddesktop/DesktopDropFile.class | Bin 1077 -> 804 bytes .../client/dnddesktop/DesktopDropFileIE.class | Bin 810 -> 810 bytes .../client/dnddesktop/DndDesktopFactory.class | Bin 790 -> 786 bytes .../dnddesktop/DndDesktopFactoryIE.class | Bin 839 -> 835 bytes .../DndDesktopFactoryNoGears$1.class | Bin 0 -> 887 bytes .../dnddesktop/DndDesktopFactoryNoGears.class | Bin 0 -> 892 bytes .../com/gloopics/g3viewer/public/G3viewer.css | 6 +- ...15D751F4204508258E3AD3E74E19E72.cache.html | 313 --- ...9A21085406FD3AEFF74EE8471199B8A.cache.html | 1795 ++++++++++++++++ ...A21C4AA9FA3F1812B8077A68729DA52.cache.html | 314 --- ...AB3C6DF30C08F43EAA999A9F920C30B.cache.html | 1818 ---------------- ...295227D4A416F64C8B3061D11DFABA0.cache.html | 1777 ---------------- ...71B2293E0881C8A53FDA41CA333A843.cache.html | 1795 ---------------- ...E4F3EA15819E3548B40625FACE2EBBE.cache.html | 1823 +++++++++++++++++ ...6E36699DD51342BCC1877A718D3B6D5.cache.html | 326 --- ...DD08D394689CC09C7978BC0F3B16995.cache.html | 1684 +++++++++++++++ ...7F950D32C617CAE2C8052EA05BDC171.cache.html | 1777 ++++++++++++++++ ...C5462085DC7810C7E2A1392D87E6531.cache.html | 1818 ++++++++++++++++ ...C1AD451EC3EDEB1136202063B8983F0.cache.html | 1661 +++++++++++++++ ...26A0FAD0C07BC304C641864F5274BFC.cache.html | 1819 ---------------- ...2CC6089F1DDA8F19D1F5BD74ED71B1B.cache.html | 1643 +++++++++++++++ ...CE6F9D8917D340A8A0D301E71E5507A.cache.html | 1685 +++++++++++++++ ...E48EA5D8ECD3E90C23EBF393DC6958A.cache.html | 1823 ----------------- ...71911CF996F6E89D496C872F18EA45B.cache.html | 311 --- ...0A3E821CD3689650D1DF0CEF5C506A9.cache.html | 1791 ---------------- ...3A8CA313CFDC8DB1F2ED097816C6EC0.cache.html | 1819 ++++++++++++++++ ...B317E0D3E395FA9682EC2E87A205F17.cache.html | 1657 +++++++++++++++ ...94A32538BE218C5D21AE0170373089B.cache.html | 1791 ++++++++++++++++ ...B10FC871F1917C3CF43B2E1A192D050.cache.html | 308 --- ...EAA0157C361541B2682E3107C5BF9ED.cache.html | 1688 +++++++++++++++ modules/gwtorganise/war/g3viewer/G3viewer.css | 6 +- .../1.cache.js | 7 - .../2.cache.js | 7 - .../3.cache.js | 75 - .../1.cache.js | 7 + .../2.cache.js | 6 + .../3.cache.js | 35 + .../1.cache.js | 7 - .../2.cache.js | 7 - .../3.cache.js | 75 - .../1.cache.js | 7 - .../2.cache.js | 6 - .../3.cache.js | 35 - .../1.cache.js | 7 - .../2.cache.js | 6 - .../3.cache.js | 35 - .../1.cache.js | 7 - .../2.cache.js | 6 - .../3.cache.js | 35 - .../1.cache.js | 7 + .../2.cache.js | 6 + .../3.cache.js | 35 + .../1.cache.js | 7 - .../2.cache.js | 7 - .../3.cache.js | 75 - .../1.cache.js | 9 + .../2.cache.js | 9 + .../3.cache.js | 54 + .../1.cache.js | 7 + .../2.cache.js | 6 + .../3.cache.js | 35 + .../1.cache.js | 7 + .../2.cache.js | 6 + .../3.cache.js | 35 + .../1.cache.js | 9 + .../2.cache.js | 9 + .../3.cache.js | 54 + .../1.cache.js | 7 - .../2.cache.js | 6 - .../3.cache.js | 35 - .../1.cache.js | 9 + .../2.cache.js | 9 + .../3.cache.js | 54 + .../1.cache.js | 9 + .../2.cache.js | 9 + .../3.cache.js | 54 + .../1.cache.js | 7 - .../2.cache.js | 6 - .../3.cache.js | 35 - .../1.cache.js | 7 - .../2.cache.js | 7 - .../3.cache.js | 75 - .../1.cache.js | 7 - .../2.cache.js | 6 - .../3.cache.js | 35 - .../1.cache.js | 7 + .../2.cache.js | 6 + .../3.cache.js | 35 + .../1.cache.js | 9 + .../2.cache.js | 9 + .../3.cache.js | 54 + .../1.cache.js | 7 + .../2.cache.js | 6 + .../3.cache.js | 35 + .../1.cache.js | 7 - .../2.cache.js | 7 - .../3.cache.js | 75 - .../1.cache.js | 9 + .../2.cache.js | 9 + .../3.cache.js | 54 + .../war/g3viewer/g3viewer.nocache.js | 6 +- 165 files changed, 21957 insertions(+), 13449 deletions(-) delete mode 100644 modules/gwtorganise/src/com/gloopics/g3viewer/client/NoGears.java create mode 100644 modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadControlNoGears.java create mode 100644 modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.java create mode 100644 modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.java create mode 100644 modules/gwtorganise/war/.htaccess create mode 100644 modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3$1.class delete mode 100644 modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5$1.class delete mode 100644 modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/NoGears.class create mode 100644 modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControlNoGears.class create mode 100644 modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.class create mode 100644 modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears$1.class create mode 100644 modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.class delete mode 100644 modules/gwtorganise/war/g3viewer/015D751F4204508258E3AD3E74E19E72.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/09A21085406FD3AEFF74EE8471199B8A.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/0A21C4AA9FA3F1812B8077A68729DA52.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/0AB3C6DF30C08F43EAA999A9F920C30B.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/3295227D4A416F64C8B3061D11DFABA0.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/371B2293E0881C8A53FDA41CA333A843.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/3E4F3EA15819E3548B40625FACE2EBBE.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/46E36699DD51342BCC1877A718D3B6D5.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/4DD08D394689CC09C7978BC0F3B16995.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/57F950D32C617CAE2C8052EA05BDC171.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/5C5462085DC7810C7E2A1392D87E6531.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/7C1AD451EC3EDEB1136202063B8983F0.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/826A0FAD0C07BC304C641864F5274BFC.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/82CC6089F1DDA8F19D1F5BD74ED71B1B.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/ACE6F9D8917D340A8A0D301E71E5507A.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/AE48EA5D8ECD3E90C23EBF393DC6958A.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/B71911CF996F6E89D496C872F18EA45B.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/C0A3E821CD3689650D1DF0CEF5C506A9.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/C3A8CA313CFDC8DB1F2ED097816C6EC0.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/CB317E0D3E395FA9682EC2E87A205F17.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/D94A32538BE218C5D21AE0170373089B.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/DB10FC871F1917C3CF43B2E1A192D050.cache.html create mode 100644 modules/gwtorganise/war/g3viewer/FEAA0157C361541B2682E3107C5BF9ED.cache.html delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/826A0FAD0C07BC304C641864F5274BFC/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/826A0FAD0C07BC304C641864F5274BFC/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/826A0FAD0C07BC304C641864F5274BFC/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/3.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/1.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/2.cache.js delete mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/3.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/1.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/2.cache.js create mode 100644 modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/3.cache.js diff --git a/modules/gwtorganise/.settings/com.google.gwt.eclipse.core.prefs b/modules/gwtorganise/.settings/com.google.gwt.eclipse.core.prefs index 7d6a4d40..3236ad0e 100644 --- a/modules/gwtorganise/.settings/com.google.gwt.eclipse.core.prefs +++ b/modules/gwtorganise/.settings/com.google.gwt.eclipse.core.prefs @@ -1,4 +1,4 @@ -#Thu Feb 11 15:27:06 NZDT 2010 +#Wed Mar 17 15:58:06 NZDT 2010 eclipse.preferences.version=1 entryPointModules= filesCopiedToWebInfLib=gwt-servlet.jar diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/G3viewer.gwt.xml b/modules/gwtorganise/src/com/gloopics/g3viewer/G3viewer.gwt.xml index ef16872b..ffe12be4 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/G3viewer.gwt.xml +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/G3viewer.gwt.xml @@ -9,8 +9,8 @@ - - + + @@ -29,5 +29,10 @@ + + + + + diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/Album.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/Album.java index a3df5ac4..dd23b4c7 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/Album.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/Album.java @@ -30,458 +30,437 @@ import com.google.gwt.user.client.ui.TreeItem; /** * encapsulates an album + * * @author User - * + * */ public class Album extends TreeItem { - + private final int m_ID; - + private String m_Title; - - + private final G3Viewer m_Container; - - private final View m_View; - + + private final View m_View; + private final Label m_Label; - + private String m_Sort; - + private final List m_Items = new ArrayList(); - + private final Map m_IDtoItem = new HashMap(); private final Map m_IDtoAlbum = new HashMap(); - + private final Set m_AllUploads = new HashSet(); - + private final AlbumTreeDropController m_DropController; - + private final UploadControl m_UploadControl; - - public Album(JSONObject jsonObject, G3Viewer a_Container) - { + + public Album(JSONObject jsonObject, G3Viewer a_Container) { m_UploadControl = a_Container.getUploadControl(); m_ID = Utils.extractId(jsonObject.get("id")); - m_Title = ((JSONString)jsonObject.get("title")).stringValue(); - m_Sort = ((JSONString)jsonObject.get("sort")).stringValue(); - + m_Title = ((JSONString) jsonObject.get("title")).stringValue(); + m_Sort = ((JSONString) jsonObject.get("sort")).stringValue(); + m_Container = a_Container; m_View = a_Container.getView(); - m_DropController = new AlbumTreeDropController(this); + m_DropController = new AlbumTreeDropController(this); m_Label = initComponents(); - + } - public Album(G3Viewer a_Container) - { + public Album(G3Viewer a_Container) { m_UploadControl = a_Container.getUploadControl(); m_ID = 1; m_Title = "Root"; m_Container = a_Container; m_View = a_Container.getView(); m_Sort = "Unknown"; - m_DropController = new AlbumTreeDropController(this); + m_DropController = new AlbumTreeDropController(this); m_Label = initComponents(); refresh(); } - - public void updateValues(JSONValue a_Jso){ + + public void updateValues(JSONValue a_Jso) { JSONObject jso = a_Jso.isObject(); - if (jso != null){ - m_Title = ((JSONString)jso.get("title")).stringValue(); + if (jso != null) { + m_Title = ((JSONString) jso.get("title")).stringValue(); String oldSort = m_Sort; - m_Sort = ((JSONString)jso.get("sort")).stringValue(); - if (!oldSort.equals(m_Sort)){ - if (m_View.getCurrentAlbum() == this) - { + m_Sort = ((JSONString) jso.get("sort")).stringValue(); + if (!oldSort.equals(m_Sort)) { + if (m_View.getCurrentAlbum() == this) { select(); } } m_Label.setText(m_Title); } } - - public void refresh(){ - m_Container.doJSONRequest(G3Viewer.VIEW_ITEM_URL + getId(), + + public void refresh() { + m_Container.doJSONRequest(G3Viewer.VIEW_ITEM_URL + getId(), new HttpSuccessHandler() { - + @Override public void success(JSONValue aValue) { updateValues(aValue); } - },false,true); + }, false, true); } - - - - public void showPopupMenu(Event event){ + + public void showPopupMenu(Event event) { m_Label.addStyleName("popped"); - final PopupPanel popupPanel = new PopupPanel(true); + final PopupPanel popupPanel = new PopupPanel(true); popupPanel.setAnimationEnabled(true); MenuBar popupMenuBar = new MenuBar(true); MenuItem editItem = new MenuItem("Edit Album", true, new Command() { - + @Override public void execute() { - m_Container.doDialog("index.php/form/edit/albums/" + m_ID, new HttpDialogHandler() { - @Override - public void success(String aResult) { - refresh(); - - } - }); + m_Container.doDialog("index.php/form/edit/albums/" + m_ID, + new HttpDialogHandler() { + @Override + public void success(String aResult) { + refresh(); + + } + }); popupPanel.hide(); - - } - }); - MenuItem uploadPhotos = new MenuItem("Upload Photos", true, new Command() { - - @Override - public void execute() { - uploadFiles(); - popupPanel.hide(); - + } }); + MenuItem addAlbum = new MenuItem("Add Album", true, new Command() { - + @Override public void execute() { - m_Container.doDialog("index.php/form/add/albums/" + m_ID + "?type=album", new HttpDialogHandler() { + m_Container.doDialog("index.php/form/add/albums/" + m_ID + + "?type=album", new HttpDialogHandler() { @Override public void success(String aResult) { expand(); m_View.getCurrentAlbum().select(); } }); - + popupPanel.hide(); - + } }); - - MenuItem userPermissions = new MenuItem("User Permissions", true, new Command() { - @Override - public void execute() { - m_Container.doDialog("index.php/permissions/browse/" + m_ID , new HttpDialogHandler() { + + MenuItem userPermissions = new MenuItem("User Permissions", true, + new Command() { @Override - public void success(String aResult) { + public void execute() { + m_Container.doDialog("index.php/permissions/browse/" + + m_ID, new HttpDialogHandler() { + @Override + public void success(String aResult) { + } + }); + + popupPanel.hide(); + } }); - - popupPanel.hide(); - - } - }); - + popupPanel.setStyleName("popup"); editItem.addStyleName("popup-item"); addAlbum.addStyleName("popup-item"); - uploadPhotos.addStyleName("popup-item"); userPermissions.addStyleName("popup-item"); - - - popupMenuBar.addItem(uploadPhotos); + + if (m_Container.isUploadEnabled()) { + MenuItem uploadPhotos = new MenuItem("Upload Photos", true, + new Command() { + + @Override + public void execute() { + uploadFiles(); + popupPanel.hide(); + + } + }); + uploadPhotos.addStyleName("popup-item"); + popupMenuBar.addItem(uploadPhotos); + } + popupMenuBar.addItem(editItem); popupMenuBar.addItem(addAlbum); popupMenuBar.addItem(userPermissions); - - + popupMenuBar.setVisible(true); popupPanel.add(popupMenuBar); - + int x = DOM.eventGetClientX(event); int y = DOM.eventGetClientY(event); popupPanel.setPopupPosition(x, y); popupPanel.addCloseHandler(new CloseHandler() { - + @Override public void onClose(CloseEvent event) { - + m_Label.removeStyleName("popped"); } }); - - popupPanel.show(); + + popupPanel.show(); } - - private Label initComponents() - { + + private Label initComponents() { Label toReturn = new Label(m_Title); toReturn.addStyleName("Tree-Album"); setWidget(toReturn); - m_Container.getDragController().registerDropController(m_DropController); + m_Container.getDragController() + .registerDropController(m_DropController); expand(); - + return toReturn; } - - public int getId() - { + + public int getId() { return m_ID; } - + /* - * Adds the albums in the json response - * TreeItem. + * Adds the albums in the json response TreeItem. */ - private void addAlbums(JSONValue jsonValue) - { - JSONArray jsonArray = (JSONArray)jsonValue; - Set allAlbums = new HashSet(m_IDtoAlbum.keySet()); - for (int i = 0; i < jsonArray.size(); ++i) - { - JSONObject jso = (JSONObject)jsonArray.get(i); - - - int id = Utils.extractId(jso.get("id")); - - if (m_IDtoAlbum.containsKey(id)) - { + private void addAlbums(JSONValue jsonValue) { + JSONArray jsonArray = (JSONArray) jsonValue; + Set allAlbums = new HashSet(m_IDtoAlbum.keySet()); + for (int i = 0; i < jsonArray.size(); ++i) { + JSONObject jso = (JSONObject) jsonArray.get(i); + + int id = Utils.extractId(jso.get("id")); + + if (m_IDtoAlbum.containsKey(id)) { m_IDtoAlbum.get(id).updateValues(jso); - } - else - { + } else { Album album = new Album(jso, m_Container); m_IDtoAlbum.put(id, album); addItem(album); } allAlbums.remove(id); - } - for (Integer id : allAlbums){ - Album a = m_IDtoAlbum.remove(id); - a.cleanup(); - - - removeItem(a); - } + } + for (Integer id : allAlbums) { + Album a = m_IDtoAlbum.remove(id); + a.cleanup(); + + removeItem(a); + } } - - public void cleanup() - { - m_Container.getDragController().unregisterDropController(m_DropController); - for (int i = 0; i < getChildCount(); i++){ + + public void cleanup() { + m_Container.getDragController().unregisterDropController( + m_DropController); + for (int i = 0; i < getChildCount(); i++) { ((Album) getChild(i)).cleanup(); } } - + /** * moves the given array of ids to this album */ - public void moveTo(JSONArray a_Ids){ + public void moveTo(JSONArray a_Ids) { Loading.getInstance().loading("Moving Items.."); - m_Container.doJSONRequest(G3Viewer.MOVE_TO_ALBUM_URL + getId() + "?sourceids=" + a_Ids.toString(), - new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - expand(); - m_View.getCurrentAlbum().expand(); - m_View.getCurrentAlbum().select(); - } - },true,true); + m_Container.doJSONRequest(G3Viewer.MOVE_TO_ALBUM_URL + getId() + + "?sourceids=" + a_Ids.toString(), new HttpSuccessHandler() { + + @Override + public void success(JSONValue aValue) { + expand(); + m_View.getCurrentAlbum().expand(); + m_View.getCurrentAlbum().select(); + } + }, true, true); } - + /** * rearranges the albums */ - public void rearrangeTo(JSONArray a_Ids, Item m_CompareTo, boolean m_Before){ + public void rearrangeTo(JSONArray a_Ids, Item m_CompareTo, boolean m_Before) { Loading.getInstance().loading("Re-arranging.."); - String bora = m_Before?"before":"after"; + String bora = m_Before ? "before" : "after"; - m_Container.doJSONRequest(G3Viewer.REARRANGE_URL + m_CompareTo.getID() + "/" + bora - + "?sourceids=" + a_Ids.toString(), + m_Container.doJSONRequest(G3Viewer.REARRANGE_URL + m_CompareTo.getID() + + "/" + bora + "?sourceids=" + a_Ids.toString(), new HttpSuccessHandler() { - + @Override public void success(JSONValue aValue) { m_View.getCurrentAlbum().select(); } - },true,true); + }, true, true); } - - + /** * returns the album with the given id */ - public void selectSubAlbum(int a_Id){ - for (int i = 0; i < getChildCount(); i++) - { + public void selectSubAlbum(int a_Id) { + for (int i = 0; i < getChildCount(); i++) { Album ab = ((Album) getChild(i)); - if (ab.m_ID == a_Id) - { + if (ab.m_ID == a_Id) { ab.select(); m_Container.getTree().ensureSelected(ab); } } } - + /* * Fetch the requested URL. */ public void expand() { - - m_Container.doJSONRequest(G3Viewer.VIEW_ALBUM_URL + getId(), - new HttpSuccessHandler() { - - @Override - public void success(JSONValue aValue) { - addAlbums(aValue); - } - },false,true); + + m_Container.doJSONRequest(G3Viewer.VIEW_ALBUM_URL + getId(), + new HttpSuccessHandler() { + + @Override + public void success(JSONValue aValue) { + addAlbums(aValue); + } + }, false, true); } - - + public void select() { Loading.getInstance().loading("Loading Contents.."); - m_Container.doJSONRequest(G3Viewer.VIEW_CHILDREN_URL + getId(), + m_Container.doJSONRequest(G3Viewer.VIEW_CHILDREN_URL + getId(), new HttpSuccessHandler() { - + @Override public void success(JSONValue aValue) { viewAlbum(aValue); } - },false,true); + }, false, true); } - - /* - * view Album contents - */ - private void viewAlbum(JSONValue a_Value){ - - JSONArray jsonArray = (JSONArray)a_Value; - - Item item = null; - int id; - JSONObject jso; - - m_Items.clear(); - - for (int i = 0; i < jsonArray.size(); ++i) - { - jso = (JSONObject)jsonArray.get(i); - id = Utils.extractId(jso.get("id")); - - if (m_IDtoItem.containsKey(id)){ - item = m_IDtoItem.get(id); - item.updateValues(jso); - } - else - { - item =new Item(this, jso, m_Container); - m_IDtoItem.put(id, item); - if (item.isAlbum()){ - linkAlbum(item); - } - } - m_Items.add(item); - - } + /* + * view Album contents + */ + private void viewAlbum(JSONValue a_Value) { - m_View.setAlbum(this); - addPendingDownloads(); - } + JSONArray jsonArray = (JSONArray) a_Value; - public List getItems() - { - return m_Items; - } - - public void linkAlbum(Item a_Item){ - // link album - int id = a_Item.getID(); - Album child; - for (int j = 0 ; j < getChildCount(); j++){ - child = (Album) getChild(j); - if (child.m_ID == id){ - a_Item.setLinkedAlbum(child); - j = getChildCount(); - } - - } - } - - public boolean isManualSort(){ - return m_Sort.equalsIgnoreCase("weight"); - } + Item item = null; + int id; + JSONObject jso; + + m_Items.clear(); + + for (int i = 0; i < jsonArray.size(); ++i) { + jso = (JSONObject) jsonArray.get(i); + id = Utils.extractId(jso.get("id")); + + if (m_IDtoItem.containsKey(id)) { + item = m_IDtoItem.get(id); + item.updateValues(jso); + } else { + item = new Item(this, jso, m_Container); + m_IDtoItem.put(id, item); + + if (item.isAlbum()) { + linkAlbum(item); + } + } + m_Items.add(item); + + } + + m_View.setAlbum(this); + addPendingDownloads(); + } + + public List getItems() { + return m_Items; + } + + public void linkAlbum(Item a_Item) { + // link album + int id = a_Item.getID(); + Album child; + for (int j = 0; j < getChildCount(); j++) { + child = (Album) getChild(j); + if (child.m_ID == id) { + a_Item.setLinkedAlbum(child); + j = getChildCount(); + } + + } + } + + public boolean isManualSort() { + return m_Sort.equalsIgnoreCase("weight"); + } public void uploadFiles() { Desktop desktop = Factory.getInstance().createDesktop(); - - desktop.openFiles(new OpenFilesHandler() { - public void onOpenFiles(OpenFilesEvent event) { - uploadFiles(event.getFiles()); - } - }, false); - - } - - public void uploadFiles(final File[] files){ - - m_Container.doJSONRequest(G3Viewer.RESIZE_DETAILS_URL, new HttpSuccessHandler() { - - public void success(JSONValue a_Value) { - JSONObject jso = a_Value.isObject(); - if (jso != null) { - - ResizeOptions ro = new ResizeOptions(jso); - UploadFile uf; - for (File file : files){ - uf = m_UploadControl.createUploadFile(Album.this, file, ro); - m_AllUploads.add(uf); - m_View.addToView(uf); - } - m_Container.updateInformation(); - } + desktop.openFiles(new OpenFilesHandler() { + + public void onOpenFiles(OpenFilesEvent event) { + uploadFiles(event.getFiles()); } - },false,true); - - + }, false); + } - - public void removeUpload(UploadFile a_Uf) - { + + public void uploadFiles(final File[] files) { + + m_Container.doJSONRequest(G3Viewer.RESIZE_DETAILS_URL, + new HttpSuccessHandler() { + + public void success(JSONValue a_Value) { + JSONObject jso = a_Value.isObject(); + if (jso != null) { + + ResizeOptions ro = new ResizeOptions(jso); + UploadFile uf; + for (File file : files) { + uf = m_UploadControl.createUploadFile( + Album.this, file, ro); + m_AllUploads.add(uf); + m_View.addToView(uf); + } + m_Container.updateInformation(); + } + } + }, false, true); + + } + + public void removeUpload(UploadFile a_Uf) { m_AllUploads.remove(a_Uf); } - public void replaceUpload(UploadFile a_Uf, JSONValue a_Return) - { + public void replaceUpload(UploadFile a_Uf, JSONValue a_Return) { m_AllUploads.remove(a_Uf); - + JSONObject jo = a_Return.isObject(); - if (jo != null){ - Item item = new Item(this,jo,m_Container); + if (jo != null) { + Item item = new Item(this, jo, m_Container); m_IDtoItem.put(item.getID(), item); m_Items.add(item); - - if (m_View.getCurrentAlbum() == this){ + + if (m_View.getCurrentAlbum() == this) { m_View.replaceInView(a_Uf, item); } - } - else - { - if (m_View.getCurrentAlbum() == this){ + } else { + if (m_View.getCurrentAlbum() == this) { m_View.removeFromView(a_Uf); } } } - - public void addPendingDownloads() - { - for (UploadFile uf: m_AllUploads) - { + + public void addPendingDownloads() { + for (UploadFile uf : m_AllUploads) { m_View.addToView(uf); } } - } diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/G3Viewer.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/G3Viewer.java index daac1220..310c4109 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/G3Viewer.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/G3Viewer.java @@ -17,9 +17,9 @@ package com.gloopics.g3viewer.client; import com.allen_sauer.gwt.dnd.client.PickupDragController; +import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.InputElement; -import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.http.client.RequestBuilder; @@ -239,7 +239,8 @@ public class G3Viewer { m_DragController.setBehaviorMultipleSelection(true); m_DragController.setBehaviorDragStartSensitivity(5); m_DragController.setBehaviorDragProxy(true); - m_UploadControl = new UploadControl(this); + m_UploadControl = (UploadControl)GWT.create(UploadControl.class); + m_UploadControl.init(this); m_InfoBar = new InformationBar(this, m_UploadControl); m_Tree = new AlbumTree(this); @@ -252,6 +253,11 @@ public class G3Viewer { return m_UploadControl; } + public boolean isUploadEnabled() + { + return m_UploadControl.isUploadEnabled(); + } + public static String getCSRF() { return m_CSRF; diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/InformationBar.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/InformationBar.java index 172c8d7f..c60524e6 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/InformationBar.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/InformationBar.java @@ -8,6 +8,7 @@ import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.ui.Anchor; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.FlowPanel; +import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.Label; public class InformationBar extends FlowPanel{ @@ -26,7 +27,10 @@ public class InformationBar extends FlowPanel{ } public void initializeForm(){ + if (m_UploadControl.isUploadEnabled()) + { Anchor button = new Anchor("Upload Options"); + button.addStyleName("up-options"); button.addClickHandler(new ClickHandler() { @Override @@ -45,6 +49,11 @@ public class InformationBar extends FlowPanel{ updateInformation(); add(m_Label); + } + else + { + add(new HTML("Please install Google Gears to allow upload")); + } } public void updateInformation() diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/Item.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/Item.java index 7584d5cf..3bc0d276 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/Item.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/Item.java @@ -126,7 +126,10 @@ public class Item extends Composite implements HasAllMouseHandlers, DesktopDropp if (m_IsAlbum) { - ((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this); + if (m_Container.isUploadEnabled()) + { + ((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this); + } } } diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/NoGears.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/NoGears.java deleted file mode 100644 index 04fdfecb..00000000 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/NoGears.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.gloopics.g3viewer.client; - -import com.google.gwt.core.client.EntryPoint; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.RootPanel; - -public class NoGears implements EntryPoint { - public void onModuleLoad() { - RootPanel rootPanel = RootPanel.get("main"); - rootPanel.add(new HTML( - "This application requires Google Gears. To install please visit gears.google.com and follow the installation instructions.")); - } -} diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadControl.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadControl.java index c63a6595..e416b925 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadControl.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadControl.java @@ -17,9 +17,10 @@ public class UploadControl { private boolean m_Running = false; private boolean m_PrepareRunning = false; - private final G3Viewer m_Container; + private G3Viewer m_Container; - public UploadControl(G3Viewer a_Container){ + public void init(G3Viewer a_Container) + { m_Container = a_Container; } @@ -104,4 +105,8 @@ public class UploadControl { } + public boolean isUploadEnabled(){ + return true; + } + } diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadControlNoGears.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadControlNoGears.java new file mode 100644 index 00000000..734d9a0d --- /dev/null +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadControlNoGears.java @@ -0,0 +1,53 @@ +package com.gloopics.g3viewer.client; + +import com.google.gwt.core.client.EntryPoint; +import com.google.gwt.gears.client.desktop.File; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.RootPanel; + +public class UploadControlNoGears extends UploadControl{ + public UploadFile createUploadFile(Album a_Album, File a_File, ResizeOptions a_ResizeOptions) + { + return null; + } + + public void init(G3Viewer a_Container) + { + + } + + private void cleanupUpload(UploadFile uf) + { + + } + + public int size() + { + return 0; + } + + public void finishedUploadWithError(UploadFile uf) + { + } + + public void finishedUpload(UploadFile uf) + { + } + + private void next() + { + } + + private void prepareNext() + { + } + + public void finishedPrepare(UploadFile a_UploadFile) + { + + } + + public boolean isUploadEnabled(){ + return false; + } +} diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/View.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/View.java index 7035683c..a814022b 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/View.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/View.java @@ -42,7 +42,10 @@ public class View extends FlowPanel implements DesktopDroppableWidget{ public View(G3Viewer a_Container){ m_Container = a_Container; - ((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this); + if (m_Container.isUploadEnabled()) + { + ((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this); + } } diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.java new file mode 100644 index 00000000..2b5be2c4 --- /dev/null +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.java @@ -0,0 +1,5 @@ +package com.gloopics.g3viewer.client.dnddesktop; + +public interface DesktopDrop { + +} diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.java index 17373305..d55a67ea 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.java @@ -6,7 +6,7 @@ import com.google.gwt.gears.client.desktop.Desktop; import com.google.gwt.gears.client.desktop.File; import com.google.gwt.user.client.ui.Widget; -public abstract class DesktopDropBase { +public abstract class DesktopDropBase implements DesktopDrop{ private final DesktopDroppableWidget m_DropFile; protected final Widget m_Widget; private final Desktop m_Desktop; diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.java index c44f7eea..1c8085d4 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.java @@ -1,19 +1,12 @@ package com.gloopics.g3viewer.client.dnddesktop; -import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.dom.client.Element; -import com.google.gwt.gears.client.Factory; -import com.google.gwt.gears.client.desktop.Desktop; -import com.google.gwt.gears.client.desktop.File; import com.google.gwt.user.client.Window.Navigator; -import com.google.gwt.user.client.ui.Widget; public class DesktopDropFile extends DesktopDropBase{ public DesktopDropFile(DesktopDroppableWidget a_Widget){ super(a_Widget); - String nav = Navigator.getUserAgent().toLowerCase(); - addDropEvents(m_Widget.getElement()); } diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.java index ae0773d0..da5437dd 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.java @@ -1,6 +1,5 @@ package com.gloopics.g3viewer.client.dnddesktop; -import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.dom.client.Element; public class DesktopDropFileIE extends DesktopDropBase{ diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.java index 14939d25..f6afac22 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.java @@ -2,7 +2,7 @@ package com.gloopics.g3viewer.client.dnddesktop; public class DndDesktopFactory { - public DesktopDropBase getInstance(DesktopDroppableWidget a_Widget) + public DesktopDrop getInstance(DesktopDroppableWidget a_Widget) { return new DesktopDropFile(a_Widget); } diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.java index d0ab032f..145f023a 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.java +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.java @@ -2,7 +2,7 @@ package com.gloopics.g3viewer.client.dnddesktop; public class DndDesktopFactoryIE extends DndDesktopFactory{ - public DesktopDropBase getInstance(DesktopDroppableWidget a_Widget) + public DesktopDrop getInstance(DesktopDroppableWidget a_Widget) { return new DesktopDropFileIE(a_Widget); } diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.java b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.java new file mode 100644 index 00000000..25318438 --- /dev/null +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.java @@ -0,0 +1,8 @@ +package com.gloopics.g3viewer.client.dnddesktop; + +public class DndDesktopFactoryNoGears extends DndDesktopFactory{ + public DesktopDrop getInstance(DesktopDroppableWidget a_Widget) + { + return new DesktopDrop(){}; + } +} diff --git a/modules/gwtorganise/src/com/gloopics/g3viewer/public/G3viewer.css b/modules/gwtorganise/src/com/gloopics/g3viewer/public/G3viewer.css index 6e2c79a6..c6f40841 100644 --- a/modules/gwtorganise/src/com/gloopics/g3viewer/public/G3viewer.css +++ b/modules/gwtorganise/src/com/gloopics/g3viewer/public/G3viewer.css @@ -15,8 +15,8 @@ .infobar {background-color: #fff; position: absolute; bottom:0px; border-width: 4px 4px 0 4px; border-style: solid; border-color: #d2e1f6; height: 15px; width: 240px; right: 50px; font-size:10px; padding: 2px 5px 1px 5px;} .infobar div {float:right; } -.infobar a {float:left;} -.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity = 70);} +.infobar .up-options {float:left;} +.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity=70);} .loading-label{z-index:10; position:absolute; width:100%; left:0px; text-align:center;} .loading-image{z-index:10;} .gwt-TreeItem-selected .Tree-Album {background-color: #333; color: #FFF;} @@ -24,6 +24,8 @@ .Tree-Album:hover{text-decoration:underline;} .drop-target{background-color: #91c0ef; color: #000;} +.dragdrop-selected ,.dragdrop-dragging ,.dragdrop-proxy {filter: Alpha(Opacity=30) !important;;} + .popup {padding: 2px; border: 1px solid #91c0ef;background-color:#FFF} .dialog fieldset{ border: none; padding: 0px; margin: 0px;} diff --git a/modules/gwtorganise/war/.htaccess b/modules/gwtorganise/war/.htaccess new file mode 100644 index 00000000..b303d424 --- /dev/null +++ b/modules/gwtorganise/war/.htaccess @@ -0,0 +1,9 @@ + + + ExpiresDefault "access" + + + + ExpiresDefault "now plus 1 year" + + diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/G3viewer.gwt.xml b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/G3viewer.gwt.xml index ef16872b..ffe12be4 100644 --- a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/G3viewer.gwt.xml +++ b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/G3viewer.gwt.xml @@ -9,8 +9,8 @@ - - + + @@ -29,5 +29,10 @@ + + + + + diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$1.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$1.class index 9cc2ceb820110a73555f13b271c8f88e795db5af..49c3a8e2ca5c34d2a5383504f3b756017fd17f88 100644 GIT binary patch delta 23 fcmbQkHivD)G$zK($}1w delta 23 fcmdnOv4vy9VrIrglb0|%vo2-eW?VM;4YLOTWbX(S diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$12.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$12.class index b4d404237efa9dee62f5a8c323eb87516c43a427..c5a3974844318ddafc46b1c770f649419167b7d7 100644 GIT binary patch delta 75 zcmX>rd{uZuCI{pE$yprojOvrSIBJcJ7M7#A_HGA?G|WL(N1#JHS6lW_%u0pm&r db0BTQxQfA>aWz9YP&|=wEkicr`pHI|vjNWh5}E)2 delta 67 zcmcaAd{%fvCI{o%$yprojPjGaIBK=E7`PZ17&kDmGHztxWZcXk#JH6~lW`k^4dZqO XZ^j)A;Xr;O<1U75#yyj*IA;R@R^kz4 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2$1.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2$1.class index 38bf3e71b2709acc1150cf39fb63842566d1c88c..b63f1ae556b37c78790c14b0011856ecf8f069c6 100644 GIT binary patch delta 22 dcmeBY?`PlepNX+{60;L)0|OUB(`0vM4**h425A5Q delta 22 dcmeBY?`PlepNX+?60;L)3j-HJ+hliU4**iV26X@c diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2.class index 78d479543ba04bc9d32b7196523bf58971ec1615..065323c71cb331949f280625674e4eee6a0929a9 100644 GIT binary patch delta 53 zcmey()6BbJCM#pb?C~BoZr51(fjk9uHZS2UG(yu@Q zz61$E#RDI}M!CP=UKE{DG1o zLoq(`BCAQYyE9WK#oLte-1EKo1w*ZxEv43DD0G5>EP>$?hk-d0c`R_0P-e(ib-+T` z^X1!Q*q7lu(N~h8(hVG;dLs1nec~)=x(wMWTTP;CM2X|bh?1^VyVIT>#-ZoC?OM;o z5|$0zV6d_@fMW$W8RkR^YHcxevyo}nGIXnL;x<+d++kQhpAE;FZeUTKj%b`Z^)82n zdsBMb40~DVoky-mLL_eYQ8Q3wSewaB2XoZ1NmF%Y+)2WaLxX}yLXIMLYg9Th}0@Ha9(3I-gHHLxL1rIW-I z&G&p?h8-oMNJdyCo#ts@04tZZTGy%cJ7J=r`q}Uw&S6XxyNa2t0gsckrmgv+=lcMz(ZwMv3 literal 0 HcmV?d00001 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3.class index f23a270ab2c5c16c15d980af3138a88e21443be4..1404fde485c218b464f0737ff0685f6c68b1d54f 100644 GIT binary patch delta 749 zcmZ`%QBTug6g{^Ewv2+?0?tenoEx;$t&V|CE20Rp=};0A5*{n9qh@T)R#cw$%!4Lm ziSfZ7A&D7A5`F-W{s4c2zrb+6R%0UAhu-$w@1A?kz2B$M_o2w~uWv^Hrm?yo`AM;H zLfG8cu-onQ4Z@0A-HWDVL*sC%vs_$r>^FAH2;mAL@ydK{>UFbG)1P}Sr%_wjcIuYh z3gapv=`<|+ZQk8<^_R`omTp>>Zq{FHZ?*LZCXi7uh)KezTK$*B(AFZj2vvcG>|Zej zf;{D`=@?o?a9mfAL!K~Tx~|=@2xDqRJ4N?flo1Bo8JzcaTzk$JA}FQ>MUjv@OUD1G ziiRkiRd5rxSfAGn+!IFB)9raww+WMb(R3_bh@b>RIKNBKgqQTN@Ae+pc{Dm^nmgJ$ryVJ!}f2h89j=)fWGZL^3_~5QzEio#i;^!XY3CBLZH&s02uQ;C<;>A-6!U@3vqiFyD delta 212 zcmcb_JBOX?)W2Q(7#J9g7_>KXeP9$9VPxPgEy&4FOmWN1NiF7LP+(AEXHcBn&!Wqv z%m9>S$;eDeoh-_#$E?AiIoXXhg^_9UYF3N-9tJU>F+2>6K$4$9oIwIeGcrgrhyY1m zAlng0gXOfgFz{_-kOEQy+Zg0G0;QN3M1dq912d4Ez`)Kh5y+m5#W-dL6|ibm1~nkf U!XV9{&Y%TkaRCix2bm2709ff$?3=9lL42m1MDj6s1FnhDHGsrSBs7w@4Vdi0wpIpV9!nk1aeP;P2 zQ=mE~AZFYMW(WdFHU>r@xtKu+NQyxu8H5=`fIOfw25|-nAj!-i3FI*`NHItQX%+?< V1~~==AWH}+CIh5F0Avaf007^b52*kE delta 355 zcmYLF%}N4c6g_t)8yh}qG%3@}W-^~7H^bqQKmp7D_6p(14!vsCVaORL z7xJ28R^Vu`2_|c1s0oy?N|-vA{$aP%k!}B=)#zRligswUQqk^pfsJURCtK3>g9kcR z1$KikYSLqHrsVHVK~VT-+0rY-5VHg1{<@V zO~W!qFv?<75yuGnsvgCyL?tAUl;Ok#L5O_|ic5(nLpu_tFk{Cw`=lzJ#T@&k+szAD zvSX1TSltY;FmbtMEW<}2<_kuaAZ^)2%g%lTgJIhj@D6|n&MXD7mAbZyHI5O%uK)l5 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5$1.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5$1.class deleted file mode 100644 index 97fdef6799ae33afb6a0ad2dc6e9c4600e6a560f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 737 zcma))U27CE6o%jIt~>5H+O=x^tRFDQwnB$h3PMGYs#I7lw9@-*_ApJ!CS{VT{w2X1 zFGT1?e?Wg!@npKti$d8zCOK!$bKWyAb9#1s0^l`XBxnh|RBl?7#<@eSd{MqR()5F> zLK#gq6d%mEp62WMFhNJ4e;|)!VWcgK?ePJrkf1BDc4ddH5Dq_TXGX?8I>e=2OmxJZ|D^rN}dMZ!o&>Y&TTemK#wzkvrsT6Qbm$ z0)ceb)s>>pIu4aKKCHzup81ni#(D1ZmBPN8Bv=;6=dm%vv-s%={UlWf?wftFma0u7 zy(f?7Y*d@~HHdyc`o;f9i+2wxXK(QBEyppFuD<$*{b_1$$6WI!(!a3CamGx{ z-oafy*#|7mx~y{?yNC<8+Z6w9z@=HEb1p#pbsa*g7 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5.class index 78fe0c5d744d5c91a6f33b0d3745cef0bb79add9..a9641a13b6b8dceca6514fab3142aed4b4fb4b46 100644 GIT binary patch delta 178 zcmey(J%^p^)W2Q(7#J9g7_>KXePEOlVPxPgEy&4FOmWN1NiF7LP+(AEXHaBh(3lt? zJz1BLmzjq_d2%U>IkN_X=H&G(a~U^H_GOh%b7WuyLIwtYtt||E+Zd#Pl)yFy`Hes! zCI(R;$;ZG9B)2iJGi(R4cQS|pc{~s;4B`wDKpr!L3Xo)CP-Rd9(ku+p4C)M8Ko%F& HXdn{+WjY)c delta 580 zcmZuuT~E_s6n;*NjFe{C7I8*cHlaW}g>DQ4t%xA7&ES;@373U7vt+bQJHD>=8`C0q;A~6(zHT5%b`{ z4nw6t_@M5z5|g5#vCA~erCrB9wF4uDr-byOd1C5y)2-9~ zp;aS{=Q8FnPZ&0R-*zp+gj&_^!Cmt*qK<-$A{H34;SER=9;)|Sc*8})Oe>)zm7;_a zUPNq{30gE?iT4@41ed)cOtUunjW#k~W0mnOZ__dBUX8Hzp9Ld1Cn}AGKPal0u2pAU zqrKO#9>d#qQkbKS_L{IPmQiV+3t#AKJ1u6L`*;B2dlmBE5&wZFm&ome+=;+`PXYv3OX*}jk#5=YEHnGKih)=PN QDn}^@iGCr+tV#d<1K7=ifdBvi diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$6.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$6.class index 37f4efde24c281946b9591d51e4b25c63321dfbe..827d6ab0035dbe549aac31701a07ee0f52e395cb 100644 GIT binary patch delta 23 fcmbQhJ%M|}6Bfpklb^Equ%2V!VK_h8j5P`XY8VJN delta 23 fcmbQhJ%M|}6Bfqflb^Equ%2PyVK_V4j5P`XY2FAi diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$7.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$7.class index 65fa0d7193c504224b51a7932267ccaa24b3b69c..91b87a27205b9dc0bc54183bef36f475deef6b67 100644 GIT binary patch delta 31 ncmX@aafoBXY-UFO$#a+^d4(C+8ATXG7)2Qr8O0_uu{Zz#eD($P delta 31 ncmX@aafoBXY-UEW$#a+^d8HWG8KoIS7-bj~8D%Fku{Zz#e#-_J diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$8.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$8.class index 7b82342fd532710f15cd8a9dd4044c3390c0dfb1..0f743b0d3d6e7f9c54c72bd02597a082d087b309 100644 GIT binary patch delta 23 fcmdnPv4>;BMrKBp$(xv6Sv44V88s*WVRirjS``M> delta 23 fcmdnPv4>;BMrKCs$(xv6S@jus84V`?VRirjTHpri diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$9.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$9.class index 4e8d88967c209d0325ba7fec18c90b92bfa2a20b..e03a134c26749a5ee9dad5fd5d945c3bc9f42a16 100644 GIT binary patch delta 23 fcmaFP_MC0QLncOt$&Z*ESX~%67+oi;GdlnPXDbH! delta 23 fcmaFP_MC0QLncPA$&Z*ESp66{82u-!GdlnPXiWzg diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album.class index 1aca31542215a632433ada99d762c2cd8e4c3b25..4f8ccdb9aefb466c8130da963a17af509dcf18be 100644 GIT binary patch delta 5340 zcmZu#31F1fwf@eX<)2Lc>`ao$zCe~qCL37@iyy1Lhzp{X)@rrttB4PuygutvsJPS>NzeUfOrU*0=Kgc<{m=Q% zcfND(4UhHz>6@|7omTa3;~4&?<1~Ij(EXmlWrN#$J#Af^ zJvRKEU^n)-y@Q_3cD#h&+A#|s==cyH5n{al75%-wuJuiQUF&*1>j|cU!c{i>gAf&3 z$XeRt8}zZ$PnFZyDmy;GYj(VVFLZo~bMn{G-Rb9bOyCdfiG8p1`n_z4Ara{$$RrD6 zDkChUX=Ej2$Wzg&w#Lg^b+S=}yfJ3(bPGl5yfcEqc(!=@1{Zn;7xa4hp;Ot2)+vT! z<-0NI6mI~iwo@E>)RIG|L`stLVy`nhbxM&>#GaB5#-*p~LqI3Ysak_@xn5RHIQf zVW!NEpJ~x)7S+nz;ycW9bebzail0vNWxp*)W+htEBdLKJHCn)2ZtB|7RXQ~2?JaHX z>es1>E|pg%WLGTGkwwh}XF z(Nc{rlP43BwaW>KYN0+cAxC*!rqgoVLWu14^$m7;`}|8h+tvI^Wu-%wPjjbq>ezwn zRk*7e0J7Ec8lA49wQ}3ECVLlWmevu93S@m;W{V=InZ?6sB56Hs(8zO9M9VybI&D-g ztplFTzAYYw*{jng93Yte-fKMSwO*YzQ=hDGU2BpmOGQ?lyGfDxB9m5T$Xb0FDbFp&uEWMcdD|}R1xu71gqsPo%YGo zNy*M%aTevFkh=d;=aEJwmW_ZQyv6pHZC-!N$30Z>n!^uWwt}w01>%i=7VB zqZ*A9vgHnuF3+Z!lXQAaCBwpUZf>;E6I>Cc8a>Ir3+ad)cJ^5Rpwn~oywp-^BVM3C zY4jo?PcS#+8(R3M)exzZg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xk5 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1$1.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1$1.class index e171ea2183d43181ca800d849666eec36132f900..45f90da45472d61c52f4df93884e7f1a3515dfbd 100644 GIT binary patch delta 23 ecmeyx{)>G>7Bi#VG>7Bi#70GKe!)F=#VZGng{gFxUXu hZj5yd9*p%2g+RKTv4x?Mv6W#OkeFA=C#|T-8M86|A zG+El>3`SrEMWitPBLj}(W0Z7MR9f1bmS{v!RIG{*pcN~MuYxE=ih}a++`F4JWV$=M z=lqZJopZi({{P;4n_pR5`1E^^O#o=%kcKRxN?qqEQ?F^BqgS5yj(i;tYxo9H9!(B} z`;y7NxEby{miQBZ z+*mVhW?N6c8BH~MK|Erh0t<8;!7&4m;ts+UOT2t`}79mF$1$utl>MvVkhVqi@mdTjN^72_1&ziJQGdc6H4z+xOE3euN(rTA!I}>1c1$@H1k`BojrI^*T=Db{p&&1HZ(t)U&w> z*RuwmQ|pa(*KdjX$-NbotwTe}p>?rHJlW^L?+EHT&SIVY_o9J6sF#e_-N*5F123zy zdEM^U47`eesH^h30&m)Cn+N|PVEcO8_Vr(4m#WY4t9SAis&GMpdNu#%GE&H19339o z)8t{c=+`*9#vGzX(O;u`>7r)PL$5ko(3B^mTp^GKvA+5<{-CNVEcfRVMoTi0k|Ngb zxMk4vuuydtR<+7zpFuy)5Z+-kwZV+^nnNBI6NNi#+s*wqo5Lxyx3(*m+UwzLB7f(W z%^Omw!OW7z0I}R5#$X0y)=?gvaq!EP}Ceu#gYjRmr3a>YAb|fUTNTYoKfd|pLMM!!cN$s0^hYBu903m z5Hkmi*T(tzw@x5k}zk#`r@G#T7w<77)vI*#+h25-b7!L?72G+^wbW?OP-z{8s)lYvMq zp+hlZAjBS`Nt&uy1&f!mTXhv*bPW=9cIT)=CF7j+=AqU9u{c_kYl@eM3gj`+nIcKnsLsQv7FsrU7^|0ABo5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dY~kKj{^NF@DtPcTjSF*S2Srg#k(DAv=j%QUu;hKA6BPPCB;JJF3HGDI|i0fK<) zQx^23iLy$1ID=U*%uz-R$rlV0{Iw9+o*xdrhu5C&U$$`X2%SOK$FqxM>7u~~i&#(k zAD-ZG(87j4Wg%@LOYk|rdI;2f1R~Ai#V< fpNKqk9v7RNd?o6(d=3;!aS!{nd#I+LcKZGUD8aiK delta 710 zcmYLFO>YuW6g`i@nQ=NTAGT1z7TTHs!$*;}sHN4mSQMpJEw$qJw4E9v0xg&rHeI=K z`*yC_xp70%42dNE0RM^q!KiltfYf0%BHqq+$m}&O~kEG1>KnjfBNKv6vEH6H{^l&s03e3*HjL zW1~Aw{ow7EUN7qV6@$0MKNB9t{o&Wn(-1Qls|^)f}xAVLu~vGFfpm@egp31yw)&pG-sYg{($_v--;X;(-Sr=7mP9Rz-P diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$3.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$3.class index 4f3fe7116bda811ac20f951e2007109a9c1fa923..6504ca0d69918f7c51f46dd2209137c03b8717b2 100644 GIT binary patch delta 23 fcmbQnHjQn=1SZCYi8Tfz{JGJFu94zf{|tNZYB=^H|qs7 delta 20 bcmZo>Yi8Tfz{JGxcXAVx1ta6+-Ao<;Lazob diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6.class index 1c12b2b52df9f951e923c127b4334eea34b61c3d..78149e015123127e48844ac72f6ca3337205c4b0 100644 GIT binary patch delta 36 qcmey%^OtAC0anI8lMk}y2r)7+Xfm=gXai|IMm7dhM)t|}Y<2+7p9nwz delta 36 qcmey%^OtAC0anJJlMk}y2r>L+&}3v{&<4_ajLZzCj4YGw+3W!CWC|<* diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7$1.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7$1.class index de9cac81d3ae8fea5e5f757f788b8f8504162518..9027695caf3be06fc43a45fa9ea9b2e59aef46ea 100644 GIT binary patch delta 23 ecmey*{-1qA9y6oRgL*z#KLGkIhngL*z#KLGYIhnSbNJ2t_lLSbBgk;DV2qYv3M#NO25-@1CR^mWLjAQ{atYW9t zS}X2eH*hOj>s~?N1q>phf}*(LF1EGR)&;fJ*4CCn&wVpl;0yE3yt|$Mod2G4?mcfd zHND%Eyzj_UI{_5)BLi_nj^faqO%pQBToVCowy*_TiKLd!^B1>v1e+_{gY#QM%|v{D zL8E~#HQPMZy&c^Ko>Iyj9lrxltL^4QpN(fM?839epoO7uReNVR*uEe{tWXn@N2(6f zQsW1mts;Xyb-hZA5}U)-944r>R$}TK7T(l0jh4>ot@D?)8F))=vdTOM@Q#ISysN&o z&UL?U;RAfAW)2Rze{bOr(tToZz5CDj)W9cdaAHCHU+`B|o>)F+KR&ncM|^BzCBC$9 z2unnBXDEDLXl2+$8@{&ijk+!I!tC!Y{0kN_xVEaYuBqz0%2`e4*PLUb2|rl)5B{st zlO~V&pM@hhN+jq_o#A+)%EXnVg=-n77A57-rH-WLCQmdOkK4tCG%R}PRlAc8xsxpp zVT#(4JU)9U(+#E(DVGG72a8&R?F);l!l9+wxfX}1LFFAg;uEFkjLl41Gv zCi6K?9LYk$mETxUt0zvjSfnRX#WT~}TiSx*mX7vVtUa6{8x}pw7HiRo7AI*ZS|U0( zys9-+9c&93EL9aLes>AS87x;FDdQ4P5kH?1Y7K=$*#@U+rzB1?Ih7UK_G!c%b?(S9 z>S)Tzo-&@U=Vqvq)QaJigz4A{w1h)#Cd+WM$r8@ASjDr{O{qca9AQ)0+!7YG)uJ{( zYZfa!JeNqG6r@n zXS8-KShS+0Q+D%Xjq^@6*{F5TQ!ft9;)Qyyu*_tW=n_f`EH-POnc|4rmd+Llo%jdK zOswZZix;y+m8Mm=77^Lv_{_nT%R}v9lW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torganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControlNoGears.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControlNoGears.class new file mode 100644 index 0000000000000000000000000000000000000000..2ef143e07cf02464d176f0cefff2078ce0f100cf GIT binary patch literal 1731 zcmb7E+iuf95IyUrO=(hk0a98nr4-1e6$T=nf{;*EDo~UnE=A%c+B(~0!SPzQ(<1(d zHy+>#i3dJ_k3!6@-83mQ4llc&-I+OO&dmDP?;k$_JU}H2i{ZYbx^~-D%9l=Px2uOz z9EreoTq(TBe&f4}x3-iQ18N79qgV}^-Rd5e3U9UUy#vulc?!7#8cw;qD#}q_&g8Ow^GfL$y9Wc0#$vFz*C{MH=>Lab(yW4L9UXJTtn>G#V+g?o{{8jMelkc6-`;iQ@jw`s=^JAfiY6|Fppc>Zd9WeY)4>G!WW`LhDEFDm#VMny$tZ!x1 z*$x6l1)LwgAx%8-ku=Hqf$(`C8pfJC_IeSYGUR#lgdw#;hOxQr>G^LN;CBo&uT(E^ zMBLov*k$-}-hIyxIo3cC^vHo6ebF1EHA|LFJEMKF@*UIP=)=Mct@;|6CTAcYJJ3E$ z7FC2fT6OSq+B39U?5kb}B6B9P65l3~+G8FICYyytTp(MYUBo4##!$dglJ}uGC#=(i z7EIcL2_%UOAx-HrmT9%Hf-7k$3TLFaifa_ga2=~jicMn^!-+4as#_V*#p>&FBOQD- z1$-?%#rnt;7H;-iyFsjV7ynYRI6(hcMGNccfgAq_q+d`v>3e68zMY7E2gOv;s{`OC KqL)l-%6|YzTVl2V literal 0 HcmV?d00001 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1.class index 71b9cb7ed01a81c922e71a7dbb278b38be33c7a8..eddfe155ff7dc9f9f995e22ad0966921fe2cc014 100644 GIT binary patch delta 23 ecmZo>Z)V@X!OYkZ)V@X!OYk_nUmR`btVHl!|chv%w_;ZTLqH< diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/View.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/View.class index ec1a7780d99c996ee81a5d28de96c7f7df209586..c2ee16e6ec7bb54677af73df75a6d2d1c25067a1 100644 GIT binary patch delta 2893 zcmZ8j33yc175?wcoA+j3UbYDcAtVq85GE70K)?tIOAsQNfCPvEmki+ngJC9ShD2@4 zU|X!B*vhSK!9ulKq1LugWCEtLbfI;4=luWu z&w1~SnkQx#y!g&@rvc0o;|#b2%H=t&RPJ(X$7a4Pa!izh_A-G<%3iswW?jVYvwJLz zN4Y?LB)+!0D;D0gG#cL6Wp5I2S594TVB$Vky*>$33`~}du8HnSOqJVQHN_K9Wg&=a zft)RNqA40rgrl9dK%Xo($I0<7>*2j4<=d`WIm2yNUroIOsw(t?T!M9TTm@4F0Zdv*AHKAq`kD$nl{Q};`o>=$#SkzXg zM=g932j!c-soo}h%0fOKlVxVY+l)_Jc!Ec8z%23B;WHMV!eRNmxl=!?mb>MmoICUr z7EK;P%hwSK%#o-x%{j`f&fAOM?8_gcy&*91Y7^#H%rtQszf(nB z5k#!|WS83`d-A7wFX2sPe@h<8Zz%nvfaw%c9dV>{36H8gf3fga{7q^F;Yk+?q~)1{dY2F~T`jua#i8{3b*iC!W0IFf!%9I6U*$xlCB6B?F=m}OXP|?d9<)pzaR=MQF#19;msns z7jC#Xbb^6?_yYqN+1`&)Conotbpm4o&tgmpWA~%LKj9=Q&SF9!g+SXe`nxfW*D~rE zsDg&c@L&ol2x0`PX`fE(OkRO&GVw8k-_<9GS;(WBYq-uYf=JWTWk47lC7|zYd8lY~ za!xaok3NNK1rA|mX5Aprav1*VQ&=K!7EPh5UhF$Z4M63kqdH;={7#kHI#i#f^KP>);D z0GsP5Ej?Jmj&5|o21o_amj&xZ3=wQ2*ecR_KE+i=S;k~#(z(Se6aHlIY?vk#KgR3uT1 zk8(4&kY@Fg72#@fPs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h>O_R1c2J3aBBmQXRAeia z9>z|xcF{2va7+?UiUy|9P|+wIQYVQK+mr{B(64N}t^FLz*NZ-pk)4_7_xYd00BfW& zqQj_Ss8UX2o>!TosH2HCZlkh&{-8311HNDq3HtkRuu;aCyj`$DQUm8?SinwUXK-f{ zN3T*+MVNs#RNIYk5zG{oh(`6u3xkPvY~$cM)de3#1zdA*a{C6#g2jMs}qtigT327bOx4h;F)fm}0xydFu3` zD!xS0qalGW5SSm=5OL#Q<%$X zm1oE+8hDxvt9;dT#?3U`3Ybd6@NJwUPX@(qLAym?x_tT^QshGQe&?#-Qwc5TZLHw{ zO|yeDaHUVE!g zKL@C_|K?97@b^*t_Y5X09aNTSGe@Nw$aZ9_N#+bB8JDG6oLRknCu!~ob@^R1^6o|< zj#67cLL=`4&9=v=^G{N@pF#^BCq+L&5;{$j?@6<^wHE$qS|Tj1nWa;CF6>|#%tOZ% wVk66BS;W#JRI_Y0i^S9dFUuiSI4Gf;<&ves#=H_1%VYVp%Ky+V(Mq5H0T}NnNB{r; diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDrop.class new file mode 100644 index 0000000000000000000000000000000000000000..25bdd8b6a519b09a401d172b5255164b55798810 GIT binary patch literal 143 zcmX^0Z`VEs1_mPrc6J6PMh4^L{9OI?oc#QP%;aMIbmOwj)bi9K{p6g?)Vvb?l)RLb z)Z*-t`~rO!2<=joU%<}5!pIXw<43Y16E Zpa)XR#>l|Pzznn+1Q;1ufg}?H8vx{PCsn5G-u^e@=V z!kzztXe$`w(uM!Pn7Hv5xYiioE43PPlXLH6&N8GuUif8-@u( zpwf<4cJJlHSVAI-q(Gopx*dkVfP{%q1ZiYU3<}KC(Z4Suxkpedji(Z0IP7m~vmplsi6fZsUucU)Q6d8Af7SMK#|0vf8aq#>n)Sx^ zZeTn|-nNuovfTR-1mJBE*ypyUt-X=Q` zMU2+w*8^xgfaAVF-1Rz0x!yhw33QNm_b}YWcn6ca^w3c9?;81*%Xj)91|G`%Vl<}6 z5E+%l*X97^fng-}Sdx z`r>N&1ES=l%KKQ>pg^liP5>p^H2V*B#$s1uOq1bS4s!>Tq|t*^eW23=TAb4jtWm)_ bz1YhiYB_IGDaTKt3AHKwBSP5VrQy~un<`?> delta 724 zcmYk4O;1xn6o#L&H9N_;Nm$ibTH_E5ks<3ashBZOeHpW7 zIeyI))8?(U9L#V^Gs9`~-C7OIYK91zjJ=aQs|Y`DzkF5hwA!05Iw9s+bXYJy?Sg%t z3nu9+1}d6MESZMyL*TOJ3T5-lw-KDDs<|mCEB>kMie{B1VF{z&Zf(|EotCGyp}EZ+ z^TuBd+|^u{(y#u8S~u}PaSLqXo+-J4gy%r!xF<|zM;wRI5{G5?3`+)N-A|0T#V#?o zxXY-bOUm70qQ}WDxoyd?n3FgrR2acWM0im~g*z!Re{gm{qEN$?tw1S?1SO+Hx!>@K zNb}NC?nhGbGd<3^vdR^ETzu?GT<-TW%1Lhhr=}?Mp((C%4W(kS?7<*jtm+^4jTxvQX7z8OQBbqJyKh5mcB47ePX3uZdrJZ);#St yb7tR}XnNYG4{HYKY#$wxS81{?YVS!_5cP*~hx_75o?0x$yk8+FiVcYt5B>q%#$I6n diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.class index 0f3950bb7e89056841fa9d9b23eee72b97bfae68..2919410f64f210129725127d59bede2b04da00b4 100644 GIT binary patch delta 202 zcmXAiI}QPH5Qo42inaUSwchWy(5ym2qHqVb3lQ0!Lg5gyS8xG|N1|{5N6@PkdNF8z zGv8#snWMEc_3eGR0t1>`eb+V$$HgTcZq&$5kcyF1bhgimw+i~xV78bqUD9O2hZ>tX zmpp~AYrMi?q`jskdPJ^)Azc(xGA1+;Hl(Kf-WkjH59kx#iR}KjT9ovDqAijpi9<jTUfPcr$MB`Nw2hB~+&AaE_d+xb6;fF}#_4D}!z$P|iNDPgDNsYnYwW>hHgbdD5 z8+_#YEz52@z0#rRTBh(Fmm`Ka12+x-*fZQ6)3AMpWTo0X7hO^B2-~b5`L1P~+X^Nz zB|~FK{N*^3-&0iIX*xZ_-4&h@1;aE)8X1Pj#c9iGlLQ;Q>){#9%E$#etA^${r~^~ delta 21 ccmZ3*wu)`TXC_Wg237_x1_1`{$$yyi06ruI0RR91 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.class index ebf79bbf82a764c93613e3b32d871d02b3f8f2e4..2f8a45429b7e3196e105924cb7488259bc7582ee 100644 GIT binary patch delta 36 scmbQnHi>P*Z^rV;2N|6v+cBE3TeC9=GBTJ?+^9ME4I|g)4UB1w0N5A{CjbBd delta 40 wcmbQlHjQnDOEi5s*gzhD%fY{zKA?UY!YYR%3d$jD$maiiwuMT`ZE02;9jtN;K2 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.class index b31054d1691cb3dca8a8bf8bfab24ccbb96a97ad..b4e76dee3d266c5dd2f2a5bcdc854beaaf7fcab9 100644 GIT binary patch delta 34 qcmX@kc9?C01|wtn5W&$xsU0IsnLga7~l diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears$1.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears$1.class new file mode 100644 index 0000000000000000000000000000000000000000..464e939165b6ca9288e05a398d6b234cace8bacc GIT binary patch literal 887 zcmbtTO-~y!5PeS4ELpZCghD@4^^gMz5)0*034{;{R7h!hXqBEFueCVc*wNYv>d)eU zD)qn*;71|Gp%SM^sbb6Wj6L)G{Kme!|9cDI6FvkeFq{fAiqp)Pu@W{;52i|9$vhUB zlG??IP7-NHM6>l(qcKF^i+|1FmMH5ocfvuf_k_&mR{CV|x)!OxC zB8F#LWX39;ewFUhBmv$qoGdGLgm-w)u$oGDp{?Uu5S6R{Q2prfOWq% l+ws|D)X0x!xgj?2lDr}|XOUZYMRN(S@fLNmJhDH7+5-eB1)Kl? literal 0 HcmV?d00001 diff --git a/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.class b/modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryNoGears.class new file mode 100644 index 0000000000000000000000000000000000000000..610d289d74172625424e2a19d2cf52afffee9bed GIT binary patch literal 892 zcmbtSO-sW-5Ph3|r`6V~^#eQz9$F6u^(0jhTa`lTMX7j_ZL-wWbhjjFi~mYbf`UK5 zA0<>h}X0uOvI4MA%P@A zzA2Sx4SF5nUGa`97>Z48bGOYs8RnDCcyK3uhSTQEPnj61GGx0VXedA6%BJ6q%D>l) zDpdD$zaPHsS~?_Et;`}&O<{rj{MXLbu89H`!(uKmoc+Pel!jNsE~WWxu?d~AXShvpeDXhj1 \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/09A21085406FD3AEFF74EE8471199B8A.cache.html b/modules/gwtorganise/war/g3viewer/09A21085406FD3AEFF74EE8471199B8A.cache.html new file mode 100644 index 00000000..250b52ce --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/09A21085406FD3AEFF74EE8471199B8A.cache.html @@ -0,0 +1,1795 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/0A21C4AA9FA3F1812B8077A68729DA52.cache.html b/modules/gwtorganise/war/g3viewer/0A21C4AA9FA3F1812B8077A68729DA52.cache.html deleted file mode 100644 index 135a2b8c..00000000 --- a/modules/gwtorganise/war/g3viewer/0A21C4AA9FA3F1812B8077A68729DA52.cache.html +++ /dev/null @@ -1,314 +0,0 @@ - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/0AB3C6DF30C08F43EAA999A9F920C30B.cache.html b/modules/gwtorganise/war/g3viewer/0AB3C6DF30C08F43EAA999A9F920C30B.cache.html deleted file mode 100644 index f3c8cee2..00000000 --- a/modules/gwtorganise/war/g3viewer/0AB3C6DF30C08F43EAA999A9F920C30B.cache.html +++ /dev/null @@ -1,1818 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/3295227D4A416F64C8B3061D11DFABA0.cache.html b/modules/gwtorganise/war/g3viewer/3295227D4A416F64C8B3061D11DFABA0.cache.html deleted file mode 100644 index a1710d65..00000000 --- a/modules/gwtorganise/war/g3viewer/3295227D4A416F64C8B3061D11DFABA0.cache.html +++ /dev/null @@ -1,1777 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/371B2293E0881C8A53FDA41CA333A843.cache.html b/modules/gwtorganise/war/g3viewer/371B2293E0881C8A53FDA41CA333A843.cache.html deleted file mode 100644 index a8754f7a..00000000 --- a/modules/gwtorganise/war/g3viewer/371B2293E0881C8A53FDA41CA333A843.cache.html +++ /dev/null @@ -1,1795 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/3E4F3EA15819E3548B40625FACE2EBBE.cache.html b/modules/gwtorganise/war/g3viewer/3E4F3EA15819E3548B40625FACE2EBBE.cache.html new file mode 100644 index 00000000..dc9c09fb --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/3E4F3EA15819E3548B40625FACE2EBBE.cache.html @@ -0,0 +1,1823 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/46E36699DD51342BCC1877A718D3B6D5.cache.html b/modules/gwtorganise/war/g3viewer/46E36699DD51342BCC1877A718D3B6D5.cache.html deleted file mode 100644 index 08cf6363..00000000 --- a/modules/gwtorganise/war/g3viewer/46E36699DD51342BCC1877A718D3B6D5.cache.html +++ /dev/null @@ -1,326 +0,0 @@ - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/4DD08D394689CC09C7978BC0F3B16995.cache.html b/modules/gwtorganise/war/g3viewer/4DD08D394689CC09C7978BC0F3B16995.cache.html new file mode 100644 index 00000000..b8ba861f --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/4DD08D394689CC09C7978BC0F3B16995.cache.html @@ -0,0 +1,1684 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/57F950D32C617CAE2C8052EA05BDC171.cache.html b/modules/gwtorganise/war/g3viewer/57F950D32C617CAE2C8052EA05BDC171.cache.html new file mode 100644 index 00000000..fa9170e5 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/57F950D32C617CAE2C8052EA05BDC171.cache.html @@ -0,0 +1,1777 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/5C5462085DC7810C7E2A1392D87E6531.cache.html b/modules/gwtorganise/war/g3viewer/5C5462085DC7810C7E2A1392D87E6531.cache.html new file mode 100644 index 00000000..07ae0424 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/5C5462085DC7810C7E2A1392D87E6531.cache.html @@ -0,0 +1,1818 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/7C1AD451EC3EDEB1136202063B8983F0.cache.html b/modules/gwtorganise/war/g3viewer/7C1AD451EC3EDEB1136202063B8983F0.cache.html new file mode 100644 index 00000000..be3b24f9 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/7C1AD451EC3EDEB1136202063B8983F0.cache.html @@ -0,0 +1,1661 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/826A0FAD0C07BC304C641864F5274BFC.cache.html b/modules/gwtorganise/war/g3viewer/826A0FAD0C07BC304C641864F5274BFC.cache.html deleted file mode 100644 index 57c4200d..00000000 --- a/modules/gwtorganise/war/g3viewer/826A0FAD0C07BC304C641864F5274BFC.cache.html +++ /dev/null @@ -1,1819 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/82CC6089F1DDA8F19D1F5BD74ED71B1B.cache.html b/modules/gwtorganise/war/g3viewer/82CC6089F1DDA8F19D1F5BD74ED71B1B.cache.html new file mode 100644 index 00000000..f2e52dcc --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/82CC6089F1DDA8F19D1F5BD74ED71B1B.cache.html @@ -0,0 +1,1643 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/ACE6F9D8917D340A8A0D301E71E5507A.cache.html b/modules/gwtorganise/war/g3viewer/ACE6F9D8917D340A8A0D301E71E5507A.cache.html new file mode 100644 index 00000000..733a7192 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/ACE6F9D8917D340A8A0D301E71E5507A.cache.html @@ -0,0 +1,1685 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/AE48EA5D8ECD3E90C23EBF393DC6958A.cache.html b/modules/gwtorganise/war/g3viewer/AE48EA5D8ECD3E90C23EBF393DC6958A.cache.html deleted file mode 100644 index 4b77477f..00000000 --- a/modules/gwtorganise/war/g3viewer/AE48EA5D8ECD3E90C23EBF393DC6958A.cache.html +++ /dev/null @@ -1,1823 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/B71911CF996F6E89D496C872F18EA45B.cache.html b/modules/gwtorganise/war/g3viewer/B71911CF996F6E89D496C872F18EA45B.cache.html deleted file mode 100644 index 952fbc55..00000000 --- a/modules/gwtorganise/war/g3viewer/B71911CF996F6E89D496C872F18EA45B.cache.html +++ /dev/null @@ -1,311 +0,0 @@ - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/C0A3E821CD3689650D1DF0CEF5C506A9.cache.html b/modules/gwtorganise/war/g3viewer/C0A3E821CD3689650D1DF0CEF5C506A9.cache.html deleted file mode 100644 index 296597ca..00000000 --- a/modules/gwtorganise/war/g3viewer/C0A3E821CD3689650D1DF0CEF5C506A9.cache.html +++ /dev/null @@ -1,1791 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/C3A8CA313CFDC8DB1F2ED097816C6EC0.cache.html b/modules/gwtorganise/war/g3viewer/C3A8CA313CFDC8DB1F2ED097816C6EC0.cache.html new file mode 100644 index 00000000..f3c64ff9 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/C3A8CA313CFDC8DB1F2ED097816C6EC0.cache.html @@ -0,0 +1,1819 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/CB317E0D3E395FA9682EC2E87A205F17.cache.html b/modules/gwtorganise/war/g3viewer/CB317E0D3E395FA9682EC2E87A205F17.cache.html new file mode 100644 index 00000000..116cc832 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/CB317E0D3E395FA9682EC2E87A205F17.cache.html @@ -0,0 +1,1657 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/D94A32538BE218C5D21AE0170373089B.cache.html b/modules/gwtorganise/war/g3viewer/D94A32538BE218C5D21AE0170373089B.cache.html new file mode 100644 index 00000000..a5af996e --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/D94A32538BE218C5D21AE0170373089B.cache.html @@ -0,0 +1,1791 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/DB10FC871F1917C3CF43B2E1A192D050.cache.html b/modules/gwtorganise/war/g3viewer/DB10FC871F1917C3CF43B2E1A192D050.cache.html deleted file mode 100644 index c32b9730..00000000 --- a/modules/gwtorganise/war/g3viewer/DB10FC871F1917C3CF43B2E1A192D050.cache.html +++ /dev/null @@ -1,308 +0,0 @@ - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/FEAA0157C361541B2682E3107C5BF9ED.cache.html b/modules/gwtorganise/war/g3viewer/FEAA0157C361541B2682E3107C5BF9ED.cache.html new file mode 100644 index 00000000..1d3b48ec --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/FEAA0157C361541B2682E3107C5BF9ED.cache.html @@ -0,0 +1,1688 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/G3viewer.css b/modules/gwtorganise/war/g3viewer/G3viewer.css index 6e2c79a6..c6f40841 100644 --- a/modules/gwtorganise/war/g3viewer/G3viewer.css +++ b/modules/gwtorganise/war/g3viewer/G3viewer.css @@ -15,8 +15,8 @@ .infobar {background-color: #fff; position: absolute; bottom:0px; border-width: 4px 4px 0 4px; border-style: solid; border-color: #d2e1f6; height: 15px; width: 240px; right: 50px; font-size:10px; padding: 2px 5px 1px 5px;} .infobar div {float:right; } -.infobar a {float:left;} -.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity = 70);} +.infobar .up-options {float:left;} +.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity=70);} .loading-label{z-index:10; position:absolute; width:100%; left:0px; text-align:center;} .loading-image{z-index:10;} .gwt-TreeItem-selected .Tree-Album {background-color: #333; color: #FFF;} @@ -24,6 +24,8 @@ .Tree-Album:hover{text-decoration:underline;} .drop-target{background-color: #91c0ef; color: #000;} +.dragdrop-selected ,.dragdrop-dragging ,.dragdrop-proxy {filter: Alpha(Opacity=30) !important;;} + .popup {padding: 2px; border: 1px solid #91c0ef;background-color:#FFF} .dialog fieldset{ border: none; padding: 0px; margin: 0px;} diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/1.cache.js deleted file mode 100644 index 4c902a9c..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function _g(){} -function Zg(){} -function eh(){} -function Yg(){} -function bh(){bh=wp;ah=new Zg} -function dh(){ah=(bh(),new Yg);dc((ac(),_b),1);!!$stats&&$stats(Fc(Qr,Rr,null,null));ah.m();!!$stats&&$stats(Fc(Qr,Sr,null,null))} -var Qr='runCallbacks1';_=Zg.prototype=new O;_.m=_g;_.tI=0;_=Yg.prototype=new Zg;_.m=eh;_.tI=0;var ah;dh(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/2.cache.js deleted file mode 100644 index af900388..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/2.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function ih(){} -function gh(){} -function nh(){} -function fh(){} -function kh(){kh=wp;jh=new gh} -function mh(){jh=(kh(),new fh);dc((ac(),_b),2);!!$stats&&$stats(Fc(Tr,Rr,null,null));jh.m();!!$stats&&$stats(Fc(Tr,Sr,null,null))} -var Tr='runCallbacks2';_=gh.prototype=new O;_.m=ih;_.tI=0;_=fh.prototype=new gh;_.m=nh;_.tI=0;var jh;mh(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/3.cache.js deleted file mode 100644 index e6b2d526..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/015D751F4204508258E3AD3E74E19E72/3.cache.js +++ /dev/null @@ -1,75 +0,0 @@ -function $b(){} -function lc(){} -function uc(){} -function xc(){} -function Nc(){} -function Qk(){} -function Pk(){} -function Cn(){} -function Jn(){} -function On(){} -function Eo(){} -function Po(){} -function Yo(){} -function kc(){fc(_b)} -function fc(a){dc(a,a.c)} -function Bc(a){Ac(this,a)} -function qc(a){a.b=0;a.c=0} -function tc(a){return a.c-a.b} -function Vk(){return this.a} -function Wk(){return this.a} -function Oo(){return this.b} -function Xo(){return Vo(this)} -function rc(a){return a.a[a.b]} -function pc(a,b){a.a[a.c++]=b} -function wc(a,b){Hd();return a} -function zc(a,b){a.a=b;return a} -function Tk(a,b){a.a=b;return a} -function Ln(a,b){a.a=b;return a} -function Sn(){return Jo(this,0)} -function In(){return this.b.a.d} -function sc(a){return a.a[a.b++]} -function Mn(){return jn(this.a.a)} -function Gn(a){return Yl(this.a,a)} -function Wo(){return this.b!=this.d.a} -function $o(a){a.a=a.b=a;return a} -function Pc(a,b,c){a.b=b;a.a=c;return a} -function En(a,b,c){a.a=b;a.b=c;return a} -function No(a){return _o(new Yo,a,this.a),++this.b,true} -function Mo(a){if(a.b==0){throw pp(new np)}} -function Go(a){a.a=$o(new Yo);a.b=0;return a} -function Io(a,b,c){_o(new Yo,b,c);++a.b} -function So(a,b,c,d){a.d=d;a.b=c;a.a=b;return a} -function _o(a,b,c){a.c=b;a.a=c;a.b=c.b;c.b.a=a;c.b=a;return a} -function oc(a,b){a.a=_f(Cg,0,-1,b,1);return a} -function $k(){$k=wp;Zk=_f(Eg,0,12,256,0)} -function ac(){ac=wp;_b=cc(new $b,3,ag(Cg,0,-1,[]))} -function Ol(a){var b;b=rm(new lm,a);return En(new Cn,a,b)} -function Nn(){var a;a=pg(kn(this.a.a),20).D();return a} -function Hn(){var a;a=Am(new ym,this.b.a);return Ln(new Jn,a)} -function Qn(a,b){var c;c=Jo(this,a);Io(c.d,b,c.b);++c.a;c.c=null} -function Ko(a){var b;Mo(a);--a.b;b=a.a.a;b.a.b=b.b;b.b.a=b.a;b.a=b.b=b;return b.c} -function Uk(a){return a!=null&&ng(a.tI,12)&&pg(a,12).a==this.a} -function nk(b){var a=b;$wnd.setTimeout(function(){a.onreadystatechange=new Function},0)} -function tk(c,a){var b=c;c.onreadystatechange=$entry(function(){a.i(b)})} -function Xl(e,a){var b=e.e;for(var c in b){if(c.charCodeAt(0)==58){var d=b[c];if(e.B(a,d)){return true}}}return false} -function Lc(b,c){function d(a){c.h(a)} -return __gwtStartLoadingFragment(b,d)} -function Yl(a,b){if(a.c&&qo(a.b,b)){return true}else if(Xl(a,b)){return true}else if(Vl(a,b)){return true}return false} -function Vo(a){if(a.b==a.d.a){throw pp(new np)}a.c=a.b;a.b=a.b.a;++a.a;return a.c.c} -function cc(a,b,c){ac();a.a=po(new no);a.f=Go(new Eo);a.c=b;a.b=c;a.e=oc(new lc,b+1);return a} -function Mc(a,b){var c,d;c=Lc(a,b);if(c==null){return}d=uk();d.open(Xr,c,true);tk(d,Pc(new Nc,d,b));d.send(null)} -function dc(a,b){var c;c=b==a.c?Ur:Vr+b;hc(c,Sr,Xk(b),null);if(ec(a,b)){sc(a.d);gm(a.a,Xk(b));jc(a)}} -function Jo(a,b){var c,d;(b<0||b>a.b)&&cn(b,a.b);if(b>=a.b>>1){d=a.a;for(c=a.b;c>b;--c){d=d.b}}else{d=a.a.a;for(c=0;c-129&&a<128){b=a+128;c=($k(),Zk)[b];!c&&(c=Zk[b]=Tk(new Pk,a));return c}return Tk(new Pk,a)} -function Vl(i,a){var b=i.a;for(var c in b){if(c==parseInt(c)){var d=b[c];for(var e=0,f=d.length;e0){Xn(h,pg(Ko(b.a.f),2));sc(b.a.e)}qc(b.a.e);Zn(h,Ol(b.a.a));Ul(b.a.a);i=null;for(g=hn(new en,h);g.a1){return}if(tc(a.d)>0){c=rc(a.d);hc(c==a.c?Ur:Vr+c,Rr,Xk(c),null);Mc(c,zc(new xc,a));return}while(tc(a.e)>0){c=sc(a.e);b=pg(Ko(a.f),2);hc(c==a.c?Ur:Vr+c,Rr,Xk(c),null);Mc(c,b)}} -var $r="Can't get element ",Xr='GET',Yr='MSXML2.XMLHTTP.3.0',Zr='Microsoft.XMLHTTP',Rr='begin',Vr='download',Sr='end',Ur='leftoversDownload',Wr='runAsync';_=$b.prototype=new O;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var _b;_=lc.prototype=new O;_.tI=0;_.a=null;_.b=0;_.c=0;_=uc.prototype=new mb;_.tI=7;_=xc.prototype=new O;_.h=Bc;_.tI=8;_.a=null;_=Nc.prototype=new O;_.i=Qc;_.tI=0;_.a=null;_.b=null;_=Qk.prototype=new O;_.tI=27;_=Pk.prototype=new Qk;_.eQ=Uk;_.hC=Vk;_.w=Wk;_.tI=30;_.a=0;var Zk;_=Cn.prototype=new Dl;_.y=Gn;_.s=Hn;_.z=In;_.tI=0;_.a=null;_.b=null;_=Jn.prototype=new O;_.u=Mn;_.v=Nn;_.tI=0;_.a=null;_=On.prototype=new Wm;_.F=Qn;_.G=Rn;_.s=Sn;_.tI=41;_=Eo.prototype=new On;_.x=No;_.z=Oo;_.tI=45;_.a=null;_.b=0;_=Po.prototype=new O;_.u=Wo;_.v=Xo;_.tI=0;_.a=0;_.b=null;_.c=null;_.d=null;_=Yo.prototype=new O;_.tI=0;_.a=null;_.b=null;_.c=null;var Cg=new Ak,Eg=new Ak;kc(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/1.cache.js new file mode 100644 index 00000000..cf79ccaf --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/1.cache.js @@ -0,0 +1,7 @@ +function US(){} +function eT(){return DP} +function iT(){var a;while(ZS){a=ZS;ZS=ZS.c;!ZS&&($S=null);Zv(a.b.b)}} +function xv(a,b){Hab(a.f,b);if(!a.e){a.e=true;zv(a)}a.c=false;Av(a)} +function Zv(a){var b;a.b.b=a.b.c.blob;(Ev(),Dv).captureBlob(a.b.b,a.b.f,Grb);b=U$(new R$,a.b.f);a.b.d.sb(b);xv(a.b.j,a.b)} +function fT(){aT=true;_S=(cT(),new US);Ky((Hy(),Gy),1);!!$stats&&$stats(oz(Hrb,Oib,null,null));_S.Zb();!!$stats&&$stats(oz(Hrb,Irb,null,null))} +var Jrb='AsyncLoader1',Grb='image/JPEG',Hrb='runCallbacks1';_=US.prototype=new VS;_.gC=eT;_.Zb=iT;_.tI=0;var DP=f4(wpb,Jrb);fT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/2.cache.js new file mode 100644 index 00000000..0d28038d --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/2.cache.js @@ -0,0 +1,6 @@ +function qT(){} +function CT(){return HP} +function GT(){var a;while(vT){a=vT;vT=vT.c;!vT&&(wT=null);ro(a.b)}} +function DT(){yT=true;xT=(AT(),new qT);Ky((Hy(),Gy),2);!!$stats&&$stats(oz(Lrb,Oib,null,null));xT.Zb();!!$stats&&$stats(oz(Lrb,Irb,null,null))} +function ro(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Krb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Kv(a.d,e.encode());return}Kv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Kv(a.d,e.encode());return}Kv(a.d,a.b)}} +var Mrb='AsyncLoader2',Krb='beta.canvas',Lrb='runCallbacks2';_=qT.prototype=new rT;_.gC=CT;_.Zb=GT;_.tI=0;var HP=f4(wpb,Mrb);DT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/3.cache.js new file mode 100644 index 00000000..a59daae7 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/3.cache.js @@ -0,0 +1,35 @@ +function oo(){} +function Mv(){} +function Rv(){} +function uT(){} +function rT(){} +function HT(){} +function LT(){} +function Sy(){Ny(Gy)} +function so(){return vN} +function Qv(){return jO} +function Vv(){return kO} +function tT(){return GP} +function JT(){return EP} +function NT(){return FP} +function Ny(a){Ky(a,a.e)} +function Ov(a,b){a.b=b;return a} +function Tv(a,b){a.b=b;return a} +function AT(){AT=Cbb;xT=new rT} +function KT(a){AT();zT=false;FT(a)} +function GI(a,b){if(!a){return}Uv(a,b)} +function JI(c,b){c.onprogress=function(a){KI(b,a)}} +function qo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} +function nw(a,b,c){var d;d=Z1(a.g,b);Os(a,c,a.I,d,true);Ps(a,b)} +function vv(a,b){p7(a.g.b,b)!=null;Av(a);zv(a);dt(a.b.e)} +function Jv(a){if(a.i.d){(FB(),a.e.I).textContent=Nrb;ET(qo(new oo,a.b,a))}else{Kv(a,a.b)}} +function FT(a){AT();while(vT){Uo();Uq(br(new rp,Vrb+Bh(a)));vT=vT.c}wT=null} +function KI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(CM(Math.floor(c*100))+Urb)} +function Ky(a,b){var c;c=b==a.e?Mib:Nib+b;Py(c,Irb,e5(b),null);if(My(a,b)){_y(a.f);p7(a.b,e5(b));Ry(a)}} +function zv(a){var b;if(a.f.c>0){b=pM(Jab(a.f),37);Jv(b)}else{a.e=false}} +function ET(a){AT();var b;b=new LT;b.b=a;!!wT&&(wT.c=b);wT=b;!vT&&(vT=b);if(yT){xT.Zb();return}if(!zT){zT=true;Ly((Hy(),Gy),2,new HT)}} +function Xk(a,b,c){var d,e;p7(a.b.b,b)!=null;e=c.Xb();if(e){d=zt(new ot,a,e,a.c);l7(a.g,e5(d.d),d);v9(a.h,d);a.m.b==a&&nw(a.m,b,d)}else{a.m.b==a&&Ps(a.m,b)}} +function Uv(b,c){var a,e,f;if(c.status!=200){(FB(),b.b.e.I).textContent=Rrb;ik(b.b._(),Srb,true)}(Ev(),Dv).remove(b.b.f);if(c.status==200){try{f=DL(c.responseText);vv(b.b.j,b.b);Xk(b.b.g,b.b,f);return}catch(a){a=rS(a);if(sM(a,23)){e=a;Uo();Uq(br(new rp,Trb+Bh(e)+Udb+c.responseText))}else throw a}}p7(b.b.g.b.b,b.b)!=null;vv(b.b.j,b.b)} +function FI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){GI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function Kv(a,b){var c;(FB(),a.e.I).textContent=Orb;c=gI().create(Prb);c.open(ojb,(Uo(),Po)+a.g.e+Qrb+a.f+Efb+To);JI(c.upload,Ov(new Mv,a));FI(c,Tv(new Rv,a));c.send(b)} +var Urb='%',Qrb='?filename=',$rb='AsyncLoader2$1',_rb='AsyncLoader2__Callback',Zrb='AsyncLoader2__Super',Wrb='AsyncResizer',Vrb='Error Resizing image\n',Trb='Exception on Upload\n',Nrb='Resizing..',Rrb='Upload Error',Xrb='UploadFile$1',Yrb='UploadFile$2',Orb='Uploading..',Prb='beta.httprequest',Irb='end',Srb='upload-error';_=oo.prototype=new Lf;_.gC=so;_.tI=0;_.b=null;_.c=null;_.d=null;_=Mv.prototype=new Lf;_.gC=Qv;_.tI=0;_.b=null;_=Rv.prototype=new Lf;_.gC=Vv;_.tI=0;_.b=null;_=rT.prototype=new Lf;_.gC=tT;_.Zb=uT;_.tI=0;var vT=null,wT=null,xT,yT=false,zT=false;_=HT.prototype=new Lf;_.gC=JT;_.Nb=KT;_.tI=89;_=LT.prototype=new Lf;_.gC=NT;_.tI=0;_.b=null;_.c=null;var vN=f4(ymb,Wrb),jO=f4(ymb,Xrb),kO=f4(ymb,Yrb),GP=f4(wpb,Zrb),EP=f4(wpb,$rb),FP=f4(wpb,_rb);Sy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/1.cache.js deleted file mode 100644 index 5b08821d..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function Xg(){} -function Vg(){} -function ah(){} -function Ug(){} -function Zg(){Zg=np;Yg=new Vg} -function _g(){Yg=(Zg(),new Ug);ac((Zb(),Yb),1);!!$stats&&$stats(Cc(yr,zr,null,null));Yg.m();!!$stats&&$stats(Cc(yr,Ar,null,null))} -var yr='runCallbacks1';_=Vg.prototype=new O;_.m=Xg;_.tI=0;_=Ug.prototype=new Vg;_.m=ah;_.tI=0;var Yg;_g(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/2.cache.js deleted file mode 100644 index eb494981..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/2.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function eh(){} -function ch(){} -function jh(){} -function bh(){} -function gh(){gh=np;fh=new ch} -function ih(){fh=(gh(),new bh);ac((Zb(),Yb),2);!!$stats&&$stats(Cc(Br,zr,null,null));fh.m();!!$stats&&$stats(Cc(Br,Ar,null,null))} -var Br='runCallbacks2';_=ch.prototype=new O;_.m=eh;_.tI=0;_=bh.prototype=new ch;_.m=jh;_.tI=0;var fh;ih(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/3.cache.js deleted file mode 100644 index f4471a59..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/0A21C4AA9FA3F1812B8077A68729DA52/3.cache.js +++ /dev/null @@ -1,75 +0,0 @@ -function Xb(){} -function ic(){} -function rc(){} -function uc(){} -function Kc(){} -function Hk(){} -function Gk(){} -function tn(){} -function An(){} -function Fn(){} -function vo(){} -function Go(){} -function Po(){} -function hc(){cc(Yb)} -function cc(a){ac(a,a.d)} -function yc(a){xc(this,a)} -function nc(a){a.c=0;a.d=0} -function qc(a){return a.d-a.c} -function Mk(){return this.b} -function Nk(){return this.b} -function Fo(){return this.c} -function Oo(){return Mo(this)} -function oc(a){return a.b[a.c]} -function mc(a,b){a.b[a.d++]=b} -function tc(a,b){Ed();return a} -function wc(a,b){a.b=b;return a} -function Kk(a,b){a.b=b;return a} -function Cn(a,b){a.b=b;return a} -function Jn(){return Ao(this,0)} -function zn(){return this.c.b.e} -function pc(a){return a.b[a.c++]} -function Dn(){return _m(this.b.b)} -function xn(a){return Pl(this.b,a)} -function No(){return this.c!=this.e.b} -function Ro(a){a.b=a.c=a;return a} -function Mc(a,b,c){a.c=b;a.b=c;return a} -function vn(a,b,c){a.b=b;a.c=c;return a} -function Eo(a){return So(new Po,a,this.b),++this.c,true} -function Do(a){if(a.c==0){throw gp(new ep)}} -function xo(a){a.b=Ro(new Po);a.c=0;return a} -function zo(a,b,c){So(new Po,b,c);++a.c} -function Jo(a,b,c,d){a.e=d;a.c=c;a.b=b;return a} -function So(a,b,c){a.d=b;a.b=c;a.c=c.c;c.c.b=a;c.c=a;return a} -function lc(a,b){a.b=Xf(yg,0,-1,b,1);return a} -function Rk(){Rk=np;Qk=Xf(Ag,0,12,256,0)} -function Zb(){Zb=np;Yb=_b(new Xb,3,Yf(yg,0,-1,[]))} -function Fl(a){var b;b=im(new cm,a);return vn(new tn,a,b)} -function En(){var a;a=lg(an(this.b.b),20).D();return a} -function yn(){var a;a=rm(new pm,this.c.b);return Cn(new An,a)} -function Hn(a,b){var c;c=Ao(this,a);zo(c.e,b,c.c);++c.b;c.d=null} -function Bo(a){var b;Do(a);--a.c;b=a.b.b;b.b.c=b.c;b.c.b=b.b;b.b=b.c=b;return b.d} -function Lk(a){return a!=null&&jg(a.tI,12)&&lg(a,12).b==this.b} -function ec(a,b,c,d){!!$stats&&$stats(Cc(a,b,c,d))} -function Ic(b,c){function d(a){c.i(a)} -return __gwtStartLoadingFragment(b,d)} -function Pl(a,b){if(a.d&&ho(a.c,b)){return true}else if(Ol(a,b)){return true}else if(Ml(a,b)){return true}return false} -function Mo(a){if(a.c==a.e.b){throw gp(new ep)}a.d=a.c;a.c=a.c.b;++a.b;return a.d.d} -function _b(a,b,c){Zb();a.b=go(new eo);a.g=xo(new vo);a.d=b;a.c=c;a.f=lc(new ic,b+1);return a} -function ek(b){var a=b;$wnd.setTimeout(function(){a.onreadystatechange=new Function},0)} -function kk(c,a){var b=c;c.onreadystatechange=$entry(function(){a.j(b)})} -function Ol(e,a){var b=e.f;for(var c in b){if(c.charCodeAt(0)==58){var d=b[c];if(e.B(a,d)){return true}}}return false} -function Ml(i,a){var b=i.b;for(var c in b){if(c==parseInt(c)){var d=b[c];for(var e=0,f=d.length;ea.c)&&Vm(b,a.c);if(b>=a.c>>1){d=a.b;for(c=a.c;c>b;--c){d=d.c}}else{d=a.b.b;for(c=0;c-129&&a<128){b=a+128;c=(Rk(),Qk)[b];!c&&(c=Qk[b]=Kk(new Gk,a));return c}return Kk(new Gk,a)} -function lk(){if($wnd.XMLHttpRequest){return new XMLHttpRequest}else{try{return new ActiveXObject(Gr)}catch(a){return new ActiveXObject(Hr)}}} -function xc(b,c){var a,e,f,g,h,i;h=Nn(new Kn);while(qc(b.b.f)>0){On(h,lg(Bo(b.b.g),2));pc(b.b.f)}nc(b.b.f);Qn(h,Fl(b.b.b));Ll(b.b.b);i=null;for(g=$m(new Xm,h);g.b1){return}if(qc(a.e)>0){c=oc(a.e);ec(c==a.d?Cr:Dr+c,zr,Ok(c),null);Jc(c,wc(new uc,a));return}while(qc(a.f)>0){c=pc(a.f);b=lg(Bo(a.g),2);ec(c==a.d?Cr:Dr+c,zr,Ok(c),null);Jc(c,b)}} -var Ir="Can't get element ",Fr='GET',Gr='MSXML2.XMLHTTP.3.0',Hr='Microsoft.XMLHTTP',zr='begin',Dr='download',Ar='end',Cr='leftoversDownload',Er='runAsync';_=Xb.prototype=new O;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var Yb;_=ic.prototype=new O;_.tI=0;_.b=null;_.c=0;_.d=0;_=rc.prototype=new mb;_.tI=7;_=uc.prototype=new O;_.i=yc;_.tI=8;_.b=null;_=Kc.prototype=new O;_.j=Nc;_.tI=0;_.b=null;_.c=null;_=Hk.prototype=new O;_.tI=27;_=Gk.prototype=new Hk;_.eQ=Lk;_.hC=Mk;_.w=Nk;_.tI=30;_.b=0;var Qk;_=tn.prototype=new ul;_.y=xn;_.s=yn;_.z=zn;_.tI=0;_.b=null;_.c=null;_=An.prototype=new O;_.u=Dn;_.v=En;_.tI=0;_.b=null;_=Fn.prototype=new Nm;_.F=Hn;_.G=In;_.s=Jn;_.tI=41;_=vo.prototype=new Fn;_.x=Eo;_.z=Fo;_.tI=45;_.b=null;_.c=0;_=Go.prototype=new O;_.u=No;_.v=Oo;_.tI=0;_.b=0;_.c=null;_.d=null;_.e=null;_=Po.prototype=new O;_.tI=0;_.b=null;_.c=null;_.d=null;var yg=new rk,Ag=new rk;hc(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/1.cache.js deleted file mode 100644 index 6ce711bd..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function qT(){} -function CT(){return UP} -function GT(){var a;while(vT){a=vT;vT=vT.b;!vT&&(wT=null);Yv(a.a.a)}} -function xv(a,b){bcb(a.e,b);if(!a.d){a.d=true;yv(a)}a.b=false;zv(a)} -function Yv(a){var b;a.a.a=a.a.b.blob;(Dv(),Cv).captureBlob(a.a.a,a.a.e,Mtb);b=__(new Y_,a.a.e);a.a.c.rb(b);xv(a.a.i,a.a)} -function DT(){yT=true;xT=(AT(),new qT);My((Jy(),Iy),1);!!$stats&&$stats(qz(Ntb,akb,null,null));xT.Zb();!!$stats&&$stats(qz(Ntb,Otb,null,null))} -var Ptb='AsyncLoader1',Mtb='image/JPEG',Ntb='runCallbacks1';_=qT.prototype=new rT;_.gC=CT;_.Zb=GT;_.tI=0;var UP=B5(urb,Ptb);DT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/2.cache.js deleted file mode 100644 index 1278fc96..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function OT(){} -function $T(){return YP} -function cU(){var a;while(TT){a=TT;TT=TT.b;!TT&&(UT=null);so(a.a)}} -function _T(){WT=true;VT=(YT(),new OT);My((Jy(),Iy),2);!!$stats&&$stats(qz(Rtb,akb,null,null));VT.Zb();!!$stats&&$stats(qz(Rtb,Otb,null,null))} -function so(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Qtb);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));Jv(a.c,e.encode());return}Jv(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);Jv(a.c,e.encode());return}Jv(a.c,a.a)}} -var Stb='AsyncLoader2',Qtb='beta.canvas',Rtb='runCallbacks2';_=OT.prototype=new PT;_.gC=$T;_.Zb=cU;_.tI=0;var YP=B5(urb,Stb);_T(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/3.cache.js deleted file mode 100644 index ba08400e..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/0AB3C6DF30C08F43EAA999A9F920C30B/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function po(){} -function Lv(){} -function Qv(){} -function ST(){} -function PT(){} -function dU(){} -function hU(){} -function Uy(){Py(Iy)} -function to(){return ON} -function Pv(){return CO} -function Uv(){return DO} -function RT(){return XP} -function fU(){return VP} -function jU(){return WP} -function Py(a){My(a,a.d)} -function Nv(a,b){a.a=b;return a} -function Sv(a,b){a.a=b;return a} -function YT(){YT=Ycb;VT=new PT} -function gU(a){YT();XT=false;bU(a)} -function $I(a,b){if(!a){return}Tv(a,b)} -function vv(a,b){L8(a.f.a,b)!=null;zv(a);yv(a);dt(a.a.d)} -function Iv(a){if(a.h.c){(DB(),a.d.H).innerText=Ttb;aU(ro(new po,a.a,a))}else{Jv(a,a.a)}} -function mw(a,b,c){var d;d=g3(a.f,b);Os(a,c,a.H,d,true);Ps(a,b)} -function bJ(c,b){c.onprogress=function(a){cJ(b,a)}} -function yv(a){var b;if(a.e.b>0){b=JM(dcb(a.e),37);Iv(b)}else{a.d=false}} -function cJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(WM(Math.floor(c*100))+$tb)} -function bU(a){YT();while(TT){Vo();Uq(br(new sp,_tb+Fh(a)));TT=TT.b}UT=null} -function ro(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} -function My(a,b){var c;c=b==a.d?$jb:_jb+b;Ry(c,Otb,A6(b),null);if(Oy(a,b)){bz(a.e);L8(a.a,A6(b));Ty(a)}} -function Yk(a,b,c){var d,e;L8(a.a.a,b)!=null;e=c.Xb();if(e){d=zt(new ot,a,e,a.b);H8(a.f,A6(d.c),d);Rab(a.g,d);a.l.a==a&&mw(a.l,b,d)}else{a.l.a==a&&Ps(a.l,b)}} -function aU(a){YT();var b;b=new hU;b.a=a;!!UT&&(UT.b=b);UT=b;!TT&&(TT=b);if(WT){VT.Zb();return}if(!XT){XT=true;Ny((Jy(),Iy),2,new dU)}} -function Jv(a,b){var c;(DB(),a.d.H).innerText=Utb;c=AI().create(Vtb);c.open(zkb,(Vo(),Qo)+a.f.d+Wtb+a.e+Vgb+Uo);bJ(c.upload,Nv(new Lv,a));ZI(c,Sv(new Qv,a));c.send(b)} -function Tv(b,c){var a,e,f;if(c.status!=200){(DB(),b.a.d.H).innerText=Xtb;jk(b.a.$(),Ytb,true)}(Dv(),Cv).remove(b.a.e);if(c.status==200){try{f=XL(c.responseText);vv(b.a.i,b.a);Yk(b.a.f,b.a,f);return}catch(a){a=PS(a);if(MM(a,23)){e=a;Vo();Uq(br(new sp,Ztb+Fh(e)+hfb+c.responseText))}else throw a}}L8(b.a.f.a.a,b.a)!=null;vv(b.a.i,b.a)} -function ZI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){$I(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -var $tb='%',Wtb='?filename=',eub='AsyncLoader2$1',fub='AsyncLoader2__Callback',dub='AsyncLoader2__Super',aub='AsyncResizer',_tb='Error Resizing image\n',Ztb='Exception on Upload\n',Ttb='Resizing..',Xtb='Upload Error',bub='UploadFile$1',cub='UploadFile$2',Utb='Uploading..',Vtb='beta.httprequest',Otb='end',Ytb='upload-error';_=po.prototype=new Pf;_.gC=to;_.tI=0;_.a=null;_.b=null;_.c=null;_=Lv.prototype=new Pf;_.gC=Pv;_.tI=0;_.a=null;_=Qv.prototype=new Pf;_.gC=Uv;_.tI=0;_.a=null;_=PT.prototype=new Pf;_.gC=RT;_.Zb=ST;_.tI=0;var TT=null,UT=null,VT,WT=false,XT=false;_=dU.prototype=new Pf;_.gC=fU;_.Mb=gU;_.tI=89;_=hU.prototype=new Pf;_.gC=jU;_.tI=0;_.a=null;_.b=null;var ON=B5(yob,aub),CO=B5(yob,bub),DO=B5(yob,cub),XP=B5(urb,dub),VP=B5(urb,eub),WP=B5(urb,fub);Uy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/1.cache.js deleted file mode 100644 index c43d88a0..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function PS(){} -function _S(){return zP} -function dT(){var a;while(US){a=US;US=US.c;!US&&(VS=null);Wv(a.b.b)}} -function vv(a,b){vab(a.f,b);if(!a.e){a.e=true;wv(a)}a.c=false;xv(a)} -function Wv(a){var b;a.b.b=a.b.c.blob;(Bv(),Av).captureBlob(a.b.b,a.b.f,prb);b=R$(new O$,a.b.f);a.b.d.sb(b);vv(a.b.j,a.b)} -function aT(){XS=true;WS=(ZS(),new PS);Gy((Dy(),Cy),1);!!$stats&&$stats(kz(qrb,Bib,null,null));WS.$b();!!$stats&&$stats(kz(qrb,rrb,null,null))} -var srb='AsyncLoader1',prb='image/JPEG',qrb='runCallbacks1';_=PS.prototype=new QS;_.gC=_S;_.$b=dT;_.tI=0;var zP=T3(gpb,srb);aT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/2.cache.js deleted file mode 100644 index 18c074c4..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function lT(){} -function xT(){return DP} -function BT(){var a;while(qT){a=qT;qT=qT.c;!qT&&(rT=null);qo(a.b)}} -function yT(){tT=true;sT=(vT(),new lT);Gy((Dy(),Cy),2);!!$stats&&$stats(kz(urb,Bib,null,null));sT.$b();!!$stats&&$stats(kz(urb,rrb,null,null))} -function qo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(trb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Hv(a.d,e.encode());return}Hv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Hv(a.d,e.encode());return}Hv(a.d,a.b)}} -var vrb='AsyncLoader2',trb='beta.canvas',urb='runCallbacks2';_=lT.prototype=new mT;_.gC=xT;_.$b=BT;_.tI=0;var DP=T3(gpb,vrb);yT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/3.cache.js deleted file mode 100644 index bd1e277b..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/3295227D4A416F64C8B3061D11DFABA0/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function no(){} -function Jv(){} -function Ov(){} -function pT(){} -function mT(){} -function CT(){} -function GT(){} -function Oy(){Jy(Cy)} -function ro(){return rN} -function Nv(){return fO} -function Sv(){return gO} -function oT(){return CP} -function ET(){return AP} -function IT(){return BP} -function Jy(a){Gy(a,a.e)} -function Lv(a,b){a.b=b;return a} -function Qv(a,b){a.b=b;return a} -function vT(){vT=qbb;sT=new mT} -function FT(a){vT();uT=false;AT(a)} -function CI(a,b){if(!a){return}Rv(a,b)} -function FI(c,b){c.onprogress=function(a){GI(b,a)}} -function po(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function kw(a,b,c){var d;d=W1(a.g,b);Ms(a,c,a.I,d,true);Ns(a,b)} -function tv(a,b){d7(a.g.b,b)!=null;xv(a);wv(a);bt(a.b.e)} -function Gv(a){if(a.i.d){bC((GB(),a.e.I),wrb);zT(po(new no,a.b,a))}else{Hv(a,a.b)}} -function wv(a){var b;if(a.f.c>0){b=lM(xab(a.f),37);Gv(b)}else{a.e=false}} -function GI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(yM(Math.floor(c*100))+Drb)} -function Gy(a,b){var c;c=b==a.e?zib:Aib+b;Ly(c,rrb,S4(b),null);if(Iy(a,b)){Xy(a.f);d7(a.b,S4(b));Ny(a)}} -function Hv(a,b){var c;bC((GB(),a.e.I),xrb);c=cI().create(yrb);c.open(bjb,(To(),Oo)+a.g.e+zrb+a.f+sfb+So);FI(c.upload,Lv(new Jv,a));BI(c,Qv(new Ov,a));c.send(b)} -function AT(a){vT();while(qT){To();Sq(_q(new qp,Erb+Ah(a)));qT=qT.c}rT=null} -function zT(a){vT();var b;b=new GT;b.b=a;!!rT&&(rT.c=b);rT=b;!qT&&(qT=b);if(tT){sT.$b();return}if(!uT){uT=true;Hy((Dy(),Cy),2,new CT)}} -function Wk(a,b,c){var d,e;d7(a.b.b,b)!=null;e=c.Yb();if(e){d=xt(new mt,a,e,a.c);_6(a.g,S4(d.d),d);j9(a.h,d);a.m.b==a&&kw(a.m,b,d)}else{a.m.b==a&&Ns(a.m,b)}} -function Rv(b,c){var a,e,f;if(c.status!=200){bC((GB(),b.b.e.I),Arb);hk(b.b._(),Brb,true)}(Bv(),Av).remove(b.b.f);if(c.status==200){try{f=zL(c.responseText);tv(b.b.j,b.b);Wk(b.b.g,b.b,f);return}catch(a){a=mS(a);if(oM(a,23)){e=a;To();Sq(_q(new qp,Crb+Ah(e)+Idb+c.responseText))}else throw a}}d7(b.b.g.b.b,b.b)!=null;tv(b.b.j,b.b)} -function BI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){CI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -var Drb='%',zrb='?filename=',Jrb='AsyncLoader2$1',Krb='AsyncLoader2__Callback',Irb='AsyncLoader2__Super',Frb='AsyncResizer',Erb='Error Resizing image\n',Crb='Exception on Upload\n',wrb='Resizing..',Arb='Upload Error',Grb='UploadFile$1',Hrb='UploadFile$2',xrb='Uploading..',yrb='beta.httprequest',rrb='end',Brb='upload-error';_=no.prototype=new Kf;_.gC=ro;_.tI=0;_.b=null;_.c=null;_.d=null;_=Jv.prototype=new Kf;_.gC=Nv;_.tI=0;_.b=null;_=Ov.prototype=new Kf;_.gC=Sv;_.tI=0;_.b=null;_=mT.prototype=new Kf;_.gC=oT;_.$b=pT;_.tI=0;var qT=null,rT=null,sT,tT=false,uT=false;_=CT.prototype=new Kf;_.gC=ET;_.Nb=FT;_.tI=89;_=GT.prototype=new Kf;_.gC=IT;_.tI=0;_.b=null;_.c=null;var rN=T3(imb,Frb),fO=T3(imb,Grb),gO=T3(imb,Hrb),CP=T3(gpb,Irb),AP=T3(gpb,Jrb),BP=T3(gpb,Krb);Oy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/1.cache.js deleted file mode 100644 index 537c3947..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function SS(){} -function cT(){return BP} -function gT(){var a;while(XS){a=XS;XS=XS.c;!XS&&(YS=null);Yv(a.b.b)}} -function xv(a,b){Jab(a.f,b);if(!a.e){a.e=true;yv(a)}a.c=false;zv(a)} -function Yv(a){var b;a.b.b=a.b.c.blob;(Dv(),Cv).captureBlob(a.b.b,a.b.f,Hrb);b=V$(new S$,a.b.f);a.b.d.sb(b);xv(a.b.j,a.b)} -function dT(){$S=true;ZS=(aT(),new SS);Iy((Fy(),Ey),1);!!$stats&&$stats(mz(Irb,Pib,null,null));ZS.Zb();!!$stats&&$stats(mz(Irb,Jrb,null,null))} -var Krb='AsyncLoader1',Hrb='image/JPEG',Irb='runCallbacks1';_=SS.prototype=new TS;_.gC=cT;_.Zb=gT;_.tI=0;var BP=g4(xpb,Krb);dT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/2.cache.js deleted file mode 100644 index 45b26939..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function oT(){} -function AT(){return FP} -function ET(){var a;while(tT){a=tT;tT=tT.c;!tT&&(uT=null);ro(a.b)}} -function BT(){wT=true;vT=(yT(),new oT);Iy((Fy(),Ey),2);!!$stats&&$stats(mz(Mrb,Pib,null,null));vT.Zb();!!$stats&&$stats(mz(Mrb,Jrb,null,null))} -function ro(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Lrb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Jv(a.d,e.encode());return}Jv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Jv(a.d,e.encode());return}Jv(a.d,a.b)}} -var Nrb='AsyncLoader2',Lrb='beta.canvas',Mrb='runCallbacks2';_=oT.prototype=new pT;_.gC=AT;_.Zb=ET;_.tI=0;var FP=g4(xpb,Nrb);BT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/3.cache.js deleted file mode 100644 index 32d9894a..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/371B2293E0881C8A53FDA41CA333A843/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function oo(){} -function Lv(){} -function Qv(){} -function sT(){} -function pT(){} -function FT(){} -function JT(){} -function Qy(){Ly(Ey)} -function so(){return tN} -function Pv(){return hO} -function Uv(){return iO} -function rT(){return EP} -function HT(){return CP} -function LT(){return DP} -function Ly(a){Iy(a,a.e)} -function Nv(a,b){a.b=b;return a} -function Sv(a,b){a.b=b;return a} -function yT(){yT=Ebb;vT=new pT} -function IT(a){yT();xT=false;DT(a)} -function EI(a,b){if(!a){return}Tv(a,b)} -function vv(a,b){r7(a.g.b,b)!=null;zv(a);yv(a);dt(a.b.e)} -function Iv(a){if(a.i.d){(DB(),a.e.I).textContent=Orb;CT(qo(new oo,a.b,a))}else{Jv(a,a.b)}} -function mw(a,b,c){var d;d=$1(a.g,b);Os(a,c,a.I,d,true);Ps(a,b)} -function HI(c,b){c.onprogress=function(a){II(b,a)}} -function qo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function DT(a){yT();while(tT){Uo();Uq(br(new rp,Wrb+Bh(a)));tT=tT.c}uT=null} -function II(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(AM(Math.floor(c*100))+Vrb)} -function Iy(a,b){var c;c=b==a.e?Nib:Oib+b;Ny(c,Jrb,f5(b),null);if(Ky(a,b)){Zy(a.f);r7(a.b,f5(b));Py(a)}} -function yv(a){var b;if(a.f.c>0){b=nM(Lab(a.f),37);Iv(b)}else{a.e=false}} -function CT(a){yT();var b;b=new JT;b.b=a;!!uT&&(uT.c=b);uT=b;!tT&&(tT=b);if(wT){vT.Zb();return}if(!xT){xT=true;Jy((Fy(),Ey),2,new FT)}} -function Xk(a,b,c){var d,e;r7(a.b.b,b)!=null;e=c.Xb();if(e){d=zt(new ot,a,e,a.c);n7(a.g,f5(d.d),d);x9(a.h,d);a.m.b==a&&mw(a.m,b,d)}else{a.m.b==a&&Ps(a.m,b)}} -function Tv(b,c){var a,e,f;if(c.status!=200){(DB(),b.b.e.I).textContent=Srb;ik(b.b._(),Trb,true)}(Dv(),Cv).remove(b.b.f);if(c.status==200){try{f=BL(c.responseText);vv(b.b.j,b.b);Xk(b.b.g,b.b,f);return}catch(a){a=pS(a);if(qM(a,23)){e=a;Uo();Uq(br(new rp,Urb+Bh(e)+Wdb+c.responseText))}else throw a}}r7(b.b.g.b.b,b.b)!=null;vv(b.b.j,b.b)} -function DI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){EI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Jv(a,b){var c;(DB(),a.e.I).textContent=Prb;c=eI().create(Qrb);c.open(pjb,(Uo(),Po)+a.g.e+Rrb+a.f+Gfb+To);HI(c.upload,Nv(new Lv,a));DI(c,Sv(new Qv,a));c.send(b)} -var Vrb='%',Rrb='?filename=',_rb='AsyncLoader2$1',asb='AsyncLoader2__Callback',$rb='AsyncLoader2__Super',Xrb='AsyncResizer',Wrb='Error Resizing image\n',Urb='Exception on Upload\n',Orb='Resizing..',Srb='Upload Error',Yrb='UploadFile$1',Zrb='UploadFile$2',Prb='Uploading..',Qrb='beta.httprequest',Jrb='end',Trb='upload-error';_=oo.prototype=new Lf;_.gC=so;_.tI=0;_.b=null;_.c=null;_.d=null;_=Lv.prototype=new Lf;_.gC=Pv;_.tI=0;_.b=null;_=Qv.prototype=new Lf;_.gC=Uv;_.tI=0;_.b=null;_=pT.prototype=new Lf;_.gC=rT;_.Zb=sT;_.tI=0;var tT=null,uT=null,vT,wT=false,xT=false;_=FT.prototype=new Lf;_.gC=HT;_.Nb=IT;_.tI=89;_=JT.prototype=new Lf;_.gC=LT;_.tI=0;_.b=null;_.c=null;var tN=g4(zmb,Xrb),hO=g4(zmb,Yrb),iO=g4(zmb,Zrb),EP=g4(xpb,$rb),CP=g4(xpb,_rb),DP=g4(xpb,asb);Qy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/1.cache.js new file mode 100644 index 00000000..fa13e781 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/1.cache.js @@ -0,0 +1,7 @@ +function lT(){} +function xT(){return UP} +function BT(){var a;while(qT){a=qT;qT=qT.c;!qT&&(rT=null);ew(a.b.b)}} +function Ev(a,b){qbb(a.f,b);if(!a.e){a.e=true;Gv(a)}a.c=false;Hv(a)} +function ew(a){var b;a.b.b=a.b.c.blob;(Lv(),Kv).captureBlob(a.b.b,a.b.f,usb);b=p_(new m_,a.b.f);a.b.d.ub(b);Ev(a.b.j,a.b)} +function yT(){tT=true;sT=(vT(),new lT);Ry((Oy(),Ny),1);!!$stats&&$stats(vz(vsb,xjb,null,null));sT.ac();!!$stats&&$stats(vz(vsb,wsb,null,null))} +var xsb='AsyncLoader1',usb='image/JPEG',vsb='runCallbacks1';_=lT.prototype=new mT;_.gC=xT;_.ac=BT;_.tI=0;var UP=Q4(iqb,xsb);yT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/2.cache.js new file mode 100644 index 00000000..936d7c41 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/2.cache.js @@ -0,0 +1,6 @@ +function JT(){} +function VT(){return YP} +function ZT(){var a;while(OT){a=OT;OT=OT.c;!OT&&(PT=null);yo(a.b)}} +function WT(){RT=true;QT=(TT(),new JT);Ry((Oy(),Ny),2);!!$stats&&$stats(vz(zsb,xjb,null,null));QT.ac();!!$stats&&$stats(vz(zsb,wsb,null,null))} +function yo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(ysb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Rv(a.d,e.encode());return}Rv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Rv(a.d,e.encode());return}Rv(a.d,a.b)}} +var Asb='AsyncLoader2',ysb='beta.canvas',zsb='runCallbacks2';_=JT.prototype=new KT;_.gC=VT;_.ac=ZT;_.tI=0;var YP=Q4(iqb,Asb);WT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/3.cache.js new file mode 100644 index 00000000..bb2d0a23 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/3.cache.js @@ -0,0 +1,35 @@ +function vo(){} +function Tv(){} +function Yv(){} +function NT(){} +function KT(){} +function $T(){} +function cU(){} +function Zy(){Uy(Ny)} +function zo(){return LN} +function Xv(){return zO} +function aw(){return AO} +function MT(){return XP} +function aU(){return VP} +function eU(){return WP} +function Uy(a){Ry(a,a.e)} +function Vv(a,b){a.b=b;return a} +function $v(a,b){a.b=b;return a} +function TT(){TT=lcb;QT=new KT} +function bU(a){TT();ST=false;YT(a)} +function VI(a,b){if(!a){return}_v(a,b)} +function YI(c,b){c.onprogress=function(a){ZI(b,a)}} +function uw(a,b,c){var d;d=u2(a.g,b);Vs(a,c,a.K,d,true);Ws(a,b)} +function xo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} +function Gv(a){var b;if(a.f.c>0){b=EM(sbb(a.f),37);Qv(b)}else{a.e=false}} +function Cv(a,b){$7(a.g.b,b)!=null;Hv(a);Gv(a);kt(a.b.e)} +function Qv(a){if(a.i.d){JC((NB(),a.e.K),Bsb);XT(xo(new vo,a.b,a))}else{Rv(a,a.b)}} +function YT(a){TT();while(OT){_o();_q(ir(new yp,Jsb+Fh(a)));OT=OT.c}PT=null} +function XT(a){TT();var b;b=new cU;b.b=a;!!PT&&(PT.c=b);PT=b;!OT&&(OT=b);if(RT){QT.ac();return}if(!ST){ST=true;Sy((Oy(),Ny),2,new $T)}} +function Ry(a,b){var c;c=b==a.e?vjb:wjb+b;Wy(c,wsb,P5(b),null);if(Ty(a,b)){gz(a.f);$7(a.b,P5(b));Yy(a)}} +function Rv(a,b){var c;JC((NB(),a.e.K),Csb);c=vI().create(Dsb);c.open(Zjb,(_o(),Wo)+a.g.e+Esb+a.f+ngb+$o);YI(c.upload,Vv(new Tv,a));UI(c,$v(new Yv,a));c.send(b)} +function ZI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.db(RM(Math.floor(c*100))+Isb)} +function cl(a,b,c){var d,e;$7(a.b.b,b)!=null;e=c.$b();if(e){d=Gt(new vt,a,e,a.c);W7(a.g,P5(d.d),d);eab(a.h,d);a.m.b==a&&uw(a.m,b,d)}else{a.m.b==a&&Ws(a.m,b)}} +function _v(b,c){var a,e,f;if(c.status!=200){JC((NB(),b.b.e.K),Fsb);pk(b.b.bb(),Gsb,true)}(Lv(),Kv).remove(b.b.f);if(c.status==200){try{f=SL(c.responseText);Cv(b.b.j,b.b);cl(b.b.g,b.b,f);return}catch(a){a=KS(a);if(HM(a,23)){e=a;_o();_q(ir(new yp,Hsb+Fh(e)+Deb+c.responseText))}else throw a}}$7(b.b.g.b.b,b.b)!=null;Cv(b.b.j,b.b)} +function UI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){VI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +var Isb='%',Esb='?filename=',Osb='AsyncLoader2$1',Psb='AsyncLoader2__Callback',Nsb='AsyncLoader2__Super',Ksb='AsyncResizer',Jsb='Error Resizing image\n',Hsb='Exception on Upload\n',Bsb='Resizing..',Fsb='Upload Error',Lsb='UploadFile$1',Msb='UploadFile$2',Csb='Uploading..',Dsb='beta.httprequest',wsb='end',Gsb='upload-error';_=vo.prototype=new Pf;_.gC=zo;_.tI=0;_.b=null;_.c=null;_.d=null;_=Tv.prototype=new Pf;_.gC=Xv;_.tI=0;_.b=null;_=Yv.prototype=new Pf;_.gC=aw;_.tI=0;_.b=null;_=KT.prototype=new Pf;_.gC=MT;_.ac=NT;_.tI=0;var OT=null,PT=null,QT,RT=false,ST=false;_=$T.prototype=new Pf;_.gC=aU;_.Pb=bU;_.tI=89;_=cU.prototype=new Pf;_.gC=eU;_.tI=0;_.b=null;_.c=null;var LN=Q4(jnb,Ksb),zO=Q4(jnb,Lsb),AO=Q4(jnb,Msb),XP=Q4(iqb,Nsb),VP=Q4(iqb,Osb),WP=Q4(iqb,Psb);Zy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/1.cache.js deleted file mode 100644 index c90129c8..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function jh(){} -function hh(){} -function oh(){} -function gh(){} -function lh(){lh=Ap;kh=new hh} -function nh(){kh=(lh(),new gh);ac((Zb(),Yb),1);!!$stats&&$stats(Cc(Lr,Mr,null,null));kh.q();!!$stats&&$stats(Cc(Lr,Nr,null,null))} -var Lr='runCallbacks1';_=hh.prototype=new O;_.q=jh;_.tI=0;_=gh.prototype=new hh;_.q=oh;_.tI=0;var kh;nh(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/2.cache.js deleted file mode 100644 index 5cfc3a62..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/2.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function sh(){} -function qh(){} -function xh(){} -function ph(){} -function uh(){uh=Ap;th=new qh} -function wh(){th=(uh(),new ph);ac((Zb(),Yb),2);!!$stats&&$stats(Cc(Or,Mr,null,null));th.q();!!$stats&&$stats(Cc(Or,Nr,null,null))} -var Or='runCallbacks2';_=qh.prototype=new O;_.q=sh;_.tI=0;_=ph.prototype=new qh;_.q=xh;_.tI=0;var th;wh(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/3.cache.js deleted file mode 100644 index ba18aa58..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/46E36699DD51342BCC1877A718D3B6D5/3.cache.js +++ /dev/null @@ -1,75 +0,0 @@ -function Xb(){} -function ic(){} -function rc(){} -function uc(){} -function Kc(){} -function Rk(){} -function Qk(){} -function Gn(){} -function Nn(){} -function Sn(){} -function Io(){} -function To(){} -function ap(){} -function hc(){cc(Yb)} -function cc(a){ac(a,a.d)} -function yc(a){xc(this,a)} -function nc(a){a.c=0;a.d=0} -function qc(a){return a.d-a.c} -function Wk(){return this.b} -function Xk(){return this.b} -function So(){return this.c} -function _o(){return Zo(this)} -function oc(a){return a.b[a.c]} -function mc(a,b){a.b[a.d++]=b} -function tc(a,b){Ed();return a} -function wc(a,b){a.b=b;return a} -function Uk(a,b){a.b=b;return a} -function Pn(a,b){a.b=b;return a} -function Wn(){return No(this,0)} -function Mn(){return this.c.b.e} -function pc(a){return a.b[a.c++]} -function Qn(){return nn(this.b.b)} -function Kn(a){return am(this.b,a)} -function $o(){return this.c!=this.e.b} -function Qo(a){if(a.c==0){throw tp(new rp)}} -function cp(a){a.b=a.c=a;return a} -function Mc(a,b,c){a.c=b;a.b=c;return a} -function In(a,b,c){a.b=b;a.c=c;return a} -function Ro(a){return dp(new ap,a,this.b),++this.c,true} -function Mo(a,b,c){dp(new ap,b,c);++a.c} -function Ko(a){a.b=cp(new ap);a.c=0;return a} -function Wo(a,b,c,d){a.e=d;a.c=c;a.b=b;return a} -function dp(a,b,c){a.d=b;a.b=c;a.c=c.c;c.c.b=a;c.c=a;return a} -function lc(a,b){a.b=ig(Mg,0,-1,b,1);return a} -function _k(){_k=Ap;$k=ig(Og,0,12,256,0)} -function Rn(){var a;a=yg(on(this.b.b),20).H();return a} -function Ln(){var a;a=Em(new Cm,this.c.b);return Pn(new Nn,a)} -function Sl(a){var b;b=vm(new pm,a);return In(new Gn,a,b)} -function Zb(){Zb=Ap;Yb=_b(new Xb,3,jg(Mg,0,-1,[]))} -function ec(a,b,c,d){!!$stats&&$stats(Cc(a,b,c,d))} -function Ic(b,c){function d(a){c.i(a)} -return __gwtStartLoadingFragment(b,d)} -function Un(a,b){var c;c=No(this,a);Mo(c.e,b,c.c);++c.b;c.d=null} -function Oo(a){var b;Qo(a);--a.c;b=a.b.b;b.b.c=b.c;b.c.b=b.b;b.b=b.c=b;return b.d} -function uk(c,a){var b=c;c.onreadystatechange=$entry(function(){a.j(b)})} -function ok(b){var a=b;$wnd.setTimeout(function(){a.onreadystatechange=new Function},0)} -function Vn(b){var a,d;d=No(this,b);try{return Zo(d)}catch(a){a=Yg(a);if(Bg(a,23)){throw Pk(new Mk,Vr+b)}else throw a}} -function Zo(a){if(a.c==a.e.b){throw tp(new rp)}a.d=a.c;a.c=a.c.b;++a.b;return a.d.d} -function _b(a,b,c){Zb();a.b=to(new ro);a.g=Ko(new Io);a.d=b;a.c=c;a.f=lc(new ic,b+1);return a} -function am(a,b){if(a.d&&uo(a.c,b)){return true}else if(_l(a,b)){return true}else if(Zl(a,b)){return true}return false} -function ac(a,b){var c;c=b==a.d?Pr:Qr+b;ec(c,Nr,Yk(b),null);if(bc(a,b)){pc(a.e);km(a.b,Yk(b));gc(a)}} -function Jc(a,b){var c,d;c=Ic(a,b);if(c==null){return}d=vk();d.open(Sr,c,true);uk(d,Mc(new Kc,d,b));d.send(null)} -function bc(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e-129&&a<128){b=a+128;c=(_k(),$k)[b];!c&&(c=$k[b]=Uk(new Qk,a));return c}return Uk(new Qk,a)} -function _l(e,a){var b=e.f;for(var c in b){if(c.charCodeAt(0)==58){var d=b[c];if(e.F(a,d)){return true}}}return false} -function Zl(i,a){var b=i.b;for(var c in b){if(c==parseInt(c)){var d=b[c];for(var e=0,f=d.length;e0){_n(h,yg(Oo(b.b.g),2));pc(b.b.f)}nc(b.b.f);bo(h,Sl(b.b.b));Yl(b.b.b);i=null;for(g=mn(new jn,h);g.b1){return}if(qc(a.e)>0){c=oc(a.e);ec(c==a.d?Pr:Qr+c,Mr,Yk(c),null);Jc(c,wc(new uc,a));return}while(qc(a.f)>0){c=pc(a.f);b=yg(Oo(a.g),2);ec(c==a.d?Pr:Qr+c,Mr,Yk(c),null);Jc(c,b)}} -function No(a,b){var c,d;(b<0||b>a.c)&&gn(b,a.c);if(b>=a.c>>1){d=a.b;for(c=a.c;c>b;--c){d=d.c}}else{d=a.b.b;for(c=0;c0){C5(h,gJ(P6(b.b.g),41));zw(b.b.f)}xw(b.b.f);E5(h,_2(b.b.b));i3(b.b.b);i=null;for(g=H4(new E4,h);g.b1){return}if(Aw(a.e)>0){c=yw(a.e);nw(c==a.d?Nmb:Omb+c,Fmb,m1(c),null);Ww(c,Iw(new Gw,a));return}while(Aw(a.f)>0){c=zw(a.f);b=gJ(P6(a.g),41);nw(c==a.d?Nmb:Omb+c,Fmb,m1(c),null);Ww(c,b)}} +var Xmb='AbstractMap$2',Ymb='AbstractMap$2$1',Smb='AsyncFragmentLoader',Tmb='AsyncFragmentLoader$BoundedIntQueue',Umb='AsyncFragmentLoader$HttpDownloadFailure',Vmb='AsyncFragmentLoader$InitialFragmentDownloadFailed',Wmb='AsyncFragmentLoader$XhrLoadingStrategy$1',Pmb='HTTP download failed with status ',Rmb='[I',Fmb='begin',Hmb='com.google.gwt.lang.asyncloaders.',Omb='download',Gmb='end',Nmb='leftoversDownload',Qmb='runAsync';_=ew.prototype=new vf;_.gC=rw;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var fw;_=sw.prototype=new vf;_.gC=Bw;_.tI=0;_.b=null;_.c=0;_.d=0;_=Cw.prototype=new bv;_.gC=Fw;_.tI=70;_=Gw.prototype=new vf;_.gC=Kw;_.Hb=Lw;_.tI=71;_.b=null;_=Xw.prototype=new vf;_.gC=$w;_.Ib=_w;_.tI=0;_.b=null;_.c=null;_=b1.prototype;_.gc=j1;_=d5.prototype=new M2;_.ic=h5;_.gC=i5;_.ob=j5;_.jc=k5;_.tI=0;_.b=null;_.c=null;_=l5.prototype=new vf;_.gC=o5;_.Yb=p5;_.Zb=q5;_.tI=0;_.b=null;var BO=m0(L9,Rmb),cL=n0(kjb,Smb),$K=n0(kjb,Tmb),_K=n0(kjb,Umb),aL=n0(kjb,Vmb),bL=n0(kjb,Wmb),mO=n0(whb,Xmb),lO=n0(whb,Ymb);qw(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/1.cache.js new file mode 100644 index 00000000..da738f77 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/1.cache.js @@ -0,0 +1,7 @@ +function RS(){} +function bT(){return BP} +function fT(){var a;while(WS){a=WS;WS=WS.c;!WS&&(XS=null);Xv(a.b.b)}} +function vv(a,b){tab(a.f,b);if(!a.e){a.e=true;xv(a)}a.c=false;yv(a)} +function Xv(a){var b;a.b.b=a.b.c.blob;(Cv(),Bv).captureBlob(a.b.b,a.b.f,orb);b=Q$(new N$,a.b.f);a.b.d.sb(b);vv(a.b.j,a.b)} +function cT(){ZS=true;YS=(_S(),new RS);Iy((Fy(),Ey),1);!!$stats&&$stats(mz(prb,Aib,null,null));YS.$b();!!$stats&&$stats(mz(prb,qrb,null,null))} +var rrb='AsyncLoader1',orb='image/JPEG',prb='runCallbacks1';_=RS.prototype=new SS;_.gC=bT;_.$b=fT;_.tI=0;var BP=S3(fpb,rrb);cT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/2.cache.js new file mode 100644 index 00000000..766be360 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/2.cache.js @@ -0,0 +1,6 @@ +function nT(){} +function zT(){return FP} +function DT(){var a;while(sT){a=sT;sT=sT.c;!sT&&(tT=null);qo(a.b)}} +function AT(){vT=true;uT=(xT(),new nT);Iy((Fy(),Ey),2);!!$stats&&$stats(mz(trb,Aib,null,null));uT.$b();!!$stats&&$stats(mz(trb,qrb,null,null))} +function qo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(srb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Iv(a.d,e.encode());return}Iv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Iv(a.d,e.encode());return}Iv(a.d,a.b)}} +var urb='AsyncLoader2',srb='beta.canvas',trb='runCallbacks2';_=nT.prototype=new oT;_.gC=zT;_.$b=DT;_.tI=0;var FP=S3(fpb,urb);AT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/3.cache.js new file mode 100644 index 00000000..8148356a --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/3.cache.js @@ -0,0 +1,35 @@ +function no(){} +function Kv(){} +function Pv(){} +function rT(){} +function oT(){} +function ET(){} +function IT(){} +function Qy(){Ly(Ey)} +function ro(){return tN} +function Ov(){return hO} +function Tv(){return iO} +function qT(){return EP} +function GT(){return CP} +function KT(){return DP} +function Ly(a){Iy(a,a.e)} +function Mv(a,b){a.b=b;return a} +function Rv(a,b){a.b=b;return a} +function xT(){xT=obb;uT=new oT} +function HT(a){xT();wT=false;CT(a)} +function EI(a,b){if(!a){return}Sv(a,b)} +function HI(c,b){c.onprogress=function(a){II(b,a)}} +function po(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} +function lw(a,b,c){var d;d=V1(a.g,b);Ms(a,c,a.I,d,true);Ns(a,b)} +function tv(a,b){b7(a.g.b,b)!=null;yv(a);xv(a);bt(a.b.e)} +function Hv(a){if(a.i.d){dC((IB(),a.e.I),vrb);BT(po(new no,a.b,a))}else{Iv(a,a.b)}} +function xv(a){var b;if(a.f.c>0){b=nM(vab(a.f),37);Hv(b)}else{a.e=false}} +function II(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(AM(Math.floor(c*100))+Crb)} +function Iy(a,b){var c;c=b==a.e?yib:zib+b;Ny(c,qrb,R4(b),null);if(Ky(a,b)){Zy(a.f);b7(a.b,R4(b));Py(a)}} +function Wk(a,b,c){var d,e;b7(a.b.b,b)!=null;e=c.Yb();if(e){d=xt(new mt,a,e,a.c);Z6(a.g,R4(d.d),d);h9(a.h,d);a.m.b==a&&lw(a.m,b,d)}else{a.m.b==a&&Ns(a.m,b)}} +function CT(a){xT();while(sT){To();Sq(_q(new qp,Drb+Ah(a)));sT=sT.c}tT=null} +function BT(a){xT();var b;b=new IT;b.b=a;!!tT&&(tT.c=b);tT=b;!sT&&(sT=b);if(vT){uT.$b();return}if(!wT){wT=true;Jy((Fy(),Ey),2,new ET)}} +function Sv(b,c){var a,e,f;if(c.status!=200){dC((IB(),b.b.e.I),zrb);hk(b.b._(),Arb,true)}(Cv(),Bv).remove(b.b.f);if(c.status==200){try{f=BL(c.responseText);tv(b.b.j,b.b);Wk(b.b.g,b.b,f);return}catch(a){a=oS(a);if(qM(a,23)){e=a;To();Sq(_q(new qp,Brb+Ah(e)+Gdb+c.responseText))}else throw a}}b7(b.b.g.b.b,b.b)!=null;tv(b.b.j,b.b)} +function DI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){EI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function Iv(a,b){var c;dC((IB(),a.e.I),wrb);c=eI().create(xrb);c.open(ajb,(To(),Oo)+a.g.e+yrb+a.f+qfb+So);HI(c.upload,Mv(new Kv,a));DI(c,Rv(new Pv,a));c.send(b)} +var Crb='%',yrb='?filename=',Irb='AsyncLoader2$1',Jrb='AsyncLoader2__Callback',Hrb='AsyncLoader2__Super',Erb='AsyncResizer',Drb='Error Resizing image\n',Brb='Exception on Upload\n',vrb='Resizing..',zrb='Upload Error',Frb='UploadFile$1',Grb='UploadFile$2',wrb='Uploading..',xrb='beta.httprequest',qrb='end',Arb='upload-error';_=no.prototype=new Kf;_.gC=ro;_.tI=0;_.b=null;_.c=null;_.d=null;_=Kv.prototype=new Kf;_.gC=Ov;_.tI=0;_.b=null;_=Pv.prototype=new Kf;_.gC=Tv;_.tI=0;_.b=null;_=oT.prototype=new Kf;_.gC=qT;_.$b=rT;_.tI=0;var sT=null,tT=null,uT,vT=false,wT=false;_=ET.prototype=new Kf;_.gC=GT;_.Nb=HT;_.tI=89;_=IT.prototype=new Kf;_.gC=KT;_.tI=0;_.b=null;_.c=null;var tN=S3(hmb,Erb),hO=S3(hmb,Frb),iO=S3(hmb,Grb),EP=S3(fpb,Hrb),CP=S3(fpb,Irb),DP=S3(fpb,Jrb);Qy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/1.cache.js new file mode 100644 index 00000000..f56e4467 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/1.cache.js @@ -0,0 +1,7 @@ +function sT(){} +function ET(){return WP} +function IT(){var a;while(xT){a=xT;xT=xT.b;!xT&&(yT=null);Zv(a.a.a)}} +function xv(a,b){dcb(a.e,b);if(!a.d){a.d=true;zv(a)}a.b=false;Av(a)} +function Zv(a){var b;a.a.a=a.a.b.blob;(Ev(),Dv).captureBlob(a.a.a,a.a.e,Ptb);b=b0(new $_,a.a.e);a.a.c.rb(b);xv(a.a.i,a.a)} +function FT(){AT=true;zT=(CT(),new sT);Oy((Ly(),Ky),1);!!$stats&&$stats(sz(Qtb,dkb,null,null));zT.Zb();!!$stats&&$stats(sz(Qtb,Rtb,null,null))} +var Stb='AsyncLoader1',Ptb='image/JPEG',Qtb='runCallbacks1';_=sT.prototype=new tT;_.gC=ET;_.Zb=IT;_.tI=0;var WP=D5(xrb,Stb);FT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/2.cache.js new file mode 100644 index 00000000..4aabbe00 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/2.cache.js @@ -0,0 +1,6 @@ +function QT(){} +function aU(){return $P} +function eU(){var a;while(VT){a=VT;VT=VT.b;!VT&&(WT=null);so(a.a)}} +function bU(){YT=true;XT=($T(),new QT);Oy((Ly(),Ky),2);!!$stats&&$stats(sz(Utb,dkb,null,null));XT.Zb();!!$stats&&$stats(sz(Utb,Rtb,null,null))} +function so(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Ttb);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));Kv(a.c,e.encode());return}Kv(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);Kv(a.c,e.encode());return}Kv(a.c,a.a)}} +var Vtb='AsyncLoader2',Ttb='beta.canvas',Utb='runCallbacks2';_=QT.prototype=new RT;_.gC=aU;_.Zb=eU;_.tI=0;var $P=D5(xrb,Vtb);bU(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/3.cache.js new file mode 100644 index 00000000..d1cc597c --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/3.cache.js @@ -0,0 +1,35 @@ +function po(){} +function Mv(){} +function Rv(){} +function UT(){} +function RT(){} +function fU(){} +function jU(){} +function Wy(){Ry(Ky)} +function to(){return QN} +function Qv(){return EO} +function Vv(){return FO} +function TT(){return ZP} +function hU(){return XP} +function lU(){return YP} +function Ry(a){Oy(a,a.d)} +function Ov(a,b){a.a=b;return a} +function Tv(a,b){a.a=b;return a} +function $T(){$T=$cb;XT=new RT} +function iU(a){$T();ZT=false;dU(a)} +function aJ(a,b){if(!a){return}Uv(a,b)} +function dJ(c,b){c.onprogress=function(a){eJ(b,a)}} +function nw(a,b,c){var d;d=i3(a.f,b);Os(a,c,a.H,d,true);Ps(a,b)} +function ro(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} +function zv(a){var b;if(a.e.b>0){b=LM(fcb(a.e),37);Jv(b)}else{a.d=false}} +function vv(a,b){N8(a.f.a,b)!=null;Av(a);zv(a);dt(a.a.d)} +function eJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(YM(Math.floor(c*100))+bub)} +function Oy(a,b){var c;c=b==a.d?bkb:ckb+b;Ty(c,Rtb,C6(b),null);if(Qy(a,b)){dz(a.e);N8(a.a,C6(b));Vy(a)}} +function Jv(a){if(a.h.c){(FB(),a.d.H).innerText=Wtb;cU(ro(new po,a.a,a))}else{Kv(a,a.a)}} +function dU(a){$T();while(VT){Vo();Uq(br(new sp,cub+Fh(a)));VT=VT.b}WT=null} +function cU(a){$T();var b;b=new jU;b.a=a;!!WT&&(WT.b=b);WT=b;!VT&&(VT=b);if(YT){XT.Zb();return}if(!ZT){ZT=true;Py((Ly(),Ky),2,new fU)}} +function Yk(a,b,c){var d,e;N8(a.a.a,b)!=null;e=c.Xb();if(e){d=zt(new ot,a,e,a.b);J8(a.f,C6(d.c),d);Tab(a.g,d);a.l.a==a&&nw(a.l,b,d)}else{a.l.a==a&&Ps(a.l,b)}} +function Uv(b,c){var a,e,f;if(c.status!=200){(FB(),b.a.d.H).innerText=$tb;jk(b.a.$(),_tb,true)}(Ev(),Dv).remove(b.a.e);if(c.status==200){try{f=ZL(c.responseText);vv(b.a.i,b.a);Yk(b.a.f,b.a,f);return}catch(a){a=RS(a);if(OM(a,23)){e=a;Vo();Uq(br(new sp,aub+Fh(e)+jfb+c.responseText))}else throw a}}N8(b.a.f.a.a,b.a)!=null;vv(b.a.i,b.a)} +function _I(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){aJ(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function Kv(a,b){var c;(FB(),a.d.H).innerText=Xtb;c=CI().create(Ytb);c.open(Ckb,(Vo(),Qo)+a.f.d+Ztb+a.e+Xgb+Uo);dJ(c.upload,Ov(new Mv,a));_I(c,Tv(new Rv,a));c.send(b)} +var bub='%',Ztb='?filename=',hub='AsyncLoader2$1',iub='AsyncLoader2__Callback',gub='AsyncLoader2__Super',dub='AsyncResizer',cub='Error Resizing image\n',aub='Exception on Upload\n',Wtb='Resizing..',$tb='Upload Error',eub='UploadFile$1',fub='UploadFile$2',Xtb='Uploading..',Ytb='beta.httprequest',Rtb='end',_tb='upload-error';_=po.prototype=new Pf;_.gC=to;_.tI=0;_.a=null;_.b=null;_.c=null;_=Mv.prototype=new Pf;_.gC=Qv;_.tI=0;_.a=null;_=Rv.prototype=new Pf;_.gC=Vv;_.tI=0;_.a=null;_=RT.prototype=new Pf;_.gC=TT;_.Zb=UT;_.tI=0;var VT=null,WT=null,XT,YT=false,ZT=false;_=fU.prototype=new Pf;_.gC=hU;_.Mb=iU;_.tI=89;_=jU.prototype=new Pf;_.gC=lU;_.tI=0;_.a=null;_.b=null;var QN=D5(Bob,dub),EO=D5(Bob,eub),FO=D5(Bob,fub),ZP=D5(xrb,gub),XP=D5(xrb,hub),YP=D5(xrb,iub);Wy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/1.cache.js new file mode 100644 index 00000000..dde83192 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/1.cache.js @@ -0,0 +1,9 @@ +function _O(){} +function YO(){} +function fP(){} +function XO(){} +function dP(){return JL} +function $O(){return IL} +function bP(){bP=Y6;aP=new YO} +function eP(){aP=(bP(),new XO);ew((bw(),aw),1);!!$stats&&$stats(Kw(Slb,Tlb,null,null));aP.Sb();!!$stats&&$stats(Kw(Slb,Ulb,null,null))} +var Xlb='AsyncLoader1',Wlb='AsyncLoader1__Super',Slb='runCallbacks1';_=YO.prototype=new pf;_.gC=$O;_.Sb=_O;_.tI=0;_=XO.prototype=new YO;_.gC=dP;_.Sb=fP;_.tI=0;var aP;var IL=D_(Vlb,Wlb),JL=D_(Vlb,Xlb);eP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/2.cache.js new file mode 100644 index 00000000..d6c6f6b7 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/2.cache.js @@ -0,0 +1,9 @@ +function kP(){} +function hP(){} +function qP(){} +function gP(){} +function oP(){return LL} +function jP(){return KL} +function mP(){mP=Y6;lP=new hP} +function pP(){lP=(mP(),new gP);ew((bw(),aw),2);!!$stats&&$stats(Kw(Ylb,Tlb,null,null));lP.Sb();!!$stats&&$stats(Kw(Ylb,Ulb,null,null))} +var $lb='AsyncLoader2',Zlb='AsyncLoader2__Super',Ylb='runCallbacks2';_=hP.prototype=new pf;_.gC=jP;_.Sb=kP;_.tI=0;_=gP.prototype=new hP;_.gC=oP;_.Sb=qP;_.tI=0;var lP;var KL=D_(Vlb,Zlb),LL=D_(Vlb,$lb);pP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/3.cache.js new file mode 100644 index 00000000..2290ea28 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/7C1AD451EC3EDEB1136202063B8983F0/3.cache.js @@ -0,0 +1,54 @@ +function _v(){} +function nw(){} +function xw(){} +function Bw(){} +function Sw(){} +function t4(){} +function B4(){} +function lw(){gw(aw)} +function mw(){return KK} +function ww(){return GK} +function Aw(){return HK} +function Fw(){return IK} +function Vw(){return JK} +function y4(){return ON} +function E4(){return NN} +function gw(a){ew(a,a.d)} +function Gw(a){Ew(this,a)} +function sw(a){a.c=0;a.d=0} +function vw(a){return a.d-a.c} +function z0(){return this.b} +function A4(){return this.c.b.e} +function tw(a){return a.b[a.c]} +function rw(a,b){a.b[a.d++]=b} +function Dw(a,b){a.b=b;return a} +function D4(a,b){a.b=b;return a} +function F4(){return Y3(this.b.b)} +function uw(a){return a.b[a.c++]} +function x4(a){return C2(this.b,a)} +function f6(a){if(a.c==0){throw Q6(new O6)}} +function v4(a,b,c){a.b=b;a.c=c;return a} +function Uw(a,b,c){a.c=b;a.b=c;return a} +function zw(a,b){Rx(a);a.g=bmb+b;return a} +function qw(a,b){a.b=yI(bO,0,-1,b,1);return a} +function iw(a,b,c,d){!!$stats&&$stats(Kw(a,b,c,d))} +function Qw(b,c){function d(a){c.Hb(a)} +return __gwtStartLoadingFragment(b,d)} +function d6(a){var b;f6(a);--a.c;b=a.b.b;z6(b);return b.d} +function G4(){var a;a=OI(Z3(this.b.b),61).gc();return a} +function p2(a){var b;b=Z2(new S2,a);return v4(new t4,a,b)} +function z4(){var a;a=h3(new f3,this.c.b);return D4(new B4,a)} +function bw(){bw=Y6;aw=dw(new _v,3,zI(bO,0,-1,[]))} +function ew(a,b){var c;c=b==a.d?_lb:amb+b;iw(c,Ulb,C0(b),null);if(fw(a,b)){uw(a.e);M2(a.b,C0(b));kw(a)}} +function Rw(a,b){var c,d;c=Qw(a,b);if(c==null){return}d=g_();d.open(eeb,c,true);e_(d,Uw(new Sw,d,b));d.send(null)} +function fw(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e1){return}if(vw(a.e)>0){c=tw(a.e);iw(c==a.d?_lb:amb+c,Tlb,C0(c),null);Rw(c,Dw(new Bw,a));return}while(vw(a.f)>0){c=uw(a.f);b=OI(d6(a.g),41);iw(c==a.d?_lb:amb+c,Tlb,C0(c),null);Rw(c,b)}} +function Ew(b,c){var a,e,f,g,h,i;h=R4(new O4);while(vw(b.b.f)>0){S4(h,OI(d6(b.b.g),41));uw(b.b.f)}sw(b.b.f);U4(h,p2(b.b.b));y2(b.b.b);i=null;for(g=X3(new U3,h);g.bb){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Ov(a.d,e.encode());return}Ov(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Ov(a.d,e.encode());return}Ov(a.d,a.b)}} -var Asb='AsyncLoader2',ysb='beta.canvas',zsb='runCallbacks2';_=OT.prototype=new PT;_.gC=$T;_.cc=cU;_.tI=0;var aQ=T4(hqb,Asb);_T(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/826A0FAD0C07BC304C641864F5274BFC/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/826A0FAD0C07BC304C641864F5274BFC/3.cache.js deleted file mode 100644 index 665e10df..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/826A0FAD0C07BC304C641864F5274BFC/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function uo(){} -function Qv(){} -function Vv(){} -function ST(){} -function PT(){} -function dU(){} -function hU(){} -function Vy(){Qy(Jy)} -function yo(){return NN} -function Uv(){return BO} -function Zv(){return CO} -function RT(){return _P} -function fU(){return ZP} -function jU(){return $P} -function Qy(a){Ny(a,a.e)} -function Sv(a,b){a.b=b;return a} -function Xv(a,b){a.b=b;return a} -function YT(){YT=pcb;VT=new PT} -function gU(a){YT();XT=false;bU(a)} -function YI(a,b){if(!a){return}Yv(a,b)} -function _I(c,b){c.onprogress=function(a){aJ(b,a)}} -function wo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function rw(a,b,c){var d;d=D2(a.g,b);Ts(a,c,a.I,d,true);Us(a,b)} -function Av(a,b){c8(a.g.b,b)!=null;Ev(a);Dv(a);it(a.b.e)} -function Nv(a){if(a.i.d){uC((aC(),a.e.I),Bsb);aU(wo(new uo,a.b,a))}else{Ov(a,a.b)}} -function Dv(a){var b;if(a.f.c>0){b=HM(wbb(a.f),37);Nv(b)}else{a.e=false}} -function aJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(UM(Math.floor(c*100))+Isb)} -function Ny(a,b){var c;c=b==a.e?tjb:ujb+b;Sy(c,wsb,S5(b),null);if(Py(a,b)){cz(a.f);c8(a.b,S5(b));Uy(a)}} -function Ov(a,b){var c;uC((aC(),a.e.I),Csb);c=yI().create(Dsb);c.open(_jb,($o(),Vo)+a.g.e+Esb+a.f+mgb+Zo);_I(c.upload,Sv(new Qv,a));XI(c,Xv(new Vv,a));c.send(b)} -function bU(a){YT();while(TT){$o();Zq(gr(new xp,Jsb+Hh(a)));TT=TT.c}UT=null} -function aU(a){YT();var b;b=new hU;b.b=a;!!UT&&(UT.c=b);UT=b;!TT&&(TT=b);if(WT){VT.cc();return}if(!XT){XT=true;Oy((Ky(),Jy),2,new dU)}} -function bl(a,b,c){var d,e;c8(a.b.b,b)!=null;e=c.ac();if(e){d=Et(new tt,a,e,a.c);$7(a.g,S5(d.d),d);iab(a.h,d);a.m.b==a&&rw(a.m,b,d)}else{a.m.b==a&&Us(a.m,b)}} -function Yv(b,c){var a,e,f;if(c.status!=200){uC((aC(),b.b.e.I),Fsb);ok(b.b._(),Gsb,true)}(Iv(),Hv).remove(b.b.f);if(c.status==200){try{f=VL(c.responseText);Av(b.b.j,b.b);bl(b.b.g,b.b,f);return}catch(a){a=PS(a);if(KM(a,23)){e=a;$o();Zq(gr(new xp,Hsb+Hh(e)+Ceb+c.responseText))}else throw a}}c8(b.b.g.b.b,b.b)!=null;Av(b.b.j,b.b)} -function XI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){YI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -var Isb='%',Esb='?filename=',Osb='AsyncLoader2$1',Psb='AsyncLoader2__Callback',Nsb='AsyncLoader2__Super',Ksb='AsyncResizer',Jsb='Error Resizing image\n',Hsb='Exception on Upload\n',Bsb='Resizing..',Fsb='Upload Error',Lsb='UploadFile$1',Msb='UploadFile$2',Csb='Uploading..',Dsb='beta.httprequest',wsb='end',Gsb='upload-error';_=uo.prototype=new Rf;_.gC=yo;_.tI=0;_.b=null;_.c=null;_.d=null;_=Qv.prototype=new Rf;_.gC=Uv;_.tI=0;_.b=null;_=Vv.prototype=new Rf;_.gC=Zv;_.tI=0;_.b=null;_=PT.prototype=new Rf;_.gC=RT;_.cc=ST;_.tI=0;var TT=null,UT=null,VT,WT=false,XT=false;_=dU.prototype=new Rf;_.gC=fU;_.Nb=gU;_.tI=89;_=hU.prototype=new Rf;_.gC=jU;_.tI=0;_.b=null;_.c=null;var NN=T4(gnb,Ksb),BO=T4(gnb,Lsb),CO=T4(gnb,Msb),_P=T4(hqb,Nsb),ZP=T4(hqb,Osb),$P=T4(hqb,Psb);Vy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/1.cache.js new file mode 100644 index 00000000..bdd519d1 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/1.cache.js @@ -0,0 +1,9 @@ +function YO(){} +function VO(){} +function cP(){} +function UO(){} +function aP(){return HL} +function XO(){return GL} +function $O(){$O=K6;ZO=new VO} +function bP(){ZO=($O(),new UO);cw((_v(),$v),1);!!$stats&&$stats(Iw(Alb,Blb,null,null));ZO.Tb();!!$stats&&$stats(Iw(Alb,Clb,null,null))} +var Flb='AsyncLoader1',Elb='AsyncLoader1__Super',Alb='runCallbacks1';_=VO.prototype=new of;_.gC=XO;_.Tb=YO;_.tI=0;_=UO.prototype=new VO;_.gC=aP;_.Tb=cP;_.tI=0;var ZO;var GL=o_(Dlb,Elb),HL=o_(Dlb,Flb);bP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/2.cache.js new file mode 100644 index 00000000..67ca9532 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/2.cache.js @@ -0,0 +1,9 @@ +function hP(){} +function eP(){} +function nP(){} +function dP(){} +function lP(){return JL} +function gP(){return IL} +function jP(){jP=K6;iP=new eP} +function mP(){iP=(jP(),new dP);cw((_v(),$v),2);!!$stats&&$stats(Iw(Glb,Blb,null,null));iP.Tb();!!$stats&&$stats(Iw(Glb,Clb,null,null))} +var Ilb='AsyncLoader2',Hlb='AsyncLoader2__Super',Glb='runCallbacks2';_=eP.prototype=new of;_.gC=gP;_.Tb=hP;_.tI=0;_=dP.prototype=new eP;_.gC=lP;_.Tb=nP;_.tI=0;var iP;var IL=o_(Dlb,Hlb),JL=o_(Dlb,Ilb);mP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/3.cache.js new file mode 100644 index 00000000..afdad0e2 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/82CC6089F1DDA8F19D1F5BD74ED71B1B/3.cache.js @@ -0,0 +1,54 @@ +function Zv(){} +function lw(){} +function vw(){} +function zw(){} +function Qw(){} +function f4(){} +function n4(){} +function jw(){ew($v)} +function kw(){return IK} +function uw(){return EK} +function yw(){return FK} +function Dw(){return GK} +function Tw(){return HK} +function k4(){return LN} +function q4(){return KN} +function ew(a){cw(a,a.d)} +function Ew(a){Cw(this,a)} +function qw(a){a.c=0;a.d=0} +function tw(a){return a.d-a.c} +function k0(){return this.b} +function m4(){return this.c.b.e} +function rw(a){return a.b[a.c]} +function pw(a,b){a.b[a.d++]=b} +function Bw(a,b){a.b=b;return a} +function p4(a,b){a.b=b;return a} +function r4(){return K3(this.b.b)} +function sw(a){return a.b[a.c++]} +function j4(a){return o2(this.b,a)} +function T5(a){if(a.c==0){throw C6(new A6)}} +function h4(a,b,c){a.b=b;a.c=c;return a} +function Sw(a,b,c){a.c=b;a.b=c;return a} +function xw(a,b){Ox(a);a.g=Llb+b;return a} +function ow(a,b){a.b=wI($N,0,-1,b,1);return a} +function gw(a,b,c,d){!!$stats&&$stats(Iw(a,b,c,d))} +function Ow(b,c){function d(a){c.Hb(a)} +return __gwtStartLoadingFragment(b,d)} +function R5(a){var b;T5(a);--a.c;b=a.b.b;l6(b);return b.d} +function s4(){var a;a=MI(L3(this.b.b),61).hc();return a} +function b2(a){var b;b=L2(new E2,a);return h4(new f4,a,b)} +function l4(){var a;a=V2(new T2,this.c.b);return p4(new n4,a)} +function _v(){_v=K6;$v=bw(new Zv,3,xI($N,0,-1,[]))} +function cw(a,b){var c;c=b==a.d?Jlb:Klb+b;gw(c,Clb,n0(b),null);if(dw(a,b)){sw(a.e);y2(a.b,n0(b));iw(a)}} +function Pw(a,b){var c,d;c=Ow(a,b);if(c==null){return}d=T$();d.open(Sdb,c,true);R$(d,Sw(new Qw,d,b));d.send(null)} +function dw(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e1){return}if(tw(a.e)>0){c=rw(a.e);gw(c==a.d?Jlb:Klb+c,Blb,n0(c),null);Pw(c,Bw(new zw,a));return}while(tw(a.f)>0){c=sw(a.f);b=MI(R5(a.g),41);gw(c==a.d?Jlb:Klb+c,Blb,n0(c),null);Pw(c,b)}} +function Cw(b,c){var a,e,f,g,h,i;h=D4(new A4);while(tw(b.b.f)>0){E4(h,MI(R5(b.b.g),41));sw(b.b.f)}qw(b.b.f);G4(h,b2(b.b.b));k2(b.b.b);i=null;for(g=J3(new G3,h);g.b0){o6(h,iJ(B7(b.a.f),41));yw(b.a.e)}ww(b.a.e);q6(h,N3(b.a.a));W3(b.a.a);i=null;for(g=t5(new q5,h);g.a1){return}if(zw(a.d)>0){c=xw(a.d);mw(c==a.c?kob:lob+c,cob,$1(c),null);Vw(c,Hw(new Fw,a));return}while(zw(a.e)>0){c=yw(a.e);b=iJ(B7(a.f),41);mw(c==a.c?kob:lob+c,cob,$1(c),null);Vw(c,b)}} +var uob='AbstractMap$2',vob='AbstractMap$2$1',pob='AsyncFragmentLoader',qob='AsyncFragmentLoader$BoundedIntQueue',rob='AsyncFragmentLoader$HttpDownloadFailure',sob='AsyncFragmentLoader$InitialFragmentDownloadFailed',tob='AsyncFragmentLoader$XhrLoadingStrategy$1',mob='HTTP download failed with status ',oob='[I',cob='begin',eob='com.google.gwt.lang.asyncloaders.',lob='download',dob='end',kob='leftoversDownload',nob='runAsync';_=dw.prototype=new tf;_.gC=qw;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var ew;_=rw.prototype=new tf;_.gC=Aw;_.tI=0;_.a=null;_.b=0;_.c=0;_=Bw.prototype=new Zu;_.gC=Ew;_.tI=70;_=Fw.prototype=new tf;_.gC=Jw;_.Gb=Kw;_.tI=71;_.a=null;_=Ww.prototype=new tf;_.gC=Zw;_.Hb=$w;_.tI=0;_.a=null;_.b=null;_=P1.prototype;_.ac=X1;_=R5.prototype=new y3;_.cc=V5;_.gC=W5;_.nb=X5;_.dc=Y5;_.tI=0;_.a=null;_.b=null;_=Z5.prototype=new tf;_.gC=a6;_.Tb=b6;_.Ub=c6;_.tI=0;_.a=null;var BO=$0(xab,oob),dL=_0(Jkb,pob),_K=_0(Jkb,qob),aL=_0(Jkb,rob),bL=_0(Jkb,sob),cL=_0(Jkb,tob),mO=_0(Vib,uob),lO=_0(Vib,vob);pw(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/1.cache.js deleted file mode 100644 index 61de748f..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function jT(){} -function vT(){return SP} -function zT(){var a;while(oT){a=oT;oT=oT.c;!oT&&(pT=null);dw(a.b.b)}} -function Ev(a,b){sbb(a.f,b);if(!a.e){a.e=true;Fv(a)}a.c=false;Gv(a)} -function dw(a){var b;a.b.b=a.b.c.blob;(Kv(),Jv).captureBlob(a.b.b,a.b.f,vsb);b=q_(new n_,a.b.f);a.b.d.ub(b);Ev(a.b.j,a.b)} -function wT(){rT=true;qT=(tT(),new jT);Py((My(),Ly),1);!!$stats&&$stats(tz(wsb,yjb,null,null));qT.ac();!!$stats&&$stats(tz(wsb,xsb,null,null))} -var ysb='AsyncLoader1',vsb='image/JPEG',wsb='runCallbacks1';_=jT.prototype=new kT;_.gC=vT;_.ac=zT;_.tI=0;var SP=R4(jqb,ysb);wT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/2.cache.js deleted file mode 100644 index f2b14993..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function HT(){} -function TT(){return WP} -function XT(){var a;while(MT){a=MT;MT=MT.c;!MT&&(NT=null);yo(a.b)}} -function UT(){PT=true;OT=(RT(),new HT);Py((My(),Ly),2);!!$stats&&$stats(tz(Asb,yjb,null,null));OT.ac();!!$stats&&$stats(tz(Asb,xsb,null,null))} -function yo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(zsb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Qv(a.d,e.encode());return}Qv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Qv(a.d,e.encode());return}Qv(a.d,a.b)}} -var Bsb='AsyncLoader2',zsb='beta.canvas',Asb='runCallbacks2';_=HT.prototype=new IT;_.gC=TT;_.ac=XT;_.tI=0;var WP=R4(jqb,Bsb);UT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/3.cache.js deleted file mode 100644 index ccb77e46..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/AE48EA5D8ECD3E90C23EBF393DC6958A/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function vo(){} -function Sv(){} -function Xv(){} -function LT(){} -function IT(){} -function YT(){} -function aU(){} -function Xy(){Sy(Ly)} -function zo(){return JN} -function Wv(){return xO} -function _v(){return yO} -function KT(){return VP} -function $T(){return TP} -function cU(){return UP} -function Sy(a){Py(a,a.e)} -function Uv(a,b){a.b=b;return a} -function Zv(a,b){a.b=b;return a} -function RT(){RT=ncb;OT=new IT} -function _T(a){RT();QT=false;WT(a)} -function TI(a,b){if(!a){return}$v(a,b)} -function Cv(a,b){a8(a.g.b,b)!=null;Gv(a);Fv(a);kt(a.b.e)} -function Pv(a){if(a.i.d){HC((LB(),a.e.K),Csb);VT(xo(new vo,a.b,a))}else{Qv(a,a.b)}} -function tw(a,b,c){var d;d=v2(a.g,b);Vs(a,c,a.K,d,true);Ws(a,b)} -function WI(c,b){c.onprogress=function(a){XI(b,a)}} -function xo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function WT(a){RT();while(MT){_o();_q(ir(new yp,Ksb+Fh(a)));MT=MT.c}NT=null} -function Fv(a){var b;if(a.f.c>0){b=CM(ubb(a.f),37);Pv(b)}else{a.e=false}} -function Py(a,b){var c;c=b==a.e?wjb:xjb+b;Uy(c,xsb,Q5(b),null);if(Ry(a,b)){ez(a.f);a8(a.b,Q5(b));Wy(a)}} -function XI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.db(PM(Math.floor(c*100))+Jsb)} -function SI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){TI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function $v(b,c){var a,e,f;if(c.status!=200){HC((LB(),b.b.e.K),Gsb);pk(b.b.bb(),Hsb,true)}(Kv(),Jv).remove(b.b.f);if(c.status==200){try{f=QL(c.responseText);Cv(b.b.j,b.b);cl(b.b.g,b.b,f);return}catch(a){a=IS(a);if(FM(a,23)){e=a;_o();_q(ir(new yp,Isb+Fh(e)+Feb+c.responseText))}else throw a}}a8(b.b.g.b.b,b.b)!=null;Cv(b.b.j,b.b)} -function VT(a){RT();var b;b=new aU;b.b=a;!!NT&&(NT.c=b);NT=b;!MT&&(MT=b);if(PT){OT.ac();return}if(!QT){QT=true;Qy((My(),Ly),2,new YT)}} -function cl(a,b,c){var d,e;a8(a.b.b,b)!=null;e=c.$b();if(e){d=Gt(new vt,a,e,a.c);Y7(a.g,Q5(d.d),d);gab(a.h,d);a.m.b==a&&tw(a.m,b,d)}else{a.m.b==a&&Ws(a.m,b)}} -function Qv(a,b){var c;HC((LB(),a.e.K),Dsb);c=tI().create(Esb);c.open($jb,(_o(),Wo)+a.g.e+Fsb+a.f+pgb+$o);WI(c.upload,Uv(new Sv,a));SI(c,Zv(new Xv,a));c.send(b)} -var Jsb='%',Fsb='?filename=',Psb='AsyncLoader2$1',Qsb='AsyncLoader2__Callback',Osb='AsyncLoader2__Super',Lsb='AsyncResizer',Ksb='Error Resizing image\n',Isb='Exception on Upload\n',Csb='Resizing..',Gsb='Upload Error',Msb='UploadFile$1',Nsb='UploadFile$2',Dsb='Uploading..',Esb='beta.httprequest',xsb='end',Hsb='upload-error';_=vo.prototype=new Pf;_.gC=zo;_.tI=0;_.b=null;_.c=null;_.d=null;_=Sv.prototype=new Pf;_.gC=Wv;_.tI=0;_.b=null;_=Xv.prototype=new Pf;_.gC=_v;_.tI=0;_.b=null;_=IT.prototype=new Pf;_.gC=KT;_.ac=LT;_.tI=0;var MT=null,NT=null,OT,PT=false,QT=false;_=YT.prototype=new Pf;_.gC=$T;_.Pb=_T;_.tI=89;_=aU.prototype=new Pf;_.gC=cU;_.tI=0;_.b=null;_.c=null;var JN=R4(knb,Lsb),xO=R4(knb,Msb),yO=R4(knb,Nsb),VP=R4(jqb,Osb),TP=R4(jqb,Psb),UP=R4(jqb,Qsb);Xy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/1.cache.js deleted file mode 100644 index 8e2f4644..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function Ug(){} -function Sg(){} -function Zg(){} -function Rg(){} -function Wg(){Wg=kp;Vg=new Sg} -function Yg(){Vg=(Wg(),new Rg);ac((Zb(),Yb),1);!!$stats&&$stats(Cc(vr,wr,null,null));Vg.m();!!$stats&&$stats(Cc(vr,xr,null,null))} -var vr='runCallbacks1';_=Sg.prototype=new O;_.m=Ug;_.tI=0;_=Rg.prototype=new Sg;_.m=Zg;_.tI=0;var Vg;Yg(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/2.cache.js deleted file mode 100644 index 67eb0f99..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/2.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function bh(){} -function _g(){} -function gh(){} -function $g(){} -function dh(){dh=kp;ch=new _g} -function fh(){ch=(dh(),new $g);ac((Zb(),Yb),2);!!$stats&&$stats(Cc(yr,wr,null,null));ch.m();!!$stats&&$stats(Cc(yr,xr,null,null))} -var yr='runCallbacks2';_=_g.prototype=new O;_.m=bh;_.tI=0;_=$g.prototype=new _g;_.m=gh;_.tI=0;var ch;fh(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/3.cache.js deleted file mode 100644 index 75ef7c04..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/B71911CF996F6E89D496C872F18EA45B/3.cache.js +++ /dev/null @@ -1,75 +0,0 @@ -function Xb(){} -function ic(){} -function rc(){} -function uc(){} -function Kc(){} -function Ek(){} -function Dk(){} -function qn(){} -function xn(){} -function Cn(){} -function so(){} -function Do(){} -function Mo(){} -function hc(){cc(Yb)} -function cc(a){ac(a,a.d)} -function yc(a){xc(this,a)} -function nc(a){a.c=0;a.d=0} -function qc(a){return a.d-a.c} -function Jk(){return this.b} -function Kk(){return this.b} -function Co(){return this.c} -function Lo(){return Jo(this)} -function oc(a){return a.b[a.c]} -function mc(a,b){a.b[a.d++]=b} -function tc(a,b){Ed();return a} -function wc(a,b){a.b=b;return a} -function Hk(a,b){a.b=b;return a} -function zn(a,b){a.b=b;return a} -function Gn(){return xo(this,0)} -function wn(){return this.c.b.e} -function pc(a){return a.b[a.c++]} -function An(){return Ym(this.b.b)} -function un(a){return Ml(this.b,a)} -function Ko(){return this.c!=this.e.b} -function Oo(a){a.b=a.c=a;return a} -function Mc(a,b,c){a.c=b;a.b=c;return a} -function sn(a,b,c){a.b=b;a.c=c;return a} -function Bo(a){return Po(new Mo,a,this.b),++this.c,true} -function Ao(a){if(a.c==0){throw dp(new bp)}} -function uo(a){a.b=Oo(new Mo);a.c=0;return a} -function wo(a,b,c){Po(new Mo,b,c);++a.c} -function Go(a,b,c,d){a.e=d;a.c=c;a.b=b;return a} -function Po(a,b,c){a.d=b;a.b=c;a.c=c.c;c.c.b=a;c.c=a;return a} -function lc(a,b){a.b=Uf(vg,0,-1,b,1);return a} -function Ok(){Ok=kp;Nk=Uf(xg,0,12,256,0)} -function Zb(){Zb=kp;Yb=_b(new Xb,3,Vf(vg,0,-1,[]))} -function Cl(a){var b;b=fm(new _l,a);return sn(new qn,a,b)} -function Bn(){var a;a=ig(Zm(this.b.b),20).D();return a} -function vn(){var a;a=om(new mm,this.c.b);return zn(new xn,a)} -function En(a,b){var c;c=xo(this,a);wo(c.e,b,c.c);++c.b;c.d=null} -function yo(a){var b;Ao(a);--a.c;b=a.b.b;b.b.c=b.c;b.c.b=b.b;b.b=b.c=b;return b.d} -function Ik(a){return a!=null&&gg(a.tI,12)&&ig(a,12).b==this.b} -function ec(a,b,c,d){!!$stats&&$stats(Cc(a,b,c,d))} -function Ic(b,c){function d(a){c.i(a)} -return __gwtStartLoadingFragment(b,d)} -function Ml(a,b){if(a.d&&eo(a.c,b)){return true}else if(Ll(a,b)){return true}else if(Jl(a,b)){return true}return false} -function Jo(a){if(a.c==a.e.b){throw dp(new bp)}a.d=a.c;a.c=a.c.b;++a.b;return a.d.d} -function _b(a,b,c){Zb();a.b=co(new ao);a.g=uo(new so);a.d=b;a.c=c;a.f=lc(new ic,b+1);return a} -function hk(c,a){var b=c;c.onreadystatechange=$entry(function(){a.j(b)})} -function Ll(e,a){var b=e.f;for(var c in b){if(c.charCodeAt(0)==58){var d=b[c];if(e.B(a,d)){return true}}}return false} -function Jl(i,a){var b=i.b;for(var c in b){if(c==parseInt(c)){var d=b[c];for(var e=0,f=d.length;e-129&&a<128){b=a+128;c=(Ok(),Nk)[b];!c&&(c=Nk[b]=Hk(new Dk,a));return c}return Hk(new Dk,a)} -function xo(a,b){var c,d;(b<0||b>a.c)&&Sm(b,a.c);if(b>=a.c>>1){d=a.b;for(c=a.c;c>b;--c){d=d.c}}else{d=a.b.b;for(c=0;c0){Ln(h,ig(yo(b.b.g),2));pc(b.b.f)}nc(b.b.f);Nn(h,Cl(b.b.b));Il(b.b.b);i=null;for(g=Xm(new Um,h);g.b1){return}if(qc(a.e)>0){c=oc(a.e);ec(c==a.d?zr:Ar+c,wr,Lk(c),null);Jc(c,wc(new uc,a));return}while(qc(a.f)>0){c=pc(a.f);b=ig(yo(a.g),2);ec(c==a.d?zr:Ar+c,wr,Lk(c),null);Jc(c,b)}} -var Fr="Can't get element ",Cr='GET',Dr='MSXML2.XMLHTTP.3.0',Er='Microsoft.XMLHTTP',wr='begin',Ar='download',xr='end',zr='leftoversDownload',Br='runAsync';_=Xb.prototype=new O;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var Yb;_=ic.prototype=new O;_.tI=0;_.b=null;_.c=0;_.d=0;_=rc.prototype=new mb;_.tI=7;_=uc.prototype=new O;_.i=yc;_.tI=8;_.b=null;_=Kc.prototype=new O;_.j=Nc;_.tI=0;_.b=null;_.c=null;_=Ek.prototype=new O;_.tI=27;_=Dk.prototype=new Ek;_.eQ=Ik;_.hC=Jk;_.w=Kk;_.tI=30;_.b=0;var Nk;_=qn.prototype=new rl;_.y=un;_.s=vn;_.z=wn;_.tI=0;_.b=null;_.c=null;_=xn.prototype=new O;_.u=An;_.v=Bn;_.tI=0;_.b=null;_=Cn.prototype=new Km;_.F=En;_.G=Fn;_.s=Gn;_.tI=41;_=so.prototype=new Cn;_.x=Bo;_.z=Co;_.tI=45;_.b=null;_.c=0;_=Do.prototype=new O;_.u=Ko;_.v=Lo;_.tI=0;_.b=0;_.c=null;_.d=null;_.e=null;_=Mo.prototype=new O;_.tI=0;_.b=null;_.c=null;_.d=null;var vg=new ok,xg=new ok;hc(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/1.cache.js deleted file mode 100644 index e7aadde5..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function $S(){} -function kT(){return EP} -function oT(){var a;while(dT){a=dT;dT=dT.b;!dT&&(eT=null);Wv(a.a.a)}} -function vv(a,b){mbb(a.e,b);if(!a.d){a.d=true;wv(a)}a.b=false;xv(a)} -function Wv(a){var b;a.a.a=a.a.b.blob;(Bv(),Av).captureBlob(a.a.a,a.a.e,rsb);b=G_(new D_,a.a.e);a.a.c.rb(b);vv(a.a.i,a.a)} -function lT(){gT=true;fT=(iT(),new $S);Jy((Gy(),Fy),1);!!$stats&&$stats(nz(ssb,mjb,null,null));fT.Zb();!!$stats&&$stats(nz(ssb,tsb,null,null))} -var usb='AsyncLoader1',rsb='image/JPEG',ssb='runCallbacks1';_=$S.prototype=new _S;_.gC=kT;_.Zb=oT;_.tI=0;var EP=M4(bqb,usb);lT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/2.cache.js deleted file mode 100644 index d7319b98..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function wT(){} -function IT(){return IP} -function MT(){var a;while(BT){a=BT;BT=BT.b;!BT&&(CT=null);qo(a.a)}} -function JT(){ET=true;DT=(GT(),new wT);Jy((Gy(),Fy),2);!!$stats&&$stats(nz(wsb,mjb,null,null));DT.Zb();!!$stats&&$stats(nz(wsb,tsb,null,null))} -function qo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(vsb);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));Hv(a.c,e.encode());return}Hv(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);Hv(a.c,e.encode());return}Hv(a.c,a.a)}} -var xsb='AsyncLoader2',vsb='beta.canvas',wsb='runCallbacks2';_=wT.prototype=new xT;_.gC=IT;_.Zb=MT;_.tI=0;var IP=M4(bqb,xsb);JT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/3.cache.js deleted file mode 100644 index cdd183e1..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/C0A3E821CD3689650D1DF0CEF5C506A9/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function no(){} -function Jv(){} -function Ov(){} -function AT(){} -function xT(){} -function NT(){} -function RT(){} -function Ry(){My(Fy)} -function ro(){return yN} -function Nv(){return mO} -function Sv(){return nO} -function zT(){return HP} -function PT(){return FP} -function TT(){return GP} -function My(a){Jy(a,a.d)} -function Lv(a,b){a.a=b;return a} -function Qv(a,b){a.a=b;return a} -function GT(){GT=hcb;DT=new xT} -function QT(a){GT();FT=false;LT(a)} -function KI(a,b){if(!a){return}Rv(a,b)} -function NI(c,b){c.onprogress=function(a){OI(b,a)}} -function kw(a,b,c){var d;d=L2(a.f,b);Ms(a,c,a.H,d,true);Ns(a,b)} -function po(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} -function wv(a){var b;if(a.e.b>0){b=tM(obb(a.e),37);Gv(b)}else{a.d=false}} -function tv(a,b){W7(a.f.a,b)!=null;xv(a);wv(a);bt(a.a.d)} -function OI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(GM(Math.floor(c*100))+Fsb)} -function Jy(a,b){var c;c=b==a.d?kjb:ljb+b;Oy(c,tsb,L5(b),null);if(Ly(a,b)){$y(a.e);W7(a.a,L5(b));Qy(a)}} -function Gv(a){if(a.h.c){(zB(),a.d.H).innerText=ysb;KT(po(new no,a.a,a))}else{Hv(a,a.a)}} -function LT(a){GT();while(BT){To();Sq(_q(new qp,Gsb+Dh(a)));BT=BT.b}CT=null} -function KT(a){GT();var b;b=new RT;b.a=a;!!CT&&(CT.b=b);CT=b;!BT&&(BT=b);if(ET){DT.Zb();return}if(!FT){FT=true;Ky((Gy(),Fy),2,new NT)}} -function Wk(a,b,c){var d,e;W7(a.a.a,b)!=null;e=c.Xb();if(e){d=xt(new mt,a,e,a.b);S7(a.f,L5(d.c),d);aab(a.g,d);a.l.a==a&&kw(a.l,b,d)}else{a.l.a==a&&Ns(a.l,b)}} -function Rv(b,c){var a,e,f;if(c.status!=200){(zB(),b.a.d.H).innerText=Csb;hk(b.a.$(),Dsb,true)}(Bv(),Av).remove(b.a.e);if(c.status==200){try{f=HL(c.responseText);tv(b.a.i,b.a);Wk(b.a.f,b.a,f);return}catch(a){a=xS(a);if(wM(a,23)){e=a;To();Sq(_q(new qp,Esb+Dh(e)+teb+c.responseText))}else throw a}}W7(b.a.f.a.a,b.a)!=null;tv(b.a.i,b.a)} -function JI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){KI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Hv(a,b){var c;(zB(),a.d.H).innerText=zsb;c=kI().create(Asb);c.open(Jjb,(To(),Oo)+a.f.d+Bsb+a.e+fgb+So);NI(c.upload,Lv(new Jv,a));JI(c,Qv(new Ov,a));c.send(b)} -var Fsb='%',Bsb='?filename=',Lsb='AsyncLoader2$1',Msb='AsyncLoader2__Callback',Ksb='AsyncLoader2__Super',Hsb='AsyncResizer',Gsb='Error Resizing image\n',Esb='Exception on Upload\n',ysb='Resizing..',Csb='Upload Error',Isb='UploadFile$1',Jsb='UploadFile$2',zsb='Uploading..',Asb='beta.httprequest',tsb='end',Dsb='upload-error';_=no.prototype=new Nf;_.gC=ro;_.tI=0;_.a=null;_.b=null;_.c=null;_=Jv.prototype=new Nf;_.gC=Nv;_.tI=0;_.a=null;_=Ov.prototype=new Nf;_.gC=Sv;_.tI=0;_.a=null;_=xT.prototype=new Nf;_.gC=zT;_.Zb=AT;_.tI=0;var BT=null,CT=null,DT,ET=false,FT=false;_=NT.prototype=new Nf;_.gC=PT;_.Mb=QT;_.tI=89;_=RT.prototype=new Nf;_.gC=TT;_.tI=0;_.a=null;_.b=null;var yN=M4(fnb,Hsb),mO=M4(fnb,Isb),nO=M4(fnb,Jsb),HP=M4(bqb,Ksb),FP=M4(bqb,Lsb),GP=M4(bqb,Msb);Ry(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/1.cache.js new file mode 100644 index 00000000..300922b0 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/1.cache.js @@ -0,0 +1,7 @@ +function sT(){} +function ET(){return $P} +function IT(){var a;while(xT){a=xT;xT=xT.c;!xT&&(yT=null);cw(a.b.b)}} +function Cv(a,b){sbb(a.f,b);if(!a.e){a.e=true;Ev(a)}a.c=false;Fv(a)} +function cw(a){var b;a.b.b=a.b.c.blob;(Jv(),Iv).captureBlob(a.b.b,a.b.f,tsb);b=x_(new u_,a.b.f);a.b.d.sb(b);Cv(a.b.j,a.b)} +function FT(){AT=true;zT=(CT(),new sT);Py((My(),Ly),1);!!$stats&&$stats(tz(usb,ujb,null,null));zT.cc();!!$stats&&$stats(tz(usb,vsb,null,null))} +var wsb='AsyncLoader1',tsb='image/JPEG',usb='runCallbacks1';_=sT.prototype=new tT;_.gC=ET;_.cc=IT;_.tI=0;var $P=S4(gqb,wsb);FT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/2.cache.js new file mode 100644 index 00000000..8bfe1dc7 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/2.cache.js @@ -0,0 +1,6 @@ +function QT(){} +function aU(){return cQ} +function eU(){var a;while(VT){a=VT;VT=VT.c;!VT&&(WT=null);xo(a.b)}} +function bU(){YT=true;XT=($T(),new QT);Py((My(),Ly),2);!!$stats&&$stats(tz(ysb,ujb,null,null));XT.cc();!!$stats&&$stats(tz(ysb,vsb,null,null))} +function xo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(xsb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Pv(a.d,e.encode());return}Pv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Pv(a.d,e.encode());return}Pv(a.d,a.b)}} +var zsb='AsyncLoader2',xsb='beta.canvas',ysb='runCallbacks2';_=QT.prototype=new RT;_.gC=aU;_.cc=eU;_.tI=0;var cQ=S4(gqb,zsb);bU(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/3.cache.js new file mode 100644 index 00000000..40130613 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/3.cache.js @@ -0,0 +1,35 @@ +function uo(){} +function Rv(){} +function Wv(){} +function UT(){} +function RT(){} +function fU(){} +function jU(){} +function Xy(){Sy(Ly)} +function yo(){return PN} +function Vv(){return DO} +function $v(){return EO} +function TT(){return bQ} +function hU(){return _P} +function lU(){return aQ} +function Sy(a){Py(a,a.e)} +function Tv(a,b){a.b=b;return a} +function Yv(a,b){a.b=b;return a} +function $T(){$T=ncb;XT=new RT} +function iU(a){$T();ZT=false;dU(a)} +function $I(a,b){if(!a){return}Zv(a,b)} +function Av(a,b){a8(a.g.b,b)!=null;Fv(a);Ev(a);it(a.b.e)} +function Ov(a){if(a.i.d){wC((cC(),a.e.I),Asb);cU(wo(new uo,a.b,a))}else{Pv(a,a.b)}} +function sw(a,b,c){var d;d=C2(a.g,b);Ts(a,c,a.I,d,true);Us(a,b)} +function bJ(c,b){c.onprogress=function(a){cJ(b,a)}} +function wo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} +function dU(a){$T();while(VT){$o();Zq(gr(new xp,Isb+Hh(a)));VT=VT.c}WT=null} +function Ev(a){var b;if(a.f.c>0){b=JM(ubb(a.f),37);Ov(b)}else{a.e=false}} +function Py(a,b){var c;c=b==a.e?sjb:tjb+b;Uy(c,vsb,R5(b),null);if(Ry(a,b)){ez(a.f);a8(a.b,R5(b));Wy(a)}} +function Pv(a,b){var c;wC((cC(),a.e.I),Bsb);c=AI().create(Csb);c.open($jb,($o(),Vo)+a.g.e+Dsb+a.f+kgb+Zo);bJ(c.upload,Tv(new Rv,a));ZI(c,Yv(new Wv,a));c.send(b)} +function cJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(WM(Math.floor(c*100))+Hsb)} +function ZI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){$I(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function Zv(b,c){var a,e,f;if(c.status!=200){wC((cC(),b.b.e.I),Esb);ok(b.b._(),Fsb,true)}(Jv(),Iv).remove(b.b.f);if(c.status==200){try{f=XL(c.responseText);Av(b.b.j,b.b);bl(b.b.g,b.b,f);return}catch(a){a=RS(a);if(MM(a,23)){e=a;$o();Zq(gr(new xp,Gsb+Hh(e)+Aeb+c.responseText))}else throw a}}a8(b.b.g.b.b,b.b)!=null;Av(b.b.j,b.b)} +function cU(a){$T();var b;b=new jU;b.b=a;!!WT&&(WT.c=b);WT=b;!VT&&(VT=b);if(YT){XT.cc();return}if(!ZT){ZT=true;Qy((My(),Ly),2,new fU)}} +function bl(a,b,c){var d,e;a8(a.b.b,b)!=null;e=c.ac();if(e){d=Et(new tt,a,e,a.c);Y7(a.g,R5(d.d),d);gab(a.h,d);a.m.b==a&&sw(a.m,b,d)}else{a.m.b==a&&Us(a.m,b)}} +var Hsb='%',Dsb='?filename=',Nsb='AsyncLoader2$1',Osb='AsyncLoader2__Callback',Msb='AsyncLoader2__Super',Jsb='AsyncResizer',Isb='Error Resizing image\n',Gsb='Exception on Upload\n',Asb='Resizing..',Esb='Upload Error',Ksb='UploadFile$1',Lsb='UploadFile$2',Bsb='Uploading..',Csb='beta.httprequest',vsb='end',Fsb='upload-error';_=uo.prototype=new Rf;_.gC=yo;_.tI=0;_.b=null;_.c=null;_.d=null;_=Rv.prototype=new Rf;_.gC=Vv;_.tI=0;_.b=null;_=Wv.prototype=new Rf;_.gC=$v;_.tI=0;_.b=null;_=RT.prototype=new Rf;_.gC=TT;_.cc=UT;_.tI=0;var VT=null,WT=null,XT,YT=false,ZT=false;_=fU.prototype=new Rf;_.gC=hU;_.Nb=iU;_.tI=89;_=jU.prototype=new Rf;_.gC=lU;_.tI=0;_.b=null;_.c=null;var PN=S4(fnb,Jsb),DO=S4(fnb,Ksb),EO=S4(fnb,Lsb),bQ=S4(gqb,Msb),_P=S4(gqb,Nsb),aQ=S4(gqb,Osb);Xy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/1.cache.js new file mode 100644 index 00000000..6f234dca --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/1.cache.js @@ -0,0 +1,9 @@ +function hP(){} +function eP(){} +function nP(){} +function dP(){} +function lP(){return ML} +function gP(){return LL} +function jP(){jP=F7;iP=new eP} +function mP(){iP=(jP(),new dP);fw((cw(),bw),1);!!$stats&&$stats(Lw(Imb,Jmb,null,null));iP.Sb();!!$stats&&$stats(Lw(Imb,Kmb,null,null))} +var Nmb='AsyncLoader1',Mmb='AsyncLoader1__Super',Imb='runCallbacks1';_=eP.prototype=new rf;_.gC=gP;_.Sb=hP;_.tI=0;_=dP.prototype=new eP;_.gC=lP;_.Sb=nP;_.tI=0;var iP;var LL=k0(Lmb,Mmb),ML=k0(Lmb,Nmb);mP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/2.cache.js new file mode 100644 index 00000000..2701c3ed --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/2.cache.js @@ -0,0 +1,9 @@ +function sP(){} +function pP(){} +function yP(){} +function oP(){} +function wP(){return OL} +function rP(){return NL} +function uP(){uP=F7;tP=new pP} +function xP(){tP=(uP(),new oP);fw((cw(),bw),2);!!$stats&&$stats(Lw(Omb,Jmb,null,null));tP.Sb();!!$stats&&$stats(Lw(Omb,Kmb,null,null))} +var Qmb='AsyncLoader2',Pmb='AsyncLoader2__Super',Omb='runCallbacks2';_=pP.prototype=new rf;_.gC=rP;_.Sb=sP;_.tI=0;_=oP.prototype=new pP;_.gC=wP;_.Sb=yP;_.tI=0;var tP;var NL=k0(Lmb,Pmb),OL=k0(Lmb,Qmb);xP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/3.cache.js new file mode 100644 index 00000000..62b76bfa --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/3.cache.js @@ -0,0 +1,54 @@ +function aw(){} +function ow(){} +function yw(){} +function Cw(){} +function Tw(){} +function a5(){} +function i5(){} +function mw(){hw(bw)} +function nw(){return PK} +function xw(){return LK} +function Bw(){return MK} +function Gw(){return NK} +function Ww(){return OK} +function f5(){return WN} +function l5(){return VN} +function hw(a){fw(a,a.c)} +function Hw(a){Fw(this,a)} +function tw(a){a.b=0;a.c=0} +function ww(a){return a.c-a.b} +function g1(){return this.a} +function uw(a){return a.a[a.b]} +function sw(a,b){a.a[a.c++]=b} +function Ew(a,b){a.a=b;return a} +function k5(a,b){a.a=b;return a} +function vw(a){return a.a[a.b++]} +function h5(){return this.b.a.d} +function m5(){return F4(this.a.a)} +function e5(a){return j3(this.a,a)} +function O6(a){if(a.b==0){throw x7(new v7)}} +function c5(a,b,c){a.a=b;a.b=c;return a} +function Vw(a,b,c){a.b=b;a.a=c;return a} +function Aw(a,b){Sx(a);a.f=Tmb+b;return a} +function rw(a,b){a.a=EI(jO,0,-1,b,1);return a} +function M6(a){var b;O6(a);--a.b;b=a.a.a;g7(b);return b.c} +function n5(){var a;a=UI(G4(this.a.a),61).hc();return a} +function g5(){var a;a=Q3(new O3,this.b.a);return k5(new i5,a)} +function Y2(a){var b;b=G3(new z3,a);return c5(new a5,a,b)} +function cw(){cw=F7;bw=ew(new aw,3,FI(jO,0,-1,[]))} +function jw(a,b,c,d){!!$stats&&$stats(Lw(a,b,c,d))} +function ew(a,b,c){cw();a.a=m6(new k6);a.f=I6(new G6);a.c=b;a.b=c;a.e=rw(new ow,b+1);return a} +function Sw(a,b){var c,d;c=Rw(a,b);if(c==null){return}d=P_();d.open(Eeb,c,true);N_(d,Vw(new Tw,d,b));d.send(null)} +function fw(a,b){var c;c=b==a.c?Rmb:Smb+b;jw(c,Kmb,j1(b),null);if(gw(a,b)){vw(a.d);t3(a.a,j1(b));lw(a)}} +function j3(a,b){if(a.c&&o6(a.b,b)){return true}else if(i3(a,b)){return true}else if(g3(a,b)){return true}return false} +function Rw(b,c){function d(a){c.Gb(a)} +return __gwtStartLoadingFragment(b,d)} +function gw(a,b){var c,d,e,f;if(b==a.c){return true}for(d=a.b,e=0,f=d.length;e0){z5(h,UI(M6(b.a.f),41));vw(b.a.e)}tw(b.a.e);B5(h,Y2(b.a.a));f3(b.a.a);i=null;for(g=E4(new B4,h);g.a1){return}if(ww(a.d)>0){c=uw(a.d);jw(c==a.c?Rmb:Smb+c,Jmb,j1(c),null);Sw(c,Ew(new Cw,a));return}while(ww(a.e)>0){c=vw(a.e);b=UI(M6(a.f),41);jw(c==a.c?Rmb:Smb+c,Jmb,j1(c),null);Sw(c,b)}} +function Lw(a,b,c,d){var e={moduleName:$moduleName,sessionId:$sessionId,subSystem:Umb,evtGroup:a,millis:(new Date).getTime(),type:b};c!=null&&(e.fragment=c.ac());d!=null&&(e.size=d.ac());return e} +var _mb='AbstractMap$2',anb='AbstractMap$2$1',Wmb='AsyncFragmentLoader',Xmb='AsyncFragmentLoader$BoundedIntQueue',Ymb='AsyncFragmentLoader$HttpDownloadFailure',Zmb='AsyncFragmentLoader$InitialFragmentDownloadFailed',$mb='AsyncFragmentLoader$XhrLoadingStrategy$1',Tmb='HTTP download failed with status ',Vmb='[I',Jmb='begin',Lmb='com.google.gwt.lang.asyncloaders.',Smb='download',Kmb='end',Rmb='leftoversDownload',Umb='runAsync';_=aw.prototype=new rf;_.gC=nw;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var bw;_=ow.prototype=new rf;_.gC=xw;_.tI=0;_.a=null;_.b=0;_.c=0;_=yw.prototype=new Wu;_.gC=Bw;_.tI=70;_=Cw.prototype=new rf;_.gC=Gw;_.Gb=Hw;_.tI=71;_.a=null;_=Tw.prototype=new rf;_.gC=Ww;_.Hb=Xw;_.tI=0;_.a=null;_.b=null;_=$0.prototype;_.ac=g1;_=a5.prototype=new J2;_.cc=e5;_.gC=f5;_.nb=g5;_.dc=h5;_.tI=0;_.a=null;_.b=null;_=i5.prototype=new rf;_.gC=l5;_.Tb=m5;_.Ub=n5;_.tI=0;_.a=null;var jO=j0(J9,Vmb),PK=k0(qjb,Wmb),LK=k0(qjb,Xmb),MK=k0(qjb,Ymb),NK=k0(qjb,Zmb),OK=k0(qjb,$mb),WN=k0(Chb,_mb),VN=k0(Chb,anb);mw(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/1.cache.js new file mode 100644 index 00000000..dff1e7d4 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/1.cache.js @@ -0,0 +1,7 @@ +function aT(){} +function mT(){return GP} +function qT(){var a;while(fT){a=fT;fT=fT.b;!fT&&(gT=null);Xv(a.a.a)}} +function vv(a,b){obb(a.e,b);if(!a.d){a.d=true;xv(a)}a.b=false;yv(a)} +function Xv(a){var b;a.a.a=a.a.b.blob;(Cv(),Bv).captureBlob(a.a.a,a.a.e,usb);b=I_(new F_,a.a.e);a.a.c.rb(b);vv(a.a.i,a.a)} +function nT(){iT=true;hT=(kT(),new aT);Ly((Iy(),Hy),1);!!$stats&&$stats(pz(vsb,pjb,null,null));hT.Zb();!!$stats&&$stats(pz(vsb,wsb,null,null))} +var xsb='AsyncLoader1',usb='image/JPEG',vsb='runCallbacks1';_=aT.prototype=new bT;_.gC=mT;_.Zb=qT;_.tI=0;var GP=O4(eqb,xsb);nT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/2.cache.js new file mode 100644 index 00000000..d71c8a1f --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/2.cache.js @@ -0,0 +1,6 @@ +function yT(){} +function KT(){return KP} +function OT(){var a;while(DT){a=DT;DT=DT.b;!DT&&(ET=null);qo(a.a)}} +function LT(){GT=true;FT=(IT(),new yT);Ly((Iy(),Hy),2);!!$stats&&$stats(pz(zsb,pjb,null,null));FT.Zb();!!$stats&&$stats(pz(zsb,wsb,null,null))} +function qo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(ysb);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));Iv(a.c,e.encode());return}Iv(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);Iv(a.c,e.encode());return}Iv(a.c,a.a)}} +var Asb='AsyncLoader2',ysb='beta.canvas',zsb='runCallbacks2';_=yT.prototype=new zT;_.gC=KT;_.Zb=OT;_.tI=0;var KP=O4(eqb,Asb);LT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/3.cache.js new file mode 100644 index 00000000..984eb56c --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/3.cache.js @@ -0,0 +1,35 @@ +function no(){} +function Kv(){} +function Pv(){} +function CT(){} +function zT(){} +function PT(){} +function TT(){} +function Ty(){Oy(Hy)} +function ro(){return AN} +function Ov(){return oO} +function Tv(){return pO} +function BT(){return JP} +function RT(){return HP} +function VT(){return IP} +function Oy(a){Ly(a,a.d)} +function Mv(a,b){a.a=b;return a} +function Rv(a,b){a.a=b;return a} +function IT(){IT=jcb;FT=new zT} +function ST(a){IT();HT=false;NT(a)} +function MI(a,b){if(!a){return}Sv(a,b)} +function PI(c,b){c.onprogress=function(a){QI(b,a)}} +function lw(a,b,c){var d;d=N2(a.f,b);Ms(a,c,a.H,d,true);Ns(a,b)} +function po(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} +function xv(a){var b;if(a.e.b>0){b=vM(qbb(a.e),37);Hv(b)}else{a.d=false}} +function Hv(a){if(a.h.c){(BB(),a.d.H).innerText=Bsb;MT(po(new no,a.a,a))}else{Iv(a,a.a)}} +function NT(a){IT();while(DT){To();Sq(_q(new qp,Jsb+Dh(a)));DT=DT.b}ET=null} +function tv(a,b){Y7(a.f.a,b)!=null;yv(a);xv(a);bt(a.a.d)} +function Ly(a,b){var c;c=b==a.d?njb:ojb+b;Qy(c,wsb,N5(b),null);if(Ny(a,b)){az(a.e);Y7(a.a,N5(b));Sy(a)}} +function Iv(a,b){var c;(BB(),a.d.H).innerText=Csb;c=mI().create(Dsb);c.open(Mjb,(To(),Oo)+a.f.d+Esb+a.e+hgb+So);PI(c.upload,Mv(new Kv,a));LI(c,Rv(new Pv,a));c.send(b)} +function QI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(IM(Math.floor(c*100))+Isb)} +function LI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){MI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function Sv(b,c){var a,e,f;if(c.status!=200){(BB(),b.a.d.H).innerText=Fsb;hk(b.a.$(),Gsb,true)}(Cv(),Bv).remove(b.a.e);if(c.status==200){try{f=JL(c.responseText);tv(b.a.i,b.a);Wk(b.a.f,b.a,f);return}catch(a){a=zS(a);if(yM(a,23)){e=a;To();Sq(_q(new qp,Hsb+Dh(e)+veb+c.responseText))}else throw a}}Y7(b.a.f.a.a,b.a)!=null;tv(b.a.i,b.a)} +function MT(a){IT();var b;b=new TT;b.a=a;!!ET&&(ET.b=b);ET=b;!DT&&(DT=b);if(GT){FT.Zb();return}if(!HT){HT=true;My((Iy(),Hy),2,new PT)}} +function Wk(a,b,c){var d,e;Y7(a.a.a,b)!=null;e=c.Xb();if(e){d=xt(new mt,a,e,a.b);U7(a.f,N5(d.c),d);cab(a.g,d);a.l.a==a&&lw(a.l,b,d)}else{a.l.a==a&&Ns(a.l,b)}} +var Isb='%',Esb='?filename=',Osb='AsyncLoader2$1',Psb='AsyncLoader2__Callback',Nsb='AsyncLoader2__Super',Ksb='AsyncResizer',Jsb='Error Resizing image\n',Hsb='Exception on Upload\n',Bsb='Resizing..',Fsb='Upload Error',Lsb='UploadFile$1',Msb='UploadFile$2',Csb='Uploading..',Dsb='beta.httprequest',wsb='end',Gsb='upload-error';_=no.prototype=new Nf;_.gC=ro;_.tI=0;_.a=null;_.b=null;_.c=null;_=Kv.prototype=new Nf;_.gC=Ov;_.tI=0;_.a=null;_=Pv.prototype=new Nf;_.gC=Tv;_.tI=0;_.a=null;_=zT.prototype=new Nf;_.gC=BT;_.Zb=CT;_.tI=0;var DT=null,ET=null,FT,GT=false,HT=false;_=PT.prototype=new Nf;_.gC=RT;_.Mb=ST;_.tI=89;_=TT.prototype=new Nf;_.gC=VT;_.tI=0;_.a=null;_.b=null;var AN=O4(inb,Ksb),oO=O4(inb,Lsb),pO=O4(inb,Msb),JP=O4(eqb,Nsb),HP=O4(eqb,Osb),IP=O4(eqb,Psb);Ty(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/1.cache.js deleted file mode 100644 index fba0896d..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function Yg(){} -function Wg(){} -function bh(){} -function Vg(){} -function $g(){$g=mp;Zg=new Wg} -function ah(){Zg=($g(),new Vg);ac((Zb(),Yb),1);!!$stats&&$stats(Cc(ur,vr,null,null));Zg.m();!!$stats&&$stats(Cc(ur,wr,null,null))} -var ur='runCallbacks1';_=Wg.prototype=new O;_.m=Yg;_.tI=0;_=Vg.prototype=new Wg;_.m=bh;_.tI=0;var Zg;ah(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/2.cache.js deleted file mode 100644 index 45a9b6c3..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/2.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function fh(){} -function dh(){} -function kh(){} -function ch(){} -function hh(){hh=mp;gh=new dh} -function jh(){gh=(hh(),new ch);ac((Zb(),Yb),2);!!$stats&&$stats(Cc(xr,vr,null,null));gh.m();!!$stats&&$stats(Cc(xr,wr,null,null))} -var xr='runCallbacks2';_=dh.prototype=new O;_.m=fh;_.tI=0;_=ch.prototype=new dh;_.m=kh;_.tI=0;var gh;jh(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/3.cache.js deleted file mode 100644 index 9fe4efc2..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/DB10FC871F1917C3CF43B2E1A192D050/3.cache.js +++ /dev/null @@ -1,75 +0,0 @@ -function Xb(){} -function ic(){} -function rc(){} -function uc(){} -function Kc(){} -function Gk(){} -function Fk(){} -function sn(){} -function zn(){} -function En(){} -function uo(){} -function Fo(){} -function Oo(){} -function hc(){cc(Yb)} -function cc(a){ac(a,a.d)} -function yc(a){xc(this,a)} -function nc(a){a.c=0;a.d=0} -function qc(a){return a.d-a.c} -function Lk(){return this.b} -function Mk(){return this.b} -function Eo(){return this.c} -function No(){return Lo(this)} -function oc(a){return a.b[a.c]} -function mc(a,b){a.b[a.d++]=b} -function tc(a,b){Dd();return a} -function wc(a,b){a.b=b;return a} -function Jk(a,b){a.b=b;return a} -function Bn(a,b){a.b=b;return a} -function In(){return zo(this,0)} -function yn(){return this.c.b.e} -function pc(a){return a.b[a.c++]} -function Cn(){return $m(this.b.b)} -function wn(a){return Ol(this.b,a)} -function Mo(){return this.c!=this.e.b} -function Qo(a){a.b=a.c=a;return a} -function Mc(a,b,c){a.c=b;a.b=c;return a} -function un(a,b,c){a.b=b;a.c=c;return a} -function Do(a){return Ro(new Oo,a,this.b),++this.c,true} -function Co(a){if(a.c==0){throw fp(new dp)}} -function wo(a){a.b=Qo(new Oo);a.c=0;return a} -function yo(a,b,c){Ro(new Oo,b,c);++a.c} -function Io(a,b,c,d){a.e=d;a.c=c;a.b=b;return a} -function Ro(a,b,c){a.d=b;a.b=c;a.c=c.c;c.c.b=a;c.c=a;return a} -function lc(a,b){a.b=Yf(zg,0,-1,b,1);return a} -function Qk(){Qk=mp;Pk=Yf(Bg,0,12,256,0)} -function Zb(){Zb=mp;Yb=_b(new Xb,3,Zf(zg,0,-1,[]))} -function El(a){var b;b=hm(new bm,a);return un(new sn,a,b)} -function Dn(){var a;a=mg(_m(this.b.b),20).D();return a} -function xn(){var a;a=qm(new om,this.c.b);return Bn(new zn,a)} -function Gn(a,b){var c;c=zo(this,a);yo(c.e,b,c.c);++c.b;c.d=null} -function Ao(a){var b;Co(a);--a.c;b=a.b.b;b.b.c=b.c;b.c.b=b.b;b.b=b.c=b;return b.d} -function Kk(a){return a!=null&&kg(a.tI,12)&&mg(a,12).b==this.b} -function ec(a,b,c,d){!!$stats&&$stats(Cc(a,b,c,d))} -function Ic(b,c){function d(a){c.i(a)} -return __gwtStartLoadingFragment(b,d)} -function Ol(a,b){if(a.d&&go(a.c,b)){return true}else if(Nl(a,b)){return true}else if(Ll(a,b)){return true}return false} -function Lo(a){if(a.c==a.e.b){throw fp(new dp)}a.d=a.c;a.c=a.c.b;++a.b;return a.d.d} -function _b(a,b,c){Zb();a.b=fo(new co);a.g=wo(new uo);a.d=b;a.c=c;a.f=lc(new ic,b+1);return a} -function ac(a,b){var c;c=b==a.d?yr:zr+b;ec(c,wr,Nk(b),null);if(bc(a,b)){pc(a.e);Yl(a.b,Nk(b));gc(a)}} -function Jc(a,b){var c,d;c=Ic(a,b);if(c==null){return}d=kk();d.open(Br,c,true);jk(d,Mc(new Kc,d,b));d.send(null)} -function dk(b){var a=b;$wnd.setTimeout(function(){a.onreadystatechange=new Function},0)} -function jk(c,a){var b=c;c.onreadystatechange=$entry(function(){a.j(b)})} -function Hn(b){var a,d;d=zo(this,b);try{return Lo(d)}catch(a){a=Lg(a);if(pg(a,23)){throw Ek(new Bk,Er+b)}else throw a}} -function Nl(e,a){var b=e.f;for(var c in b){if(c.charCodeAt(0)==58){var d=b[c];if(e.B(a,d)){return true}}}return false} -function Ll(i,a){var b=i.b;for(var c in b){if(c==parseInt(c)){var d=b[c];for(var e=0,f=d.length;ea.c)&&Um(b,a.c);if(b>=a.c>>1){d=a.b;for(c=a.c;c>b;--c){d=d.c}}else{d=a.b.b;for(c=0;c-129&&a<128){b=a+128;c=(Qk(),Pk)[b];!c&&(c=Pk[b]=Jk(new Fk,a));return c}return Jk(new Fk,a)} -function kk(){if($wnd.XMLHttpRequest){return new XMLHttpRequest}else{try{return new ActiveXObject(Cr)}catch(a){return new ActiveXObject(Dr)}}} -function xc(b,c){var a,e,f,g,h,i;h=Mn(new Jn);while(qc(b.b.f)>0){Nn(h,mg(Ao(b.b.g),2));pc(b.b.f)}nc(b.b.f);Pn(h,El(b.b.b));Kl(b.b.b);i=null;for(g=Zm(new Wm,h);g.b1){return}if(qc(a.e)>0){c=oc(a.e);ec(c==a.d?yr:zr+c,vr,Nk(c),null);Jc(c,wc(new uc,a));return}while(qc(a.f)>0){c=pc(a.f);b=mg(Ao(a.g),2);ec(c==a.d?yr:zr+c,vr,Nk(c),null);Jc(c,b)}} -var Er="Can't get element ",Br='GET',Cr='MSXML2.XMLHTTP.3.0',Dr='Microsoft.XMLHTTP',vr='begin',zr='download',wr='end',yr='leftoversDownload',Ar='runAsync';_=Xb.prototype=new O;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var Yb;_=ic.prototype=new O;_.tI=0;_.b=null;_.c=0;_.d=0;_=rc.prototype=new mb;_.tI=7;_=uc.prototype=new O;_.i=yc;_.tI=8;_.b=null;_=Kc.prototype=new O;_.j=Nc;_.tI=0;_.b=null;_.c=null;_=Gk.prototype=new O;_.tI=27;_=Fk.prototype=new Gk;_.eQ=Kk;_.hC=Lk;_.w=Mk;_.tI=30;_.b=0;var Pk;_=sn.prototype=new tl;_.y=wn;_.s=xn;_.z=yn;_.tI=0;_.b=null;_.c=null;_=zn.prototype=new O;_.u=Cn;_.v=Dn;_.tI=0;_.b=null;_=En.prototype=new Mm;_.F=Gn;_.G=Hn;_.s=In;_.tI=41;_=uo.prototype=new En;_.x=Do;_.z=Eo;_.tI=45;_.b=null;_.c=0;_=Fo.prototype=new O;_.u=Mo;_.v=No;_.tI=0;_.b=0;_.c=null;_.d=null;_.e=null;_=Oo.prototype=new O;_.tI=0;_.b=null;_.c=null;_.d=null;var zg=new qk,Bg=new qk;hc(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/1.cache.js new file mode 100644 index 00000000..69db09af --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/1.cache.js @@ -0,0 +1,9 @@ +function sP(){} +function pP(){} +function yP(){} +function oP(){} +function wP(){return $L} +function rP(){return ZL} +function uP(){uP=G7;tP=new pP} +function xP(){tP=(uP(),new oP);lw((iw(),hw),1);!!$stats&&$stats(Rw(Fmb,Gmb,null,null));tP.Vb();!!$stats&&$stats(Rw(Fmb,Hmb,null,null))} +var Kmb='AsyncLoader1',Jmb='AsyncLoader1__Super',Fmb='runCallbacks1';_=pP.prototype=new tf;_.gC=rP;_.Vb=sP;_.tI=0;_=oP.prototype=new pP;_.gC=wP;_.Vb=yP;_.tI=0;var tP;var ZL=l0(Imb,Jmb),$L=l0(Imb,Kmb);xP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/2.cache.js new file mode 100644 index 00000000..5cf735d9 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/2.cache.js @@ -0,0 +1,9 @@ +function DP(){} +function AP(){} +function JP(){} +function zP(){} +function HP(){return aM} +function CP(){return _L} +function FP(){FP=G7;EP=new AP} +function IP(){EP=(FP(),new zP);lw((iw(),hw),2);!!$stats&&$stats(Rw(Lmb,Gmb,null,null));EP.Vb();!!$stats&&$stats(Rw(Lmb,Hmb,null,null))} +var Nmb='AsyncLoader2',Mmb='AsyncLoader2__Super',Lmb='runCallbacks2';_=AP.prototype=new tf;_.gC=CP;_.Vb=DP;_.tI=0;_=zP.prototype=new AP;_.gC=HP;_.Vb=JP;_.tI=0;var EP;var _L=l0(Imb,Mmb),aM=l0(Imb,Nmb);IP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/3.cache.js new file mode 100644 index 00000000..8e5f0e13 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/3.cache.js @@ -0,0 +1,54 @@ +function gw(){} +function uw(){} +function Ew(){} +function Iw(){} +function Zw(){} +function b5(){} +function j5(){} +function sw(){nw(hw)} +function tw(){return $K} +function Dw(){return WK} +function Hw(){return XK} +function Mw(){return YK} +function ax(){return ZK} +function g5(){return fO} +function m5(){return eO} +function nw(a){lw(a,a.d)} +function Nw(a){Lw(this,a)} +function zw(a){a.c=0;a.d=0} +function Cw(a){return a.d-a.c} +function h1(){return this.b} +function i5(){return this.c.b.e} +function Aw(a){return a.b[a.c]} +function yw(a,b){a.b[a.d++]=b} +function Kw(a,b){a.b=b;return a} +function l5(a,b){a.b=b;return a} +function n5(){return G4(this.b.b)} +function Bw(a){return a.b[a.c++]} +function f5(a){return k3(this.b,a)} +function P6(a){if(a.c==0){throw y7(new w7)}} +function d5(a,b,c){a.b=b;a.c=c;return a} +function _w(a,b,c){a.c=b;a.b=c;return a} +function Gw(a,b){Yx(a);a.g=Qmb+b;return a} +function xw(a,b){a.b=NI(uO,0,-1,b,1);return a} +function N6(a){var b;P6(a);--a.c;b=a.b.b;h7(b);return b.d} +function o5(){var a;a=bJ(H4(this.b.b),61).lc();return a} +function h5(){var a;a=R3(new P3,this.c.b);return l5(new j5,a)} +function Z2(a){var b;b=H3(new A3,a);return d5(new b5,a,b)} +function iw(){iw=G7;hw=kw(new gw,3,OI(uO,0,-1,[]))} +function pw(a,b,c,d){!!$stats&&$stats(Rw(a,b,c,d))} +function kw(a,b,c){iw();a.b=n6(new l6);a.g=J6(new H6);a.d=b;a.c=c;a.f=xw(new uw,b+1);return a} +function k3(a,b){if(a.d&&p6(a.c,b)){return true}else if(j3(a,b)){return true}else if(h3(a,b)){return true}return false} +function Xw(b,c){function d(a){c.Jb(a)} +return __gwtStartLoadingFragment(b,d)} +function mw(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e0){A5(h,bJ(N6(b.b.g),41));Bw(b.b.f)}zw(b.b.f);C5(h,Z2(b.b.b));g3(b.b.b);i=null;for(g=F4(new C4,h);g.b1){return}if(Cw(a.e)>0){c=Aw(a.e);pw(c==a.d?Omb:Pmb+c,Gmb,k1(c),null);Yw(c,Kw(new Iw,a));return}while(Cw(a.f)>0){c=Bw(a.f);b=bJ(N6(a.g),41);pw(c==a.d?Omb:Pmb+c,Gmb,k1(c),null);Yw(c,b)}} +var Ymb='AbstractMap$2',Zmb='AbstractMap$2$1',Tmb='AsyncFragmentLoader',Umb='AsyncFragmentLoader$BoundedIntQueue',Vmb='AsyncFragmentLoader$HttpDownloadFailure',Wmb='AsyncFragmentLoader$InitialFragmentDownloadFailed',Xmb='AsyncFragmentLoader$XhrLoadingStrategy$1',Qmb='HTTP download failed with status ',Smb='[I',Gmb='begin',Imb='com.google.gwt.lang.asyncloaders.',Pmb='download',Hmb='end',Omb='leftoversDownload',Rmb='runAsync';_=gw.prototype=new tf;_.gC=tw;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var hw;_=uw.prototype=new tf;_.gC=Dw;_.tI=0;_.b=null;_.c=0;_.d=0;_=Ew.prototype=new dv;_.gC=Hw;_.tI=70;_=Iw.prototype=new tf;_.gC=Mw;_.Jb=Nw;_.tI=71;_.b=null;_=Zw.prototype=new tf;_.gC=ax;_.Kb=bx;_.tI=0;_.b=null;_.c=null;_=_0.prototype;_.ec=h1;_=b5.prototype=new K2;_.gc=f5;_.gC=g5;_.qb=h5;_.hc=i5;_.tI=0;_.b=null;_.c=null;_=j5.prototype=new tf;_.gC=m5;_.Wb=n5;_.Xb=o5;_.tI=0;_.b=null;var uO=k0(J9,Smb),$K=l0(ojb,Tmb),WK=l0(ojb,Umb),XK=l0(ojb,Vmb),YK=l0(ojb,Wmb),ZK=l0(ojb,Xmb),fO=l0(Ahb,Ymb),eO=l0(Ahb,Zmb);sw(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/g3viewer.nocache.js b/modules/gwtorganise/war/g3viewer/g3viewer.nocache.js index 64aa42ab..17286ade 100644 --- a/modules/gwtorganise/war/g3viewer/g3viewer.nocache.js +++ b/modules/gwtorganise/war/g3viewer/g3viewer.nocache.js @@ -1,4 +1,4 @@ -function g3viewer(){var M='',nb='" for "gwt:onLoadErrorFn"',lb='" for "gwt:onPropertyErrorFn"',Y='"><\/script>',$='#',Wb='.cache.html',ab='/',Lb='015D751F4204508258E3AD3E74E19E72',Mb='0A21C4AA9FA3F1812B8077A68729DA52',Nb='0AB3C6DF30C08F43EAA999A9F920C30B',Ob='3295227D4A416F64C8B3061D11DFABA0',Pb='371B2293E0881C8A53FDA41CA333A843',Qb='46E36699DD51342BCC1877A718D3B6D5',Rb='826A0FAD0C07BC304C641864F5274BFC',gc=' - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/0D97DF37194D1924CC80394AAA96B9A3.cache.html b/modules/gwtorganise/war/g3viewer/0D97DF37194D1924CC80394AAA96B9A3.cache.html new file mode 100644 index 00000000..eb93e477 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/0D97DF37194D1924CC80394AAA96B9A3.cache.html @@ -0,0 +1,1728 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/27AC86F0820D8F960DBF73C151C0332B.cache.html b/modules/gwtorganise/war/g3viewer/27AC86F0820D8F960DBF73C151C0332B.cache.html new file mode 100644 index 00000000..6ae3eb2f --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/27AC86F0820D8F960DBF73C151C0332B.cache.html @@ -0,0 +1,1733 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/3E4F3EA15819E3548B40625FACE2EBBE.cache.html b/modules/gwtorganise/war/g3viewer/3E4F3EA15819E3548B40625FACE2EBBE.cache.html deleted file mode 100644 index dc9c09fb..00000000 --- a/modules/gwtorganise/war/g3viewer/3E4F3EA15819E3548B40625FACE2EBBE.cache.html +++ /dev/null @@ -1,1823 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/4AFE598FDFDF189DD61F57E554328B10.cache.html b/modules/gwtorganise/war/g3viewer/4AFE598FDFDF189DD61F57E554328B10.cache.html new file mode 100644 index 00000000..9f1d2b2a --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/4AFE598FDFDF189DD61F57E554328B10.cache.html @@ -0,0 +1,1840 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/4DD08D394689CC09C7978BC0F3B16995.cache.html b/modules/gwtorganise/war/g3viewer/4DD08D394689CC09C7978BC0F3B16995.cache.html deleted file mode 100644 index b8ba861f..00000000 --- a/modules/gwtorganise/war/g3viewer/4DD08D394689CC09C7978BC0F3B16995.cache.html +++ /dev/null @@ -1,1684 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/4E8EC2279CB4B46228EFF0682ED166A4.cache.html b/modules/gwtorganise/war/g3viewer/4E8EC2279CB4B46228EFF0682ED166A4.cache.html new file mode 100644 index 00000000..7fa662e1 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/4E8EC2279CB4B46228EFF0682ED166A4.cache.html @@ -0,0 +1,1821 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/4F7AD7D8299143D876CB4071BE00BF02.cache.html b/modules/gwtorganise/war/g3viewer/4F7AD7D8299143D876CB4071BE00BF02.cache.html new file mode 100644 index 00000000..71d67f32 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/4F7AD7D8299143D876CB4071BE00BF02.cache.html @@ -0,0 +1,1862 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/57F950D32C617CAE2C8052EA05BDC171.cache.html b/modules/gwtorganise/war/g3viewer/57F950D32C617CAE2C8052EA05BDC171.cache.html deleted file mode 100644 index fa9170e5..00000000 --- a/modules/gwtorganise/war/g3viewer/57F950D32C617CAE2C8052EA05BDC171.cache.html +++ /dev/null @@ -1,1777 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/5C5462085DC7810C7E2A1392D87E6531.cache.html b/modules/gwtorganise/war/g3viewer/5C5462085DC7810C7E2A1392D87E6531.cache.html deleted file mode 100644 index 07ae0424..00000000 --- a/modules/gwtorganise/war/g3viewer/5C5462085DC7810C7E2A1392D87E6531.cache.html +++ /dev/null @@ -1,1818 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/6462B363383D23B8418857B7A6FAD85B.cache.html b/modules/gwtorganise/war/g3viewer/6462B363383D23B8418857B7A6FAD85B.cache.html new file mode 100644 index 00000000..e3bf202e --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/6462B363383D23B8418857B7A6FAD85B.cache.html @@ -0,0 +1,1835 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/71ED95F3DFB964762667E45E2922704D.cache.html b/modules/gwtorganise/war/g3viewer/71ED95F3DFB964762667E45E2922704D.cache.html new file mode 100644 index 00000000..d3b48c83 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/71ED95F3DFB964762667E45E2922704D.cache.html @@ -0,0 +1,1687 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/7C1AD451EC3EDEB1136202063B8983F0.cache.html b/modules/gwtorganise/war/g3viewer/7C1AD451EC3EDEB1136202063B8983F0.cache.html deleted file mode 100644 index be3b24f9..00000000 --- a/modules/gwtorganise/war/g3viewer/7C1AD451EC3EDEB1136202063B8983F0.cache.html +++ /dev/null @@ -1,1661 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/82CC6089F1DDA8F19D1F5BD74ED71B1B.cache.html b/modules/gwtorganise/war/g3viewer/82CC6089F1DDA8F19D1F5BD74ED71B1B.cache.html deleted file mode 100644 index f2e52dcc..00000000 --- a/modules/gwtorganise/war/g3viewer/82CC6089F1DDA8F19D1F5BD74ED71B1B.cache.html +++ /dev/null @@ -1,1643 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/884CB866FECF37EDDE4914CA60AF2511.cache.html b/modules/gwtorganise/war/g3viewer/884CB866FECF37EDDE4914CA60AF2511.cache.html new file mode 100644 index 00000000..70fc28c4 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/884CB866FECF37EDDE4914CA60AF2511.cache.html @@ -0,0 +1,1701 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/9DC95FB4BEC084EF810751F04B440FD7.cache.html b/modules/gwtorganise/war/g3viewer/9DC95FB4BEC084EF810751F04B440FD7.cache.html new file mode 100644 index 00000000..59d502f2 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/9DC95FB4BEC084EF810751F04B440FD7.cache.html @@ -0,0 +1,1706 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/A8FBB0ADAFEE7F8EA1CDB15765D13A7F.cache.html b/modules/gwtorganise/war/g3viewer/A8FBB0ADAFEE7F8EA1CDB15765D13A7F.cache.html new file mode 100644 index 00000000..87e12a44 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/A8FBB0ADAFEE7F8EA1CDB15765D13A7F.cache.html @@ -0,0 +1,1863 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/ACE6F9D8917D340A8A0D301E71E5507A.cache.html b/modules/gwtorganise/war/g3viewer/ACE6F9D8917D340A8A0D301E71E5507A.cache.html deleted file mode 100644 index 733a7192..00000000 --- a/modules/gwtorganise/war/g3viewer/ACE6F9D8917D340A8A0D301E71E5507A.cache.html +++ /dev/null @@ -1,1685 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/C3A8CA313CFDC8DB1F2ED097816C6EC0.cache.html b/modules/gwtorganise/war/g3viewer/C3A8CA313CFDC8DB1F2ED097816C6EC0.cache.html deleted file mode 100644 index f3c64ff9..00000000 --- a/modules/gwtorganise/war/g3viewer/C3A8CA313CFDC8DB1F2ED097816C6EC0.cache.html +++ /dev/null @@ -1,1819 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/CB317E0D3E395FA9682EC2E87A205F17.cache.html b/modules/gwtorganise/war/g3viewer/CB317E0D3E395FA9682EC2E87A205F17.cache.html deleted file mode 100644 index 116cc832..00000000 --- a/modules/gwtorganise/war/g3viewer/CB317E0D3E395FA9682EC2E87A205F17.cache.html +++ /dev/null @@ -1,1657 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/CE15F73DB4EDED1CF8F93F95A728792D.cache.html b/modules/gwtorganise/war/g3viewer/CE15F73DB4EDED1CF8F93F95A728792D.cache.html new file mode 100644 index 00000000..45651178 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/CE15F73DB4EDED1CF8F93F95A728792D.cache.html @@ -0,0 +1,1868 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/D096B0ED44CBABF1A6B1F2C2D31F4FCC.cache.html b/modules/gwtorganise/war/g3viewer/D096B0ED44CBABF1A6B1F2C2D31F4FCC.cache.html new file mode 100644 index 00000000..d6666f29 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/D096B0ED44CBABF1A6B1F2C2D31F4FCC.cache.html @@ -0,0 +1,1729 @@ + + + + + + \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/D94A32538BE218C5D21AE0170373089B.cache.html b/modules/gwtorganise/war/g3viewer/D94A32538BE218C5D21AE0170373089B.cache.html deleted file mode 100644 index a5af996e..00000000 --- a/modules/gwtorganise/war/g3viewer/D94A32538BE218C5D21AE0170373089B.cache.html +++ /dev/null @@ -1,1791 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/FEAA0157C361541B2682E3107C5BF9ED.cache.html b/modules/gwtorganise/war/g3viewer/FEAA0157C361541B2682E3107C5BF9ED.cache.html deleted file mode 100644 index 1d3b48ec..00000000 --- a/modules/gwtorganise/war/g3viewer/FEAA0157C361541B2682E3107C5BF9ED.cache.html +++ /dev/null @@ -1,1688 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/1.cache.js deleted file mode 100644 index cf79ccaf..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function US(){} -function eT(){return DP} -function iT(){var a;while(ZS){a=ZS;ZS=ZS.c;!ZS&&($S=null);Zv(a.b.b)}} -function xv(a,b){Hab(a.f,b);if(!a.e){a.e=true;zv(a)}a.c=false;Av(a)} -function Zv(a){var b;a.b.b=a.b.c.blob;(Ev(),Dv).captureBlob(a.b.b,a.b.f,Grb);b=U$(new R$,a.b.f);a.b.d.sb(b);xv(a.b.j,a.b)} -function fT(){aT=true;_S=(cT(),new US);Ky((Hy(),Gy),1);!!$stats&&$stats(oz(Hrb,Oib,null,null));_S.Zb();!!$stats&&$stats(oz(Hrb,Irb,null,null))} -var Jrb='AsyncLoader1',Grb='image/JPEG',Hrb='runCallbacks1';_=US.prototype=new VS;_.gC=eT;_.Zb=iT;_.tI=0;var DP=f4(wpb,Jrb);fT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/2.cache.js deleted file mode 100644 index 0d28038d..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function qT(){} -function CT(){return HP} -function GT(){var a;while(vT){a=vT;vT=vT.c;!vT&&(wT=null);ro(a.b)}} -function DT(){yT=true;xT=(AT(),new qT);Ky((Hy(),Gy),2);!!$stats&&$stats(oz(Lrb,Oib,null,null));xT.Zb();!!$stats&&$stats(oz(Lrb,Irb,null,null))} -function ro(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Krb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Kv(a.d,e.encode());return}Kv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Kv(a.d,e.encode());return}Kv(a.d,a.b)}} -var Mrb='AsyncLoader2',Krb='beta.canvas',Lrb='runCallbacks2';_=qT.prototype=new rT;_.gC=CT;_.Zb=GT;_.tI=0;var HP=f4(wpb,Mrb);DT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/3.cache.js deleted file mode 100644 index a59daae7..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/09A21085406FD3AEFF74EE8471199B8A/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function oo(){} -function Mv(){} -function Rv(){} -function uT(){} -function rT(){} -function HT(){} -function LT(){} -function Sy(){Ny(Gy)} -function so(){return vN} -function Qv(){return jO} -function Vv(){return kO} -function tT(){return GP} -function JT(){return EP} -function NT(){return FP} -function Ny(a){Ky(a,a.e)} -function Ov(a,b){a.b=b;return a} -function Tv(a,b){a.b=b;return a} -function AT(){AT=Cbb;xT=new rT} -function KT(a){AT();zT=false;FT(a)} -function GI(a,b){if(!a){return}Uv(a,b)} -function JI(c,b){c.onprogress=function(a){KI(b,a)}} -function qo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function nw(a,b,c){var d;d=Z1(a.g,b);Os(a,c,a.I,d,true);Ps(a,b)} -function vv(a,b){p7(a.g.b,b)!=null;Av(a);zv(a);dt(a.b.e)} -function Jv(a){if(a.i.d){(FB(),a.e.I).textContent=Nrb;ET(qo(new oo,a.b,a))}else{Kv(a,a.b)}} -function FT(a){AT();while(vT){Uo();Uq(br(new rp,Vrb+Bh(a)));vT=vT.c}wT=null} -function KI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(CM(Math.floor(c*100))+Urb)} -function Ky(a,b){var c;c=b==a.e?Mib:Nib+b;Py(c,Irb,e5(b),null);if(My(a,b)){_y(a.f);p7(a.b,e5(b));Ry(a)}} -function zv(a){var b;if(a.f.c>0){b=pM(Jab(a.f),37);Jv(b)}else{a.e=false}} -function ET(a){AT();var b;b=new LT;b.b=a;!!wT&&(wT.c=b);wT=b;!vT&&(vT=b);if(yT){xT.Zb();return}if(!zT){zT=true;Ly((Hy(),Gy),2,new HT)}} -function Xk(a,b,c){var d,e;p7(a.b.b,b)!=null;e=c.Xb();if(e){d=zt(new ot,a,e,a.c);l7(a.g,e5(d.d),d);v9(a.h,d);a.m.b==a&&nw(a.m,b,d)}else{a.m.b==a&&Ps(a.m,b)}} -function Uv(b,c){var a,e,f;if(c.status!=200){(FB(),b.b.e.I).textContent=Rrb;ik(b.b._(),Srb,true)}(Ev(),Dv).remove(b.b.f);if(c.status==200){try{f=DL(c.responseText);vv(b.b.j,b.b);Xk(b.b.g,b.b,f);return}catch(a){a=rS(a);if(sM(a,23)){e=a;Uo();Uq(br(new rp,Trb+Bh(e)+Udb+c.responseText))}else throw a}}p7(b.b.g.b.b,b.b)!=null;vv(b.b.j,b.b)} -function FI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){GI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Kv(a,b){var c;(FB(),a.e.I).textContent=Orb;c=gI().create(Prb);c.open(ojb,(Uo(),Po)+a.g.e+Qrb+a.f+Efb+To);JI(c.upload,Ov(new Mv,a));FI(c,Tv(new Rv,a));c.send(b)} -var Urb='%',Qrb='?filename=',$rb='AsyncLoader2$1',_rb='AsyncLoader2__Callback',Zrb='AsyncLoader2__Super',Wrb='AsyncResizer',Vrb='Error Resizing image\n',Trb='Exception on Upload\n',Nrb='Resizing..',Rrb='Upload Error',Xrb='UploadFile$1',Yrb='UploadFile$2',Orb='Uploading..',Prb='beta.httprequest',Irb='end',Srb='upload-error';_=oo.prototype=new Lf;_.gC=so;_.tI=0;_.b=null;_.c=null;_.d=null;_=Mv.prototype=new Lf;_.gC=Qv;_.tI=0;_.b=null;_=Rv.prototype=new Lf;_.gC=Vv;_.tI=0;_.b=null;_=rT.prototype=new Lf;_.gC=tT;_.Zb=uT;_.tI=0;var vT=null,wT=null,xT,yT=false,zT=false;_=HT.prototype=new Lf;_.gC=JT;_.Nb=KT;_.tI=89;_=LT.prototype=new Lf;_.gC=NT;_.tI=0;_.b=null;_.c=null;var vN=f4(ymb,Wrb),jO=f4(ymb,Xrb),kO=f4(ymb,Yrb),GP=f4(wpb,Zrb),EP=f4(wpb,$rb),FP=f4(wpb,_rb);Sy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/1.cache.js new file mode 100644 index 00000000..e53d53ed --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/1.cache.js @@ -0,0 +1,9 @@ +function ZQ(){} +function WQ(){} +function dR(){} +function VQ(){} +function bR(){return EN} +function YQ(){return DN} +function _Q(){_Q=k9;$Q=new WQ} +function cR(){$Q=(_Q(),new VQ);zx((wx(),vx),1);!!$stats&&$stats(dy(wob,xob,null,null));$Q.Xb();!!$stats&&$stats(dy(wob,yob,null,null))} +var Bob='AsyncLoader1',Aob='AsyncLoader1__Super',wob='runCallbacks1';_=WQ.prototype=new Gf;_.gC=YQ;_.Xb=ZQ;_.tI=0;_=VQ.prototype=new WQ;_.gC=bR;_.Xb=dR;_.tI=0;var $Q;var DN=R1(zob,Aob),EN=R1(zob,Bob);cR(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/2.cache.js new file mode 100644 index 00000000..b2a4c208 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/2.cache.js @@ -0,0 +1,9 @@ +function iR(){} +function fR(){} +function oR(){} +function eR(){} +function mR(){return GN} +function hR(){return FN} +function kR(){kR=k9;jR=new fR} +function nR(){jR=(kR(),new eR);zx((wx(),vx),2);!!$stats&&$stats(dy(Cob,xob,null,null));jR.Xb();!!$stats&&$stats(dy(Cob,yob,null,null))} +var Eob='AsyncLoader2',Dob='AsyncLoader2__Super',Cob='runCallbacks2';_=fR.prototype=new Gf;_.gC=hR;_.Xb=iR;_.tI=0;_=eR.prototype=new fR;_.gC=mR;_.Xb=oR;_.tI=0;var jR;var FN=R1(zob,Dob),GN=R1(zob,Eob);nR(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/3.cache.js new file mode 100644 index 00000000..ca33975b --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/3.cache.js @@ -0,0 +1,54 @@ +function ux(){} +function Ix(){} +function Sx(){} +function Wx(){} +function ly(){} +function H6(){} +function P6(){} +function Gx(){Bx(vx)} +function Hx(){return CM} +function Rx(){return yM} +function Vx(){return zM} +function $x(){return AM} +function oy(){return BM} +function M6(){return MP} +function S6(){return LP} +function Bx(a){zx(a,a.d)} +function _x(a){Zx(this,a)} +function Nx(a){a.c=0;a.d=0} +function Qx(a){return a.d-a.c} +function N2(){return this.b} +function O6(){return this.c.b.e} +function Ox(a){return a.b[a.c]} +function Mx(a,b){a.b[a.d++]=b} +function Yx(a,b){a.b=b;return a} +function R6(a,b){a.b=b;return a} +function T6(){return k6(this.b.b)} +function Px(a){return a.b[a.c++]} +function L6(a){return Q4(this.b,a)} +function t8(a){if(a.c==0){throw c9(new a9)}} +function J6(a,b,c){a.b=b;a.c=c;return a} +function ny(a,b,c){a.c=b;a.b=c;return a} +function Ux(a,b){kz(a);a.g=Hob+b;return a} +function Lx(a,b){a.b=fK(_P,0,-1,b,1);return a} +function r8(a){var b;t8(a);--a.c;b=a.b.b;N8(b);return b.d} +function U6(){var a;a=vK(l6(this.b.b),61).nc();return a} +function N6(){var a;a=v5(new t5,this.c.b);return R6(new P6,a)} +function D4(a){var b;b=l5(new e5,a);return J6(new H6,a,b)} +function Dx(a,b,c,d){!!$stats&&$stats(dy(a,b,c,d))} +function jy(b,c){function d(a){c.Hb(a)} +return __gwtStartLoadingFragment(b,d)} +function Q4(a,b){if(a.d&&V7(a.c,b)){return true}else if(P4(a,b)){return true}else if(N4(a,b)){return true}return false} +function yx(a,b,c){wx();a.b=T7(new R7);a.g=n8(new l8);a.d=b;a.c=c;a.f=Lx(new Ix,b+1);return a} +function wx(){wx=k9;vx=yx(new ux,3,gK(_P,0,-1,[]))} +function ky(a,b){var c,d;c=jy(a,b);if(c==null){return}d=u1();d.open(wgb,c,true);s1(d,ny(new ly,d,b));d.send(null)} +function Ax(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e0){e7(h,vK(r8(b.b.g),41));Px(b.b.f)}Nx(b.b.f);g7(h,D4(b.b.b));M4(b.b.b);i=null;for(g=j6(new g6,h);g.b1){return}if(Qx(a.e)>0){c=Ox(a.e);Dx(c==a.d?Fob:Gob+c,xob,Q2(c),null);ky(c,Yx(new Wx,a));return}while(Qx(a.f)>0){c=Px(a.f);b=vK(r8(a.g),41);Dx(c==a.d?Fob:Gob+c,xob,Q2(c),null);ky(c,b)}} +var Pob='AbstractMap$2',Qob='AbstractMap$2$1',Kob='AsyncFragmentLoader',Lob='AsyncFragmentLoader$BoundedIntQueue',Mob='AsyncFragmentLoader$HttpDownloadFailure',Nob='AsyncFragmentLoader$InitialFragmentDownloadFailed',Oob='AsyncFragmentLoader$XhrLoadingStrategy$1',Hob='HTTP download failed with status ',Job='[I',xob='begin',zob='com.google.gwt.lang.asyncloaders.',Gob='download',yob='end',Fob='leftoversDownload',Iob='runAsync';_=ux.prototype=new Gf;_.gC=Hx;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var vx;_=Ix.prototype=new Gf;_.gC=Rx;_.tI=0;_.b=null;_.c=0;_.d=0;_=Sx.prototype=new rw;_.gC=Vx;_.tI=76;_=Wx.prototype=new Gf;_.gC=$x;_.Hb=_x;_.tI=77;_.b=null;_=ly.prototype=new Gf;_.gC=oy;_.Ib=py;_.tI=0;_.b=null;_.c=null;_=F2.prototype;_.gc=N2;_=H6.prototype=new o4;_.ic=L6;_.gC=M6;_.ob=N6;_.jc=O6;_.tI=0;_.b=null;_.c=null;_=P6.prototype=new Gf;_.gC=S6;_.Yb=T6;_.Zb=U6;_.tI=0;_.b=null;var _P=Q1(nbb,Job),CM=R1(clb,Kob),yM=R1(clb,Lob),zM=R1(clb,Mob),AM=R1(clb,Nob),BM=R1(clb,Oob),MP=R1(djb,Pob),LP=R1(djb,Qob);Gx(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/1.cache.js new file mode 100644 index 00000000..d583bce7 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/1.cache.js @@ -0,0 +1,9 @@ +function SQ(){} +function PQ(){} +function YQ(){} +function OQ(){} +function WQ(){return yN} +function RQ(){return xN} +function UQ(){UQ=i9;TQ=new PQ} +function XQ(){TQ=(UQ(),new OQ);Bx((yx(),xx),1);!!$stats&&$stats(fy(xob,yob,null,null));TQ.Vb();!!$stats&&$stats(fy(xob,zob,null,null))} +var Cob='AsyncLoader1',Bob='AsyncLoader1__Super',xob='runCallbacks1';_=PQ.prototype=new Ef;_.gC=RQ;_.Vb=SQ;_.tI=0;_=OQ.prototype=new PQ;_.gC=WQ;_.Vb=YQ;_.tI=0;var TQ;var xN=P1(Aob,Bob),yN=P1(Aob,Cob);XQ(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/2.cache.js new file mode 100644 index 00000000..7bb8a12e --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/2.cache.js @@ -0,0 +1,9 @@ +function bR(){} +function $Q(){} +function hR(){} +function ZQ(){} +function fR(){return AN} +function aR(){return zN} +function dR(){dR=i9;cR=new $Q} +function gR(){cR=(dR(),new ZQ);Bx((yx(),xx),2);!!$stats&&$stats(fy(Dob,yob,null,null));cR.Vb();!!$stats&&$stats(fy(Dob,zob,null,null))} +var Fob='AsyncLoader2',Eob='AsyncLoader2__Super',Dob='runCallbacks2';_=$Q.prototype=new Ef;_.gC=aR;_.Vb=bR;_.tI=0;_=ZQ.prototype=new $Q;_.gC=fR;_.Vb=hR;_.tI=0;var cR;var zN=P1(Aob,Eob),AN=P1(Aob,Fob);gR(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/3.cache.js new file mode 100644 index 00000000..8e8f02c9 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/3.cache.js @@ -0,0 +1,54 @@ +function wx(){} +function Kx(){} +function Ux(){} +function Yx(){} +function ny(){} +function F6(){} +function N6(){} +function Ix(){Dx(xx)} +function Jx(){return yM} +function Tx(){return uM} +function Xx(){return vM} +function ay(){return wM} +function qy(){return xM} +function K6(){return FP} +function Q6(){return EP} +function Dx(a){Bx(a,a.d)} +function by(a){_x(this,a)} +function Px(a){a.c=0;a.d=0} +function Sx(a){return a.d-a.c} +function L2(){return this.b} +function M6(){return this.c.b.e} +function Qx(a){return a.b[a.c]} +function Ox(a,b){a.b[a.d++]=b} +function $x(a,b){a.b=b;return a} +function P6(a,b){a.b=b;return a} +function R6(){return i6(this.b.b)} +function Rx(a){return a.b[a.c++]} +function J6(a){return O4(this.b,a)} +function r8(a){if(a.c==0){throw a9(new $8)}} +function H6(a,b,c){a.b=b;a.c=c;return a} +function py(a,b,c){a.c=b;a.b=c;return a} +function Wx(a,b){mz(a);a.g=Iob+b;return a} +function Nx(a,b){a.b=aK(UP,0,-1,b,1);return a} +function Fx(a,b,c,d){!!$stats&&$stats(fy(a,b,c,d))} +function ly(b,c){function d(a){c.Jb(a)} +return __gwtStartLoadingFragment(b,d)} +function p8(a){var b;r8(a);--a.c;b=a.b.b;L8(b);return b.d} +function S6(){var a;a=qK(j6(this.b.b),61).lc();return a} +function B4(a){var b;b=j5(new c5,a);return H6(new F6,a,b)} +function L6(){var a;a=t5(new r5,this.c.b);return P6(new N6,a)} +function yx(){yx=i9;xx=Ax(new wx,3,bK(UP,0,-1,[]))} +function Bx(a,b){var c;c=b==a.d?Gob:Hob+b;Fx(c,zob,O2(b),null);if(Cx(a,b)){Rx(a.e);Y4(a.b,O2(b));Hx(a)}} +function my(a,b){var c,d;c=ly(a,b);if(c==null){return}d=s1();d.open(vgb,c,true);q1(d,py(new ny,d,b));d.send(null)} +function Cx(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e1){return}if(Sx(a.e)>0){c=Qx(a.e);Fx(c==a.d?Gob:Hob+c,yob,O2(c),null);my(c,$x(new Yx,a));return}while(Sx(a.f)>0){c=Rx(a.f);b=qK(p8(a.g),41);Fx(c==a.d?Gob:Hob+c,yob,O2(c),null);my(c,b)}} +function _x(b,c){var a,e,f,g,h,i;h=b7(new $6);while(Sx(b.b.f)>0){c7(h,qK(p8(b.b.g),41));Rx(b.b.f)}Px(b.b.f);e7(h,B4(b.b.b));K4(b.b.b);i=null;for(g=h6(new e6,h);g.bb){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Rv(a.d,e.encode());return}Rv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Rv(a.d,e.encode());return}Rv(a.d,a.b)}} -var Asb='AsyncLoader2',ysb='beta.canvas',zsb='runCallbacks2';_=JT.prototype=new KT;_.gC=VT;_.ac=ZT;_.tI=0;var YP=Q4(iqb,Asb);WT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/3.cache.js deleted file mode 100644 index bb2d0a23..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/3E4F3EA15819E3548B40625FACE2EBBE/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function vo(){} -function Tv(){} -function Yv(){} -function NT(){} -function KT(){} -function $T(){} -function cU(){} -function Zy(){Uy(Ny)} -function zo(){return LN} -function Xv(){return zO} -function aw(){return AO} -function MT(){return XP} -function aU(){return VP} -function eU(){return WP} -function Uy(a){Ry(a,a.e)} -function Vv(a,b){a.b=b;return a} -function $v(a,b){a.b=b;return a} -function TT(){TT=lcb;QT=new KT} -function bU(a){TT();ST=false;YT(a)} -function VI(a,b){if(!a){return}_v(a,b)} -function YI(c,b){c.onprogress=function(a){ZI(b,a)}} -function uw(a,b,c){var d;d=u2(a.g,b);Vs(a,c,a.K,d,true);Ws(a,b)} -function xo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function Gv(a){var b;if(a.f.c>0){b=EM(sbb(a.f),37);Qv(b)}else{a.e=false}} -function Cv(a,b){$7(a.g.b,b)!=null;Hv(a);Gv(a);kt(a.b.e)} -function Qv(a){if(a.i.d){JC((NB(),a.e.K),Bsb);XT(xo(new vo,a.b,a))}else{Rv(a,a.b)}} -function YT(a){TT();while(OT){_o();_q(ir(new yp,Jsb+Fh(a)));OT=OT.c}PT=null} -function XT(a){TT();var b;b=new cU;b.b=a;!!PT&&(PT.c=b);PT=b;!OT&&(OT=b);if(RT){QT.ac();return}if(!ST){ST=true;Sy((Oy(),Ny),2,new $T)}} -function Ry(a,b){var c;c=b==a.e?vjb:wjb+b;Wy(c,wsb,P5(b),null);if(Ty(a,b)){gz(a.f);$7(a.b,P5(b));Yy(a)}} -function Rv(a,b){var c;JC((NB(),a.e.K),Csb);c=vI().create(Dsb);c.open(Zjb,(_o(),Wo)+a.g.e+Esb+a.f+ngb+$o);YI(c.upload,Vv(new Tv,a));UI(c,$v(new Yv,a));c.send(b)} -function ZI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.db(RM(Math.floor(c*100))+Isb)} -function cl(a,b,c){var d,e;$7(a.b.b,b)!=null;e=c.$b();if(e){d=Gt(new vt,a,e,a.c);W7(a.g,P5(d.d),d);eab(a.h,d);a.m.b==a&&uw(a.m,b,d)}else{a.m.b==a&&Ws(a.m,b)}} -function _v(b,c){var a,e,f;if(c.status!=200){JC((NB(),b.b.e.K),Fsb);pk(b.b.bb(),Gsb,true)}(Lv(),Kv).remove(b.b.f);if(c.status==200){try{f=SL(c.responseText);Cv(b.b.j,b.b);cl(b.b.g,b.b,f);return}catch(a){a=KS(a);if(HM(a,23)){e=a;_o();_q(ir(new yp,Hsb+Fh(e)+Deb+c.responseText))}else throw a}}$7(b.b.g.b.b,b.b)!=null;Cv(b.b.j,b.b)} -function UI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){VI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -var Isb='%',Esb='?filename=',Osb='AsyncLoader2$1',Psb='AsyncLoader2__Callback',Nsb='AsyncLoader2__Super',Ksb='AsyncResizer',Jsb='Error Resizing image\n',Hsb='Exception on Upload\n',Bsb='Resizing..',Fsb='Upload Error',Lsb='UploadFile$1',Msb='UploadFile$2',Csb='Uploading..',Dsb='beta.httprequest',wsb='end',Gsb='upload-error';_=vo.prototype=new Pf;_.gC=zo;_.tI=0;_.b=null;_.c=null;_.d=null;_=Tv.prototype=new Pf;_.gC=Xv;_.tI=0;_.b=null;_=Yv.prototype=new Pf;_.gC=aw;_.tI=0;_.b=null;_=KT.prototype=new Pf;_.gC=MT;_.ac=NT;_.tI=0;var OT=null,PT=null,QT,RT=false,ST=false;_=$T.prototype=new Pf;_.gC=aU;_.Pb=bU;_.tI=89;_=cU.prototype=new Pf;_.gC=eU;_.tI=0;_.b=null;_.c=null;var LN=Q4(jnb,Ksb),zO=Q4(jnb,Lsb),AO=Q4(jnb,Msb),XP=Q4(iqb,Nsb),VP=Q4(iqb,Osb),WP=Q4(iqb,Psb);Zy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/1.cache.js new file mode 100644 index 00000000..0f9550b3 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/1.cache.js @@ -0,0 +1,7 @@ +function sU(){} +function EU(){return bR} +function IU(){var a;while(xU){a=xU;xU=xU.c;!xU&&(yU=null);Kw(a.b.b)}} +function iw(a,b){jcb(a.f,b);if(!a.e){a.e=true;kw(a)}a.c=false;lw(a)} +function Kw(a){var b;a.b.b=a.b.c.blob;(pw(),ow).captureBlob(a.b.b,a.b.f,ytb);b=w0(new t0,a.b.f);a.b.d.sb(b);iw(a.b.j,a.b)} +function FU(){AU=true;zU=(CU(),new sU);$z((Xz(),Wz),1);!!$stats&&$stats(EA(ztb,vkb,null,null));zU.Zb();!!$stats&&$stats(EA(ztb,Atb,null,null))} +var Btb='AsyncLoader1',ytb='image/JPEG',ztb='runCallbacks1';_=sU.prototype=new tU;_.gC=EU;_.Zb=IU;_.tI=0;var bR=J5(orb,Btb);FU(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/2.cache.js new file mode 100644 index 00000000..4a774b8c --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/2.cache.js @@ -0,0 +1,6 @@ +function QU(){} +function aV(){return fR} +function eV(){var a;while(VU){a=VU;VU=VU.c;!VU&&(WU=null);Co(a.b)}} +function bV(){YU=true;XU=($U(),new QU);$z((Xz(),Wz),2);!!$stats&&$stats(EA(Dtb,vkb,null,null));XU.Zb();!!$stats&&$stats(EA(Dtb,Atb,null,null))} +function Co(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Ctb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));vw(a.d,e.encode());return}vw(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);vw(a.d,e.encode());return}vw(a.d,a.b)}} +var Etb='AsyncLoader2',Ctb='beta.canvas',Dtb='runCallbacks2';_=QU.prototype=new RU;_.gC=aV;_.Zb=eV;_.tI=0;var fR=J5(orb,Etb);bV(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/3.cache.js new file mode 100644 index 00000000..4481e97b --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/3.cache.js @@ -0,0 +1,35 @@ +function zo(){} +function xw(){} +function Cw(){} +function UU(){} +function RU(){} +function fV(){} +function jV(){} +function gA(){bA(Wz)} +function Do(){return KO} +function Bw(){return DP} +function Gw(){return EP} +function TU(){return eR} +function hV(){return cR} +function lV(){return dR} +function bA(a){$z(a,a.e)} +function zw(a,b){a.b=b;return a} +function Ew(a,b){a.b=b;return a} +function $U(){$U=edb;XU=new RU} +function iV(a){$U();ZU=false;dV(a)} +function VJ(a,b){if(!a){return}Fw(a,b)} +function YJ(c,b){c.onprogress=function(a){ZJ(b,a)}} +function Bo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} +function _w(a,b,c){var d;d=B3(a.g,b);ut(a,c,a.I,d,true);vt(a,b)} +function gw(a,b){T8(a.g.b,b)!=null;lw(a);kw(a);Lt(a.b.f)} +function uw(a){if(a.i.d){(UC(),a.e.I).textContent=Ftb;cV(Bo(new zo,a.b,a))}else{vw(a,a.b)}} +function dV(a){$U();while(VU){dr();jq(Fr(new Dr,Otb+Mh(a)));VU=VU.c}WU=null} +function ZJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(RN(Math.floor(c*100))+Ntb)} +function $z(a,b){var c;c=b==a.e?tkb:ukb+b;dA(c,Atb,I6(b),null);if(aA(a,b)){pA(a.f);T8(a.b,I6(b));fA(a)}} +function kw(a){var b;if(a.f.c>0){b=EN(lcb(a.f),37);uw(b)}else{a.e=false}} +function cV(a){$U();var b;b=new jV;b.b=a;!!WU&&(WU.c=b);WU=b;!VU&&(VU=b);if(YU){XU.Zb();return}if(!ZU){ZU=true;_z((Xz(),Wz),2,new fV)}} +function gl(a,b,c){var d,e;T8(a.b.b,b)!=null;e=c.Xb();if(e){d=fu(new Wt,a,e,a.c);P8(a.g,I6(d.d),d);Zab(a.h,d);a.m.b==a&&_w(a.m,b,d)}else{a.m.b==a&&vt(a.m,b)}} +function Fw(b,c){var a,e,f;if(c.status!=200){(UC(),b.b.e.I).textContent=Jtb;tk(b.b._(),Ktb,true);dr();jq(Fr(new Dr,Ltb+c.responseText))}(pw(),ow).remove(b.b.f);if(c.status==200){try{f=SM(c.responseText);gw(b.b.j,b.b);gl(b.b.g,b.b,f);return}catch(a){a=RT(a);if(HN(a,23)){e=a;dr();jq(Fr(new Dr,Mtb+Mh(e)+wfb+c.responseText))}else throw a}}T8(b.b.g.b.b,b.b)!=null;gw(b.b.j,b.b)} +function UJ(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){VJ(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function vw(a,b){var c;(UC(),a.e.I).textContent=Gtb;c=vJ().create(Htb);c.open(Xkb,(dr(),$q)+a.g.e+Itb+a.f+yhb+cr);YJ(c.upload,zw(new xw,a));UJ(c,Ew(new Cw,a));c.send(b)} +var Ntb='%',Itb='?filename=',Ttb='AsyncLoader2$1',Utb='AsyncLoader2__Callback',Stb='AsyncLoader2__Super',Ptb='AsyncResizer',Otb='Error Resizing image\n',Ltb='Error Uploading\n',Mtb='Exception on Upload\n',Ftb='Resizing..',Jtb='Upload Error',Qtb='UploadFile$1',Rtb='UploadFile$2',Gtb='Uploading..',Htb='beta.httprequest',Atb='end',Ktb='upload-error';_=zo.prototype=new Wf;_.gC=Do;_.tI=0;_.b=null;_.c=null;_.d=null;_=xw.prototype=new Wf;_.gC=Bw;_.tI=0;_.b=null;_=Cw.prototype=new Wf;_.gC=Gw;_.tI=0;_.b=null;_=RU.prototype=new Wf;_.gC=TU;_.Zb=UU;_.tI=0;var VU=null,WU=null,XU,YU=false,ZU=false;_=fV.prototype=new Wf;_.gC=hV;_.Nb=iV;_.tI=95;_=jV.prototype=new Wf;_.gC=lV;_.tI=0;_.b=null;_.c=null;var KO=J5(fob,Ptb),DP=J5(fob,Qtb),EP=J5(fob,Rtb),eR=J5(orb,Stb),cR=J5(orb,Ttb),dR=J5(orb,Utb);gA(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/1.cache.js deleted file mode 100644 index 18431ecf..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function zP(){} -function wP(){} -function FP(){} -function vP(){} -function DP(){return eM} -function yP(){return dM} -function BP(){BP=I7;AP=new wP} -function EP(){AP=(BP(),new vP);jw((gw(),fw),1);!!$stats&&$stats(Pw(Emb,Fmb,null,null));AP.Xb();!!$stats&&$stats(Pw(Emb,Gmb,null,null))} -var Jmb='AsyncLoader1',Imb='AsyncLoader1__Super',Emb='runCallbacks1';_=wP.prototype=new vf;_.gC=yP;_.Xb=zP;_.tI=0;_=vP.prototype=new wP;_.gC=DP;_.Xb=FP;_.tI=0;var AP;var dM=n0(Hmb,Imb),eM=n0(Hmb,Jmb);EP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/2.cache.js deleted file mode 100644 index 4ae041b2..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function KP(){} -function HP(){} -function QP(){} -function GP(){} -function OP(){return gM} -function JP(){return fM} -function MP(){MP=I7;LP=new HP} -function PP(){LP=(MP(),new GP);jw((gw(),fw),2);!!$stats&&$stats(Pw(Kmb,Fmb,null,null));LP.Xb();!!$stats&&$stats(Pw(Kmb,Gmb,null,null))} -var Mmb='AsyncLoader2',Lmb='AsyncLoader2__Super',Kmb='runCallbacks2';_=HP.prototype=new vf;_.gC=JP;_.Xb=KP;_.tI=0;_=GP.prototype=new HP;_.gC=OP;_.Xb=QP;_.tI=0;var LP;var fM=n0(Hmb,Lmb),gM=n0(Hmb,Mmb);PP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/3.cache.js deleted file mode 100644 index 6758d313..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/4DD08D394689CC09C7978BC0F3B16995/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function ew(){} -function sw(){} -function Cw(){} -function Gw(){} -function Xw(){} -function d5(){} -function l5(){} -function qw(){lw(fw)} -function rw(){return cL} -function Bw(){return $K} -function Fw(){return _K} -function Kw(){return aL} -function $w(){return bL} -function i5(){return mO} -function o5(){return lO} -function lw(a){jw(a,a.d)} -function Lw(a){Jw(this,a)} -function xw(a){a.c=0;a.d=0} -function Aw(a){return a.d-a.c} -function j1(){return this.b} -function k5(){return this.c.b.e} -function yw(a){return a.b[a.c]} -function ww(a,b){a.b[a.d++]=b} -function Iw(a,b){a.b=b;return a} -function n5(a,b){a.b=b;return a} -function p5(){return I4(this.b.b)} -function zw(a){return a.b[a.c++]} -function h5(a){return m3(this.b,a)} -function R6(a){if(a.c==0){throw A7(new y7)}} -function f5(a,b,c){a.b=b;a.c=c;return a} -function Zw(a,b,c){a.c=b;a.b=c;return a} -function Ew(a,b){Wx(a);a.g=Pmb+b;return a} -function vw(a,b){a.b=SI(BO,0,-1,b,1);return a} -function P6(a){var b;R6(a);--a.c;b=a.b.b;j7(b);return b.d} -function q5(){var a;a=gJ(J4(this.b.b),61).nc();return a} -function j5(){var a;a=T3(new R3,this.c.b);return n5(new l5,a)} -function _2(a){var b;b=J3(new C3,a);return f5(new d5,a,b)} -function nw(a,b,c,d){!!$stats&&$stats(Pw(a,b,c,d))} -function Vw(b,c){function d(a){c.Hb(a)} -return __gwtStartLoadingFragment(b,d)} -function m3(a,b){if(a.d&&r6(a.c,b)){return true}else if(l3(a,b)){return true}else if(j3(a,b)){return true}return false} -function iw(a,b,c){gw();a.b=p6(new n6);a.g=L6(new J6);a.d=b;a.c=c;a.f=vw(new sw,b+1);return a} -function gw(){gw=I7;fw=iw(new ew,3,TI(BO,0,-1,[]))} -function Ww(a,b){var c,d;c=Vw(a,b);if(c==null){return}d=S_();d.open(Peb,c,true);Q_(d,Zw(new Xw,d,b));d.send(null)} -function kw(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e0){C5(h,gJ(P6(b.b.g),41));zw(b.b.f)}xw(b.b.f);E5(h,_2(b.b.b));i3(b.b.b);i=null;for(g=H4(new E4,h);g.b1){return}if(Aw(a.e)>0){c=yw(a.e);nw(c==a.d?Nmb:Omb+c,Fmb,m1(c),null);Ww(c,Iw(new Gw,a));return}while(Aw(a.f)>0){c=zw(a.f);b=gJ(P6(a.g),41);nw(c==a.d?Nmb:Omb+c,Fmb,m1(c),null);Ww(c,b)}} -var Xmb='AbstractMap$2',Ymb='AbstractMap$2$1',Smb='AsyncFragmentLoader',Tmb='AsyncFragmentLoader$BoundedIntQueue',Umb='AsyncFragmentLoader$HttpDownloadFailure',Vmb='AsyncFragmentLoader$InitialFragmentDownloadFailed',Wmb='AsyncFragmentLoader$XhrLoadingStrategy$1',Pmb='HTTP download failed with status ',Rmb='[I',Fmb='begin',Hmb='com.google.gwt.lang.asyncloaders.',Omb='download',Gmb='end',Nmb='leftoversDownload',Qmb='runAsync';_=ew.prototype=new vf;_.gC=rw;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var fw;_=sw.prototype=new vf;_.gC=Bw;_.tI=0;_.b=null;_.c=0;_.d=0;_=Cw.prototype=new bv;_.gC=Fw;_.tI=70;_=Gw.prototype=new vf;_.gC=Kw;_.Hb=Lw;_.tI=71;_.b=null;_=Xw.prototype=new vf;_.gC=$w;_.Ib=_w;_.tI=0;_.b=null;_.c=null;_=b1.prototype;_.gc=j1;_=d5.prototype=new M2;_.ic=h5;_.gC=i5;_.ob=j5;_.jc=k5;_.tI=0;_.b=null;_.c=null;_=l5.prototype=new vf;_.gC=o5;_.Yb=p5;_.Zb=q5;_.tI=0;_.b=null;var BO=m0(L9,Rmb),cL=n0(kjb,Smb),$K=n0(kjb,Tmb),_K=n0(kjb,Umb),aL=n0(kjb,Vmb),bL=n0(kjb,Wmb),mO=n0(whb,Xmb),lO=n0(whb,Ymb);qw(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/1.cache.js new file mode 100644 index 00000000..3a44f42f --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/1.cache.js @@ -0,0 +1,7 @@ +function pU(){} +function BU(){return _Q} +function FU(){var a;while(uU){a=uU;uU=uU.c;!uU&&(vU=null);Iw(a.b.b)}} +function gw(a,b){Xbb(a.f,b);if(!a.e){a.e=true;iw(a)}a.c=false;jw(a)} +function Iw(a){var b;a.b.b=a.b.c.blob;(nw(),mw).captureBlob(a.b.b,a.b.f,gtb);b=s0(new p0,a.b.f);a.b.d.sb(b);gw(a.b.j,a.b)} +function CU(){xU=true;wU=(zU(),new pU);Yz((Vz(),Uz),1);!!$stats&&$stats(CA(htb,hkb,null,null));wU.$b();!!$stats&&$stats(CA(htb,itb,null,null))} +var jtb='AsyncLoader1',gtb='image/JPEG',htb='runCallbacks1';_=pU.prototype=new qU;_.gC=BU;_.$b=FU;_.tI=0;var _Q=u5(Zqb,jtb);CU(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/2.cache.js new file mode 100644 index 00000000..7b5a86ac --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/2.cache.js @@ -0,0 +1,6 @@ +function NU(){} +function ZU(){return dR} +function bV(){var a;while(SU){a=SU;SU=SU.c;!SU&&(TU=null);Bo(a.b)}} +function $U(){VU=true;UU=(XU(),new NU);Yz((Vz(),Uz),2);!!$stats&&$stats(CA(ltb,hkb,null,null));UU.$b();!!$stats&&$stats(CA(ltb,itb,null,null))} +function Bo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(ktb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));tw(a.d,e.encode());return}tw(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);tw(a.d,e.encode());return}tw(a.d,a.b)}} +var mtb='AsyncLoader2',ktb='beta.canvas',ltb='runCallbacks2';_=NU.prototype=new OU;_.gC=ZU;_.$b=bV;_.tI=0;var dR=u5(Zqb,mtb);$U(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/3.cache.js new file mode 100644 index 00000000..96fe591c --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/3.cache.js @@ -0,0 +1,35 @@ +function yo(){} +function vw(){} +function Aw(){} +function RU(){} +function OU(){} +function cV(){} +function gV(){} +function eA(){_z(Uz)} +function Co(){return IO} +function zw(){return BP} +function Ew(){return CP} +function QU(){return cR} +function eV(){return aR} +function iV(){return bR} +function _z(a){Yz(a,a.e)} +function xw(a,b){a.b=b;return a} +function Cw(a,b){a.b=b;return a} +function XU(){XU=Scb;UU=new OU} +function fV(a){XU();WU=false;aV(a)} +function TJ(a,b){if(!a){return}Dw(a,b)} +function WJ(c,b){c.onprogress=function(a){XJ(b,a)}} +function Ao(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} +function Zw(a,b,c){var d;d=x3(a.g,b);st(a,c,a.I,d,true);tt(a,b)} +function ew(a,b){F8(a.g.b,b)!=null;jw(a);iw(a);Jt(a.b.f)} +function sw(a){if(a.i.d){sD((XC(),a.e.I),ntb);_U(Ao(new yo,a.b,a))}else{tw(a,a.b)}} +function iw(a){var b;if(a.f.c>0){b=CN(Zbb(a.f),37);sw(b)}else{a.e=false}} +function XJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(PN(Math.floor(c*100))+vtb)} +function Yz(a,b){var c;c=b==a.e?fkb:gkb+b;bA(c,itb,t6(b),null);if($z(a,b)){nA(a.f);F8(a.b,t6(b));dA(a)}} +function tw(a,b){var c;sD((XC(),a.e.I),otb);c=tJ().create(ptb);c.open(Jkb,(br(),Yq)+a.g.e+qtb+a.f+khb+ar);WJ(c.upload,xw(new vw,a));SJ(c,Cw(new Aw,a));c.send(b)} +function aV(a){XU();while(SU){br();hq(Dr(new Br,wtb+Lh(a)));SU=SU.c}TU=null} +function _U(a){XU();var b;b=new gV;b.b=a;!!TU&&(TU.c=b);TU=b;!SU&&(SU=b);if(VU){UU.$b();return}if(!WU){WU=true;Zz((Vz(),Uz),2,new cV)}} +function fl(a,b,c){var d,e;F8(a.b.b,b)!=null;e=c.Yb();if(e){d=du(new Ut,a,e,a.c);B8(a.g,t6(d.d),d);Lab(a.h,d);a.m.b==a&&Zw(a.m,b,d)}else{a.m.b==a&&tt(a.m,b)}} +function Dw(b,c){var a,e,f;if(c.status!=200){sD((XC(),b.b.e.I),rtb);sk(b.b._(),stb,true);br();hq(Dr(new Br,ttb+c.responseText))}(nw(),mw).remove(b.b.f);if(c.status==200){try{f=QM(c.responseText);ew(b.b.j,b.b);fl(b.b.g,b.b,f);return}catch(a){a=OT(a);if(FN(a,23)){e=a;br();hq(Dr(new Br,utb+Lh(e)+ifb+c.responseText))}else throw a}}F8(b.b.g.b.b,b.b)!=null;ew(b.b.j,b.b)} +function SJ(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){TJ(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +var vtb='%',qtb='?filename=',Btb='AsyncLoader2$1',Ctb='AsyncLoader2__Callback',Atb='AsyncLoader2__Super',xtb='AsyncResizer',wtb='Error Resizing image\n',ttb='Error Uploading\n',utb='Exception on Upload\n',ntb='Resizing..',rtb='Upload Error',ytb='UploadFile$1',ztb='UploadFile$2',otb='Uploading..',ptb='beta.httprequest',itb='end',stb='upload-error';_=yo.prototype=new Vf;_.gC=Co;_.tI=0;_.b=null;_.c=null;_.d=null;_=vw.prototype=new Vf;_.gC=zw;_.tI=0;_.b=null;_=Aw.prototype=new Vf;_.gC=Ew;_.tI=0;_.b=null;_=OU.prototype=new Vf;_.gC=QU;_.$b=RU;_.tI=0;var SU=null,TU=null,UU,VU=false,WU=false;_=cV.prototype=new Vf;_.gC=eV;_.Nb=fV;_.tI=95;_=gV.prototype=new Vf;_.gC=iV;_.tI=0;_.b=null;_.c=null;var IO=u5(Qnb,xtb),BP=u5(Qnb,ytb),CP=u5(Qnb,ztb),cR=u5(Zqb,Atb),aR=u5(Zqb,Btb),bR=u5(Zqb,Ctb);eA(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/1.cache.js new file mode 100644 index 00000000..37f81533 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/1.cache.js @@ -0,0 +1,7 @@ +function SU(){} +function cV(){return uR} +function gV(){var a;while(XU){a=XU;XU=XU.b;!XU&&(YU=null);Kw(a.a.a)}} +function iw(a,b){Hdb(a.e,b);if(!a.d){a.d=true;kw(a)}a.b=false;lw(a)} +function Kw(a){var b;a.a.a=a.a.b.blob;(pw(),ow).captureBlob(a.a.a,a.a.e,Hvb);b=F1(new C1,a.a.e);a.a.c.rb(b);iw(a.a.i,a.a)} +function dV(){$U=true;ZU=(aV(),new SU);cA((_z(),$z),1);!!$stats&&$stats(IA(Ivb,Mlb,null,null));ZU.Zb();!!$stats&&$stats(IA(Ivb,Jvb,null,null))} +var Kvb='AsyncLoader1',Hvb='image/JPEG',Ivb='runCallbacks1';_=SU.prototype=new TU;_.gC=cV;_.Zb=gV;_.tI=0;var uR=f7(ptb,Kvb);dV(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/2.cache.js new file mode 100644 index 00000000..51e8d46b --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/2.cache.js @@ -0,0 +1,6 @@ +function oV(){} +function AV(){return yR} +function EV(){var a;while(tV){a=tV;tV=tV.b;!tV&&(uV=null);Do(a.a)}} +function BV(){wV=true;vV=(yV(),new oV);cA((_z(),$z),2);!!$stats&&$stats(IA(Mvb,Mlb,null,null));vV.Zb();!!$stats&&$stats(IA(Mvb,Jvb,null,null))} +function Do(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Lvb);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));vw(a.c,e.encode());return}vw(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);vw(a.c,e.encode());return}vw(a.c,a.a)}} +var Nvb='AsyncLoader2',Lvb='beta.canvas',Mvb='runCallbacks2';_=oV.prototype=new pV;_.gC=AV;_.Zb=EV;_.tI=0;var yR=f7(ptb,Nvb);BV(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/3.cache.js new file mode 100644 index 00000000..f4fa9cb0 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/3.cache.js @@ -0,0 +1,35 @@ +function Ao(){} +function xw(){} +function Cw(){} +function sV(){} +function pV(){} +function FV(){} +function JV(){} +function kA(){fA($z)} +function Eo(){return dP} +function Bw(){return YP} +function Gw(){return ZP} +function rV(){return xR} +function HV(){return vR} +function LV(){return wR} +function fA(a){cA(a,a.d)} +function zw(a,b){a.a=b;return a} +function Ew(a,b){a.a=b;return a} +function yV(){yV=Ceb;vV=new pV} +function IV(a){yV();xV=false;DV(a)} +function pK(a,b){if(!a){return}Fw(a,b)} +function gw(a,b){pab(a.f.a,b)!=null;lw(a);kw(a);Lt(a.a.e)} +function uw(a){if(a.h.c){(UC(),a.d.H).innerText=Ovb;CV(Co(new Ao,a.a,a))}else{vw(a,a.a)}} +function _w(a,b,c){var d;d=M4(a.f,b);ut(a,c,a.H,d,true);vt(a,b)} +function sK(c,b){c.onprogress=function(a){tK(b,a)}} +function Co(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} +function DV(a){yV();while(tV){dr();jq(Fr(new Dr,Xvb+Qh(a)));tV=tV.b}uV=null} +function tK(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(lO(Math.floor(c*100))+Wvb)} +function kw(a){var b;if(a.e.b>0){b=$N(Jdb(a.e),37);uw(b)}else{a.d=false}} +function CV(a){yV();var b;b=new JV;b.a=a;!!uV&&(uV.b=b);uV=b;!tV&&(tV=b);if(wV){vV.Zb();return}if(!xV){xV=true;dA((_z(),$z),2,new FV)}} +function cA(a,b){var c;c=b==a.d?Klb:Llb+b;hA(c,Jvb,e8(b),null);if(eA(a,b)){tA(a.e);pab(a.a,e8(b));jA(a)}} +function hl(a,b,c){var d,e;pab(a.a.a,b)!=null;e=c.Xb();if(e){d=fu(new Wt,a,e,a.b);lab(a.f,e8(d.c),d);vcb(a.g,d);a.l.a==a&&_w(a.l,b,d)}else{a.l.a==a&&vt(a.l,b)}} +function Fw(b,c){var a,e,f;if(c.status!=200){(UC(),b.a.d.H).innerText=Svb;uk(b.a.$(),Tvb,true);dr();jq(Fr(new Dr,Uvb+c.responseText))}(pw(),ow).remove(b.a.e);if(c.status==200){try{f=mN(c.responseText);gw(b.a.i,b.a);hl(b.a.f,b.a,f);return}catch(a){a=pU(a);if(bO(a,23)){e=a;dr();jq(Fr(new Dr,Vvb+Qh(e)+Ngb+c.responseText))}else throw a}}pab(b.a.f.a.a,b.a)!=null;gw(b.a.i,b.a)} +function oK(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){pK(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function vw(a,b){var c;(UC(),a.d.H).innerText=Pvb;c=RJ().create(Qvb);c.open(jmb,(dr(),$q)+a.f.d+Rvb+a.e+Rib+cr);sK(c.upload,zw(new xw,a));oK(c,Ew(new Cw,a));c.send(b)} +var Wvb='%',Rvb='?filename=',awb='AsyncLoader2$1',bwb='AsyncLoader2__Callback',_vb='AsyncLoader2__Super',Yvb='AsyncResizer',Xvb='Error Resizing image\n',Uvb='Error Uploading\n',Vvb='Exception on Upload\n',Ovb='Resizing..',Svb='Upload Error',Zvb='UploadFile$1',$vb='UploadFile$2',Pvb='Uploading..',Qvb='beta.httprequest',Jvb='end',Tvb='upload-error';_=Ao.prototype=new $f;_.gC=Eo;_.tI=0;_.a=null;_.b=null;_.c=null;_=xw.prototype=new $f;_.gC=Bw;_.tI=0;_.a=null;_=Cw.prototype=new $f;_.gC=Gw;_.tI=0;_.a=null;_=pV.prototype=new $f;_.gC=rV;_.Zb=sV;_.tI=0;var tV=null,uV=null,vV,wV=false,xV=false;_=FV.prototype=new $f;_.gC=HV;_.Mb=IV;_.tI=95;_=JV.prototype=new $f;_.gC=LV;_.tI=0;_.a=null;_.b=null;var dP=f7(iqb,Yvb),YP=f7(iqb,Zvb),ZP=f7(iqb,$vb),xR=f7(ptb,_vb),vR=f7(ptb,awb),wR=f7(ptb,bwb);kA(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/1.cache.js deleted file mode 100644 index da738f77..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function RS(){} -function bT(){return BP} -function fT(){var a;while(WS){a=WS;WS=WS.c;!WS&&(XS=null);Xv(a.b.b)}} -function vv(a,b){tab(a.f,b);if(!a.e){a.e=true;xv(a)}a.c=false;yv(a)} -function Xv(a){var b;a.b.b=a.b.c.blob;(Cv(),Bv).captureBlob(a.b.b,a.b.f,orb);b=Q$(new N$,a.b.f);a.b.d.sb(b);vv(a.b.j,a.b)} -function cT(){ZS=true;YS=(_S(),new RS);Iy((Fy(),Ey),1);!!$stats&&$stats(mz(prb,Aib,null,null));YS.$b();!!$stats&&$stats(mz(prb,qrb,null,null))} -var rrb='AsyncLoader1',orb='image/JPEG',prb='runCallbacks1';_=RS.prototype=new SS;_.gC=bT;_.$b=fT;_.tI=0;var BP=S3(fpb,rrb);cT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/2.cache.js deleted file mode 100644 index 766be360..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function nT(){} -function zT(){return FP} -function DT(){var a;while(sT){a=sT;sT=sT.c;!sT&&(tT=null);qo(a.b)}} -function AT(){vT=true;uT=(xT(),new nT);Iy((Fy(),Ey),2);!!$stats&&$stats(mz(trb,Aib,null,null));uT.$b();!!$stats&&$stats(mz(trb,qrb,null,null))} -function qo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(srb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Iv(a.d,e.encode());return}Iv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Iv(a.d,e.encode());return}Iv(a.d,a.b)}} -var urb='AsyncLoader2',srb='beta.canvas',trb='runCallbacks2';_=nT.prototype=new oT;_.gC=zT;_.$b=DT;_.tI=0;var FP=S3(fpb,urb);AT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/3.cache.js deleted file mode 100644 index 8148356a..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/57F950D32C617CAE2C8052EA05BDC171/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function no(){} -function Kv(){} -function Pv(){} -function rT(){} -function oT(){} -function ET(){} -function IT(){} -function Qy(){Ly(Ey)} -function ro(){return tN} -function Ov(){return hO} -function Tv(){return iO} -function qT(){return EP} -function GT(){return CP} -function KT(){return DP} -function Ly(a){Iy(a,a.e)} -function Mv(a,b){a.b=b;return a} -function Rv(a,b){a.b=b;return a} -function xT(){xT=obb;uT=new oT} -function HT(a){xT();wT=false;CT(a)} -function EI(a,b){if(!a){return}Sv(a,b)} -function HI(c,b){c.onprogress=function(a){II(b,a)}} -function po(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function lw(a,b,c){var d;d=V1(a.g,b);Ms(a,c,a.I,d,true);Ns(a,b)} -function tv(a,b){b7(a.g.b,b)!=null;yv(a);xv(a);bt(a.b.e)} -function Hv(a){if(a.i.d){dC((IB(),a.e.I),vrb);BT(po(new no,a.b,a))}else{Iv(a,a.b)}} -function xv(a){var b;if(a.f.c>0){b=nM(vab(a.f),37);Hv(b)}else{a.e=false}} -function II(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(AM(Math.floor(c*100))+Crb)} -function Iy(a,b){var c;c=b==a.e?yib:zib+b;Ny(c,qrb,R4(b),null);if(Ky(a,b)){Zy(a.f);b7(a.b,R4(b));Py(a)}} -function Wk(a,b,c){var d,e;b7(a.b.b,b)!=null;e=c.Yb();if(e){d=xt(new mt,a,e,a.c);Z6(a.g,R4(d.d),d);h9(a.h,d);a.m.b==a&&lw(a.m,b,d)}else{a.m.b==a&&Ns(a.m,b)}} -function CT(a){xT();while(sT){To();Sq(_q(new qp,Drb+Ah(a)));sT=sT.c}tT=null} -function BT(a){xT();var b;b=new IT;b.b=a;!!tT&&(tT.c=b);tT=b;!sT&&(sT=b);if(vT){uT.$b();return}if(!wT){wT=true;Jy((Fy(),Ey),2,new ET)}} -function Sv(b,c){var a,e,f;if(c.status!=200){dC((IB(),b.b.e.I),zrb);hk(b.b._(),Arb,true)}(Cv(),Bv).remove(b.b.f);if(c.status==200){try{f=BL(c.responseText);tv(b.b.j,b.b);Wk(b.b.g,b.b,f);return}catch(a){a=oS(a);if(qM(a,23)){e=a;To();Sq(_q(new qp,Brb+Ah(e)+Gdb+c.responseText))}else throw a}}b7(b.b.g.b.b,b.b)!=null;tv(b.b.j,b.b)} -function DI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){EI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Iv(a,b){var c;dC((IB(),a.e.I),wrb);c=eI().create(xrb);c.open(ajb,(To(),Oo)+a.g.e+yrb+a.f+qfb+So);HI(c.upload,Mv(new Kv,a));DI(c,Rv(new Pv,a));c.send(b)} -var Crb='%',yrb='?filename=',Irb='AsyncLoader2$1',Jrb='AsyncLoader2__Callback',Hrb='AsyncLoader2__Super',Erb='AsyncResizer',Drb='Error Resizing image\n',Brb='Exception on Upload\n',vrb='Resizing..',zrb='Upload Error',Frb='UploadFile$1',Grb='UploadFile$2',wrb='Uploading..',xrb='beta.httprequest',qrb='end',Arb='upload-error';_=no.prototype=new Kf;_.gC=ro;_.tI=0;_.b=null;_.c=null;_.d=null;_=Kv.prototype=new Kf;_.gC=Ov;_.tI=0;_.b=null;_=Pv.prototype=new Kf;_.gC=Tv;_.tI=0;_.b=null;_=oT.prototype=new Kf;_.gC=qT;_.$b=rT;_.tI=0;var sT=null,tT=null,uT,vT=false,wT=false;_=ET.prototype=new Kf;_.gC=GT;_.Nb=HT;_.tI=89;_=IT.prototype=new Kf;_.gC=KT;_.tI=0;_.b=null;_.c=null;var tN=S3(hmb,Erb),hO=S3(hmb,Frb),iO=S3(hmb,Grb),EP=S3(fpb,Hrb),CP=S3(fpb,Irb),DP=S3(fpb,Jrb);Qy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/1.cache.js deleted file mode 100644 index f56e4467..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function sT(){} -function ET(){return WP} -function IT(){var a;while(xT){a=xT;xT=xT.b;!xT&&(yT=null);Zv(a.a.a)}} -function xv(a,b){dcb(a.e,b);if(!a.d){a.d=true;zv(a)}a.b=false;Av(a)} -function Zv(a){var b;a.a.a=a.a.b.blob;(Ev(),Dv).captureBlob(a.a.a,a.a.e,Ptb);b=b0(new $_,a.a.e);a.a.c.rb(b);xv(a.a.i,a.a)} -function FT(){AT=true;zT=(CT(),new sT);Oy((Ly(),Ky),1);!!$stats&&$stats(sz(Qtb,dkb,null,null));zT.Zb();!!$stats&&$stats(sz(Qtb,Rtb,null,null))} -var Stb='AsyncLoader1',Ptb='image/JPEG',Qtb='runCallbacks1';_=sT.prototype=new tT;_.gC=ET;_.Zb=IT;_.tI=0;var WP=D5(xrb,Stb);FT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/2.cache.js deleted file mode 100644 index 4aabbe00..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function QT(){} -function aU(){return $P} -function eU(){var a;while(VT){a=VT;VT=VT.b;!VT&&(WT=null);so(a.a)}} -function bU(){YT=true;XT=($T(),new QT);Oy((Ly(),Ky),2);!!$stats&&$stats(sz(Utb,dkb,null,null));XT.Zb();!!$stats&&$stats(sz(Utb,Rtb,null,null))} -function so(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Ttb);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));Kv(a.c,e.encode());return}Kv(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);Kv(a.c,e.encode());return}Kv(a.c,a.a)}} -var Vtb='AsyncLoader2',Ttb='beta.canvas',Utb='runCallbacks2';_=QT.prototype=new RT;_.gC=aU;_.Zb=eU;_.tI=0;var $P=D5(xrb,Vtb);bU(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/3.cache.js deleted file mode 100644 index d1cc597c..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/5C5462085DC7810C7E2A1392D87E6531/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function po(){} -function Mv(){} -function Rv(){} -function UT(){} -function RT(){} -function fU(){} -function jU(){} -function Wy(){Ry(Ky)} -function to(){return QN} -function Qv(){return EO} -function Vv(){return FO} -function TT(){return ZP} -function hU(){return XP} -function lU(){return YP} -function Ry(a){Oy(a,a.d)} -function Ov(a,b){a.a=b;return a} -function Tv(a,b){a.a=b;return a} -function $T(){$T=$cb;XT=new RT} -function iU(a){$T();ZT=false;dU(a)} -function aJ(a,b){if(!a){return}Uv(a,b)} -function dJ(c,b){c.onprogress=function(a){eJ(b,a)}} -function nw(a,b,c){var d;d=i3(a.f,b);Os(a,c,a.H,d,true);Ps(a,b)} -function ro(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} -function zv(a){var b;if(a.e.b>0){b=LM(fcb(a.e),37);Jv(b)}else{a.d=false}} -function vv(a,b){N8(a.f.a,b)!=null;Av(a);zv(a);dt(a.a.d)} -function eJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(YM(Math.floor(c*100))+bub)} -function Oy(a,b){var c;c=b==a.d?bkb:ckb+b;Ty(c,Rtb,C6(b),null);if(Qy(a,b)){dz(a.e);N8(a.a,C6(b));Vy(a)}} -function Jv(a){if(a.h.c){(FB(),a.d.H).innerText=Wtb;cU(ro(new po,a.a,a))}else{Kv(a,a.a)}} -function dU(a){$T();while(VT){Vo();Uq(br(new sp,cub+Fh(a)));VT=VT.b}WT=null} -function cU(a){$T();var b;b=new jU;b.a=a;!!WT&&(WT.b=b);WT=b;!VT&&(VT=b);if(YT){XT.Zb();return}if(!ZT){ZT=true;Py((Ly(),Ky),2,new fU)}} -function Yk(a,b,c){var d,e;N8(a.a.a,b)!=null;e=c.Xb();if(e){d=zt(new ot,a,e,a.b);J8(a.f,C6(d.c),d);Tab(a.g,d);a.l.a==a&&nw(a.l,b,d)}else{a.l.a==a&&Ps(a.l,b)}} -function Uv(b,c){var a,e,f;if(c.status!=200){(FB(),b.a.d.H).innerText=$tb;jk(b.a.$(),_tb,true)}(Ev(),Dv).remove(b.a.e);if(c.status==200){try{f=ZL(c.responseText);vv(b.a.i,b.a);Yk(b.a.f,b.a,f);return}catch(a){a=RS(a);if(OM(a,23)){e=a;Vo();Uq(br(new sp,aub+Fh(e)+jfb+c.responseText))}else throw a}}N8(b.a.f.a.a,b.a)!=null;vv(b.a.i,b.a)} -function _I(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){aJ(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Kv(a,b){var c;(FB(),a.d.H).innerText=Xtb;c=CI().create(Ytb);c.open(Ckb,(Vo(),Qo)+a.f.d+Ztb+a.e+Xgb+Uo);dJ(c.upload,Ov(new Mv,a));_I(c,Tv(new Rv,a));c.send(b)} -var bub='%',Ztb='?filename=',hub='AsyncLoader2$1',iub='AsyncLoader2__Callback',gub='AsyncLoader2__Super',dub='AsyncResizer',cub='Error Resizing image\n',aub='Exception on Upload\n',Wtb='Resizing..',$tb='Upload Error',eub='UploadFile$1',fub='UploadFile$2',Xtb='Uploading..',Ytb='beta.httprequest',Rtb='end',_tb='upload-error';_=po.prototype=new Pf;_.gC=to;_.tI=0;_.a=null;_.b=null;_.c=null;_=Mv.prototype=new Pf;_.gC=Qv;_.tI=0;_.a=null;_=Rv.prototype=new Pf;_.gC=Vv;_.tI=0;_.a=null;_=RT.prototype=new Pf;_.gC=TT;_.Zb=UT;_.tI=0;var VT=null,WT=null,XT,YT=false,ZT=false;_=fU.prototype=new Pf;_.gC=hU;_.Mb=iU;_.tI=89;_=jU.prototype=new Pf;_.gC=lU;_.tI=0;_.a=null;_.b=null;var QN=D5(Bob,dub),EO=D5(Bob,eub),FO=D5(Bob,fub),ZP=D5(xrb,gub),XP=D5(xrb,hub),YP=D5(xrb,iub);Wy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/1.cache.js new file mode 100644 index 00000000..a0dac49e --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/1.cache.js @@ -0,0 +1,7 @@ +function AU(){} +function MU(){return eR} +function QU(){var a;while(FU){a=FU;FU=FU.b;!FU&&(GU=null);Iw(a.a.a)}} +function gw(a,b){Scb(a.e,b);if(!a.d){a.d=true;iw(a)}a.b=false;jw(a)} +function Iw(a){var b;a.a.a=a.a.b.blob;(nw(),mw).captureBlob(a.a.a,a.a.e,mub);b=k1(new h1,a.a.e);a.a.c.rb(b);gw(a.a.i,a.a)} +function NU(){IU=true;HU=(KU(),new AU);_z((Yz(),Xz),1);!!$stats&&$stats(FA(nub,Ykb,null,null));HU.Zb();!!$stats&&$stats(FA(nub,oub,null,null))} +var pub='AsyncLoader1',mub='image/JPEG',nub='runCallbacks1';_=AU.prototype=new BU;_.gC=MU;_.Zb=QU;_.tI=0;var eR=q6(Yrb,pub);NU(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/2.cache.js new file mode 100644 index 00000000..453a199b --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/2.cache.js @@ -0,0 +1,6 @@ +function YU(){} +function iV(){return iR} +function mV(){var a;while(bV){a=bV;bV=bV.b;!bV&&(cV=null);Bo(a.a)}} +function jV(){eV=true;dV=(gV(),new YU);_z((Yz(),Xz),2);!!$stats&&$stats(FA(rub,Ykb,null,null));dV.Zb();!!$stats&&$stats(FA(rub,oub,null,null))} +function Bo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(qub);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));tw(a.c,e.encode());return}tw(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);tw(a.c,e.encode());return}tw(a.c,a.a)}} +var sub='AsyncLoader2',qub='beta.canvas',rub='runCallbacks2';_=YU.prototype=new ZU;_.gC=iV;_.Zb=mV;_.tI=0;var iR=q6(Yrb,sub);jV(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/3.cache.js new file mode 100644 index 00000000..b5795b52 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/3.cache.js @@ -0,0 +1,35 @@ +function yo(){} +function vw(){} +function Aw(){} +function aV(){} +function ZU(){} +function nV(){} +function rV(){} +function hA(){cA(Xz)} +function Co(){return PO} +function zw(){return IP} +function Ew(){return JP} +function _U(){return hR} +function pV(){return fR} +function tV(){return gR} +function cA(a){_z(a,a.d)} +function xw(a,b){a.a=b;return a} +function Cw(a,b){a.a=b;return a} +function gV(){gV=Ndb;dV=new ZU} +function qV(a){gV();fV=false;lV(a)} +function _J(a,b){if(!a){return}Dw(a,b)} +function ew(a,b){A9(a.f.a,b)!=null;jw(a);iw(a);Jt(a.a.e)} +function sw(a){if(a.h.c){(QC(),a.d.H).innerText=tub;kV(Ao(new yo,a.a,a))}else{tw(a,a.a)}} +function Zw(a,b,c){var d;d=p4(a.f,b);st(a,c,a.H,d,true);tt(a,b)} +function cK(c,b){c.onprogress=function(a){dK(b,a)}} +function iw(a){var b;if(a.e.b>0){b=KN(Ucb(a.e),37);sw(b)}else{a.d=false}} +function dK(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(XN(Math.floor(c*100))+Bub)} +function lV(a){gV();while(bV){br();hq(Dr(new Br,Cub+Oh(a)));bV=bV.b}cV=null} +function Ao(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} +function _z(a,b){var c;c=b==a.d?Wkb:Xkb+b;eA(c,oub,p7(b),null);if(bA(a,b)){qA(a.e);A9(a.a,p7(b));gA(a)}} +function tw(a,b){var c;(QC(),a.d.H).innerText=uub;c=BJ().create(vub);c.open(tlb,(br(),Yq)+a.f.d+wub+a.e+bib+ar);cK(c.upload,xw(new vw,a));$J(c,Cw(new Aw,a));c.send(b)} +function kV(a){gV();var b;b=new rV;b.a=a;!!cV&&(cV.b=b);cV=b;!bV&&(bV=b);if(eV){dV.Zb();return}if(!fV){fV=true;aA((Yz(),Xz),2,new nV)}} +function fl(a,b,c){var d,e;A9(a.a.a,b)!=null;e=c.Xb();if(e){d=du(new Ut,a,e,a.b);w9(a.f,p7(d.c),d);Gbb(a.g,d);a.l.a==a&&Zw(a.l,b,d)}else{a.l.a==a&&tt(a.l,b)}} +function Dw(b,c){var a,e,f;if(c.status!=200){(QC(),b.a.d.H).innerText=xub;sk(b.a.$(),yub,true);br();hq(Dr(new Br,zub+c.responseText))}(nw(),mw).remove(b.a.e);if(c.status==200){try{f=YM(c.responseText);ew(b.a.i,b.a);fl(b.a.f,b.a,f);return}catch(a){a=ZT(a);if(NN(a,23)){e=a;br();hq(Dr(new Br,Aub+Oh(e)+Zfb+c.responseText))}else throw a}}A9(b.a.f.a.a,b.a)!=null;ew(b.a.i,b.a)} +function $J(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){_J(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +var Bub='%',wub='?filename=',Hub='AsyncLoader2$1',Iub='AsyncLoader2__Callback',Gub='AsyncLoader2__Super',Dub='AsyncResizer',Cub='Error Resizing image\n',zub='Error Uploading\n',Aub='Exception on Upload\n',tub='Resizing..',xub='Upload Error',Eub='UploadFile$1',Fub='UploadFile$2',uub='Uploading..',vub='beta.httprequest',oub='end',yub='upload-error';_=yo.prototype=new Yf;_.gC=Co;_.tI=0;_.a=null;_.b=null;_.c=null;_=vw.prototype=new Yf;_.gC=zw;_.tI=0;_.a=null;_=Aw.prototype=new Yf;_.gC=Ew;_.tI=0;_.a=null;_=ZU.prototype=new Yf;_.gC=_U;_.Zb=aV;_.tI=0;var bV=null,cV=null,dV,eV=false,fV=false;_=nV.prototype=new Yf;_.gC=pV;_.Mb=qV;_.tI=95;_=rV.prototype=new Yf;_.gC=tV;_.tI=0;_.a=null;_.b=null;var PO=q6(Rob,Dub),IP=q6(Rob,Eub),JP=q6(Rob,Fub),hR=q6(Yrb,Gub),fR=q6(Yrb,Hub),gR=q6(Yrb,Iub);hA(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/1.cache.js new file mode 100644 index 00000000..4428a14f --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/1.cache.js @@ -0,0 +1,9 @@ +function wQ(){} +function tQ(){} +function CQ(){} +function sQ(){} +function AQ(){return fN} +function vQ(){return eN} +function yQ(){yQ=m8;xQ=new tQ} +function BQ(){xQ=(yQ(),new sQ);sx((px(),ox),1);!!$stats&&$stats(Yx(snb,tnb,null,null));xQ.Tb();!!$stats&&$stats(Yx(snb,unb,null,null))} +var xnb='AsyncLoader1',wnb='AsyncLoader1__Super',snb='runCallbacks1';_=tQ.prototype=new zf;_.gC=vQ;_.Tb=wQ;_.tI=0;_=sQ.prototype=new tQ;_.gC=AQ;_.Tb=CQ;_.tI=0;var xQ;var eN=S0(vnb,wnb),fN=S0(vnb,xnb);BQ(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/2.cache.js new file mode 100644 index 00000000..fe89e09b --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/2.cache.js @@ -0,0 +1,9 @@ +function HQ(){} +function EQ(){} +function NQ(){} +function DQ(){} +function LQ(){return hN} +function GQ(){return gN} +function JQ(){JQ=m8;IQ=new EQ} +function MQ(){IQ=(JQ(),new DQ);sx((px(),ox),2);!!$stats&&$stats(Yx(ynb,tnb,null,null));IQ.Tb();!!$stats&&$stats(Yx(ynb,unb,null,null))} +var Anb='AsyncLoader2',znb='AsyncLoader2__Super',ynb='runCallbacks2';_=EQ.prototype=new zf;_.gC=GQ;_.Tb=HQ;_.tI=0;_=DQ.prototype=new EQ;_.gC=LQ;_.Tb=NQ;_.tI=0;var IQ;var gN=S0(vnb,znb),hN=S0(vnb,Anb);MQ(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/3.cache.js new file mode 100644 index 00000000..efb84b56 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/3.cache.js @@ -0,0 +1,54 @@ +function nx(){} +function Bx(){} +function Lx(){} +function Px(){} +function ey(){} +function J5(){} +function R5(){} +function zx(){ux(ox)} +function Ax(){return gM} +function Kx(){return cM} +function Ox(){return dM} +function Tx(){return eM} +function hy(){return fM} +function O5(){return jP} +function U5(){return iP} +function ux(a){sx(a,a.d)} +function Ux(a){Sx(this,a)} +function Gx(a){a.c=0;a.d=0} +function Jx(a){return a.d-a.c} +function O1(){return this.b} +function Q5(){return this.c.b.e} +function Hx(a){return a.b[a.c]} +function Fx(a,b){a.b[a.d++]=b} +function Rx(a,b){a.b=b;return a} +function T5(a,b){a.b=b;return a} +function V5(){return m5(this.b.b)} +function Ix(a){return a.b[a.c++]} +function N5(a){return S3(this.b,a)} +function Nx(a,b){cz(a);a.g=Dnb+b;return a} +function gy(a,b,c){a.c=b;a.b=c;return a} +function L5(a,b,c){a.b=b;a.c=c;return a} +function Ex(a,b){a.b=LJ(yP,0,-1,b,1);return a} +function wx(a,b,c,d){!!$stats&&$stats(Yx(a,b,c,d))} +function cy(b,c){function d(a){c.Hb(a)} +return __gwtStartLoadingFragment(b,d)} +function W5(){var a;a=_J(n5(this.b.b),61).hc();return a} +function P5(){var a;a=x4(new v4,this.c.b);return T5(new R5,a)} +function px(){px=m8;ox=rx(new nx,3,MJ(yP,0,-1,[]))} +function F3(a){var b;b=n4(new g4,a);return L5(new J5,a,b)} +function v7(a){if(a.c==0){throw e8(new c8)}} +function t7(a){var b;v7(a);--a.c;b=a.b.b;P7(b);return b.d} +function sx(a,b){var c;c=b==a.d?Bnb:Cnb+b;wx(c,unb,R1(b),null);if(tx(a,b)){Ix(a.e);a4(a.b,R1(b));yx(a)}} +function dy(a,b){var c,d;c=cy(a,b);if(c==null){return}d=v0();d.open(zfb,c,true);t0(d,gy(new ey,d,b));d.send(null)} +function tx(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e1){return}if(Jx(a.e)>0){c=Hx(a.e);wx(c==a.d?Bnb:Cnb+c,tnb,R1(c),null);dy(c,Rx(new Px,a));return}while(Jx(a.f)>0){c=Ix(a.f);b=_J(t7(a.g),41);wx(c==a.d?Bnb:Cnb+c,tnb,R1(c),null);dy(c,b)}} +function Sx(b,c){var a,e,f,g,h,i;h=f6(new c6);while(Jx(b.b.f)>0){g6(h,_J(t7(b.b.g),41));Ix(b.b.f)}Gx(b.b.f);i6(h,F3(b.b.b));O3(b.b.b);i=null;for(g=l5(new i5,h);g.b1){return}if(vw(a.e)>0){c=tw(a.e);iw(c==a.d?_lb:amb+c,Tlb,C0(c),null);Rw(c,Dw(new Bw,a));return}while(vw(a.f)>0){c=uw(a.f);b=OI(d6(a.g),41);iw(c==a.d?_lb:amb+c,Tlb,C0(c),null);Rw(c,b)}} -function Ew(b,c){var a,e,f,g,h,i;h=R4(new O4);while(vw(b.b.f)>0){S4(h,OI(d6(b.b.g),41));uw(b.b.f)}sw(b.b.f);U4(h,p2(b.b.b));y2(b.b.b);i=null;for(g=X3(new U3,h);g.b1){return}if(tw(a.e)>0){c=rw(a.e);gw(c==a.d?Jlb:Klb+c,Blb,n0(c),null);Pw(c,Bw(new zw,a));return}while(tw(a.f)>0){c=sw(a.f);b=MI(R5(a.g),41);gw(c==a.d?Jlb:Klb+c,Blb,n0(c),null);Pw(c,b)}} -function Cw(b,c){var a,e,f,g,h,i;h=D4(new A4);while(tw(b.b.f)>0){E4(h,MI(R5(b.b.g),41));sw(b.b.f)}qw(b.b.f);G4(h,b2(b.b.b));k2(b.b.b);i=null;for(g=J3(new G3,h);g.b0){b7(h,hK(o8(b.a.f),41));Lx(b.a.e)}Jx(b.a.e);d7(h,A4(b.a.a));J4(b.a.a);i=null;for(g=g6(new d6,h);g.a1){return}if(Mx(a.d)>0){c=Kx(a.d);zx(c==a.c?Job:Kob+c,Bob,N2(c),null);gy(c,Ux(new Sx,a));return}while(Mx(a.e)>0){c=Lx(a.e);b=hK(o8(a.f),41);zx(c==a.c?Job:Kob+c,Bob,N2(c),null);gy(c,b)}} +var Tob='AbstractMap$2',Uob='AbstractMap$2$1',Oob='AsyncFragmentLoader',Pob='AsyncFragmentLoader$BoundedIntQueue',Qob='AsyncFragmentLoader$HttpDownloadFailure',Rob='AsyncFragmentLoader$InitialFragmentDownloadFailed',Sob='AsyncFragmentLoader$XhrLoadingStrategy$1',Lob='HTTP download failed with status ',Nob='[I',Bob='begin',Dob='com.google.gwt.lang.asyncloaders.',Kob='download',Cob='end',Job='leftoversDownload',Mob='runAsync';_=qx.prototype=new Cf;_.gC=Dx;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var rx;_=Ex.prototype=new Cf;_.gC=Nx;_.tI=0;_.a=null;_.b=0;_.c=0;_=Ox.prototype=new kw;_.gC=Rx;_.tI=76;_=Sx.prototype=new Cf;_.gC=Wx;_.Gb=Xx;_.tI=77;_.a=null;_=hy.prototype=new Cf;_.gC=ky;_.Hb=ly;_.tI=0;_.a=null;_.b=null;_=C2.prototype;_.ac=K2;_=E6.prototype=new l4;_.cc=I6;_.gC=J6;_.nb=K6;_.dc=L6;_.tI=0;_.a=null;_.b=null;_=M6.prototype=new Cf;_.gC=P6;_.Tb=Q6;_.Ub=R6;_.tI=0;_.a=null;var JP=N1(lbb,Nob),nM=O1(ilb,Oob),jM=O1(ilb,Pob),kM=O1(ilb,Qob),lM=O1(ilb,Rob),mM=O1(ilb,Sob),uP=O1(jjb,Tob),tP=O1(jjb,Uob);Cx(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/1.cache.js new file mode 100644 index 00000000..5cd9b09c --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/1.cache.js @@ -0,0 +1,9 @@ +function zQ(){} +function wQ(){} +function FQ(){} +function vQ(){} +function DQ(){return hN} +function yQ(){return gN} +function BQ(){BQ=A8;AQ=new wQ} +function EQ(){AQ=(BQ(),new vQ);ux((rx(),qx),1);!!$stats&&$stats($x(Knb,Lnb,null,null));AQ.Sb();!!$stats&&$stats($x(Knb,Mnb,null,null))} +var Pnb='AsyncLoader1',Onb='AsyncLoader1__Super',Knb='runCallbacks1';_=wQ.prototype=new Af;_.gC=yQ;_.Sb=zQ;_.tI=0;_=vQ.prototype=new wQ;_.gC=DQ;_.Sb=FQ;_.tI=0;var AQ;var gN=f1(Nnb,Onb),hN=f1(Nnb,Pnb);EQ(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/2.cache.js new file mode 100644 index 00000000..4ffb2aa4 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/2.cache.js @@ -0,0 +1,9 @@ +function KQ(){} +function HQ(){} +function QQ(){} +function GQ(){} +function OQ(){return jN} +function JQ(){return iN} +function MQ(){MQ=A8;LQ=new HQ} +function PQ(){LQ=(MQ(),new GQ);ux((rx(),qx),2);!!$stats&&$stats($x(Qnb,Lnb,null,null));LQ.Sb();!!$stats&&$stats($x(Qnb,Mnb,null,null))} +var Snb='AsyncLoader2',Rnb='AsyncLoader2__Super',Qnb='runCallbacks2';_=HQ.prototype=new Af;_.gC=JQ;_.Sb=KQ;_.tI=0;_=GQ.prototype=new HQ;_.gC=OQ;_.Sb=QQ;_.tI=0;var LQ;var iN=f1(Nnb,Rnb),jN=f1(Nnb,Snb);PQ(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/3.cache.js new file mode 100644 index 00000000..114ed2d9 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/3.cache.js @@ -0,0 +1,54 @@ +function px(){} +function Dx(){} +function Nx(){} +function Rx(){} +function gy(){} +function X5(){} +function d6(){} +function Bx(){wx(qx)} +function Cx(){return iM} +function Mx(){return eM} +function Qx(){return fM} +function Vx(){return gM} +function jy(){return hM} +function a6(){return mP} +function g6(){return lP} +function wx(a){ux(a,a.d)} +function Wx(a){Ux(this,a)} +function Ix(a){a.c=0;a.d=0} +function Lx(a){return a.d-a.c} +function b2(){return this.b} +function c6(){return this.c.b.e} +function Jx(a){return a.b[a.c]} +function Hx(a,b){a.b[a.d++]=b} +function Tx(a,b){a.b=b;return a} +function f6(a,b){a.b=b;return a} +function h6(){return A5(this.b.b)} +function Kx(a){return a.b[a.c++]} +function _5(a){return e4(this.b,a)} +function J7(a){if(a.c==0){throw s8(new q8)}} +function Z5(a,b,c){a.b=b;a.c=c;return a} +function iy(a,b,c){a.c=b;a.b=c;return a} +function Px(a,b){fz(a);a.g=Vnb+b;return a} +function Gx(a,b){a.b=NJ(BP,0,-1,b,1);return a} +function H7(a){var b;J7(a);--a.c;b=a.b.b;b8(b);return b.d} +function i6(){var a;a=bK(B5(this.b.b),61).gc();return a} +function b6(){var a;a=L4(new J4,this.c.b);return f6(new d6,a)} +function T3(a){var b;b=B4(new u4,a);return Z5(new X5,a,b)} +function yx(a,b,c,d){!!$stats&&$stats($x(a,b,c,d))} +function ey(b,c){function d(a){c.Hb(a)} +return __gwtStartLoadingFragment(b,d)} +function e4(a,b){if(a.d&&j7(a.c,b)){return true}else if(d4(a,b)){return true}else if(b4(a,b)){return true}return false} +function tx(a,b,c){rx();a.b=h7(new f7);a.g=D7(new B7);a.d=b;a.c=c;a.f=Gx(new Dx,b+1);return a} +function rx(){rx=A8;qx=tx(new px,3,OJ(BP,0,-1,[]))} +function fy(a,b){var c,d;c=ey(a,b);if(c==null){return}d=K0();d.open(Nfb,c,true);I0(d,iy(new gy,d,b));d.send(null)} +function vx(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e0){u6(h,bK(H7(b.b.g),41));Kx(b.b.f)}Ix(b.b.f);w6(h,T3(b.b.b));a4(b.b.b);i=null;for(g=z5(new w5,h);g.b1){return}if(Lx(a.e)>0){c=Jx(a.e);yx(c==a.d?Tnb:Unb+c,Lnb,e2(c),null);fy(c,Tx(new Rx,a));return}while(Lx(a.f)>0){c=Kx(a.f);b=bK(H7(a.g),41);yx(c==a.d?Tnb:Unb+c,Lnb,e2(c),null);fy(c,b)}} +var bob='AbstractMap$2',cob='AbstractMap$2$1',Ynb='AsyncFragmentLoader',Znb='AsyncFragmentLoader$BoundedIntQueue',$nb='AsyncFragmentLoader$HttpDownloadFailure',_nb='AsyncFragmentLoader$InitialFragmentDownloadFailed',aob='AsyncFragmentLoader$XhrLoadingStrategy$1',Vnb='HTTP download failed with status ',Xnb='[I',Lnb='begin',Nnb='com.google.gwt.lang.asyncloaders.',Unb='download',Mnb='end',Tnb='leftoversDownload',Wnb='runAsync';_=px.prototype=new Af;_.gC=Cx;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var qx;_=Dx.prototype=new Af;_.gC=Mx;_.tI=0;_.b=null;_.c=0;_.d=0;_=Nx.prototype=new mw;_.gC=Qx;_.tI=76;_=Rx.prototype=new Af;_.gC=Vx;_.Hb=Wx;_.tI=77;_.b=null;_=gy.prototype=new Af;_.gC=jy;_.Ib=ky;_.tI=0;_.b=null;_.c=null;_=V1.prototype;_._b=b2;_=X5.prototype=new E3;_.bc=_5;_.gC=a6;_.ob=b6;_.cc=c6;_.tI=0;_.b=null;_.c=null;_=d6.prototype=new Af;_.gC=g6;_.Tb=h6;_.Ub=i6;_.tI=0;_.b=null;var BP=e1(Dab,Xnb),iM=f1(wkb,Ynb),eM=f1(wkb,Znb),fM=f1(wkb,$nb),gM=f1(wkb,_nb),hM=f1(wkb,aob),mP=f1(xib,bob),lP=f1(xib,cob);Bx(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/1.cache.js new file mode 100644 index 00000000..4f191dc0 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/1.cache.js @@ -0,0 +1,7 @@ +function SU(){} +function cV(){return yR} +function gV(){var a;while(XU){a=XU;XU=XU.c;!XU&&(YU=null);Pw(a.b.b)}} +function nw(a,b){Wcb(a.f,b);if(!a.e){a.e=true;pw(a)}a.c=false;qw(a)} +function Pw(a){var b;a.b.b=a.b.c.blob;(uw(),tw).captureBlob(a.b.b,a.b.f,lub);b=_0(new Y0,a.b.f);a.b.d.sb(b);nw(a.b.j,a.b)} +function dV(){$U=true;ZU=(aV(),new SU);dA((aA(),_z),1);!!$stats&&$stats(JA(mub,blb,null,null));ZU.cc();!!$stats&&$stats(JA(mub,nub,null,null))} +var oub='AsyncLoader1',lub='image/JPEG',mub='runCallbacks1';_=SU.prototype=new TU;_.gC=cV;_.cc=gV;_.tI=0;var yR=u6($rb,oub);dV(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/2.cache.js new file mode 100644 index 00000000..35fe43df --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/2.cache.js @@ -0,0 +1,6 @@ +function oV(){} +function AV(){return CR} +function EV(){var a;while(tV){a=tV;tV=tV.c;!tV&&(uV=null);Io(a.b)}} +function BV(){wV=true;vV=(yV(),new oV);dA((aA(),_z),2);!!$stats&&$stats(JA(qub,blb,null,null));vV.cc();!!$stats&&$stats(JA(qub,nub,null,null))} +function Io(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(pub);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Aw(a.d,e.encode());return}Aw(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Aw(a.d,e.encode());return}Aw(a.d,a.b)}} +var rub='AsyncLoader2',pub='beta.canvas',qub='runCallbacks2';_=oV.prototype=new pV;_.gC=AV;_.cc=EV;_.tI=0;var CR=u6($rb,rub);BV(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/3.cache.js new file mode 100644 index 00000000..a7e3e3d6 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/3.cache.js @@ -0,0 +1,35 @@ +function Fo(){} +function Cw(){} +function Hw(){} +function sV(){} +function pV(){} +function FV(){} +function JV(){} +function lA(){gA(_z)} +function Jo(){return cP} +function Gw(){return XP} +function Lw(){return YP} +function rV(){return BR} +function HV(){return zR} +function LV(){return AR} +function gA(a){dA(a,a.e)} +function Ew(a,b){a.b=b;return a} +function Jw(a,b){a.b=b;return a} +function yV(){yV=Rdb;vV=new pV} +function IV(a){yV();xV=false;DV(a)} +function nK(a,b){if(!a){return}Kw(a,b)} +function qK(c,b){c.onprogress=function(a){rK(b,a)}} +function Ho(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} +function ex(a,b,c){var d;d=e4(a.g,b);zt(a,c,a.I,d,true);At(a,b)} +function lw(a,b){E9(a.g.b,b)!=null;qw(a);pw(a);Qt(a.b.f)} +function zw(a){if(a.i.d){LD((rD(),a.e.I),sub);CV(Ho(new Fo,a.b,a))}else{Aw(a,a.b)}} +function DV(a){yV();while(tV){ir();oq(Kr(new Ir,Bub+Sh(a)));tV=tV.c}uV=null} +function rK(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(jO(Math.floor(c*100))+Aub)} +function dA(a,b){var c;c=b==a.e?_kb:alb+b;iA(c,nub,t7(b),null);if(fA(a,b)){uA(a.f);E9(a.b,t7(b));kA(a)}} +function pw(a){var b;if(a.f.c>0){b=YN(Ycb(a.f),37);zw(b)}else{a.e=false}} +function CV(a){yV();var b;b=new JV;b.b=a;!!uV&&(uV.c=b);uV=b;!tV&&(tV=b);if(wV){vV.cc();return}if(!xV){xV=true;eA((aA(),_z),2,new FV)}} +function ml(a,b,c){var d,e;E9(a.b.b,b)!=null;e=c.ac();if(e){d=ku(new _t,a,e,a.c);A9(a.g,t7(d.d),d);Kbb(a.h,d);a.m.b==a&&ex(a.m,b,d)}else{a.m.b==a&&At(a.m,b)}} +function Kw(b,c){var a,e,f;if(c.status!=200){LD((rD(),b.b.e.I),wub);zk(b.b._(),xub,true);ir();oq(Kr(new Ir,yub+c.responseText))}(uw(),tw).remove(b.b.f);if(c.status==200){try{f=kN(c.responseText);lw(b.b.j,b.b);ml(b.b.g,b.b,f);return}catch(a){a=pU(a);if(_N(a,23)){e=a;ir();oq(Kr(new Ir,zub+Sh(e)+cgb+c.responseText))}else throw a}}E9(b.b.g.b.b,b.b)!=null;lw(b.b.j,b.b)} +function mK(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){nK(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function Aw(a,b){var c;LD((rD(),a.e.I),tub);c=PJ().create(uub);c.open(Hlb,(ir(),dr)+a.g.e+vub+a.f+eib+hr);qK(c.upload,Ew(new Cw,a));mK(c,Jw(new Hw,a));c.send(b)} +var Aub='%',vub='?filename=',Gub='AsyncLoader2$1',Hub='AsyncLoader2__Callback',Fub='AsyncLoader2__Super',Cub='AsyncResizer',Bub='Error Resizing image\n',yub='Error Uploading\n',zub='Exception on Upload\n',sub='Resizing..',wub='Upload Error',Dub='UploadFile$1',Eub='UploadFile$2',tub='Uploading..',uub='beta.httprequest',nub='end',xub='upload-error';_=Fo.prototype=new ag;_.gC=Jo;_.tI=0;_.b=null;_.c=null;_.d=null;_=Cw.prototype=new ag;_.gC=Gw;_.tI=0;_.b=null;_=Hw.prototype=new ag;_.gC=Lw;_.tI=0;_.b=null;_=pV.prototype=new ag;_.gC=rV;_.cc=sV;_.tI=0;var tV=null,uV=null,vV,wV=false,xV=false;_=FV.prototype=new ag;_.gC=HV;_.Nb=IV;_.tI=95;_=JV.prototype=new ag;_.gC=LV;_.tI=0;_.b=null;_.c=null;var cP=u6(Oob,Cub),XP=u6(Oob,Dub),YP=u6(Oob,Eub),BR=u6($rb,Fub),zR=u6($rb,Gub),AR=u6($rb,Hub);lA(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/1.cache.js deleted file mode 100644 index 50d9d10e..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function zP(){} -function wP(){} -function FP(){} -function vP(){} -function DP(){return aM} -function yP(){return _L} -function BP(){BP=u8;AP=new wP} -function EP(){AP=(BP(),new vP);iw((fw(),ew),1);!!$stats&&$stats(Ow(bob,cob,null,null));AP.Sb();!!$stats&&$stats(Ow(bob,dob,null,null))} -var gob='AsyncLoader1',fob='AsyncLoader1__Super',bob='runCallbacks1';_=wP.prototype=new tf;_.gC=yP;_.Sb=zP;_.tI=0;_=vP.prototype=new wP;_.gC=DP;_.Sb=FP;_.tI=0;var AP;var _L=_0(eob,fob),aM=_0(eob,gob);EP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/2.cache.js deleted file mode 100644 index e41ad8b3..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function KP(){} -function HP(){} -function QP(){} -function GP(){} -function OP(){return cM} -function JP(){return bM} -function MP(){MP=u8;LP=new HP} -function PP(){LP=(MP(),new GP);iw((fw(),ew),2);!!$stats&&$stats(Ow(hob,cob,null,null));LP.Sb();!!$stats&&$stats(Ow(hob,dob,null,null))} -var job='AsyncLoader2',iob='AsyncLoader2__Super',hob='runCallbacks2';_=HP.prototype=new tf;_.gC=JP;_.Sb=KP;_.tI=0;_=GP.prototype=new HP;_.gC=OP;_.Sb=QP;_.tI=0;var LP;var bM=_0(eob,iob),cM=_0(eob,job);PP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/3.cache.js deleted file mode 100644 index 3ed4ddeb..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/ACE6F9D8917D340A8A0D301E71E5507A/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function dw(){} -function rw(){} -function Bw(){} -function Fw(){} -function Ww(){} -function R5(){} -function Z5(){} -function pw(){kw(ew)} -function qw(){return dL} -function Aw(){return _K} -function Ew(){return aL} -function Jw(){return bL} -function Zw(){return cL} -function W5(){return mO} -function a6(){return lO} -function kw(a){iw(a,a.c)} -function Kw(a){Iw(this,a)} -function ww(a){a.b=0;a.c=0} -function zw(a){return a.c-a.b} -function X1(){return this.a} -function xw(a){return a.a[a.b]} -function vw(a,b){a.a[a.c++]=b} -function Hw(a,b){a.a=b;return a} -function _5(a,b){a.a=b;return a} -function yw(a){return a.a[a.b++]} -function Y5(){return this.b.a.d} -function b6(){return u5(this.a.a)} -function V5(a){return $3(this.a,a)} -function D7(a){if(a.b==0){throw m8(new k8)}} -function T5(a,b,c){a.a=b;a.b=c;return a} -function Yw(a,b,c){a.b=b;a.a=c;return a} -function Dw(a,b){Wx(a);a.f=mob+b;return a} -function uw(a,b){a.a=UI(BO,0,-1,b,1);return a} -function N3(a){var b;b=v4(new o4,a);return T5(new R5,a,b)} -function X5(){var a;a=F4(new D4,this.b.a);return _5(new Z5,a)} -function c6(){var a;a=iJ(v5(this.a.a),61).hc();return a} -function B7(a){var b;D7(a);--a.b;b=a.a.a;X7(b);return b.c} -function mw(a,b,c,d){!!$stats&&$stats(Ow(a,b,c,d))} -function Uw(b,c){function d(a){c.Gb(a)} -return __gwtStartLoadingFragment(b,d)} -function $3(a,b){if(a.c&&d7(a.b,b)){return true}else if(Z3(a,b)){return true}else if(X3(a,b)){return true}return false} -function hw(a,b,c){fw();a.a=b7(new _6);a.f=x7(new v7);a.c=b;a.b=c;a.e=uw(new rw,b+1);return a} -function fw(){fw=u8;ew=hw(new dw,3,VI(BO,0,-1,[]))} -function Vw(a,b){var c,d;c=Uw(a,b);if(c==null){return}d=E0();d.open(ufb,c,true);C0(d,Yw(new Ww,d,b));d.send(null)} -function jw(a,b){var c,d,e,f;if(b==a.c){return true}for(d=a.b,e=0,f=d.length;e0){o6(h,iJ(B7(b.a.f),41));yw(b.a.e)}ww(b.a.e);q6(h,N3(b.a.a));W3(b.a.a);i=null;for(g=t5(new q5,h);g.a1){return}if(zw(a.d)>0){c=xw(a.d);mw(c==a.c?kob:lob+c,cob,$1(c),null);Vw(c,Hw(new Fw,a));return}while(zw(a.e)>0){c=yw(a.e);b=iJ(B7(a.f),41);mw(c==a.c?kob:lob+c,cob,$1(c),null);Vw(c,b)}} -var uob='AbstractMap$2',vob='AbstractMap$2$1',pob='AsyncFragmentLoader',qob='AsyncFragmentLoader$BoundedIntQueue',rob='AsyncFragmentLoader$HttpDownloadFailure',sob='AsyncFragmentLoader$InitialFragmentDownloadFailed',tob='AsyncFragmentLoader$XhrLoadingStrategy$1',mob='HTTP download failed with status ',oob='[I',cob='begin',eob='com.google.gwt.lang.asyncloaders.',lob='download',dob='end',kob='leftoversDownload',nob='runAsync';_=dw.prototype=new tf;_.gC=qw;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var ew;_=rw.prototype=new tf;_.gC=Aw;_.tI=0;_.a=null;_.b=0;_.c=0;_=Bw.prototype=new Zu;_.gC=Ew;_.tI=70;_=Fw.prototype=new tf;_.gC=Jw;_.Gb=Kw;_.tI=71;_.a=null;_=Ww.prototype=new tf;_.gC=Zw;_.Hb=$w;_.tI=0;_.a=null;_.b=null;_=P1.prototype;_.ac=X1;_=R5.prototype=new y3;_.cc=V5;_.gC=W5;_.nb=X5;_.dc=Y5;_.tI=0;_.a=null;_.b=null;_=Z5.prototype=new tf;_.gC=a6;_.Tb=b6;_.Ub=c6;_.tI=0;_.a=null;var BO=$0(xab,oob),dL=_0(Jkb,pob),_K=_0(Jkb,qob),aL=_0(Jkb,rob),bL=_0(Jkb,sob),cL=_0(Jkb,tob),mO=_0(Vib,uob),lO=_0(Vib,vob);pw(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/1.cache.js deleted file mode 100644 index 300922b0..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function sT(){} -function ET(){return $P} -function IT(){var a;while(xT){a=xT;xT=xT.c;!xT&&(yT=null);cw(a.b.b)}} -function Cv(a,b){sbb(a.f,b);if(!a.e){a.e=true;Ev(a)}a.c=false;Fv(a)} -function cw(a){var b;a.b.b=a.b.c.blob;(Jv(),Iv).captureBlob(a.b.b,a.b.f,tsb);b=x_(new u_,a.b.f);a.b.d.sb(b);Cv(a.b.j,a.b)} -function FT(){AT=true;zT=(CT(),new sT);Py((My(),Ly),1);!!$stats&&$stats(tz(usb,ujb,null,null));zT.cc();!!$stats&&$stats(tz(usb,vsb,null,null))} -var wsb='AsyncLoader1',tsb='image/JPEG',usb='runCallbacks1';_=sT.prototype=new tT;_.gC=ET;_.cc=IT;_.tI=0;var $P=S4(gqb,wsb);FT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/2.cache.js deleted file mode 100644 index 8bfe1dc7..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function QT(){} -function aU(){return cQ} -function eU(){var a;while(VT){a=VT;VT=VT.c;!VT&&(WT=null);xo(a.b)}} -function bU(){YT=true;XT=($T(),new QT);Py((My(),Ly),2);!!$stats&&$stats(tz(ysb,ujb,null,null));XT.cc();!!$stats&&$stats(tz(ysb,vsb,null,null))} -function xo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(xsb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Pv(a.d,e.encode());return}Pv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Pv(a.d,e.encode());return}Pv(a.d,a.b)}} -var zsb='AsyncLoader2',xsb='beta.canvas',ysb='runCallbacks2';_=QT.prototype=new RT;_.gC=aU;_.cc=eU;_.tI=0;var cQ=S4(gqb,zsb);bU(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/3.cache.js deleted file mode 100644 index 40130613..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/C3A8CA313CFDC8DB1F2ED097816C6EC0/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function uo(){} -function Rv(){} -function Wv(){} -function UT(){} -function RT(){} -function fU(){} -function jU(){} -function Xy(){Sy(Ly)} -function yo(){return PN} -function Vv(){return DO} -function $v(){return EO} -function TT(){return bQ} -function hU(){return _P} -function lU(){return aQ} -function Sy(a){Py(a,a.e)} -function Tv(a,b){a.b=b;return a} -function Yv(a,b){a.b=b;return a} -function $T(){$T=ncb;XT=new RT} -function iU(a){$T();ZT=false;dU(a)} -function $I(a,b){if(!a){return}Zv(a,b)} -function Av(a,b){a8(a.g.b,b)!=null;Fv(a);Ev(a);it(a.b.e)} -function Ov(a){if(a.i.d){wC((cC(),a.e.I),Asb);cU(wo(new uo,a.b,a))}else{Pv(a,a.b)}} -function sw(a,b,c){var d;d=C2(a.g,b);Ts(a,c,a.I,d,true);Us(a,b)} -function bJ(c,b){c.onprogress=function(a){cJ(b,a)}} -function wo(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} -function dU(a){$T();while(VT){$o();Zq(gr(new xp,Isb+Hh(a)));VT=VT.c}WT=null} -function Ev(a){var b;if(a.f.c>0){b=JM(ubb(a.f),37);Ov(b)}else{a.e=false}} -function Py(a,b){var c;c=b==a.e?sjb:tjb+b;Uy(c,vsb,R5(b),null);if(Ry(a,b)){ez(a.f);a8(a.b,R5(b));Wy(a)}} -function Pv(a,b){var c;wC((cC(),a.e.I),Bsb);c=AI().create(Csb);c.open($jb,($o(),Vo)+a.g.e+Dsb+a.f+kgb+Zo);bJ(c.upload,Tv(new Rv,a));ZI(c,Yv(new Wv,a));c.send(b)} -function cJ(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.bb(WM(Math.floor(c*100))+Hsb)} -function ZI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){$I(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Zv(b,c){var a,e,f;if(c.status!=200){wC((cC(),b.b.e.I),Esb);ok(b.b._(),Fsb,true)}(Jv(),Iv).remove(b.b.f);if(c.status==200){try{f=XL(c.responseText);Av(b.b.j,b.b);bl(b.b.g,b.b,f);return}catch(a){a=RS(a);if(MM(a,23)){e=a;$o();Zq(gr(new xp,Gsb+Hh(e)+Aeb+c.responseText))}else throw a}}a8(b.b.g.b.b,b.b)!=null;Av(b.b.j,b.b)} -function cU(a){$T();var b;b=new jU;b.b=a;!!WT&&(WT.c=b);WT=b;!VT&&(VT=b);if(YT){XT.cc();return}if(!ZT){ZT=true;Qy((My(),Ly),2,new fU)}} -function bl(a,b,c){var d,e;a8(a.b.b,b)!=null;e=c.ac();if(e){d=Et(new tt,a,e,a.c);Y7(a.g,R5(d.d),d);gab(a.h,d);a.m.b==a&&sw(a.m,b,d)}else{a.m.b==a&&Us(a.m,b)}} -var Hsb='%',Dsb='?filename=',Nsb='AsyncLoader2$1',Osb='AsyncLoader2__Callback',Msb='AsyncLoader2__Super',Jsb='AsyncResizer',Isb='Error Resizing image\n',Gsb='Exception on Upload\n',Asb='Resizing..',Esb='Upload Error',Ksb='UploadFile$1',Lsb='UploadFile$2',Bsb='Uploading..',Csb='beta.httprequest',vsb='end',Fsb='upload-error';_=uo.prototype=new Rf;_.gC=yo;_.tI=0;_.b=null;_.c=null;_.d=null;_=Rv.prototype=new Rf;_.gC=Vv;_.tI=0;_.b=null;_=Wv.prototype=new Rf;_.gC=$v;_.tI=0;_.b=null;_=RT.prototype=new Rf;_.gC=TT;_.cc=UT;_.tI=0;var VT=null,WT=null,XT,YT=false,ZT=false;_=fU.prototype=new Rf;_.gC=hU;_.Nb=iU;_.tI=89;_=jU.prototype=new Rf;_.gC=lU;_.tI=0;_.b=null;_.c=null;var PN=S4(fnb,Jsb),DO=S4(fnb,Ksb),EO=S4(fnb,Lsb),bQ=S4(gqb,Msb),_P=S4(gqb,Nsb),aQ=S4(gqb,Osb);Xy(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/1.cache.js deleted file mode 100644 index 6f234dca..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function hP(){} -function eP(){} -function nP(){} -function dP(){} -function lP(){return ML} -function gP(){return LL} -function jP(){jP=F7;iP=new eP} -function mP(){iP=(jP(),new dP);fw((cw(),bw),1);!!$stats&&$stats(Lw(Imb,Jmb,null,null));iP.Sb();!!$stats&&$stats(Lw(Imb,Kmb,null,null))} -var Nmb='AsyncLoader1',Mmb='AsyncLoader1__Super',Imb='runCallbacks1';_=eP.prototype=new rf;_.gC=gP;_.Sb=hP;_.tI=0;_=dP.prototype=new eP;_.gC=lP;_.Sb=nP;_.tI=0;var iP;var LL=k0(Lmb,Mmb),ML=k0(Lmb,Nmb);mP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/2.cache.js deleted file mode 100644 index 2701c3ed..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function sP(){} -function pP(){} -function yP(){} -function oP(){} -function wP(){return OL} -function rP(){return NL} -function uP(){uP=F7;tP=new pP} -function xP(){tP=(uP(),new oP);fw((cw(),bw),2);!!$stats&&$stats(Lw(Omb,Jmb,null,null));tP.Sb();!!$stats&&$stats(Lw(Omb,Kmb,null,null))} -var Qmb='AsyncLoader2',Pmb='AsyncLoader2__Super',Omb='runCallbacks2';_=pP.prototype=new rf;_.gC=rP;_.Sb=sP;_.tI=0;_=oP.prototype=new pP;_.gC=wP;_.Sb=yP;_.tI=0;var tP;var NL=k0(Lmb,Pmb),OL=k0(Lmb,Qmb);xP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/3.cache.js deleted file mode 100644 index 62b76bfa..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/CB317E0D3E395FA9682EC2E87A205F17/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function aw(){} -function ow(){} -function yw(){} -function Cw(){} -function Tw(){} -function a5(){} -function i5(){} -function mw(){hw(bw)} -function nw(){return PK} -function xw(){return LK} -function Bw(){return MK} -function Gw(){return NK} -function Ww(){return OK} -function f5(){return WN} -function l5(){return VN} -function hw(a){fw(a,a.c)} -function Hw(a){Fw(this,a)} -function tw(a){a.b=0;a.c=0} -function ww(a){return a.c-a.b} -function g1(){return this.a} -function uw(a){return a.a[a.b]} -function sw(a,b){a.a[a.c++]=b} -function Ew(a,b){a.a=b;return a} -function k5(a,b){a.a=b;return a} -function vw(a){return a.a[a.b++]} -function h5(){return this.b.a.d} -function m5(){return F4(this.a.a)} -function e5(a){return j3(this.a,a)} -function O6(a){if(a.b==0){throw x7(new v7)}} -function c5(a,b,c){a.a=b;a.b=c;return a} -function Vw(a,b,c){a.b=b;a.a=c;return a} -function Aw(a,b){Sx(a);a.f=Tmb+b;return a} -function rw(a,b){a.a=EI(jO,0,-1,b,1);return a} -function M6(a){var b;O6(a);--a.b;b=a.a.a;g7(b);return b.c} -function n5(){var a;a=UI(G4(this.a.a),61).hc();return a} -function g5(){var a;a=Q3(new O3,this.b.a);return k5(new i5,a)} -function Y2(a){var b;b=G3(new z3,a);return c5(new a5,a,b)} -function cw(){cw=F7;bw=ew(new aw,3,FI(jO,0,-1,[]))} -function jw(a,b,c,d){!!$stats&&$stats(Lw(a,b,c,d))} -function ew(a,b,c){cw();a.a=m6(new k6);a.f=I6(new G6);a.c=b;a.b=c;a.e=rw(new ow,b+1);return a} -function Sw(a,b){var c,d;c=Rw(a,b);if(c==null){return}d=P_();d.open(Eeb,c,true);N_(d,Vw(new Tw,d,b));d.send(null)} -function fw(a,b){var c;c=b==a.c?Rmb:Smb+b;jw(c,Kmb,j1(b),null);if(gw(a,b)){vw(a.d);t3(a.a,j1(b));lw(a)}} -function j3(a,b){if(a.c&&o6(a.b,b)){return true}else if(i3(a,b)){return true}else if(g3(a,b)){return true}return false} -function Rw(b,c){function d(a){c.Gb(a)} -return __gwtStartLoadingFragment(b,d)} -function gw(a,b){var c,d,e,f;if(b==a.c){return true}for(d=a.b,e=0,f=d.length;e0){z5(h,UI(M6(b.a.f),41));vw(b.a.e)}tw(b.a.e);B5(h,Y2(b.a.a));f3(b.a.a);i=null;for(g=E4(new B4,h);g.a1){return}if(ww(a.d)>0){c=uw(a.d);jw(c==a.c?Rmb:Smb+c,Jmb,j1(c),null);Sw(c,Ew(new Cw,a));return}while(ww(a.e)>0){c=vw(a.e);b=UI(M6(a.f),41);jw(c==a.c?Rmb:Smb+c,Jmb,j1(c),null);Sw(c,b)}} -function Lw(a,b,c,d){var e={moduleName:$moduleName,sessionId:$sessionId,subSystem:Umb,evtGroup:a,millis:(new Date).getTime(),type:b};c!=null&&(e.fragment=c.ac());d!=null&&(e.size=d.ac());return e} -var _mb='AbstractMap$2',anb='AbstractMap$2$1',Wmb='AsyncFragmentLoader',Xmb='AsyncFragmentLoader$BoundedIntQueue',Ymb='AsyncFragmentLoader$HttpDownloadFailure',Zmb='AsyncFragmentLoader$InitialFragmentDownloadFailed',$mb='AsyncFragmentLoader$XhrLoadingStrategy$1',Tmb='HTTP download failed with status ',Vmb='[I',Jmb='begin',Lmb='com.google.gwt.lang.asyncloaders.',Smb='download',Kmb='end',Rmb='leftoversDownload',Umb='runAsync';_=aw.prototype=new rf;_.gC=nw;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var bw;_=ow.prototype=new rf;_.gC=xw;_.tI=0;_.a=null;_.b=0;_.c=0;_=yw.prototype=new Wu;_.gC=Bw;_.tI=70;_=Cw.prototype=new rf;_.gC=Gw;_.Gb=Hw;_.tI=71;_.a=null;_=Tw.prototype=new rf;_.gC=Ww;_.Hb=Xw;_.tI=0;_.a=null;_.b=null;_=$0.prototype;_.ac=g1;_=a5.prototype=new J2;_.cc=e5;_.gC=f5;_.nb=g5;_.dc=h5;_.tI=0;_.a=null;_.b=null;_=i5.prototype=new rf;_.gC=l5;_.Tb=m5;_.Ub=n5;_.tI=0;_.a=null;var jO=j0(J9,Vmb),PK=k0(qjb,Wmb),LK=k0(qjb,Xmb),MK=k0(qjb,Ymb),NK=k0(qjb,Zmb),OK=k0(qjb,$mb),WN=k0(Chb,_mb),VN=k0(Chb,anb);mw(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/1.cache.js new file mode 100644 index 00000000..ad849765 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/1.cache.js @@ -0,0 +1,7 @@ +function LU(){} +function XU(){return sR} +function _U(){var a;while(QU){a=QU;QU=QU.c;!QU&&(RU=null);Rw(a.b.b)}} +function pw(a,b){Ucb(a.f,b);if(!a.e){a.e=true;rw(a)}a.c=false;sw(a)} +function Rw(a){var b;a.b.b=a.b.c.blob;(ww(),vw).captureBlob(a.b.b,a.b.f,mub);b=T0(new Q0,a.b.f);a.b.d.ub(b);pw(a.b.j,a.b)} +function YU(){TU=true;SU=(VU(),new LU);fA((cA(),bA),1);!!$stats&&$stats(LA(nub,elb,null,null));SU.ac();!!$stats&&$stats(LA(nub,oub,null,null))} +var pub='AsyncLoader1',mub='image/JPEG',nub='runCallbacks1';_=LU.prototype=new MU;_.gC=XU;_.ac=_U;_.tI=0;var sR=s6(asb,pub);YU(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/2.cache.js new file mode 100644 index 00000000..e48dfe65 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/2.cache.js @@ -0,0 +1,6 @@ +function hV(){} +function tV(){return wR} +function xV(){var a;while(mV){a=mV;mV=mV.c;!mV&&(nV=null);Jo(a.b)}} +function uV(){pV=true;oV=(rV(),new hV);fA((cA(),bA),2);!!$stats&&$stats(LA(rub,elb,null,null));oV.ac();!!$stats&&$stats(LA(rub,oub,null,null))} +function Jo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(qub);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Cw(a.d,e.encode());return}Cw(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Cw(a.d,e.encode());return}Cw(a.d,a.b)}} +var sub='AsyncLoader2',qub='beta.canvas',rub='runCallbacks2';_=hV.prototype=new iV;_.gC=tV;_.ac=xV;_.tI=0;var wR=s6(asb,sub);uV(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/3.cache.js new file mode 100644 index 00000000..5f8c4d35 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/3.cache.js @@ -0,0 +1,35 @@ +function Go(){} +function Ew(){} +function Jw(){} +function lV(){} +function iV(){} +function yV(){} +function CV(){} +function nA(){iA(bA)} +function Ko(){return $O} +function Iw(){return TP} +function Nw(){return UP} +function kV(){return vR} +function AV(){return tR} +function EV(){return uR} +function iA(a){fA(a,a.e)} +function Gw(a,b){a.b=b;return a} +function Lw(a,b){a.b=b;return a} +function rV(){rV=Pdb;oV=new iV} +function BV(a){rV();qV=false;wV(a)} +function iK(a,b){if(!a){return}Mw(a,b)} +function lK(c,b){c.onprogress=function(a){mK(b,a)}} +function Io(a,b,c){a.b=b;a.d=c;a.c=c.i;return a} +function gx(a,b,c){var d;d=Y3(a.g,b);Bt(a,c,a.K,d,true);Ct(a,b)} +function nw(a,b){C9(a.g.b,b)!=null;sw(a);rw(a);St(a.b.f)} +function Bw(a){if(a.i.d){YD((aD(),a.e.K),tub);vV(Io(new Go,a.b,a))}else{Cw(a,a.b)}} +function wV(a){rV();while(mV){kr();qq(Mr(new Kr,Cub+Qh(a)));mV=mV.c}nV=null} +function mK(a,b){var c;if(!a){return}c=b.loaded/b.total;a.b.h.b.db(eO(Math.floor(c*100))+Bub)} +function fA(a,b){var c;c=b==a.e?clb:dlb+b;kA(c,oub,r7(b),null);if(hA(a,b)){wA(a.f);C9(a.b,r7(b));mA(a)}} +function rw(a){var b;if(a.f.c>0){b=TN(Wcb(a.f),37);Bw(b)}else{a.e=false}} +function vV(a){rV();var b;b=new CV;b.b=a;!!nV&&(nV.c=b);nV=b;!mV&&(mV=b);if(pV){oV.ac();return}if(!qV){qV=true;gA((cA(),bA),2,new yV)}} +function nl(a,b,c){var d,e;C9(a.b.b,b)!=null;e=c.$b();if(e){d=mu(new bu,a,e,a.c);y9(a.g,r7(d.d),d);Ibb(a.h,d);a.m.b==a&&gx(a.m,b,d)}else{a.m.b==a&&Ct(a.m,b)}} +function Mw(b,c){var a,e,f;if(c.status!=200){YD((aD(),b.b.e.K),xub);Ak(b.b.bb(),yub,true);kr();qq(Mr(new Kr,zub+c.responseText))}(ww(),vw).remove(b.b.f);if(c.status==200){try{f=fN(c.responseText);nw(b.b.j,b.b);nl(b.b.g,b.b,f);return}catch(a){a=iU(a);if(WN(a,23)){e=a;kr();qq(Mr(new Kr,Aub+Qh(e)+fgb+c.responseText))}else throw a}}C9(b.b.g.b.b,b.b)!=null;nw(b.b.j,b.b)} +function hK(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){iK(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} +function Cw(a,b){var c;YD((aD(),a.e.K),uub);c=KJ().create(vub);c.open(Glb,(kr(),fr)+a.g.e+wub+a.f+hib+jr);lK(c.upload,Gw(new Ew,a));hK(c,Lw(new Jw,a));c.send(b)} +var Bub='%',wub='?filename=',Hub='AsyncLoader2$1',Iub='AsyncLoader2__Callback',Gub='AsyncLoader2__Super',Dub='AsyncResizer',Cub='Error Resizing image\n',zub='Error Uploading\n',Aub='Exception on Upload\n',tub='Resizing..',xub='Upload Error',Eub='UploadFile$1',Fub='UploadFile$2',uub='Uploading..',vub='beta.httprequest',oub='end',yub='upload-error';_=Go.prototype=new $f;_.gC=Ko;_.tI=0;_.b=null;_.c=null;_.d=null;_=Ew.prototype=new $f;_.gC=Iw;_.tI=0;_.b=null;_=Jw.prototype=new $f;_.gC=Nw;_.tI=0;_.b=null;_=iV.prototype=new $f;_.gC=kV;_.ac=lV;_.tI=0;var mV=null,nV=null,oV,pV=false,qV=false;_=yV.prototype=new $f;_.gC=AV;_.Pb=BV;_.tI=95;_=CV.prototype=new $f;_.gC=EV;_.tI=0;_.b=null;_.c=null;var $O=s6(Sob,Dub),TP=s6(Sob,Eub),UP=s6(Sob,Fub),vR=s6(asb,Gub),tR=s6(asb,Hub),uR=s6(asb,Iub);nA(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/1.cache.js new file mode 100644 index 00000000..2bd71e07 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/1.cache.js @@ -0,0 +1,9 @@ +function ZQ(){} +function WQ(){} +function dR(){} +function VQ(){} +function bR(){return AN} +function YQ(){return zN} +function _Q(){_Q=Y9;$Q=new WQ} +function cR(){$Q=(_Q(),new VQ);yx((vx(),ux),1);!!$stats&&$stats(cy(Vpb,Wpb,null,null));$Q.Sb();!!$stats&&$stats(cy(Vpb,Xpb,null,null))} +var $pb='AsyncLoader1',Zpb='AsyncLoader1__Super',Vpb='runCallbacks1';_=WQ.prototype=new Ef;_.gC=YQ;_.Sb=ZQ;_.tI=0;_=VQ.prototype=new WQ;_.gC=bR;_.Sb=dR;_.tI=0;var $Q;var zN=D2(Ypb,Zpb),AN=D2(Ypb,$pb);cR(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/2.cache.js new file mode 100644 index 00000000..1263b2b5 --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/2.cache.js @@ -0,0 +1,9 @@ +function iR(){} +function fR(){} +function oR(){} +function eR(){} +function mR(){return CN} +function hR(){return BN} +function kR(){kR=Y9;jR=new fR} +function nR(){jR=(kR(),new eR);yx((vx(),ux),2);!!$stats&&$stats(cy(_pb,Wpb,null,null));jR.Sb();!!$stats&&$stats(cy(_pb,Xpb,null,null))} +var bqb='AsyncLoader2',aqb='AsyncLoader2__Super',_pb='runCallbacks2';_=fR.prototype=new Ef;_.gC=hR;_.Sb=iR;_.tI=0;_=eR.prototype=new fR;_.gC=mR;_.Sb=oR;_.tI=0;var jR;var BN=D2(Ypb,aqb),CN=D2(Ypb,bqb);nR(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/3.cache.js new file mode 100644 index 00000000..cfb339de --- /dev/null +++ b/modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/3.cache.js @@ -0,0 +1,54 @@ +function tx(){} +function Hx(){} +function Rx(){} +function Vx(){} +function ky(){} +function t7(){} +function B7(){} +function Fx(){Ax(ux)} +function Gx(){return DM} +function Qx(){return zM} +function Ux(){return AM} +function Zx(){return BM} +function ny(){return CM} +function y7(){return MP} +function E7(){return LP} +function Ax(a){yx(a,a.c)} +function $x(a){Yx(this,a)} +function Mx(a){a.b=0;a.c=0} +function Px(a){return a.c-a.b} +function z3(){return this.a} +function Nx(a){return a.a[a.b]} +function Lx(a,b){a.a[a.c++]=b} +function Xx(a,b){a.a=b;return a} +function D7(a,b){a.a=b;return a} +function Ox(a){return a.a[a.b++]} +function A7(){return this.b.a.d} +function F7(){return Y6(this.a.a)} +function x7(a){return C5(this.a,a)} +function f9(a){if(a.b==0){throw Q9(new O9)}} +function v7(a,b,c){a.a=b;a.b=c;return a} +function my(a,b,c){a.b=b;a.a=c;return a} +function Tx(a,b){kz(a);a.f=eqb+b;return a} +function Kx(a,b){a.a=hK(_P,0,-1,b,1);return a} +function p5(a){var b;b=Z5(new S5,a);return v7(new t7,a,b)} +function d9(a){var b;f9(a);--a.b;b=a.a.a;z9(b);return b.c} +function G7(){var a;a=xK(Z6(this.a.a),61).hc();return a} +function z7(){var a;a=h6(new f6,this.b.a);return D7(new B7,a)} +function Cx(a,b,c,d){!!$stats&&$stats(cy(a,b,c,d))} +function iy(b,c){function d(a){c.Gb(a)} +return __gwtStartLoadingFragment(b,d)} +function C5(a,b){if(a.c&&H8(a.b,b)){return true}else if(B5(a,b)){return true}else if(z5(a,b)){return true}return false} +function xx(a,b,c){vx();a.a=F8(new D8);a.f=_8(new Z8);a.c=b;a.b=c;a.e=Kx(new Hx,b+1);return a} +function vx(){vx=Y9;ux=xx(new tx,3,iK(_P,0,-1,[]))} +function jy(a,b){var c,d;c=iy(a,b);if(c==null){return}d=g2();d.open(bhb,c,true);e2(d,my(new ky,d,b));d.send(null)} +function zx(a,b){var c,d,e,f;if(b==a.c){return true}for(d=a.b,e=0,f=d.length;e0){S7(h,xK(d9(b.a.f),41));Ox(b.a.e)}Mx(b.a.e);U7(h,p5(b.a.a));y5(b.a.a);i=null;for(g=X6(new U6,h);g.a1){return}if(Px(a.d)>0){c=Nx(a.d);Cx(c==a.c?cqb:dqb+c,Wpb,C3(c),null);jy(c,Xx(new Vx,a));return}while(Px(a.e)>0){c=Ox(a.e);b=xK(d9(a.f),41);Cx(c==a.c?cqb:dqb+c,Wpb,C3(c),null);jy(c,b)}} +var mqb='AbstractMap$2',nqb='AbstractMap$2$1',hqb='AsyncFragmentLoader',iqb='AsyncFragmentLoader$BoundedIntQueue',jqb='AsyncFragmentLoader$HttpDownloadFailure',kqb='AsyncFragmentLoader$InitialFragmentDownloadFailed',lqb='AsyncFragmentLoader$XhrLoadingStrategy$1',eqb='HTTP download failed with status ',gqb='[I',Wpb='begin',Ypb='com.google.gwt.lang.asyncloaders.',dqb='download',Xpb='end',cqb='leftoversDownload',fqb='runAsync';_=tx.prototype=new Ef;_.gC=Gx;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var ux;_=Hx.prototype=new Ef;_.gC=Qx;_.tI=0;_.a=null;_.b=0;_.c=0;_=Rx.prototype=new nw;_.gC=Ux;_.tI=76;_=Vx.prototype=new Ef;_.gC=Zx;_.Gb=$x;_.tI=77;_.a=null;_=ky.prototype=new Ef;_.gC=ny;_.Hb=oy;_.tI=0;_.a=null;_.b=null;_=r3.prototype;_.ac=z3;_=t7.prototype=new a5;_.cc=x7;_.gC=y7;_.nb=z7;_.dc=A7;_.tI=0;_.a=null;_.b=null;_=B7.prototype=new Ef;_.gC=E7;_.Tb=F7;_.Ub=G7;_.tI=0;_.a=null;var _P=C2(_bb,gqb),DM=D2(Bmb,hqb),zM=D2(Bmb,iqb),AM=D2(Bmb,jqb),BM=D2(Bmb,kqb),CM=D2(Bmb,lqb),MP=D2(Ckb,mqb),LP=D2(Ckb,nqb);Fx(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/1.cache.js deleted file mode 100644 index dff1e7d4..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/1.cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function aT(){} -function mT(){return GP} -function qT(){var a;while(fT){a=fT;fT=fT.b;!fT&&(gT=null);Xv(a.a.a)}} -function vv(a,b){obb(a.e,b);if(!a.d){a.d=true;xv(a)}a.b=false;yv(a)} -function Xv(a){var b;a.a.a=a.a.b.blob;(Cv(),Bv).captureBlob(a.a.a,a.a.e,usb);b=I_(new F_,a.a.e);a.a.c.rb(b);vv(a.a.i,a.a)} -function nT(){iT=true;hT=(kT(),new aT);Ly((Iy(),Hy),1);!!$stats&&$stats(pz(vsb,pjb,null,null));hT.Zb();!!$stats&&$stats(pz(vsb,wsb,null,null))} -var xsb='AsyncLoader1',usb='image/JPEG',vsb='runCallbacks1';_=aT.prototype=new bT;_.gC=mT;_.Zb=qT;_.tI=0;var GP=O4(eqb,xsb);nT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/2.cache.js deleted file mode 100644 index d71c8a1f..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/2.cache.js +++ /dev/null @@ -1,6 +0,0 @@ -function yT(){} -function KT(){return KP} -function OT(){var a;while(DT){a=DT;DT=DT.b;!DT&&(ET=null);qo(a.a)}} -function LT(){GT=true;FT=(IT(),new yT);Ly((Iy(),Hy),2);!!$stats&&$stats(pz(zsb,pjb,null,null));FT.Zb();!!$stats&&$stats(pz(zsb,wsb,null,null))} -function qo(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(ysb);e.decode(a.a);d=e.width;c=e.height;f=d/a.b.b;b=c/a.b.a;if(f>b){if(f>1){e.resize(a.b.b,~~Math.max(Math.min(c/f,2147483647),-2147483648));Iv(a.c,e.encode());return}Iv(a.c,a.a)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.b.a);Iv(a.c,e.encode());return}Iv(a.c,a.a)}} -var Asb='AsyncLoader2',ysb='beta.canvas',zsb='runCallbacks2';_=yT.prototype=new zT;_.gC=KT;_.Zb=OT;_.tI=0;var KP=O4(eqb,Asb);LT(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/3.cache.js deleted file mode 100644 index 984eb56c..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/D94A32538BE218C5D21AE0170373089B/3.cache.js +++ /dev/null @@ -1,35 +0,0 @@ -function no(){} -function Kv(){} -function Pv(){} -function CT(){} -function zT(){} -function PT(){} -function TT(){} -function Ty(){Oy(Hy)} -function ro(){return AN} -function Ov(){return oO} -function Tv(){return pO} -function BT(){return JP} -function RT(){return HP} -function VT(){return IP} -function Oy(a){Ly(a,a.d)} -function Mv(a,b){a.a=b;return a} -function Rv(a,b){a.a=b;return a} -function IT(){IT=jcb;FT=new zT} -function ST(a){IT();HT=false;NT(a)} -function MI(a,b){if(!a){return}Sv(a,b)} -function PI(c,b){c.onprogress=function(a){QI(b,a)}} -function lw(a,b,c){var d;d=N2(a.f,b);Ms(a,c,a.H,d,true);Ns(a,b)} -function po(a,b,c){a.a=b;a.c=c;a.b=c.h;return a} -function xv(a){var b;if(a.e.b>0){b=vM(qbb(a.e),37);Hv(b)}else{a.d=false}} -function Hv(a){if(a.h.c){(BB(),a.d.H).innerText=Bsb;MT(po(new no,a.a,a))}else{Iv(a,a.a)}} -function NT(a){IT();while(DT){To();Sq(_q(new qp,Jsb+Dh(a)));DT=DT.b}ET=null} -function tv(a,b){Y7(a.f.a,b)!=null;yv(a);xv(a);bt(a.a.d)} -function Ly(a,b){var c;c=b==a.d?njb:ojb+b;Qy(c,wsb,N5(b),null);if(Ny(a,b)){az(a.e);Y7(a.a,N5(b));Sy(a)}} -function Iv(a,b){var c;(BB(),a.d.H).innerText=Csb;c=mI().create(Dsb);c.open(Mjb,(To(),Oo)+a.f.d+Esb+a.e+hgb+So);PI(c.upload,Mv(new Kv,a));LI(c,Rv(new Pv,a));c.send(b)} -function QI(a,b){var c;if(!a){return}c=b.loaded/b.total;a.a.g.a.ab(IM(Math.floor(c*100))+Isb)} -function LI(c,a){var b=c;c.onreadystatechange=function(){if(b.readyState==4){MI(a,b);b.onreadystatechange=null;b.onprogress=null;b.upload.onprogress=null}}} -function Sv(b,c){var a,e,f;if(c.status!=200){(BB(),b.a.d.H).innerText=Fsb;hk(b.a.$(),Gsb,true)}(Cv(),Bv).remove(b.a.e);if(c.status==200){try{f=JL(c.responseText);tv(b.a.i,b.a);Wk(b.a.f,b.a,f);return}catch(a){a=zS(a);if(yM(a,23)){e=a;To();Sq(_q(new qp,Hsb+Dh(e)+veb+c.responseText))}else throw a}}Y7(b.a.f.a.a,b.a)!=null;tv(b.a.i,b.a)} -function MT(a){IT();var b;b=new TT;b.a=a;!!ET&&(ET.b=b);ET=b;!DT&&(DT=b);if(GT){FT.Zb();return}if(!HT){HT=true;My((Iy(),Hy),2,new PT)}} -function Wk(a,b,c){var d,e;Y7(a.a.a,b)!=null;e=c.Xb();if(e){d=xt(new mt,a,e,a.b);U7(a.f,N5(d.c),d);cab(a.g,d);a.l.a==a&&lw(a.l,b,d)}else{a.l.a==a&&Ns(a.l,b)}} -var Isb='%',Esb='?filename=',Osb='AsyncLoader2$1',Psb='AsyncLoader2__Callback',Nsb='AsyncLoader2__Super',Ksb='AsyncResizer',Jsb='Error Resizing image\n',Hsb='Exception on Upload\n',Bsb='Resizing..',Fsb='Upload Error',Lsb='UploadFile$1',Msb='UploadFile$2',Csb='Uploading..',Dsb='beta.httprequest',wsb='end',Gsb='upload-error';_=no.prototype=new Nf;_.gC=ro;_.tI=0;_.a=null;_.b=null;_.c=null;_=Kv.prototype=new Nf;_.gC=Ov;_.tI=0;_.a=null;_=Pv.prototype=new Nf;_.gC=Tv;_.tI=0;_.a=null;_=zT.prototype=new Nf;_.gC=BT;_.Zb=CT;_.tI=0;var DT=null,ET=null,FT,GT=false,HT=false;_=PT.prototype=new Nf;_.gC=RT;_.Mb=ST;_.tI=89;_=TT.prototype=new Nf;_.gC=VT;_.tI=0;_.a=null;_.b=null;var AN=O4(inb,Ksb),oO=O4(inb,Lsb),pO=O4(inb,Msb),JP=O4(eqb,Nsb),HP=O4(eqb,Osb),IP=O4(eqb,Psb);Ty(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/1.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/1.cache.js deleted file mode 100644 index 69db09af..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/1.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function sP(){} -function pP(){} -function yP(){} -function oP(){} -function wP(){return $L} -function rP(){return ZL} -function uP(){uP=G7;tP=new pP} -function xP(){tP=(uP(),new oP);lw((iw(),hw),1);!!$stats&&$stats(Rw(Fmb,Gmb,null,null));tP.Vb();!!$stats&&$stats(Rw(Fmb,Hmb,null,null))} -var Kmb='AsyncLoader1',Jmb='AsyncLoader1__Super',Fmb='runCallbacks1';_=pP.prototype=new tf;_.gC=rP;_.Vb=sP;_.tI=0;_=oP.prototype=new pP;_.gC=wP;_.Vb=yP;_.tI=0;var tP;var ZL=l0(Imb,Jmb),$L=l0(Imb,Kmb);xP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/2.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/2.cache.js deleted file mode 100644 index 5cf735d9..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/2.cache.js +++ /dev/null @@ -1,9 +0,0 @@ -function DP(){} -function AP(){} -function JP(){} -function zP(){} -function HP(){return aM} -function CP(){return _L} -function FP(){FP=G7;EP=new AP} -function IP(){EP=(FP(),new zP);lw((iw(),hw),2);!!$stats&&$stats(Rw(Lmb,Gmb,null,null));EP.Vb();!!$stats&&$stats(Rw(Lmb,Hmb,null,null))} -var Nmb='AsyncLoader2',Mmb='AsyncLoader2__Super',Lmb='runCallbacks2';_=AP.prototype=new tf;_.gC=CP;_.Vb=DP;_.tI=0;_=zP.prototype=new AP;_.gC=HP;_.Vb=JP;_.tI=0;var EP;var _L=l0(Imb,Mmb),aM=l0(Imb,Nmb);IP(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/3.cache.js b/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/3.cache.js deleted file mode 100644 index 8e5f0e13..00000000 --- a/modules/gwtorganise/war/g3viewer/deferredjs/FEAA0157C361541B2682E3107C5BF9ED/3.cache.js +++ /dev/null @@ -1,54 +0,0 @@ -function gw(){} -function uw(){} -function Ew(){} -function Iw(){} -function Zw(){} -function b5(){} -function j5(){} -function sw(){nw(hw)} -function tw(){return $K} -function Dw(){return WK} -function Hw(){return XK} -function Mw(){return YK} -function ax(){return ZK} -function g5(){return fO} -function m5(){return eO} -function nw(a){lw(a,a.d)} -function Nw(a){Lw(this,a)} -function zw(a){a.c=0;a.d=0} -function Cw(a){return a.d-a.c} -function h1(){return this.b} -function i5(){return this.c.b.e} -function Aw(a){return a.b[a.c]} -function yw(a,b){a.b[a.d++]=b} -function Kw(a,b){a.b=b;return a} -function l5(a,b){a.b=b;return a} -function n5(){return G4(this.b.b)} -function Bw(a){return a.b[a.c++]} -function f5(a){return k3(this.b,a)} -function P6(a){if(a.c==0){throw y7(new w7)}} -function d5(a,b,c){a.b=b;a.c=c;return a} -function _w(a,b,c){a.c=b;a.b=c;return a} -function Gw(a,b){Yx(a);a.g=Qmb+b;return a} -function xw(a,b){a.b=NI(uO,0,-1,b,1);return a} -function N6(a){var b;P6(a);--a.c;b=a.b.b;h7(b);return b.d} -function o5(){var a;a=bJ(H4(this.b.b),61).lc();return a} -function h5(){var a;a=R3(new P3,this.c.b);return l5(new j5,a)} -function Z2(a){var b;b=H3(new A3,a);return d5(new b5,a,b)} -function iw(){iw=G7;hw=kw(new gw,3,OI(uO,0,-1,[]))} -function pw(a,b,c,d){!!$stats&&$stats(Rw(a,b,c,d))} -function kw(a,b,c){iw();a.b=n6(new l6);a.g=J6(new H6);a.d=b;a.c=c;a.f=xw(new uw,b+1);return a} -function k3(a,b){if(a.d&&p6(a.c,b)){return true}else if(j3(a,b)){return true}else if(h3(a,b)){return true}return false} -function Xw(b,c){function d(a){c.Jb(a)} -return __gwtStartLoadingFragment(b,d)} -function mw(a,b){var c,d,e,f;if(b==a.d){return true}for(d=a.c,e=0,f=d.length;e0){A5(h,bJ(N6(b.b.g),41));Bw(b.b.f)}zw(b.b.f);C5(h,Z2(b.b.b));g3(b.b.b);i=null;for(g=F4(new C4,h);g.b1){return}if(Cw(a.e)>0){c=Aw(a.e);pw(c==a.d?Omb:Pmb+c,Gmb,k1(c),null);Yw(c,Kw(new Iw,a));return}while(Cw(a.f)>0){c=Bw(a.f);b=bJ(N6(a.g),41);pw(c==a.d?Omb:Pmb+c,Gmb,k1(c),null);Yw(c,b)}} -var Ymb='AbstractMap$2',Zmb='AbstractMap$2$1',Tmb='AsyncFragmentLoader',Umb='AsyncFragmentLoader$BoundedIntQueue',Vmb='AsyncFragmentLoader$HttpDownloadFailure',Wmb='AsyncFragmentLoader$InitialFragmentDownloadFailed',Xmb='AsyncFragmentLoader$XhrLoadingStrategy$1',Qmb='HTTP download failed with status ',Smb='[I',Gmb='begin',Imb='com.google.gwt.lang.asyncloaders.',Pmb='download',Hmb='end',Omb='leftoversDownload',Rmb='runAsync';_=gw.prototype=new tf;_.gC=tw;_.tI=0;_.c=null;_.d=0;_.e=null;_.f=null;var hw;_=uw.prototype=new tf;_.gC=Dw;_.tI=0;_.b=null;_.c=0;_.d=0;_=Ew.prototype=new dv;_.gC=Hw;_.tI=70;_=Iw.prototype=new tf;_.gC=Mw;_.Jb=Nw;_.tI=71;_.b=null;_=Zw.prototype=new tf;_.gC=ax;_.Kb=bx;_.tI=0;_.b=null;_.c=null;_=_0.prototype;_.ec=h1;_=b5.prototype=new K2;_.gc=f5;_.gC=g5;_.qb=h5;_.hc=i5;_.tI=0;_.b=null;_.c=null;_=j5.prototype=new tf;_.gC=m5;_.Wb=n5;_.Xb=o5;_.tI=0;_.b=null;var uO=k0(J9,Smb),$K=l0(ojb,Tmb),WK=l0(ojb,Umb),XK=l0(ojb,Vmb),YK=l0(ojb,Wmb),ZK=l0(ojb,Xmb),fO=l0(Ahb,Ymb),eO=l0(Ahb,Zmb);sw(); \ No newline at end of file diff --git a/modules/gwtorganise/war/g3viewer/g3viewer.nocache.js b/modules/gwtorganise/war/g3viewer/g3viewer.nocache.js index 17286ade..8ef094fe 100644 --- a/modules/gwtorganise/war/g3viewer/g3viewer.nocache.js +++ b/modules/gwtorganise/war/g3viewer/g3viewer.nocache.js @@ -1,4 +1,4 @@ -function g3viewer(){var M='',nb='" for "gwt:onLoadErrorFn"',lb='" for "gwt:onPropertyErrorFn"',Y='"><\/script>',$='#',Xb='.cache.html',ab='/',Lb='09A21085406FD3AEFF74EE8471199B8A',Mb='3E4F3EA15819E3548B40625FACE2EBBE',Nb='4DD08D394689CC09C7978BC0F3B16995',Ob='57F950D32C617CAE2C8052EA05BDC171',Pb='5C5462085DC7810C7E2A1392D87E6531',Qb='7C1AD451EC3EDEB1136202063B8983F0',Rb='82CC6089F1DDA8F19D1F5BD74ED71B1B',hc=' + '; + + return $google_code; + } + } + + static function footer($theme) { + if(module::get_var("adsense","location") == "footer") { + $code = module::get_var("adsense", "code"); + if (!$code) { + return; + } + $google_code = ' + + '; + + return $google_code; + } + } +} diff --git a/modules/adsense/module.info b/modules/adsense/module.info new file mode 100644 index 00000000..41cc63b2 --- /dev/null +++ b/modules/adsense/module.info @@ -0,0 +1,3 @@ +name = "Adsense" +description = "Display Google Adsense ads" +version = 1 diff --git a/modules/adsense/views/admin_adsense.html.php b/modules/adsense/views/admin_adsense.html.php new file mode 100644 index 00000000..f994fae5 --- /dev/null +++ b/modules/adsense/views/admin_adsense.html.php @@ -0,0 +1,7 @@ + +
+

+
+ +
+
diff --git a/modules/adsense/views/adsense_block.html.php b/modules/adsense/views/adsense_block.html.php new file mode 100644 index 00000000..53f8b20a --- /dev/null +++ b/modules/adsense/views/adsense_block.html.php @@ -0,0 +1,17 @@ +' . $code . ' + '; + + echo $google_code; +} +?> + From 085d7cff74113dae96d4892d601921b98e0bd71e Mon Sep 17 00:00:00 2001 From: John Bowles Date: Wed, 25 Aug 2010 21:39:57 -0700 Subject: [PATCH 12/55] Inital commit. Not yet in a working state, please do not pull. In the process of refactoring. --- .../controllers/embedded_videos.php | 176 +++ modules/embed_videos/helpers/embed_video.php | 107 ++ .../helpers/embed_video_event.php | 37 + .../helpers/embed_video_installer.php | 13 + .../embed_videos/images/embed_video_icon.png | Bin 0 -> 3772 bytes .../embed_videos/models/embedded_video.php | 7 + modules/embed_videos/models/item.php | 1033 +++++++++++++++++ modules/embed_videos/module.info | 3 + .../embed_videos/views/embed_video.html.php | 19 + .../views/embed_videoplayer.html.php | 3 + 10 files changed, 1398 insertions(+) create mode 100644 modules/embed_videos/controllers/embedded_videos.php create mode 100644 modules/embed_videos/helpers/embed_video.php create mode 100644 modules/embed_videos/helpers/embed_video_event.php create mode 100644 modules/embed_videos/helpers/embed_video_installer.php create mode 100644 modules/embed_videos/images/embed_video_icon.png create mode 100644 modules/embed_videos/models/embedded_video.php create mode 100644 modules/embed_videos/models/item.php create mode 100644 modules/embed_videos/module.info create mode 100644 modules/embed_videos/views/embed_video.html.php create mode 100644 modules/embed_videos/views/embed_videoplayer.html.php diff --git a/modules/embed_videos/controllers/embedded_videos.php b/modules/embed_videos/controllers/embedded_videos.php new file mode 100644 index 00000000..becab73a --- /dev/null +++ b/modules/embed_videos/controllers/embedded_videos.php @@ -0,0 +1,176 @@ +parent()->get_position($movie, $where); + if ($position > 1) { + list($previous_item, $ignore, $next_item) = $movie->parent()->children(3, $position - 2, $where); + } else { + $previous_item = null; + list($next_item) = $movie->parent()->viewable()->children(1, $position, $where); + } + $template = new Theme_View("page.html", "item", "embed"); + $template->set_global("item", $movie); + $template->set_global("children", array()); + $template->set_global("children_count", 0); + $template->set_global("parents", $movie->parents()); + $template->set_global("next_item", $next_item); + $template->set_global("previous_item", $previous_item); + $template->set_global("sibling_count", $movie->parent()->viewable()->children_count($where)); + $template->set_global("position", $position); + $template->content = new View("embed.html"); + $movie->view_count++; + $movie->save(); + print $template; + } + public function update($movie_id) { + access::verify_csrf(); + $movie = ORM::factory("item", $movie_id); + access::required("view", $movie); + access::required("edit", $movie); + $form = embed::get_edit_form($movie); + try { + $valid = $form->validate(); + $movie->title = $form->edit_item->title->value; + $movie->description = $form->edit_item->description->value; + $movie->slug = $form->edit_item->slug->value; + //$movie->name = $form->edit_item->inputs["name"]->value; + $movie->validate(); + } + catch(ORM_Validation_Exception $e) { + // Translate ORM validation errors into form error messages + foreach($e->validation->errors() as $key => $error) { + $form->edit_item->inputs[$key]->add_error($error, 1); + } + $valid = false; + } + if ($valid) { + $movie->save(); + module::event("item_edit_form_completed", $movie, $form); + log::success("content", "Updated embed", "url() }\">view"); + message::success(t("Saved embed %movie_title", array("movie_title" => $movie->title))); + if ($form->from_id->value == $movie->id) { + // Use the new url; it might have changed. + print json_encode(array("result" => "success", "location" => $movie->url())); + } else { + // Stay on the same page + print json_encode(array("result" => "success")); + } + } else { + print json_encode(array("result" => "error", "form" => (string)$form)); + } + } + public function create($id) { + $album = ORM::factory("item", $id); + access::required("view", $album); + access::required("add", $album); + access::verify_csrf(); + $form = embed::get_add_form($album); + //$form->add_rules('youtubeid', array('required', 'length[11]')); + //$form->add_callback('youtubeid', 'valid_youtubeid'); + batch::start(); + try { + $valid = $form->validate(); + if (preg_match('/^[a-zA-Z0-9_-]{11}$/', $form->add_embed->inputs['name']->value)) { + $temp_filename = VARPATH . "tmp/" . $form->add_embed->inputs['name']->value . ".jpg"; + $item = ORM::factory("item"); + $item->type = "photo"; + $item->name = basename($form->add_embed->inputs['name']->value . ".jpg"); + //$item->youtubeid = $form->add_embed->youtubeid->value; + $item->title = $form->add_embed->title->value; + $item->parent_id = $album->id; + $item->description = $form->add_embed->description->value; + $item->slug = $form->add_embed->slug->value; + //$item->validate(); + $content = file_get_contents("http://img.youtube.com/vi/" . $form->add_embed->inputs['name']->value . "/0.jpg"); + if ($content) { + $file = fopen($temp_filename, "wb"); + fwrite($file, $content); + fclose($file); + gallery_graphics::composite($temp_filename, $temp_filename, array("file" => "modules/embed/images/icon.png", "position" => "center", "transparency" => 95)); + $item->set_data_file($temp_filename); + $path_info = @pathinfo($temp_filename); + $item->save(); + $embedded_video = ORM::factory("embedded_video"); + $embedded_video->video = true; + $embedded_video->embed_code = "test"; + $embedded_video->source = "YouTube"; + $embedded_video->item_id = $item->id; + $embedded_video->validate(); + $embedded_video->save(); + log::success("content", t("Added a embedded video"), html::anchor("embeds/$item->id", t("view video"))); + module::event("add_event_form_completed", $item, $form); + } else { + $form->add_embed->inputs['name']->add_error('invalid_id', 1); + $valid = false; + } + } else { + $form->add_embed->inputs['name']->add_error('invalid_id', 1); + $valid = false; + } + } + catch(Exception $e) { + // Lame error handling for now. Just record the exception and move on + Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString()); + // Ugh. I hate to use instanceof, But this beats catching the exception separately since + // we mostly want to treat it the same way as all other exceptions + if ($e instanceof ORM_Validation_Exception) { + Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); + foreach($e->validation->errors() as $key => $error) { + $form->add_embed->inputs[$key]->add_error($error, 1); + } + $valid = false; + } + if (file_exists($temp_filename)) { + unlink($temp_filename); + } + } + if (file_exists($temp_filename)) { + unlink($temp_filename); + } + batch::stop(); + if ($valid) { + //print json_encode(array("result" => "success")); + json::reply(array("result" => "success", "location" => $item->url())); + } else { + //json::reply(array("result" => "error", "form" => (string)$form)); + print $form; + } + } + public function form_add($album_id) { + $album = ORM::factory("item", $album_id); + access::required("view", $album); + access::required("add", $album); + print embed::get_add_form($album); + } + public function form_edit($id) { + $embed = ORM::factory("item", $id); + access::required("view", $embed); + access::required("edit", $embed); + print embed::get_edit_form($embed); + } +} diff --git a/modules/embed_videos/helpers/embed_video.php b/modules/embed_videos/helpers/embed_video.php new file mode 100644 index 00000000..7a60107d --- /dev/null +++ b/modules/embed_videos/helpers/embed_video.php @@ -0,0 +1,107 @@ +id}", "", "post", array("id" => "g-add-embed-form")); + $group = $form->group("add_embed") + ->label(t("Add embedded video to %album_title", array("album_title" => $album->title))); + $group->input("title")->label(t("Title")) + ->error_messages("required", t("You must provide a title")) + ->error_messages("length", t("Your title is too long")); + $group->input("name")->label(t("Youtube ID")) + ->error_messages( + "conflict", t("There is already a movie with this ID")) + ->error_messages("required", t("You must provide a Youtube ID")) + ->error_messages("length", t("Invalid Youtube ID")) + ->error_messages("invalid_id", t("Invalid Youtube ID")); + $group->textarea("description")->label(t("Description")); + $group->input("slug")->label(t("Internet Address")) + ->error_messages( + "conflict", t("There is already a movie, photo or album with this internet address")) + ->error_messages( + "not_url_safe", + t("The internet address should contain only letters, numbers, hyphens and underscores")) + ->error_messages("required", t("You must provide an internet address")) + ->error_messages("length", t("Your internet address is too long")); + $group->hidden("type")->value("embed"); + + module::event("embed_add_form", $album, $form); + + $group = $form->group("buttons")->label(""); + $group->submit("")->value(t("Add")); + + return $form; + } + + static function get_edit_form($photo) { + $form = new Forge("embeds/update/$photo->id", "", "post", array("id" => "g-edit-embed-form")); + $form->hidden("from_id")->value($photo->id); + $group = $form->group("edit_item")->label(t("Edit Embedded Video")); + $group->input("title")->label(t("Title"))->value($photo->title) + ->error_messages("required", t("You must provide a title")) + ->error_messages("length", t("Your title is too long")); + $group->textarea("description")->label(t("Description"))->value($photo->description); + $group->input("slug")->label(t("Internet Address"))->value($photo->slug) + ->error_messages( + "conflict", t("There is already a movie, photo or album with this internet address")) + ->error_messages( + "not_url_safe", + t("The internet address should contain only letters, numbers, hyphens and underscores")) + ->error_messages("required", t("You must provide an internet address")) + ->error_messages("length", t("Your internet address is too long")); + + module::event("item_edit_form", $photo, $form); + + $group = $form->group("buttons")->label(""); + $group->submit("")->value(t("Modify")); + return $form; + } + + /** + * Return scaled width and height. + * + * @param integer $width + * @param integer $height + * @param integer $max the target size for the largest dimension + * @param string $format the output format using %d placeholders for width and height + */ + static function img_dimensions($width, $height, $max, $format="width=\"%d\" height=\"%d\"") { + if (!$width || !$height) { + return ""; + } + + if ($width > $height) { + $new_width = $max; + $new_height = (int)$max * ($height / $width); + } else { + $new_height = $max; + $new_width = (int)$max * ($width / $height); + } + return sprintf($format, $new_width, $new_height); + } + +} diff --git a/modules/embed_videos/helpers/embed_video_event.php b/modules/embed_videos/helpers/embed_video_event.php new file mode 100644 index 00000000..6224bfb8 --- /dev/null +++ b/modules/embed_videos/helpers/embed_video_event.php @@ -0,0 +1,37 @@ +is_embed()) { + // Build our thumbnail/resizes. + try { + graphics::generate($item); + } catch (Exception $e) { + log::error("graphics", t("Couldn't create a thumbnail or resize for %item_title", + array("item_title" => $item->title)), + html::anchor($item->abs_url(), t("details"))); + Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString()); + } + + // If the parent has no cover item, make this it. + $parent = $item->parent(); + if (access::can("edit", $parent) && $parent->album_cover_item_id == null) { + item::make_album_cover($item); + } + } + } + static function site_menu($menu, $theme) { + $item = $theme->item(); + + if ($can_add = $item && access::can("add", $item)) { + $menu->get("add_menu") + ->append(Menu::factory("dialog") + ->id("embed_add") + ->label(t("Embed Video")) + ->url(url::site("form/add/embeds/$item->id"))); + } + } +} diff --git a/modules/embed_videos/helpers/embed_video_installer.php b/modules/embed_videos/helpers/embed_video_installer.php new file mode 100644 index 00000000..1837abfd --- /dev/null +++ b/modules/embed_videos/helpers/embed_video_installer.php @@ -0,0 +1,13 @@ +l~$J)6BCmqxH?{*j9_i2Sy(_O^J>nojooV6BA>4GBW(!G18gi zr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Al=o1UjQ&9$`g4KgCT(Uy*dWstPaJjE5B| zKSJ;@I^YPR}Q|?geiNUkiK%Na7m3Xs(D_( z`m-fc?WdB{i0PDkq1l)L{jP#Gd@nZ`wQ5~?w&UD}?Vhx~t6t$9y!3^(qoS8Ji9SC? z-C+;#@*$V5Ozt`R^+Th%BUqQ1Xmhi5UR5NHmTAW4Tr-?|RHL%|-@Ej`b0_)n%lF2f z&<;h7*fzA!-y{yj_!xno&u_TRnof>=4$W*YC|#gM|NN0?ec#%SkQP*Ck9~c<*p%}V zPhsdYWm^XQ9==ws)8bkjnBAwA)is)VKJxi_W|5R=+p)L^a>sEm8SwX0jDYuczUvg4 F^nd)r_*wt} literal 0 HcmV?d00001 diff --git a/modules/embed_videos/models/embedded_video.php b/modules/embed_videos/models/embedded_video.php new file mode 100644 index 00000000..6c849d72 --- /dev/null +++ b/modules/embed_videos/models/embedded_video.php @@ -0,0 +1,7 @@ +loaded()) { + // Set reasonable defaults + $this->created = time(); + $this->rand_key = ((float)mt_rand()) / (float)mt_getrandmax(); + $this->thumb_dirty = 1; + $this->resize_dirty = 1; + $this->sort_column = "created"; + $this->sort_order = "ASC"; + $this->owner_id = identity::active_user()->id; + } + } + + /** + * Add a set of restrictions to any following queries to restrict access only to items + * viewable by the active user. + * @chainable + */ + public function viewable() { + return item::viewable($this); + } + + /** + * Is this item an album? + * @return true if it's an album + */ + public function is_album() { + return $this->type == 'album'; + } + + /** + * Is this item a photo? + * @return true if it's a photo + */ + public function is_photo() { + return $this->type == 'photo'; + } + + /** + * Is this item a movie? + * @return true if it's a movie + */ + public function is_movie() { + return $this->type == 'movie'; + } + + public function is_embed() { + return $this->type == 'embed'; + } + + public function delete($ignored_id=null) { + if ($this->id == 1) { + $v = new Validation(array("id")); + $v->add_error("id", "cant_delete_root_album"); + ORM_Validation_Exception::handle_validation($this->table_name, $v); + } + + $old = clone $this; + module::event("item_before_delete", $this); + + $parent = $this->parent(); + if ($parent->album_cover_item_id == $this->id) { + item::remove_album_cover($parent); + } + + $path = $this->file_path(); + $resize_path = $this->resize_path(); + $thumb_path = $this->thumb_path(); + + parent::delete(); + if (is_dir($path)) { + // Take some precautions against accidentally deleting way too much + $delete_resize_path = dirname($resize_path); + $delete_thumb_path = dirname($thumb_path); + if ($delete_resize_path == VARPATH . "resizes" || + $delete_thumb_path == VARPATH . "thumbs" || + $path == VARPATH . "albums") { + throw new Exception( + "@todo DELETING_TOO_MUCH ($delete_resize_path, $delete_thumb_path, $path)"); + } + @dir::unlink($path); + @dir::unlink($delete_resize_path); + @dir::unlink($delete_thumb_path); + } else { + @unlink($path); + @unlink($resize_path); + @unlink($thumb_path); + } + + module::event("item_deleted", $old); + } + + /** + * Specify the path to the data file associated with this item. To actually associate it, + * you still have to call save(). + * @chainable + */ + public function set_data_file($data_file) { + $this->data_file = $data_file; + return $this; + } + + /** + * Return the server-relative url to this item, eg: + * /gallery3/index.php/BobsWedding?page=2 + * /gallery3/index.php/BobsWedding/Eating-Cake.jpg + * + * @param string $query the query string (eg "show=3") + */ + public function url($query=null) { + $url = url::site($this->relative_url()); + if ($query) { + $url .= "?$query"; + } + return $url; + } + + /** + * Return the full url to this item, eg: + * http://example.com/gallery3/index.php/BobsWedding?page=2 + * http://example.com/gallery3/index.php/BobsWedding/Eating-Cake.jpg + * + * @param string $query the query string (eg "show=3") + */ + public function abs_url($query=null) { + $url = url::abs_site($this->relative_url()); + if ($query) { + $url .= "?$query"; + } + return $url; + } + + /** + * album: /var/albums/album1/album2 + * photo: /var/albums/album1/album2/photo.jpg + */ + public function file_path() { + return VARPATH . "albums/" . urldecode($this->relative_path()); + } + + /** + * album: http://example.com/gallery3/var/resizes/album1/ + * photo: http://example.com/gallery3/var/albums/album1/photo.jpg + */ + public function file_url($full_uri=false) { + $relative_path = "var/albums/" . $this->relative_path(); + return ($full_uri ? url::abs_file($relative_path) : url::file($relative_path)) + . "?m={$this->updated}"; + } + + /** + * album: /var/resizes/album1/.thumb.jpg + * photo: /var/albums/album1/photo.thumb.jpg + */ + public function thumb_path() { + $base = VARPATH . "thumbs/" . urldecode($this->relative_path()); + if ($this->is_photo() || $this->is_embed()) { + return $base; + } else if ($this->is_album()) { + return $base . "/.album.jpg"; + } else if ($this->is_movie()) { + // Replace the extension with jpg + return preg_replace("/...$/", "jpg", $base); + } + } + + /** + * Return true if there is a thumbnail for this item. + */ + public function has_thumb() { + return $this->thumb_width && $this->thumb_height; + } + + /** + * album: http://example.com/gallery3/var/resizes/album1/.thumb.jpg + * photo: http://example.com/gallery3/var/albums/album1/photo.thumb.jpg + */ + public function thumb_url($full_uri=false) { + $cache_buster = "?m={$this->updated}"; + $relative_path = "var/thumbs/" . $this->relative_path(); + $base = ($full_uri ? url::abs_file($relative_path) : url::file($relative_path)); + if ($this->is_photo() || $this->is_embed()) { + return $base . $cache_buster; + } else if ($this->is_album()) { + return $base . "/.album.jpg" . $cache_buster; + } else if ($this->is_movie()) { + // Replace the extension with jpg + $base = preg_replace("/...$/", "jpg", $base); + return $base . $cache_buster; + } + } + + /** + * album: /var/resizes/album1/.resize.jpg + * photo: /var/albums/album1/photo.resize.jpg + */ + public function resize_path() { + return VARPATH . "resizes/" . urldecode($this->relative_path()) . + ($this->is_album() ? "/.album.jpg" : ""); + } + + /** + * album: http://example.com/gallery3/var/resizes/album1/.resize.jpg + * photo: http://example.com/gallery3/var/albums/album1/photo.resize.jpg + */ + public function resize_url($full_uri=false) { + $relative_path = "var/resizes/" . $this->relative_path(); + return ($full_uri ? url::abs_file($relative_path) : url::file($relative_path)) . + ($this->is_album() ? "/.album.jpg" : "") + . "?m={$this->updated}"; + } + + /** + * Rebuild the relative_path_cache and relative_url_cache. + */ + private function _build_relative_caches() { + $names = array(); + $slugs = array(); + foreach (db::build() + ->select(array("name", "slug")) + ->from("items") + ->where("left_ptr", "<=", $this->left_ptr) + ->where("right_ptr", ">=", $this->right_ptr) + ->where("id", "<>", 1) + ->order_by("left_ptr", "ASC") + ->execute() as $row) { + // Don't encode the names segment + $names[] = rawurlencode($row->name); + $slugs[] = rawurlencode($row->slug); + } + $this->relative_path_cache = implode($names, "/"); + $this->relative_url_cache = implode($slugs, "/"); + return $this; + } + + /** + * Return the relative path to this item's file. Note that the components of the path are + * urlencoded so if you want to use this as a filesystem path, you need to call urldecode + * on it. + * @return string + */ + public function relative_path() { + if (!$this->loaded()) { + return; + } + + if (!isset($this->relative_path_cache)) { + $this->_build_relative_caches()->save(); + } + return $this->relative_path_cache; + } + + /** + * Return the relative url to this item's file. + * @return string + */ + public function relative_url() { + if (!$this->loaded()) { + return; + } + + if (!isset($this->relative_url_cache)) { + $this->_build_relative_caches()->save(); + } + return $this->relative_url_cache; + } + + /** + * @see ORM::__get() + */ + public function __get($column) { + if ($column == "owner") { + // This relationship depends on an outside module, which may not be present so handle + // failures gracefully. + try { + return identity::lookup_user($this->owner_id); + } catch (Exception $e) { + return null; + } + } else { + return parent::__get($column); + } + } + + /** + * Handle any business logic necessary to create or modify an item. + * @see ORM::save() + * + * @return ORM Item_Model + */ + public function save() { + $significant_changes = $this->changed; + unset($significant_changes["view_count"]); + unset($significant_changes["relative_url_cache"]); + unset($significant_changes["relative_path_cache"]); + + if ((!empty($this->changed) && $significant_changes) || isset($this->data_file)) { + $this->updated = time(); + if (!$this->loaded()) { + // Create a new item. + + // Set a weight if it's missing. We don't do this in the constructor because it's not a + // simple assignment. + if (empty($this->weight)) { + $this->weight = item::get_max_weight(); + } + + // Make an url friendly slug from the name, if necessary + if (empty($this->slug)) { + $tmp = pathinfo($this->name, PATHINFO_FILENAME); + $tmp = preg_replace("/[^A-Za-z0-9-_]+/", "-", $tmp); + $this->slug = trim($tmp, "-"); + + // If the filename is all invalid characters, then the slug may be empty here. Pick a + // random value. + if (empty($this->slug)) { + $this->slug = (string)rand(1000, 9999); + } + } + + // Get the width, height and mime type from our data file for photos and movies. + if ($this->is_photo() || $this->is_movie() || $this->is_embed()) { + if ($this->is_photo() || $this->is_embed()) { + list ($this->width, $this->height, $this->mime_type, $extension) = + photo::get_file_metadata($this->data_file); + } else if ($this->is_movie()) { + list ($this->width, $this->height, $this->mime_type, $extension) = + movie::get_file_metadata($this->data_file); + } + + // Force an extension onto the name if necessary + $pi = pathinfo($this->data_file); + if (empty($pi["extension"])) { + $this->name = "{$this->name}.$extension"; + } + } + + // Randomize the name or slug if there's a conflict. Preserve the extension. + // @todo Improve this. Random numbers are not user friendly + $base_name = pathinfo($this->name, PATHINFO_FILENAME); + $base_ext = pathinfo($this->name, PATHINFO_EXTENSION); + $base_slug = $this->slug; + while (ORM::factory("item") + ->where("parent_id", "=", $this->parent_id) + ->and_open() + ->where("name", "=", $this->name) + ->or_where("slug", "=", $this->slug) + ->close() + ->find()->id) { + $rand = rand(); + if ($base_ext) { + $this->name = "$base_name-$rand.$base_ext"; + } else { + $this->name = "$base_name-$rand"; + } + $this->slug = "$base_slug-$rand"; + } + + parent::save(); + + // Build our url caches, then save again. We have to do this after it's already been + // saved once because we use only information from the database to build the paths. If we + // could depend on a save happening later we could defer this 2nd save. + $this->_build_relative_caches(); + parent::save(); + + // Take any actions that we can only do once all our paths are set correctly after saving. + switch ($this->type) { + case "album": + mkdir($this->file_path()); + mkdir(dirname($this->thumb_path())); + mkdir(dirname($this->resize_path())); + break; + + case "photo": + case "movie": + case "embed": + // The thumb or resize may already exist in the case where a movie and a photo generate + // a thumbnail of the same name (eg, foo.flv movie and foo.jpg photo will generate + // foo.jpg thumbnail). If that happens, randomize and save again. + if (file_exists($this->resize_path()) || + file_exists($this->thumb_path())) { + $pi = pathinfo($this->name); + $this->name = $pi["filename"] . "-" . rand() . "." . $pi["extension"]; + parent::save(); + } + + copy($this->data_file, $this->file_path()); + break; + } + + // This will almost definitely trigger another save, so put it at the end so that we're + // tail recursive. + module::event("item_created", $this); + } else { + // Update an existing item + + // If any significant fields have changed, load up a copy of the original item and + // keep it around. + $original = ORM::factory("item", $this->id); + if (array_intersect($this->changed, array("parent_id", "name", "slug"))) { + $original->_build_relative_caches(); + $this->relative_path_cache = null; + $this->relative_url_cache = null; + } + + parent::save(); + + // Now update the filesystem and any database caches if there were significant value + // changes. If anything past this point fails, then we'll have an inconsistent database + // so this code should be as robust as we can make it. + + // Update the MPTT pointers, if necessary. We have to do this before we generate any + // cached paths! + if ($original->parent_id != $this->parent_id) { + parent::move_to($this->parent()); + } + + if ($original->parent_id != $this->parent_id || $original->name != $this->name) { + // Move all of the items associated data files + @rename($original->file_path(), $this->file_path()); + if ($this->is_album()) { + @rename(dirname($original->resize_path()), dirname($this->resize_path())); + @rename(dirname($original->thumb_path()), dirname($this->thumb_path())); + } else { + @rename($original->resize_path(), $this->resize_path()); + @rename($original->thumb_path(), $this->thumb_path()); + } + + if ($original->parent_id != $this->parent_id) { + // This will result in 2 events since we'll still fire the item_updated event below + module::event("item_moved", $this, $original->parent()); + } + } + + // Changing the name, slug or parent ripples downwards + if ($this->is_album() && + ($original->name != $this->name || + $original->slug != $this->slug || + $original->parent_id != $this->parent_id)) { + db::build() + ->update("items") + ->set("relative_url_cache", null) + ->set("relative_path_cache", null) + ->where("left_ptr", ">", $this->left_ptr) + ->where("right_ptr", "<", $this->right_ptr) + ->execute(); + } + + // Replace the data file, if requested. + // @todo: we don't handle the case where you swap in a file of a different mime type + // should we prevent that in validation? or in set_data_file() + if ($this->data_file && ($this->is_photo() || $this->is_movie())) { + copy($this->data_file, $this->file_path()); + + // Get the width, height and mime type from our data file for photos and movies. + if ($this->is_photo() || $this->is_embed()) { + list ($this->width, $this->height) = photo::get_file_metadata($this->file_path()); + } else if ($this->is_movie()) { + list ($this->width, $this->height) = movie::get_file_metadata($this->file_path()); + } + $this->thumb_dirty = 1; + $this->resize_dirty = 1; + } + + module::event("item_updated", $original, $this); + + if ($this->data_file) { + // Null out the data file variable here, otherwise this event will trigger another + // save() which will think that we're doing another file move. + $this->data_file = null; + module::event("item_updated_data_file", $this); + } + } + } else if (!empty($this->changed)) { + // Insignificant changes only. Don't fire events or do any special checking to try to keep + // this lightweight. + parent::save(); + } + + return $this; + } + + /** + * Return the Item_Model representing the cover for this album. + * @return Item_Model or null if there's no cover + */ + public function album_cover() { + if (!$this->is_album()) { + return null; + } + + if (empty($this->album_cover_item_id)) { + return null; + } + + try { + return model_cache::get("item", $this->album_cover_item_id); + } catch (Exception $e) { + // It's possible (unlikely) that the item was deleted, if so keep going. + return null; + } + } + + /** + * Find the position of the given child id in this album. The resulting value is 1-indexed, so + * the first child in the album is at position 1. + */ + public function get_position($child, $where=array()) { + if ($this->sort_order == "DESC") { + $comp = ">"; + } else { + $comp = "<"; + } + $db = db::build(); + + // If the comparison column has NULLs in it, we can't use comparators on it and will have to + // deal with it the hard way. + $count = $db->from("items") + ->where("parent_id", "=", $this->id) + ->where($this->sort_column, "IS", null) + ->merge_where($where) + ->count_records(); + + if (empty($count)) { + // There are no NULLs in the sort column, so we can just use it directly. + $sort_column = $this->sort_column; + + $position = $db->from("items") + ->where("parent_id", "=", $this->id) + ->where($sort_column, $comp, $child->$sort_column) + ->merge_where($where) + ->count_records(); + + // We stopped short of our target value in the sort (notice that we're using a < comparator + // above) because it's possible that we have duplicate values in the sort column. An + // equality check would just arbitrarily pick one of those multiple possible equivalent + // columns, which would mean that if you choose a sort order that has duplicates, it'd pick + // any one of them as the child's "position". + // + // Fix this by doing a 2nd query where we iterate over the equivalent columns and add them to + // our base value. + foreach ($db + ->select("id") + ->from("items") + ->where("parent_id", "=", $this->id) + ->where($sort_column, "=", $child->$sort_column) + ->merge_where($where) + ->order_by(array("id" => "ASC")) + ->execute() as $row) { + $position++; + if ($row->id == $child->id) { + break; + } + } + } else { + // There are NULLs in the sort column, so we can't use MySQL comparators. Fall back to + // iterating over every child row to get to the current one. This can be wildly inefficient + // for really large albums, but it should be a rare case that the user is sorting an album + // with null values in the sort column. + // + // Reproduce the children() functionality here using Database directly to avoid loading the + // whole ORM for each row. + $order_by = array($this->sort_column => $this->sort_order); + // Use id as a tie breaker + if ($this->sort_column != "id") { + $order_by["id"] = "ASC"; + } + + $position = 0; + foreach ($db->select("id") + ->from("items") + ->where("parent_id", "=", $this->id) + ->merge_where($where) + ->order_by($order_by) + ->execute() as $row) { + $position++; + if ($row->id == $child->id) { + break; + } + } + } + + return $position; + } + + /** + * Return an tag for the thumbnail. + * @param array $extra_attrs Extra attributes to add to the img tag + * @param int (optional) $max Maximum size of the thumbnail (default: null) + * @param boolean (optional) $center_vertically Center vertically (default: false) + * @return string + */ + public function thumb_img($extra_attrs=array(), $max=null, $center_vertically=false) { + list ($height, $width) = $this->scale_dimensions($max); + if ($center_vertically && $max) { + // The constant is divide by 2 to calculate the file and 10 to convert to em + $margin_top = ($max - $height) / 20; + $extra_attrs["style"] = "margin-top: {$margin_top}em"; + $extra_attrs["title"] = $this->title; + } + $attrs = array_merge($extra_attrs, + array( + "src" => $this->thumb_url(), + "alt" => $this->title, + "width" => $width, + "height" => $height) + ); + // html::image forces an absolute url which we don't want + return ""; + } + + /** + * Calculate the largest width/height that fits inside the given maximum, while preserving the + * aspect ratio. + * @param int $max Maximum size of the largest dimension + * @return array + */ + public function scale_dimensions($max) { + $width = $this->thumb_width; + $height = $this->thumb_height; + + if ($height) { + if (isset($max)) { + if ($width > $height) { + $height = (int)($max * ($height / $width)); + $width = $max; + } else { + $width = (int)($max * ($width / $height)); + $height = $max; + } + } + } else { + // Missing thumbnail, can happen on albums with no photos yet. + // @todo we should enforce a placeholder for those albums. + $width = 0; + $height = 0; + } + return array($height, $width); + } + + /** + * Return an tag for the resize. + * @param array $extra_attrs Extra attributes to add to the img tag + * @return string + */ + public function resize_img($extra_attrs) { + $attrs = array_merge($extra_attrs, + array("src" => $this->resize_url(), + "alt" => $this->title, + "width" => $this->resize_width, + "height" => $this->resize_height) + ); + // html::image forces an absolute url which we don't want + return ""; + } + + /** + * Return a flowplayer + \ No newline at end of file From 30f8f02a56965863d1debd757471720f18ceb4db Mon Sep 17 00:00:00 2001 From: John Bowles Date: Thu, 26 Aug 2010 22:12:18 -0700 Subject: [PATCH 23/55] Fixed controller. --- .../controllers/embedded_videos.php | 197 +++--------------- 1 file changed, 31 insertions(+), 166 deletions(-) diff --git a/modules/embed_videos/controllers/embedded_videos.php b/modules/embed_videos/controllers/embedded_videos.php index 5b3a25b1..fdb7b5e1 100644 --- a/modules/embed_videos/controllers/embedded_videos.php +++ b/modules/embed_videos/controllers/embedded_videos.php @@ -18,144 +18,6 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Embedded_videos_Controller extends Controller { -<<<<<<< HEAD - public function show($movie) { - if (!is_object($movie)) { - // show() must be public because we route to it in url::parse_url(), so make - // sure that we're actually receiving an object - throw new Kohana_404_Exception(); - } - access::required("view", $movie); - $where = array(array("type", "!=", "album")); - $position = $movie->parent()->get_position($movie, $where); - if ($position > 1) { - list($previous_item, $ignore, $next_item) = $movie->parent()->children(3, $position - 2, $where); - } else { - $previous_item = null; - list($next_item) = $movie->parent()->viewable()->children(1, $position, $where); - } - $embedded_video = ORM::factory("embedded_video")->where("item_id", "=", $movie->id)->find(); - //$db = Database::instance(); - //$result = $db->from('embedded_videos')->select('embed_code')->where('item_id',$movie->id)->get(); - $template = new Theme_View("page.html", "item", "embedded_video"); - $template->set_global("item", $movie); - $template->set_global("embedded_video", $embedded_video->embed_code); - $template->set_global("children", array()); - $template->set_global("children_count", 0); - $template->set_global("parents", $movie->parents()); - $template->set_global("next_item", $next_item); - $template->set_global("previous_item", $previous_item); - $template->set_global("sibling_count", $movie->parent()->viewable()->children_count($where)); - $template->set_global("position", $position); - $template->content = new View("embedded_video.html"); - db::query("UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = $movie->id")->execute(); - //$movie->view_count++; - //$movie->save(); - print $template; - } - public function update($movie_id) { - access::verify_csrf(); - $movie = ORM::factory("item", $movie_id); - access::required("view", $movie); - access::required("edit", $movie); - $form = embed_videos::get_edit_form($movie); - try { - $valid = $form->validate(); - $movie->title = $form->edit_item->title->value; - $movie->description = $form->edit_item->description->value; - $movie->slug = $form->edit_item->slug->value; - //$movie->name = $form->edit_item->inputs["name"]->value; - $movie->validate(); - } - catch(ORM_Validation_Exception $e) { - // Translate ORM validation errors into form error messages - foreach($e->validation->errors() as $key => $error) { - $form->edit_item->inputs[$key]->add_error($error, 1); - } - $valid = false; - } - if ($valid) { - $movie->save(); - module::event("item_edit_form_completed", $movie, $form); - log::success("content", "Updated embed", "url() }\">view"); - message::success(t("Saved embed %movie_title", array("movie_title" => $movie->title))); - if ($form->from_id->value == $movie->id) { - // Use the new url; it might have changed. - print json_encode(array("result" => "success", "location" => $movie->url())); - } else { - // Stay on the same page - print json_encode(array("result" => "success")); - } - } else { - print json_encode(array("result" => "error", "form" => (string)$form)); - } - } - - public function create($id) { - $album = ORM::factory("item", $id); - access::required("view", $album); - access::required("add", $album); - access::verify_csrf(); - $form = embed_videos::get_add_form($album); - $temp_filename = ""; - //$form->add_rules('youtubeid', array('required', 'length[11]')); - //$form->add_callback('youtubeid', 'valid_youtubeid'); - batch::start(); - try { - $valid = $form->validate(); - if ($form->add_embedded_video->inputs['video_url']->value != "") { - $youtubeUrlPattern="youtube"; - $youtubeApiUrl="http://gdata.youtube.com/feeds/api/"; - $youtubeThumbnailUrl="http://img.youtube.com/vi/"; - $valid_url=false; - $embedded_video = ORM::factory("embedded_video"); - $item = ORM::factory("item"); - $item->type = "photo"; - $url = $form->add_embedded_video->inputs['video_url']->value; - if(preg_match("/$youtubeUrlPattern/",$url)) { - if(preg_match("/watch\?v=(.*?)(&\S+=\S+)/",$url,$matches)) { - $video_id = $matches[1]; - $embedded_video->embed_code = ''; - $embedded_video->source = "YouTube"; - $content = file_get_contents("http://img.youtube.com/vi/" . $video_id . "/0.jpg"); - $itemname = "youtube_" . $video_id . ".jpg"; - $temp_filename = VARPATH . "tmp/$itemname"; - if ($content) { - $valid_url = true; - } - } - } - //$item->validate(); - //$content = file_get_contents("http://img.youtube.com/vi/" . $form->add_embedded_video->inputs['name']->value . "/0.jpg"); - if ($valid_url) { - $file = fopen($temp_filename, "wb"); - fwrite($file, $content); - fclose($file); - gallery_graphics::composite($temp_filename, $temp_filename, array("file" => "modules/embed_videos/images/embed_video_icon.png", "position" => "center", "transparency" => 95)); - $item->name = basename($itemname); - $item->title = $form->add_embedded_video->title->value; - $item->parent_id = $album->id; - $item->description = $form->add_embedded_video->description->value; - $item->slug = $form->add_embedded_video->slug->value; - $item->set_data_file($temp_filename); - $path_info = @pathinfo($temp_filename); - $item->save(); - //module::event("item_created", $item); - db::query("UPDATE {items} SET `type` = 'embedded_video' WHERE `id` = $item->id")->execute(); - $embedded_video->item_id = $item->id; - $embedded_video->validate(); - $embedded_video->save(); - log::success("content", t("Added a embedded video"), html::anchor("embeds/$item->id", t("view video"))); - module::event("add_event_form_completed", $item, $form); - - } else { - $form->add_embedded_video->inputs['video_url']->add_error('invalid_id', 1); - $valid = false; - } - } else { - $form->add_embedded_video->inputs['video_url']->add_error('invalid_id', 1); - $valid = false; -======= public function create($id) { $album = ORM::factory("item", $id); access::required("view", $album); @@ -187,26 +49,9 @@ class Embedded_videos_Controller extends Controller { $temp_filename = VARPATH . "tmp/$itemname"; if ($content) { $valid_url = true; ->>>>>>> js-solution } + } } -<<<<<<< HEAD - catch(Exception $e) { - // Lame error handling for now. Just record the exception and move on - Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString()); - // Ugh. I hate to use instanceof, But this beats catching the exception separately since - // we mostly want to treat it the same way as all other exceptions - if ($e instanceof ORM_Validation_Exception) { - Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); - foreach($e->validation->errors() as $key => $error) { - $form->add_embed->inputs[$key]->add_error($error, 1); - } - $valid = false; - } - if (file_exists($temp_filename)) { - unlink($temp_filename); - } -======= //$item->validate(); //$content = file_get_contents("http://img.youtube.com/vi/" . $form->add_embedded_video->inputs['name']->value . "/0.jpg"); if ($valid_url) { @@ -231,18 +76,38 @@ class Embedded_videos_Controller extends Controller { } else { $form->add_embedded_video->inputs['video_url']->add_error('invalid_id', 1); $valid = false; ->>>>>>> js-solution } - if (file_exists($temp_filename)) { - unlink($temp_filename); + } else { + $form->add_embedded_video->inputs['video_url']->add_error('invalid_id', 1); + $valid = false; + } + } + catch(Exception $e) { + // Lame error handling for now. Just record the exception and move on + Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString()); + // Ugh. I hate to use instanceof, But this beats catching the exception separately since + // we mostly want to treat it the same way as all other exceptions + if ($e instanceof ORM_Validation_Exception) { + Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); + foreach($e->validation->errors() as $key => $error) { + $form->add_embed->inputs[$key]->add_error($error, 1); } - batch::stop(); - if ($valid) { - //print json_encode(array("result" => "success")); - json::reply(array("result" => "success", "location" => $item->url())); - } else { - //json::reply(array("result" => "error", "form" => (string)$form)); - print $form; + $valid = false; + } + if (file_exists($temp_filename)) { + unlink($temp_filename); + } + } + if (file_exists($temp_filename)) { + unlink($temp_filename); + } + batch::stop(); + if ($valid) { + //print json_encode(array("result" => "success")); + json::reply(array("result" => "success", "location" => $item->url())); + } else { + //json::reply(array("result" => "error", "form" => (string)$form)); + print $form; } } public function form_add($album_id) { From 95b357636c7f4b6a7bd5aeedb3d6dc416d7a4c10 Mon Sep 17 00:00:00 2001 From: John Bowles Date: Thu, 26 Aug 2010 22:44:54 -0700 Subject: [PATCH 24/55] Fetch title and description from Youtube API if none is provided. --- .../embed_videos/controllers/embedded_videos.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/embed_videos/controllers/embedded_videos.php b/modules/embed_videos/controllers/embedded_videos.php index fdb7b5e1..83077e59 100644 --- a/modules/embed_videos/controllers/embedded_videos.php +++ b/modules/embed_videos/controllers/embedded_videos.php @@ -31,6 +31,8 @@ class Embedded_videos_Controller extends Controller { try { $valid = $form->validate(); if ($form->add_embedded_video->inputs['video_url']->value != "") { + $title = $form->add_embedded_video->inputs['title']->value; + $description = $form->add_embedded_video->inputs['description']->value; $youtubeUrlPattern="youtube"; $youtubeApiUrl="http://gdata.youtube.com/feeds/api/"; $youtubeThumbnailUrl="http://img.youtube.com/vi/"; @@ -49,6 +51,13 @@ class Embedded_videos_Controller extends Controller { $temp_filename = VARPATH . "tmp/$itemname"; if ($content) { $valid_url = true; + $sxml = simplexml_load_file("http://gdata.youtube.com/feeds/api/videos/$video_id"); + if ($title == '') { + $title = (string)$sxml->title; + } + if ($description == '') { + $description = (string)$sxml->content; + } } } } @@ -61,10 +70,10 @@ class Embedded_videos_Controller extends Controller { gallery_graphics::composite($temp_filename, $temp_filename, array("file" => "modules/embed_videos/images/embed_video_icon.png", "position" => "center", "transparency" => 95)); $item->set_data_file($temp_filename); $item->name = basename($itemname); - $item->title = $form->add_embedded_video->title->value; + $item->title = $title; $item->parent_id = $album->id; - $item->description = $form->add_embedded_video->description->value; - $item->slug = $form->add_embedded_video->slug->value; + $item->description = $description; + $item->slug = $form->add_embedded_video->inputs['slug']->value; $path_info = @pathinfo($temp_filename); $item->save(); //db::query("UPDATE {items} SET `type` = 'embedded_video' WHERE `id` = $item->id")->execute(); From d0447f020a056f5c4ee205152e0d79529ac36820 Mon Sep 17 00:00:00 2001 From: John Bowles Date: Thu, 26 Aug 2010 22:57:20 -0700 Subject: [PATCH 25/55] Clean up a few things --- .../embed_videos/controllers/embedded_videos.php | 13 +++++++------ modules/embed_videos/helpers/embed_videos.php | 5 ++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/embed_videos/controllers/embedded_videos.php b/modules/embed_videos/controllers/embedded_videos.php index 83077e59..256ad7c2 100644 --- a/modules/embed_videos/controllers/embedded_videos.php +++ b/modules/embed_videos/controllers/embedded_videos.php @@ -52,11 +52,13 @@ class Embedded_videos_Controller extends Controller { if ($content) { $valid_url = true; $sxml = simplexml_load_file("http://gdata.youtube.com/feeds/api/videos/$video_id"); - if ($title == '') { - $title = (string)$sxml->title; - } - if ($description == '') { - $description = (string)$sxml->content; + if ($sxml) { + if ($title == '') { + $title = (string)$sxml->title; + } + if ($description == '') { + $description = (string)$sxml->content; + } } } } @@ -76,7 +78,6 @@ class Embedded_videos_Controller extends Controller { $item->slug = $form->add_embedded_video->inputs['slug']->value; $path_info = @pathinfo($temp_filename); $item->save(); - //db::query("UPDATE {items} SET `type` = 'embedded_video' WHERE `id` = $item->id")->execute(); $embedded_video->item_id = $item->id; $embedded_video->validate(); $embedded_video->save(); diff --git a/modules/embed_videos/helpers/embed_videos.php b/modules/embed_videos/helpers/embed_videos.php index 49182407..75b47ec2 100644 --- a/modules/embed_videos/helpers/embed_videos.php +++ b/modules/embed_videos/helpers/embed_videos.php @@ -35,9 +35,8 @@ class embed_videos_Core { $group->input("video_url")->label(t("Video URL")) ->error_messages( "conflict", t("There is already a movie with this ID")) - ->error_messages("required", t("You must provide a Youtube ID")) - ->error_messages("length", t("Invalid Youtube ID")) - ->error_messages("invalid_id", t("Invalid Youtube ID")); + ->error_messages("required", t("You must provide a URL")) + ->error_messages("invalid_id", t("Invalid URL")); $group->textarea("description")->label(t("Description")); $group->input("slug")->label(t("Internet Address")) ->error_messages( From 78a4fbacea52a3a1c0395375cc113426e12c429e Mon Sep 17 00:00:00 2001 From: John Bowles Date: Thu, 26 Aug 2010 23:35:22 -0700 Subject: [PATCH 26/55] Embed Videos: Oops. Left out some of the regexes for youtube. --- .../controllers/embedded_videos.php | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/modules/embed_videos/controllers/embedded_videos.php b/modules/embed_videos/controllers/embedded_videos.php index 256ad7c2..205377fe 100644 --- a/modules/embed_videos/controllers/embedded_videos.php +++ b/modules/embed_videos/controllers/embedded_videos.php @@ -25,24 +25,33 @@ class Embedded_videos_Controller extends Controller { access::verify_csrf(); $form = embed_videos::get_add_form($album); $temp_filename = ""; - //$form->add_rules('youtubeid', array('required', 'length[11]')); - //$form->add_callback('youtubeid', 'valid_youtubeid'); + + // Yes, this is a mess. + $youtubeUrlPattern="youtube"; + $youtubeThumbnailUrl="http://img.youtube.com/vi/"; + // End mess + batch::start(); try { $valid = $form->validate(); if ($form->add_embedded_video->inputs['video_url']->value != "") { $title = $form->add_embedded_video->inputs['title']->value; $description = $form->add_embedded_video->inputs['description']->value; - $youtubeUrlPattern="youtube"; - $youtubeApiUrl="http://gdata.youtube.com/feeds/api/"; - $youtubeThumbnailUrl="http://img.youtube.com/vi/"; $valid_url=false; $embedded_video = ORM::factory("embedded_video"); $item = ORM::factory("item"); $item->type = "photo"; $url = $form->add_embedded_video->inputs['video_url']->value; if(preg_match("/$youtubeUrlPattern/",$url)) { - if(preg_match("/watch\?v=(.*?)(&\S+=\S+)/",$url,$matches)) { + $video_id = 0; + if (preg_match("/watch\?v=(.*?)(&\S+=\S+)/",$url,$matches)) { + $video_id = $matches[1]; + } else if (preg_match("/watch\?v=(.*)/",$url,$matches)) { + $video_id = $matches[1]; + } else if (preg_match("/v\/(.*)/",$url,$matches)) { + $video_id = $matches[1]; + } + if ($video_id) { $video_id = $matches[1]; $embedded_video->embed_code = ''; $embedded_video->source = "YouTube"; From 329799db33b04d09b9ce3bef4f26ffab6e2fcebc Mon Sep 17 00:00:00 2001 From: John Bowles Date: Fri, 27 Aug 2010 17:00:18 -0700 Subject: [PATCH 27/55] Embed_videos: Moved JS to header, added DIV. Removed unused view. --- .../helpers/embed_videos_theme.php | 2 +- .../views/embed_video_js.html.php | 6 +++--- .../views/embedded_video.html.php | 19 ------------------- 3 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 modules/embed_videos/views/embedded_video.html.php diff --git a/modules/embed_videos/helpers/embed_videos_theme.php b/modules/embed_videos/helpers/embed_videos_theme.php index 5d51204f..b7464478 100644 --- a/modules/embed_videos/helpers/embed_videos_theme.php +++ b/modules/embed_videos/helpers/embed_videos_theme.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class embed_videos_theme_Core { - static function photo_bottom($theme) { + static function head($theme) { $item = $theme->item(); if ($item && $item->is_photo()) { $embedded_video = ORM::factory("embedded_video") diff --git a/modules/embed_videos/views/embed_video_js.html.php b/modules/embed_videos/views/embed_video_js.html.php index 7f3201c8..ea2aa721 100644 --- a/modules/embed_videos/views/embed_video_js.html.php +++ b/modules/embed_videos/views/embed_video_js.html.php @@ -20,8 +20,8 @@ ?> \ No newline at end of file diff --git a/modules/embed_videos/views/embedded_video.html.php b/modules/embed_videos/views/embedded_video.html.php deleted file mode 100644 index efdd7f1c..00000000 --- a/modules/embed_videos/views/embedded_video.html.php +++ /dev/null @@ -1,19 +0,0 @@ - -
- photo_top() ?> - - paginator() ?> - -
- resize_top($item) ?> - - resize_bottom($item) ?> -
- -
-

title) ?>

-
description)) ?>
-
- - photo_bottom() ?> -
From 4f2750a0e27272909edc4d305fdf3c4bf8bee3f6 Mon Sep 17 00:00:00 2001 From: brentil Date: Fri, 27 Aug 2010 21:54:56 +0800 Subject: [PATCH 28/55] Version 2.0 - 2010.08.27 Fixed: comply with translated/t("string") standards Added: New caching system. ModuleUpdates now caches the last results so that it does not check every time the page is run. The cache expires every 30 days, when the user selects the option to Check Modules for Updates, or the cache is empty. Added: Color coding for more cases when versions are out of sync (Orange = Your file version is newer than the installed version & Pink = Your installed version is newer than file version). Added: Each module now links to it's location in the Gallery Codex so if your version is out of date you can go get the official version. This also allows for manual verification of DNE modules that are not in the GitHub. Added: GitHub status check along with status check to access the internet outbound from your Gallery installation. --- .../controllers/admin_moduleupdates.php | 187 ++++++++++++++---- .../helpers/moduleupdates_installer.php | 18 +- modules/moduleupdates/module.info | 2 +- .../views/admin_moduleupdates.html.php | 48 +++-- 4 files changed, 197 insertions(+), 58 deletions(-) diff --git a/modules/moduleupdates/controllers/admin_moduleupdates.php b/modules/moduleupdates/controllers/admin_moduleupdates.php index ba812515..1a7a2508 100644 --- a/modules/moduleupdates/controllers/admin_moduleupdates.php +++ b/modules/moduleupdates/controllers/admin_moduleupdates.php @@ -39,40 +39,136 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { * @author brentil */ public function index() { + $view = new Admin_View("admin.html"); $view->page_title = t("Gallery 3 :: Manage Module Updates"); $view->content = new View("admin_moduleupdates.html"); - $all_modules = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS); + $devDebug = false; + $refreshCache = false; + + $cache = unserialize(Cache::instance()->get("moduleupdates_cache")); + $cache_updates = unserialize(Cache::instance()->get("moduleupdates_cache_updates")); + + //--------------------------------------------------------------------------------------------- + //echo 'Message 01: ' .$cache_updates . '
'; + //--------------------------------------------------------------------------------------------- + + //if someone pressed the button to refresh now + if (request::method() == "post") { + access::verify_csrf(); + $cache = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS); + $cache_updates = array("date" => "", "updates" => 0); + $refreshCache = true; + }else if(count($cache) < 1 or $cache_updates['date'] == ""){ + //if there are no items in the cache array or the update date is "" refresh the data + $cache = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS); + $cache_updates = array("date" => "", "updates" => 0); + $refreshCache = true; + } + + //Check the ability to access the Gallery3 GitHub + $GitHub = null; + try { + $GitHub = fopen ("http://github.com", "r"); + if ($GitHub != null) { + $GitHub = 'Online'; + }else{ + $GitHub = 'Offline'; + } + } + catch (Exception $e) { + //echo 'Message: ' .$e->getMessage() . '
'; + } + //Check the ability to access the Google + $Google = null; + try { + $Google = fopen ("http://google.com", "r"); + if ($Google != null) { + $Google = 'Online'; + }else{ + $Google = 'Offline'; + } + } + catch (Exception $e) { + //echo 'Message: ' .$e->getMessage() . '
'; + } - foreach (module::available() as $this_module_name => $module_info) { - - $remote_version = ''; - $remote_server = ''; - - list ($remote_version, $remote_server) = $this->get_remote_module_version($this_module_name); - - $font_color = "black"; - if ($remote_version == "DNE") { - $font_color = "blue"; - } else if ($module_info->version != '' and $module_info->code_version < $module_info->version) { - $font_color = "pink"; - } else if ($module_info->version != '' and $module_info->code_version > $module_info->version) { - $font_color = "orange"; - } else if ($remote_version < $module_info->code_version or ($module_info->version != '' and $remote_version < $module_info->version)) { - $font_color = "green"; - } else if ($remote_version > $module_info->code_version or ($module_info->version != '' and $remote_version > $module_info->version)) { - $font_color = "red"; - } + if($refreshCache == true){ + foreach (module::available() as $this_module_name => $module_info) { + + //example code for setting cache values + //Cache::instance()->set($key, "$log{$msg}", array("task", "log", "import"), 2592000); + //example delete cache + //Cache::instance()->delete("update_l10n_cache:{$task->id}"); + //example for reading cache + //$log = Cache::instance()->get($key); + + $remote_version = ''; + $remote_server = ''; + $update_count = 0; + + list ($remote_version, $remote_server) = $this->get_remote_module_version($this_module_name, $devDebug); + + $font_color = "black"; + //BLUE - DNE: Does Not Exist, this module was not found + if ($remote_version == "DNE") { + $font_color = "blue"; + //PINK - Your installed version is newer than file version + } else if ($module_info->version != '' and $module_info->code_version < $module_info->version) { + $font_color = "pink"; + //ORANGE - Your file version is newer than the installed version + } else if ($module_info->version != '' and $module_info->code_version > $module_info->version) { + $font_color = "orange"; + //GREEN - Your version is newer than the GitHub + } else if ($remote_version < $module_info->code_version or ($module_info->version != '' + and $remote_version < $module_info->version)) { + $font_color = "green"; + //RED - Your version is older than the GitHub + } else if ($remote_version > $module_info->code_version or ($module_info->version != '' + and $remote_version > $module_info->version)) { + $font_color = "red"; + $update_count++; + /* + if($remote_server == "(G3)"){ + $module_info->name = "".$module_info->name.""; + }else if($remote_server == "(G3CC)"){ + $module_info->name = "".$module_info->name.""; + }else if($remote_server == "(brentil)"){ + $module_info->name = "".$module_info->name.""; + } + */ + } + + $module_info->name = "".$module_info->name.""; + + //populate the list fo modules and their data + $cache->$this_module_name = array ("name" => $module_info->name, "locked" => $module_info->locked, + "code_version" => $module_info->code_version, "active" => $module_info->active, + "version" => $module_info->version,"description" => $module_info->description, + "remote_version" => $remote_version, "remote_server" => $remote_server, "font_color" => $font_color); + } - $all_modules->$this_module_name = array ("name" => $module_info->name, "locked" => $module_info->locked, - "code_version" => $module_info->code_version, "active" => $module_info->active, - "version" => $module_info->version,"description" => $module_info->description, - "remote_version" => $remote_version, "remote_server" => $remote_server, "font_color" => $font_color); + //Define right now as YYYY.MM.DD HH:MM with the # of updates that are out of date + $cache_updates = array("date" => date("Y.m.d - H:i"), "updates" => $update_count); + + //--------------------------------------------------------------------------------------------- + //echo 'Message 02: ' .$cache_updates . '
'; + //--------------------------------------------------------------------------------------------- + + //Write out the new data to cache with a 30 day expiration & 0 for update data so it's always present + Cache::instance()->set("moduleupdates_cache", serialize($cache), array("ModuleUpdates"), 30*86400); + Cache::instance()->set("moduleupdates_cache_updates", serialize($cache_updates), array("ModuleUpdates"), null); + log::success("moduleupdates", t("Completed checking remote GitHub for modules updates.")); } + + $view->content->vars = $cache; + $view->content->update_time = $cache_updates['date']; + $view->content->csrf = access::csrf_token(); + $view->content->Google = $Google; + $view->content->GitHub = $GitHub; - $view->content->vars = $all_modules; - + print $view; } @@ -91,22 +187,41 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { * @param String The folder name of the module to search for on the remote GitHub server * @return Array An array with the remote module version and the server it was found on. */ - private function get_remote_module_version ($module_name) { + private function get_remote_module_version ($module_name, $devDebug) { $version = 'DNE'; $server = ''; $file = null; - try { - $file = fopen ("http://github.com/gallery/gallery3/raw/master/modules/".$module_name."/module.info", "r"); - if ($file != null) { - $server = '(G3)'; - } - } - catch (Exception $e) { - //echo 'Message: ' .$e->getMessage() . '
'; + //For development debug only + if ($devDebug == true){ + if ($file == null) { + try { + $file = fopen ("http://github.com/brentil/gallery3-contrib/raw/master/modules/".$module_name."/module.info", "r"); + if ($file != null) { + $server = '(brentil)'; + } + } + catch (Exception $e) { + //echo 'Message: ' .$e->getMessage() . '
'; + } + } } + + //Check the main Gallery3 GitHub + if ($file == null) { + try { + $file = fopen ("http://github.com/gallery/gallery3/raw/master/modules/".$module_name."/module.info", "r"); + if ($file != null) { + $server = '(G3)'; + } + } + catch (Exception $e) { + //echo 'Message: ' .$e->getMessage() . '
'; + } + } + //Check the Gallery3 Community Contributions GitHub if ($file == null) { try { $file = fopen ("http://github.com/gallery/gallery3-contrib/raw/master/modules/".$module_name."/module.info", "r"); @@ -118,7 +233,7 @@ class Admin_Moduleupdates_Controller extends Admin_Controller { //echo 'Message: ' .$e->getMessage() . '
'; } } - + if ($file != null) { while (!feof ($file)) { $line = fgets ($file, 1024); diff --git a/modules/moduleupdates/helpers/moduleupdates_installer.php b/modules/moduleupdates/helpers/moduleupdates_installer.php index c15f4d82..dd0dddb8 100644 --- a/modules/moduleupdates/helpers/moduleupdates_installer.php +++ b/modules/moduleupdates/helpers/moduleupdates_installer.php @@ -17,21 +17,35 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + class moduleupdates_installer { static function install() { $version = module::get_version("moduleupdates"); if ($version == 0) { - module::set_version("moduleupdates", 1); + module::set_version("moduleupdates", 2); + //Remove the ModuleUpdates cache entry 'JIC' + Cache::instance()->delete("ModuleUpdates"); + //create the blank ModuleUpdates cache entry with an expiration of 0 days + Cache::instance()->set("moduleupdates_cache", "", array("ModuleUpdates"), null); + Cache::instance()->set("moduleupdates_cache_updates", "", array("ModuleUpdates"), null); } } static function upgrade($version) { + module::set_version("moduleupdates", 2); + //Remove the ModuleUpdates cache entry 'JIC' + Cache::instance()->delete("ModuleUpdates"); + //Empty the ModuleUpdates cache entry so our new version starts from scratch + Cache::instance()->set("moduleupdates_cache", "", array("ModuleUpdates"), null); + Cache::instance()->set("moduleupdates_cache_updates", "", array("ModuleUpdates"), null); } static function uninstall() { - + + //Remove the ModuleUpdates cache entry as we remove the module + Cache::instance()->delete("ModuleUpdates"); module::delete("moduleupdates"); } } diff --git a/modules/moduleupdates/module.info b/modules/moduleupdates/module.info index 446d30db..8fad54ff 100644 --- a/modules/moduleupdates/module.info +++ b/modules/moduleupdates/module.info @@ -1,3 +1,3 @@ name = "Module Updates" description = "Compares your installed module version against the ones stored in the GitHub." -version = 1 +version = 2 diff --git a/modules/moduleupdates/views/admin_moduleupdates.html.php b/modules/moduleupdates/views/admin_moduleupdates.html.php index 8a7c6494..3fdc06a7 100644 --- a/modules/moduleupdates/views/admin_moduleupdates.html.php +++ b/modules/moduleupdates/views/admin_moduleupdates.html.php @@ -1,21 +1,33 @@ +
-

-

-
") ?> - Red = Your version is older than the GitHub
") ?> - Green = Your version is newer than the GitHub
") ?> - Orange = Your file version is newer than the installed version
") ?> - Pink = Your installed version is newer than file version
") ?> - Blue = Does Not Exist/No information available
") ?> -

- -
    -
  • -
- +

+ +
+ +
" id="g-configure-moduleupdates-form"> + +
+ ModuleUpdates Information +
    +
  • Red = Your version is older than the GitHub
    ") ?>
  • +
  • Green = Your version is newer than the GitHub
    ") ?>
  • +
  • Orange = Your file version is newer than the installed version
    ") ?>
  • +
  • Pink = Your installed version is newer than file version
    ") ?>
  • +
  • Blue = Does Not Exist/No information available
    ") ?>
  • +
  • ") ?>
  • +
  • " class="submit" />
  • +
+
+
+ +
+
    +
  • +
+ @@ -25,14 +37,12 @@ "> - + - +
"; ?> "; ?> "; ?> "; ?> "; ?> "; ?>
-
-
-
\ No newline at end of file + \ No newline at end of file From 90ad68fcc68f3763bf4cd2caffe4f790ec08a328 Mon Sep 17 00:00:00 2001 From: hukoeth Date: Thu, 26 Aug 2010 21:46:20 +0200 Subject: [PATCH 29/55] Renamed modded tagfaces module to photoannotation to avoid confusion Started working on feature to delete annotations directly Added warning when tagfaces and photoannotation are activated at the same time --- .../controllers/photoannotation.php | 364 +++++ .../photoannotation/css/photoannotation.css | 200 +++ .../helpers/photoannotation_event.php | 86 ++ .../helpers/photoannotation_installer.php | 86 ++ .../helpers/photoannotation_theme.php | 32 + modules/photoannotation/images/delete.png | Bin 0 -> 334 bytes modules/photoannotation/images/jcrop.gif | Bin 0 -> 329 bytes modules/photoannotation/js/jquery.Jcrop.js | 1197 +++++++++++++++++ .../photoannotation/js/jquery.Jcrop.min.js | 163 +++ modules/photoannotation/js/jquery.annotate.js | 478 +++++++ .../photoannotation/js/jquery.annotate.min.js | 1 + modules/photoannotation/js/jquery.min.js | 19 + modules/photoannotation/models/items_face.php | 21 + modules/photoannotation/models/items_note.php | 21 + modules/photoannotation/module.info | 3 + .../views/photoannotation.html.php | 141 ++ .../photoannotation_highlight_block.html.php | 79 ++ 17 files changed, 2891 insertions(+) create mode 100644 modules/photoannotation/controllers/photoannotation.php create mode 100644 modules/photoannotation/css/photoannotation.css create mode 100644 modules/photoannotation/helpers/photoannotation_event.php create mode 100644 modules/photoannotation/helpers/photoannotation_installer.php create mode 100644 modules/photoannotation/helpers/photoannotation_theme.php create mode 100644 modules/photoannotation/images/delete.png create mode 100644 modules/photoannotation/images/jcrop.gif create mode 100644 modules/photoannotation/js/jquery.Jcrop.js create mode 100644 modules/photoannotation/js/jquery.Jcrop.min.js create mode 100644 modules/photoannotation/js/jquery.annotate.js create mode 100644 modules/photoannotation/js/jquery.annotate.min.js create mode 100644 modules/photoannotation/js/jquery.min.js create mode 100644 modules/photoannotation/models/items_face.php create mode 100644 modules/photoannotation/models/items_note.php create mode 100644 modules/photoannotation/module.info create mode 100644 modules/photoannotation/views/photoannotation.html.php create mode 100644 modules/photoannotation/views/photoannotation_highlight_block.html.php diff --git a/modules/photoannotation/controllers/photoannotation.php b/modules/photoannotation/controllers/photoannotation.php new file mode 100644 index 00000000..8395d726 --- /dev/null +++ b/modules/photoannotation/controllers/photoannotation.php @@ -0,0 +1,364 @@ +item_id = $item_data; + $newnote->x1 = $str_x1; + $newnote->y1 = $str_y1; + $newnote->x2 = $str_x2; + $newnote->y2 = $str_y2; + $newnote->title = $str_face_title; + $newnote->description = $str_face_description; + $newnote->save(); + } else { + // Check to see if the tag already has a face associated with it. + $existingFace = ORM::factory("items_face") + ->where("tag_id", "=", $tag_data) + ->where("item_id", "=", $item_data) + ->find_all(); + + if (count($existingFace) == 0) { + // Save the new face to the database. + $newface = ORM::factory("items_face"); + $newface->tag_id = $tag_data; + $newface->item_id = $item_data; + $newface->x1 = $str_x1; + $newface->y1 = $str_y1; + $newface->x2 = $str_x2; + $newface->y2 = $str_y2; + $newface->description = $str_face_description; + $newface->save(); + } else { + // Update the coordinates of an existing face. + $updatedFace = ORM::factory("items_face", $existingFace[0]->id); + $updatedFace->x1 = $str_x1; + $updatedFace->y1 = $str_y1; + $updatedFace->x2 = $str_x2; + $updatedFace->y2 = $str_y2; + $updatedFace->description = $str_face_description; + $updatedFace->save(); + } + } + message::success(t("Face saved.")); + url::redirect($redir_uri); + return; + } + + public function drawfaces($id) { + // Generate the page that allows the user to draw boxes over a photo. + // Make sure user has access to view and edit the photo. + $item = ORM::factory("item", $id); + access::required("view", $item); + access::required("edit", $item); + + // Create the page. + $template = new Theme_View("page.html", "other", "photoannotation"); + $template->set_global("item_id", $id); + $template->set_global("page_title", t("Draw Faces")); + $template->set_global("page_type", "other"); + $template->set_global("page_subtype", "photoface"); + $template->content = new View("photoannotation.html"); + $template->content->title = t("Tag Faces"); + $template->content->form = $this->_get_faces_form($id); + $template->content->delete_form = $this->_get_delfaces_form($id); + + // Display the page. + print $template; + } + + public function delface() { + // Delete the specified face data from the photo. + + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Convert submitted data to local variables. + // Figure out which tagged faces and notes to delete. + $tag_data = Input::instance()->post("facesList"); + $note_data = Input::instance()->post("notesList"); + // Figure out the item id, in order to reload the correct face tagging page. + $item_data = Input::instance()->post("item_id"); + + // If the user didn't select a tag or note, display and error and abort. + if ((count($tag_data) == 0) && (count($note_data) == 0)) { + message::error(t("Please select a tag or note to delete.")); + url::redirect("photoannotation/drawfaces/$item_data"); + return; + } + + // Delete the face(s) from the database. + foreach ($tag_data as $one_tag) { + db::build()->delete("items_faces")->where("id", "=", $one_tag)->execute(); + } + + // Delete the notes(s) from the database. + foreach ($note_data as $one_note) { + db::build()->delete("items_notes")->where("id", "=", $one_note)->execute(); + } + + // Display a success message for deleted faces. + if (count($tag_data) == 1) { + message::success(t("One face deleted.")); + } elseif (count($tag_data) > 1) { + message::success(count($tag_data) . t(" faces deleted.")); + } + + // Display a success message for deleted notes. + if (count($note_data) == 1) { + message::success(t("One note deleted.")); + } elseif (count($note_data) > 1) { + message::success(count($note_data) . t(" notes deleted.")); + } + + // Re-load the face tagging page. + url::redirect("photoannotation/drawfaces/$item_data"); + } + + public function saveface() { + // Save the face coordinates to the specified tag. + + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Convert submitted data to local variables. + $tag_data = Input::instance()->post("tagsList"); + $str_face_title = str_replace("'", "\'", Input::instance()->post("face_title")); + $str_face_description = str_replace("'", "\'", Input::instance()->post("face_description")); + $item_data = Input::instance()->post("item_id"); + $str_x1 = Input::instance()->post("x1"); + $str_y1 = Input::instance()->post("y1"); + $str_x2 = Input::instance()->post("x2"); + $str_y2 = Input::instance()->post("y2"); + + // If the user didn't select a face, display an error and abort. + if (($str_x1 == "") || ($str_x2 == "") || ($str_y1 == "") || ($str_y2 == "")) { + message::error(t("Please select a face.")); + url::redirect("photoannotation/drawfaces/$item_data"); + return; + } + + // Decide if we are saving a face or a note. + if ($tag_data == -1) { + // Make sure there's a title. + if ($str_face_title == "") { + message::error(t("Please select a Tag or specify a Title.")); + url::redirect("photoannotation/drawfaces/$item_data"); + return; + } + + // Save a new Note to the database. + $newnote = ORM::factory("items_note"); + $newnote->item_id = $item_data; + $newnote->x1 = $str_x1; + $newnote->y1 = $str_y1; + $newnote->x2 = $str_x2; + $newnote->y2 = $str_y2; + $newnote->title = $str_face_title; + $newnote->description = $str_face_description; + $newnote->save(); + + } else { + // Check to see if the tag already has a face associated with it. + $existingFace = ORM::factory("items_face") + ->where("tag_id", "=", $tag_data) + ->where("item_id", "=", $item_data) + ->find_all(); + + if (count($existingFace) == 0) { + // Save the new face to the database. + $newface = ORM::factory("items_face"); + $newface->tag_id = $tag_data; + $newface->item_id = $item_data; + $newface->x1 = $str_x1; + $newface->y1 = $str_y1; + $newface->x2 = $str_x2; + $newface->y2 = $str_y2; + $newface->description = $str_face_description; + $newface->save(); + } else { + // Update the coordinates of an existing face. + $updatedFace = ORM::factory("items_face", $existingFace[0]->id); + $updatedFace->x1 = $str_x1; + $updatedFace->y1 = $str_y1; + $updatedFace->x2 = $str_x2; + $updatedFace->y2 = $str_y2; + $updatedFace->description = $str_face_description; + $updatedFace->save(); + } + } + + // Redirect back to the main screen and display a "success" message. + message::success(t("Annotation saved.")); + url::redirect("photoannotation/drawfaces/$item_data"); + } + + private function _get_faces_form($id) { + // Generate the form that allows the user to select a tag to + // save the face too. Also displays the coordinates of the face + // and the "Save face" button. + + // Make a new Form. + $form = new Forge("photoannotation/saveface", "", "post", + array("id" => "g-tag-faces-form")); + + // Create an array of all the tags for the current item. + $all_tags = ORM::factory("tag") + ->join("items_tags", "tags.id", "items_tags.tag_id") + ->where("items_tags.item_id", "=", $id) + ->find_all(); + + // Generate an array of tags to use as checkboxes. + $array_tags = ""; + $array_tags[-1] = t("No Tag"); + foreach ($all_tags as $oneTag) { + $array_tags[$oneTag->id] = $oneTag->name; + } + + // Make a checklist of tags on the form. + $tags_group = $form->group("FaceTag") + ->label(t("Select a tag or enter in a title:")); + + $tags_group->dropdown('tagsList') + ->label(t("Tag:")) + ->id('tagsList') + ->options($array_tags); + + $tags_group->input("face_title") + ->id('face_title') + ->label(t("Note Title:")); + + $tags_description = $form->group("TagsDescription") + ->label(t("Description (optional):")); + $tags_description->input("face_description") + ->id('face_description'); + + // Generate input boxes to hold the coordinates of the face. + $coordinates_group = $form->group("FaceCoordinates") + ->label(t("Coordinates:")); + $coordinates_group->input('x1') + ->id('x1') + ->label(t("X1")); + $coordinates_group->input("y1") + ->id('y1') + ->label(t("Y1")); + $coordinates_group->input("x2") + ->id('x2') + ->label(t("X2")); + $coordinates_group->input("y2") + ->id('y2') + ->label(t("Y2")); + + // Add the id# of the photo and a save button to the form. + $coordinates_group->hidden("item_id")->value($id); + $form->submit("SaveFace")->value(t("Save face")); + + // Return the newly generated form. + return $form; + } + + private function _get_delfaces_form($id) { + // Generate a form to allow the user to remove face data + // from a photo. + // Make a new Form. + $form = new Forge("photoannotation/delface", "", "post", + array("id" => "g-tag-del-faces-form")); + + // Create an array of all the tags that already have faces. + $existing_faces = ORM::factory("items_face") + ->where("item_id", "=", $id) + ->find_all(); + + // turn the $existing_faces array into an array that can be used + // for a checklist. + $array_faces = ""; + foreach ($existing_faces as $oneFace) { + $array_faces[$oneFace->id] = array(ORM::factory("tag", + $oneFace->tag_id)->name, false); + } + + if ($array_faces) { + // Add a checklist to the form. + $tags_group = $form->group("ExistingFaces") + ->label(t("Tags with faces:")); + // Add the id# of the photo and a delete button to the form. + $tags_group->hidden("item_id")->value($id); + + $tags_group->checklist("facesList") + ->options($array_faces) + ->label(t("Select the tag(s) that correspond(s) to the face(s) you wish to delete:")); + } + + // Create an array of all the notes associated with this photo. + $existing_notes = ORM::factory("items_note") + ->where("item_id", "=", $id) + ->find_all(); + + // turn the $existing_notes array into an array that can be used + // for a checklist. + $array_notes = ""; + foreach ($existing_notes as $oneNote) { + $array_notes[$oneNote->id] = array($oneNote->title, false); + } + + if ($array_notes) { + // Add a checklist to the form. + $notes_group = $form->group("ExistingNotes") + ->label(t("Notes:")); + // Add the id# of the photo and a delete button to the form. + $notes_group->hidden("item_id")->value($id); + + $notes_group->checklist("notesList") + ->options($array_notes) + ->label(t("Select the notes you wish to delete:")); + } + + // Hide the delete button when there's nothing to delete. + if (($array_notes) || ($array_faces)) { + $form->submit("DeleteFace")->value(t("Delete face(s) / note(s)")); + } else { + $form->group("NoFacesNotes")->label(t("There is nothing to delete for this photo.")); + } + + // Return the newly generated form. + return $form; + } +} diff --git a/modules/photoannotation/css/photoannotation.css b/modules/photoannotation/css/photoannotation.css new file mode 100644 index 00000000..bc2f7f86 --- /dev/null +++ b/modules/photoannotation/css/photoannotation.css @@ -0,0 +1,200 @@ +.image-annotate-add { + background: #fff url(../images/asterisk_yellow.png) no-repeat 3px 3px; + color: #000 !important; + cursor: pointer; + display: block; + float: left; + font-family: Verdana, Sans-Serif; + font-size: 12px; + height: 18px; + line-height: 18px; + padding: 2px 0 2px 24px; + margin: 5px 0; + width: 64px; + text-decoration: none; +} +.image-annotate-add:hover { + background-color: #eee; +} +.image-annotate-canvas { + background-position: left top; + background-repeat: no-repeat; + display: block; + margin: 0 auto; + position: relative; +} +.image-annotate-view { + display: none; + position: relative; +} +.image-annotate-area { + border: 1px solid #000000; + position: absolute; + cursor: default; +} +.image-annotate-area div { + border: 1px solid #FFFFFF; + display: block; +} +.image-annotate-area-editable { + cursor: pointer; +} +.image-annotate-area-editable-hover div { + border-color: #00AD00 !important; +} +.image-annotate-note { + background: #000000 none repeat scroll 0 0; + color: #FFFFFF; + display: none; + font-family: Verdana, Sans-Serif; + font-size: 1.4em; + max-width: 200px; + padding: 3px 7px; + position: absolute; +} +.image-annotate-note .actions { + display: block; + font-size: 80%; +} +.image-annotate-edit { + display: none; +} +#image-annotate-edit-form { + background: #FFFFFF none repeat scroll 0 0; + border: 1px solid #000000; + height: 220px; + padding: 7px; + position: absolute; + width: 250px; +} +#image-annotate-edit-form form { + clear: right; + margin: 0 !important; + padding: 0; + z-index: 999; + text-align: left; + color: #000000; +} +#image-annotate-edit-form .box { + margin: 0; +} +#image-annotate-edit-form input.form-text, #image-annotate-edit-form #edit-comment-wrapper textarea { + width: 90%; +} +#image-annotate-edit-form textarea { + height: 50px; + font-family: Verdana, Sans-Serif; + font-size: 12px; + width: 248px; +} +#image-annotate-edit-form fieldset { + background: transparent none repeat scroll 0 0; +} +#image-annotate-edit-form .form-item { + margin: 0 0 5px; +} +#image-annotate-edit-form .form-button, #image-annotate-edit-form .form-submit { + margin: 0; +} +#image-annotate-edit-form a { + cursor: pointer; + display: block; + float: left; + margin: 3px 6px 3px 0; +} +.image-annotate-edit-area { + border: 1px solid black; + cursor: move; + display: block; + height: 60px; + left: 10px; + margin: 0; + padding: 0; + position: absolute; + top: 10px; + width: 60px; +} +.image-annotate-edit-area .ui-resizable-handle { + opacity: 0.8; +} +.image-annotate-edit-ok { + /*background-image: url(../images/accept.png);*/ +} +.image-annotate-edit-delete { + background-image: url(../images/delete.png); +} +.image-annotate-edit-close { + /*background-image: url(../images/cross.png);*/ +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + z-index: 99999; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable- autohide .ui-resizable-handle { + display: block; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0px; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0px; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0px; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0px; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.photoannotation-del-button { + background-image: url('../images/delete.png'); + cursor: pointer; +} diff --git a/modules/photoannotation/helpers/photoannotation_event.php b/modules/photoannotation/helpers/photoannotation_event.php new file mode 100644 index 00000000..011a3f09 --- /dev/null +++ b/modules/photoannotation/helpers/photoannotation_event.php @@ -0,0 +1,86 @@ +deactivate)) { + site_status::warning( + t("The Photo Annotation module requires the Tags module. " . + "Activate the Tags module now", + array("url" => url::site("admin/modules"))), + "photoannotation_needs_tag"); + } else { + site_status::clear("photoannotation_needs_tag"); + } + if (module::is_active("tagfaces") || in_array("tagfaces", $changes->activate)) { + site_status::warning( + t("The Photo Annotation module cannot be used together with the TagFaces module. " . + "Dectivate the TagFaces module now", + array("url" => url::site("admin/modules"))), + "photoannotation_incompatibility_tagfaces"); + } else { + site_status::clear("photoannotation_incompatibility_tagfaces"); + } + } + + static function site_menu($menu, $theme) { + // Create a menu option for adding face data. + if (!$theme->item()) { + return; + } + + $item = $theme->item(); + + if ($item->is_photo()) { + if ((access::can("view", $item)) && (access::can("edit", $item))) { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("photoannotation") + ->label(t("Add annotation")) + ->css_id("g-photoannotation-link") + ->url("#")); + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("photoannotation_edit") + ->label(t("Edit annotations")) + ->css_id("g-photoannotation-edit-link") + ->url(url::site("photoannotation/drawfaces/" . $item->id))); + } + } + } + + static function item_deleted($item) { + // Check for and delete existing Faces and Notes. + $existingFaces = ORM::factory("items_face") + ->where("item_id", "=", $item->id) + ->find_all(); + if (count($existingFaces) > 0) { + db::build()->delete("items_faces")->where("item_id", "=", $item->id)->execute(); + } + + $existingNotes = ORM::factory("items_note") + ->where("item_id", "=", $item->id) + ->find_all(); + if (count($existingNotes) > 0) { + db::build()->delete("items_notes")->where("item_id", "=", $item->id)->execute(); + } + } +} diff --git a/modules/photoannotation/helpers/photoannotation_installer.php b/modules/photoannotation/helpers/photoannotation_installer.php new file mode 100644 index 00000000..ea3b7c0f --- /dev/null +++ b/modules/photoannotation/helpers/photoannotation_installer.php @@ -0,0 +1,86 @@ +query("CREATE TABLE IF NOT EXISTS {items_faces} ( + `id` int(9) NOT NULL auto_increment, + `tag_id` int(9) NOT NULL, + `item_id` int(9) NOT NULL, + `x1` int(9) NOT NULL, + `y1` int(9) NOT NULL, + `x2` int(9) NOT NULL, + `y2` int(9) NOT NULL, + `description` varchar(2048) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + + $db->query("CREATE TABLE IF NOT EXISTS {items_notes} ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `x1` int(9) NOT NULL, + `y1` int(9) NOT NULL, + `x2` int(9) NOT NULL, + `y2` int(9) NOT NULL, + `title` varchar(64) NOT NULL, + `description` varchar(2048) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + + // Set the module's version number. + module::set_version("photoannotation", 1); + } + + static function upgrade($version) { + $db = Database::instance(); + if ($version == 1) { + $db->query("ALTER TABLE {items_faces} ADD `description` varchar(2048) default NULL"); + + $db->query("CREATE TABLE IF NOT EXISTS {items_notes} ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `x1` int(9) NOT NULL, + `y1` int(9) NOT NULL, + `x2` int(9) NOT NULL, + `y2` int(9) NOT NULL, + `title` varchar(64) NOT NULL, + `description` varchar(2048) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + + module::set_version("photoannotation", $version = 1); + } + } + + static function deactivate() { + // Clear the require tags message when photoannotation is deactivated. + site_status::clear("photoannotation_needs_tag"); + site_status::clear("photoannotation_incompatibility_tagfaces"); + } + + static function uninstall() { + // Delete the face table before uninstalling. + $db = Database::instance(); + $db->query("DROP TABLE IF EXISTS {items_faces};"); + $db->query("DROP TABLE IF EXISTS {items_notes};"); + module::delete("photoannotation"); + } +} diff --git a/modules/photoannotation/helpers/photoannotation_theme.php b/modules/photoannotation/helpers/photoannotation_theme.php new file mode 100644 index 00000000..27661c92 --- /dev/null +++ b/modules/photoannotation/helpers/photoannotation_theme.php @@ -0,0 +1,32 @@ +css("photoannotation.css"); + //$theme->script("jquery.annotate.js"); + Return ""; + } + + static function photo_bottom($theme) { + // If it does, add an image map to the page to display them. + return new View("photoannotation_highlight_block.html"); + } +} diff --git a/modules/photoannotation/images/delete.png b/modules/photoannotation/images/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..13eccb1c413227aa295a4ae381b395f9fe35a575 GIT binary patch literal 334 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg44k^~#Ai#Q|(DmSC^@B`7O|B6Q%N@7`SgbwR!xV2gS#4-&V7<|@K;YQn4HsowU8l{B zw)=muMa99T!brcuVt-?z#J1ez-hJ=q79W?qf4NkaVM^-Gb*uSrZ)0UxI>n#Qz&Ci_ z^K|F8DxN)t<_$BKWvtvgBvXS4w#q z3T32|*KFM)ZOncl>bIHdy^zpS=4X{+P8*`5vRefnTl`Y7sJD9_BhmI|X{5xTzuVsh X&G(3@vFxY;`i#NT)z4*}Q$iB}h5dM$ literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/jcrop.gif b/modules/photoannotation/images/jcrop.gif new file mode 100644 index 0000000000000000000000000000000000000000..72ea7ccb5321d5384d70437cfaac73011237901e GIT binary patch literal 329 zcmZ?wbhEHb9b#5NV>2k zBC~b@b~P=nNfWAe-b%_i6tS^-1y(h@EsB~1TqDA_h@fkxG$bHgvj}VxE1JLgr!*!^ ILUxTc0Q$^Q5C8xG literal 0 HcmV?d00001 diff --git a/modules/photoannotation/js/jquery.Jcrop.js b/modules/photoannotation/js/jquery.Jcrop.js new file mode 100644 index 00000000..9d68d589 --- /dev/null +++ b/modules/photoannotation/js/jquery.Jcrop.js @@ -0,0 +1,1197 @@ +/** + * jquery.Jcrop.js v0.9.8 + * jQuery Image Cropping Plugin + * @author Kelly Hallman + * Copyright (c) 2008-2009 Kelly Hallman - released under MIT License {{{ + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + + * }}} + */ + +(function($) { + +$.Jcrop = function(obj,opt) +{ + // Initialization {{{ + + // Sanitize some options {{{ + var obj = obj, opt = opt; + + if (typeof(obj) !== 'object') obj = $(obj)[0]; + if (typeof(opt) !== 'object') opt = { }; + + // Some on-the-fly fixes for MSIE...sigh + if (!('trackDocument' in opt)) + { + opt.trackDocument = $.browser.msie ? false : true; + if ($.browser.msie && $.browser.version.split('.')[0] == '8') + opt.trackDocument = true; + } + + if (!('keySupport' in opt)) + opt.keySupport = $.browser.msie ? false : true; + + // }}} + // Extend the default options {{{ + var defaults = { + + // Basic Settings + trackDocument: false, + baseClass: 'jcrop', + addClass: null, + + // Styling Options + bgColor: 'black', + bgOpacity: .6, + borderOpacity: .4, + handleOpacity: .5, + + handlePad: 5, + handleSize: 9, + handleOffset: 5, + edgeMargin: 14, + + aspectRatio: 0, + keySupport: true, + cornerHandles: true, + sideHandles: true, + drawBorders: true, + dragEdges: true, + + boxWidth: 0, + boxHeight: 0, + + boundary: 8, + animationDelay: 20, + swingSpeed: 3, + + allowSelect: true, + allowMove: true, + allowResize: true, + + minSelect: [ 0, 0 ], + maxSize: [ 0, 0 ], + minSize: [ 0, 0 ], + + // Callbacks / Event Handlers + onChange: function() { }, + onSelect: function() { } + + }; + var options = defaults; + setOptions(opt); + + // }}} + // Initialize some jQuery objects {{{ + + var $origimg = $(obj); + var $img = $origimg.clone().removeAttr('id').css({ position: 'static' }); + + $img.width($origimg.width()); + $img.height($origimg.height()); + $origimg.after($img).hide(); + + presize($img,options.boxWidth,options.boxHeight); + + var boundx = $img.width(), + boundy = $img.height(), + + $div = $('
') + .width(boundx).height(boundy) + .addClass(cssClass('holder')) + .css({ + position: 'relative', + backgroundColor: options.bgColor + }).insertAfter($origimg).append($img); + ; + + if (options.addClass) $div.addClass(options.addClass); + //$img.wrap($div); + + var $img2 = $('')/*{{{*/ + .attr('src',$img.attr('src')) + .css('position','absolute') + .width(boundx).height(boundy) + ;/*}}}*/ + var $img_holder = $('
')/*{{{*/ + .width(pct(100)).height(pct(100)) + .css({ + zIndex: 310, + position: 'absolute', + overflow: 'hidden' + }) + .append($img2) + ;/*}}}*/ + var $hdl_holder = $('
')/*{{{*/ + .width(pct(100)).height(pct(100)) + .css('zIndex',320); + /*}}}*/ + var $sel = $('
')/*{{{*/ + .css({ + position: 'absolute', + zIndex: 300 + }) + .insertBefore($img) + .append($img_holder,$hdl_holder) + ;/*}}}*/ + + var bound = options.boundary; + var $trk = newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)) + .css({ position: 'absolute', top: px(-bound), left: px(-bound), zIndex: 290 }) + .mousedown(newSelection); + + /* }}} */ + // Set more variables {{{ + + var xlimit, ylimit, xmin, ymin; + var xscale, yscale, enabled = true; + var docOffset = getPos($img), + // Internal states + btndown, lastcurs, dimmed, animating, + shift_down; + + // }}} + + + // }}} + // Internal Modules {{{ + + var Coords = function()/*{{{*/ + { + var x1 = 0, y1 = 0, x2 = 0, y2 = 0, ox, oy; + + function setPressed(pos)/*{{{*/ + { + var pos = rebound(pos); + x2 = x1 = pos[0]; + y2 = y1 = pos[1]; + }; + /*}}}*/ + function setCurrent(pos)/*{{{*/ + { + var pos = rebound(pos); + ox = pos[0] - x2; + oy = pos[1] - y2; + x2 = pos[0]; + y2 = pos[1]; + }; + /*}}}*/ + function getOffset()/*{{{*/ + { + return [ ox, oy ]; + }; + /*}}}*/ + function moveOffset(offset)/*{{{*/ + { + var ox = offset[0], oy = offset[1]; + + if (0 > x1 + ox) ox -= ox + x1; + if (0 > y1 + oy) oy -= oy + y1; + + if (boundy < y2 + oy) oy += boundy - (y2 + oy); + if (boundx < x2 + ox) ox += boundx - (x2 + ox); + + x1 += ox; + x2 += ox; + y1 += oy; + y2 += oy; + }; + /*}}}*/ + function getCorner(ord)/*{{{*/ + { + var c = getFixed(); + switch(ord) + { + case 'ne': return [ c.x2, c.y ]; + case 'nw': return [ c.x, c.y ]; + case 'se': return [ c.x2, c.y2 ]; + case 'sw': return [ c.x, c.y2 ]; + } + }; + /*}}}*/ + function getFixed()/*{{{*/ + { + if (!options.aspectRatio) return getRect(); + // This function could use some optimization I think... + var aspect = options.aspectRatio, + min_x = options.minSize[0]/xscale, + min_y = options.minSize[1]/yscale, + max_x = options.maxSize[0]/xscale, + max_y = options.maxSize[1]/yscale, + rw = x2 - x1, + rh = y2 - y1, + rwa = Math.abs(rw), + rha = Math.abs(rh), + real_ratio = rwa / rha, + xx, yy + ; + if (max_x == 0) { max_x = boundx * 10 } + if (max_y == 0) { max_y = boundy * 10 } + if (real_ratio < aspect) + { + yy = y2; + w = rha * aspect; + xx = rw < 0 ? x1 - w : w + x1; + + if (xx < 0) + { + xx = 0; + h = Math.abs((xx - x1) / aspect); + yy = rh < 0 ? y1 - h: h + y1; + } + else if (xx > boundx) + { + xx = boundx; + h = Math.abs((xx - x1) / aspect); + yy = rh < 0 ? y1 - h : h + y1; + } + } + else + { + xx = x2; + h = rwa / aspect; + yy = rh < 0 ? y1 - h : y1 + h; + if (yy < 0) + { + yy = 0; + w = Math.abs((yy - y1) * aspect); + xx = rw < 0 ? x1 - w : w + x1; + } + else if (yy > boundy) + { + yy = boundy; + w = Math.abs(yy - y1) * aspect; + xx = rw < 0 ? x1 - w : w + x1; + } + } + + // Magic %-) + if(xx > x1) { // right side + if(xx - x1 < min_x) { + xx = x1 + min_x; + } else if (xx - x1 > max_x) { + xx = x1 + max_x; + } + if(yy > y1) { + yy = y1 + (xx - x1)/aspect; + } else { + yy = y1 - (xx - x1)/aspect; + } + } else if (xx < x1) { // left side + if(x1 - xx < min_x) { + xx = x1 - min_x + } else if (x1 - xx > max_x) { + xx = x1 - max_x; + } + if(yy > y1) { + yy = y1 + (x1 - xx)/aspect; + } else { + yy = y1 - (x1 - xx)/aspect; + } + } + + if(xx < 0) { + x1 -= xx; + xx = 0; + } else if (xx > boundx) { + x1 -= xx - boundx; + xx = boundx; + } + + if(yy < 0) { + y1 -= yy; + yy = 0; + } else if (yy > boundy) { + y1 -= yy - boundy; + yy = boundy; + } + + return last = makeObj(flipCoords(x1,y1,xx,yy)); + }; + /*}}}*/ + function rebound(p)/*{{{*/ + { + if (p[0] < 0) p[0] = 0; + if (p[1] < 0) p[1] = 0; + + if (p[0] > boundx) p[0] = boundx; + if (p[1] > boundy) p[1] = boundy; + + return [ p[0], p[1] ]; + }; + /*}}}*/ + function flipCoords(x1,y1,x2,y2)/*{{{*/ + { + var xa = x1, xb = x2, ya = y1, yb = y2; + if (x2 < x1) + { + xa = x2; + xb = x1; + } + if (y2 < y1) + { + ya = y2; + yb = y1; + } + return [ Math.round(xa), Math.round(ya), Math.round(xb), Math.round(yb) ]; + }; + /*}}}*/ + function getRect()/*{{{*/ + { + var xsize = x2 - x1; + var ysize = y2 - y1; + + if (xlimit && (Math.abs(xsize) > xlimit)) + x2 = (xsize > 0) ? (x1 + xlimit) : (x1 - xlimit); + if (ylimit && (Math.abs(ysize) > ylimit)) + y2 = (ysize > 0) ? (y1 + ylimit) : (y1 - ylimit); + + if (ymin && (Math.abs(ysize) < ymin)) + y2 = (ysize > 0) ? (y1 + ymin) : (y1 - ymin); + if (xmin && (Math.abs(xsize) < xmin)) + x2 = (xsize > 0) ? (x1 + xmin) : (x1 - xmin); + + if (x1 < 0) { x2 -= x1; x1 -= x1; } + if (y1 < 0) { y2 -= y1; y1 -= y1; } + if (x2 < 0) { x1 -= x2; x2 -= x2; } + if (y2 < 0) { y1 -= y2; y2 -= y2; } + if (x2 > boundx) { var delta = x2 - boundx; x1 -= delta; x2 -= delta; } + if (y2 > boundy) { var delta = y2 - boundy; y1 -= delta; y2 -= delta; } + if (x1 > boundx) { var delta = x1 - boundy; y2 -= delta; y1 -= delta; } + if (y1 > boundy) { var delta = y1 - boundy; y2 -= delta; y1 -= delta; } + + return makeObj(flipCoords(x1,y1,x2,y2)); + }; + /*}}}*/ + function makeObj(a)/*{{{*/ + { + return { x: a[0], y: a[1], x2: a[2], y2: a[3], + w: a[2] - a[0], h: a[3] - a[1] }; + }; + /*}}}*/ + + return { + flipCoords: flipCoords, + setPressed: setPressed, + setCurrent: setCurrent, + getOffset: getOffset, + moveOffset: moveOffset, + getCorner: getCorner, + getFixed: getFixed + }; + }(); + + /*}}}*/ + var Selection = function()/*{{{*/ + { + var start, end, dragmode, awake, hdep = 370; + var borders = { }; + var handle = { }; + var seehandles = false; + var hhs = options.handleOffset; + + /* Insert draggable elements {{{*/ + + // Insert border divs for outline + if (options.drawBorders) { + borders = { + top: insertBorder('hline') + .css('top',$.browser.msie?px(-1):px(0)), + bottom: insertBorder('hline'), + left: insertBorder('vline'), + right: insertBorder('vline') + }; + } + + // Insert handles on edges + if (options.dragEdges) { + handle.t = insertDragbar('n'); + handle.b = insertDragbar('s'); + handle.r = insertDragbar('e'); + handle.l = insertDragbar('w'); + } + + // Insert side handles + options.sideHandles && + createHandles(['n','s','e','w']); + + // Insert corner handles + options.cornerHandles && + createHandles(['sw','nw','ne','se']); + + /*}}}*/ + // Private Methods + function insertBorder(type)/*{{{*/ + { + var jq = $('
') + .css({position: 'absolute', opacity: options.borderOpacity }) + .addClass(cssClass(type)); + $img_holder.append(jq); + return jq; + }; + /*}}}*/ + function dragDiv(ord,zi)/*{{{*/ + { + var jq = $('
') + .mousedown(createDragger(ord)) + .css({ + cursor: ord+'-resize', + position: 'absolute', + zIndex: zi + }) + ; + $hdl_holder.append(jq); + return jq; + }; + /*}}}*/ + function insertHandle(ord)/*{{{*/ + { + return dragDiv(ord,hdep++) + .css({ top: px(-hhs+1), left: px(-hhs+1), opacity: options.handleOpacity }) + .addClass(cssClass('handle')); + }; + /*}}}*/ + function insertDragbar(ord)/*{{{*/ + { + var s = options.handleSize, + o = hhs, + h = s, w = s, + t = o, l = o; + + switch(ord) + { + case 'n': case 's': w = pct(100); break; + case 'e': case 'w': h = pct(100); break; + } + + return dragDiv(ord,hdep++).width(w).height(h) + .css({ top: px(-t+1), left: px(-l+1)}); + }; + /*}}}*/ + function createHandles(li)/*{{{*/ + { + for(i in li) handle[li[i]] = insertHandle(li[i]); + }; + /*}}}*/ + function moveHandles(c)/*{{{*/ + { + var midvert = Math.round((c.h / 2) - hhs), + midhoriz = Math.round((c.w / 2) - hhs), + north = west = -hhs+1, + east = c.w - hhs, + south = c.h - hhs, + x, y; + + 'e' in handle && + handle.e.css({ top: px(midvert), left: px(east) }) && + handle.w.css({ top: px(midvert) }) && + handle.s.css({ top: px(south), left: px(midhoriz) }) && + handle.n.css({ left: px(midhoriz) }); + + 'ne' in handle && + handle.ne.css({ left: px(east) }) && + handle.se.css({ top: px(south), left: px(east) }) && + handle.sw.css({ top: px(south) }); + + 'b' in handle && + handle.b.css({ top: px(south) }) && + handle.r.css({ left: px(east) }); + }; + /*}}}*/ + function moveto(x,y)/*{{{*/ + { + $img2.css({ top: px(-y), left: px(-x) }); + $sel.css({ top: px(y), left: px(x) }); + }; + /*}}}*/ + function resize(w,h)/*{{{*/ + { + $sel.width(w).height(h); + }; + /*}}}*/ + function refresh()/*{{{*/ + { + var c = Coords.getFixed(); + + Coords.setPressed([c.x,c.y]); + Coords.setCurrent([c.x2,c.y2]); + + updateVisible(); + }; + /*}}}*/ + + // Internal Methods + function updateVisible()/*{{{*/ + { if (awake) return update(); }; + /*}}}*/ + function update()/*{{{*/ + { + var c = Coords.getFixed(); + + resize(c.w,c.h); + moveto(c.x,c.y); + + options.drawBorders && + borders['right'].css({ left: px(c.w-1) }) && + borders['bottom'].css({ top: px(c.h-1) }); + + seehandles && moveHandles(c); + awake || show(); + + options.onChange(unscale(c)); + }; + /*}}}*/ + function show()/*{{{*/ + { + $sel.show(); + $img.css('opacity',options.bgOpacity); + awake = true; + }; + /*}}}*/ + function release()/*{{{*/ + { + disableHandles(); + $sel.hide(); + $img.css('opacity',1); + awake = false; + }; + /*}}}*/ + function showHandles()//{{{ + { + if (seehandles) + { + moveHandles(Coords.getFixed()); + $hdl_holder.show(); + } + }; + //}}} + function enableHandles()/*{{{*/ + { + seehandles = true; + if (options.allowResize) + { + moveHandles(Coords.getFixed()); + $hdl_holder.show(); + return true; + } + }; + /*}}}*/ + function disableHandles()/*{{{*/ + { + seehandles = false; + $hdl_holder.hide(); + }; + /*}}}*/ + function animMode(v)/*{{{*/ + { + (animating = v) ? disableHandles(): enableHandles(); + }; + /*}}}*/ + function done()/*{{{*/ + { + animMode(false); + refresh(); + }; + /*}}}*/ + + var $track = newTracker().mousedown(createDragger('move')) + .css({ cursor: 'move', position: 'absolute', zIndex: 360 }) + + $img_holder.append($track); + disableHandles(); + + return { + updateVisible: updateVisible, + update: update, + release: release, + refresh: refresh, + setCursor: function (cursor) { $track.css('cursor',cursor); }, + enableHandles: enableHandles, + enableOnly: function() { seehandles = true; }, + showHandles: showHandles, + disableHandles: disableHandles, + animMode: animMode, + done: done + }; + }(); + /*}}}*/ + var Tracker = function()/*{{{*/ + { + var onMove = function() { }, + onDone = function() { }, + trackDoc = options.trackDocument; + + if (!trackDoc) + { + $trk + .mousemove(trackMove) + .mouseup(trackUp) + .mouseout(trackUp) + ; + } + + function toFront()/*{{{*/ + { + $trk.css({zIndex:450}); + if (trackDoc) + { + $(document) + .mousemove(trackMove) + .mouseup(trackUp) + ; + } + } + /*}}}*/ + function toBack()/*{{{*/ + { + $trk.css({zIndex:290}); + if (trackDoc) + { + $(document) + .unbind('mousemove',trackMove) + .unbind('mouseup',trackUp) + ; + } + } + /*}}}*/ + function trackMove(e)/*{{{*/ + { + onMove(mouseAbs(e)); + }; + /*}}}*/ + function trackUp(e)/*{{{*/ + { + e.preventDefault(); + e.stopPropagation(); + + if (btndown) + { + btndown = false; + + onDone(mouseAbs(e)); + options.onSelect(unscale(Coords.getFixed())); + toBack(); + onMove = function() { }; + onDone = function() { }; + } + + return false; + }; + /*}}}*/ + + function activateHandlers(move,done)/* {{{ */ + { + btndown = true; + onMove = move; + onDone = done; + toFront(); + return false; + }; + /* }}} */ + + function setCursor(t) { $trk.css('cursor',t); }; + + $img.before($trk); + return { + activateHandlers: activateHandlers, + setCursor: setCursor + }; + }(); + /*}}}*/ + var KeyManager = function()/*{{{*/ + { + var $keymgr = $('') + .css({ position: 'absolute', left: '-30px' }) + .keypress(parseKey) + .blur(onBlur), + + $keywrap = $('
') + .css({ + position: 'absolute', + overflow: 'hidden' + }) + .append($keymgr) + ; + + function watchKeys()/*{{{*/ + { + if (options.keySupport) + { + $keymgr.show(); + $keymgr.focus(); + } + }; + /*}}}*/ + function onBlur(e)/*{{{*/ + { + $keymgr.hide(); + }; + /*}}}*/ + function doNudge(e,x,y)/*{{{*/ + { + if (options.allowMove) { + Coords.moveOffset([x,y]); + Selection.updateVisible(); + }; + e.preventDefault(); + e.stopPropagation(); + }; + /*}}}*/ + function parseKey(e)/*{{{*/ + { + if (e.ctrlKey) return true; + shift_down = e.shiftKey ? true : false; + var nudge = shift_down ? 10 : 1; + switch(e.keyCode) + { + case 37: doNudge(e,-nudge,0); break; + case 39: doNudge(e,nudge,0); break; + case 38: doNudge(e,0,-nudge); break; + case 40: doNudge(e,0,nudge); break; + + case 27: Selection.release(); break; + + case 9: return true; + } + + return nothing(e); + }; + /*}}}*/ + + if (options.keySupport) $keywrap.insertBefore($img); + return { + watchKeys: watchKeys + }; + }(); + /*}}}*/ + + // }}} + // Internal Methods {{{ + + function px(n) { return '' + parseInt(n) + 'px'; }; + function pct(n) { return '' + parseInt(n) + '%'; }; + function cssClass(cl) { return options.baseClass + '-' + cl; }; + function getPos(obj)/*{{{*/ + { + // Updated in v0.9.4 to use built-in dimensions plugin + var pos = $(obj).offset(); + return [ pos.left, pos.top ]; + }; + /*}}}*/ + function mouseAbs(e)/*{{{*/ + { + return [ (e.pageX - docOffset[0]), (e.pageY - docOffset[1]) ]; + }; + /*}}}*/ + function myCursor(type)/*{{{*/ + { + if (type != lastcurs) + { + Tracker.setCursor(type); + //Handles.xsetCursor(type); + lastcurs = type; + } + }; + /*}}}*/ + function startDragMode(mode,pos)/*{{{*/ + { + docOffset = getPos($img); + Tracker.setCursor(mode=='move'?mode:mode+'-resize'); + + if (mode == 'move') + return Tracker.activateHandlers(createMover(pos), doneSelect); + + var fc = Coords.getFixed(); + var opp = oppLockCorner(mode); + var opc = Coords.getCorner(oppLockCorner(opp)); + + Coords.setPressed(Coords.getCorner(opp)); + Coords.setCurrent(opc); + + Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect); + }; + /*}}}*/ + function dragmodeHandler(mode,f)/*{{{*/ + { + return function(pos) { + if (!options.aspectRatio) switch(mode) + { + case 'e': pos[1] = f.y2; break; + case 'w': pos[1] = f.y2; break; + case 'n': pos[0] = f.x2; break; + case 's': pos[0] = f.x2; break; + } + else switch(mode) + { + case 'e': pos[1] = f.y+1; break; + case 'w': pos[1] = f.y+1; break; + case 'n': pos[0] = f.x+1; break; + case 's': pos[0] = f.x+1; break; + } + Coords.setCurrent(pos); + Selection.update(); + }; + }; + /*}}}*/ + function createMover(pos)/*{{{*/ + { + var lloc = pos; + KeyManager.watchKeys(); + + return function(pos) + { + Coords.moveOffset([pos[0] - lloc[0], pos[1] - lloc[1]]); + lloc = pos; + + Selection.update(); + }; + }; + /*}}}*/ + function oppLockCorner(ord)/*{{{*/ + { + switch(ord) + { + case 'n': return 'sw'; + case 's': return 'nw'; + case 'e': return 'nw'; + case 'w': return 'ne'; + case 'ne': return 'sw'; + case 'nw': return 'se'; + case 'se': return 'nw'; + case 'sw': return 'ne'; + }; + }; + /*}}}*/ + function createDragger(ord)/*{{{*/ + { + return function(e) { + if (options.disabled) return false; + if ((ord == 'move') && !options.allowMove) return false; + btndown = true; + startDragMode(ord,mouseAbs(e)); + e.stopPropagation(); + e.preventDefault(); + return false; + }; + }; + /*}}}*/ + function presize($obj,w,h)/*{{{*/ + { + var nw = $obj.width(), nh = $obj.height(); + if ((nw > w) && w > 0) + { + nw = w; + nh = (w/$obj.width()) * $obj.height(); + } + if ((nh > h) && h > 0) + { + nh = h; + nw = (h/$obj.height()) * $obj.width(); + } + xscale = $obj.width() / nw; + yscale = $obj.height() / nh; + $obj.width(nw).height(nh); + }; + /*}}}*/ + function unscale(c)/*{{{*/ + { + return { + x: parseInt(c.x * xscale), y: parseInt(c.y * yscale), + x2: parseInt(c.x2 * xscale), y2: parseInt(c.y2 * yscale), + w: parseInt(c.w * xscale), h: parseInt(c.h * yscale) + }; + }; + /*}}}*/ + function doneSelect(pos)/*{{{*/ + { + var c = Coords.getFixed(); + if (c.w > options.minSelect[0] && c.h > options.minSelect[1]) + { + Selection.enableHandles(); + Selection.done(); + } + else + { + Selection.release(); + } + Tracker.setCursor( options.allowSelect?'crosshair':'default' ); + }; + /*}}}*/ + function newSelection(e)/*{{{*/ + { + if (options.disabled) return false; + if (!options.allowSelect) return false; + btndown = true; + docOffset = getPos($img); + Selection.disableHandles(); + myCursor('crosshair'); + var pos = mouseAbs(e); + Coords.setPressed(pos); + Tracker.activateHandlers(selectDrag,doneSelect); + KeyManager.watchKeys(); + Selection.update(); + + e.stopPropagation(); + e.preventDefault(); + return false; + }; + /*}}}*/ + function selectDrag(pos)/*{{{*/ + { + Coords.setCurrent(pos); + Selection.update(); + }; + /*}}}*/ + function newTracker() + { + var trk = $('
').addClass(cssClass('tracker')); + $.browser.msie && trk.css({ opacity: 0, backgroundColor: 'white' }); + return trk; + }; + + // }}} + // API methods {{{ + + function animateTo(a)/*{{{*/ + { + var x1 = a[0] / xscale, + y1 = a[1] / yscale, + x2 = a[2] / xscale, + y2 = a[3] / yscale; + + if (animating) return; + + var animto = Coords.flipCoords(x1,y1,x2,y2); + var c = Coords.getFixed(); + var animat = initcr = [ c.x, c.y, c.x2, c.y2 ]; + var interv = options.animationDelay; + + var x = animat[0]; + var y = animat[1]; + var x2 = animat[2]; + var y2 = animat[3]; + var ix1 = animto[0] - initcr[0]; + var iy1 = animto[1] - initcr[1]; + var ix2 = animto[2] - initcr[2]; + var iy2 = animto[3] - initcr[3]; + var pcent = 0; + var velocity = options.swingSpeed; + + Selection.animMode(true); + + var animator = function() + { + return function() + { + pcent += (100 - pcent) / velocity; + + animat[0] = x + ((pcent / 100) * ix1); + animat[1] = y + ((pcent / 100) * iy1); + animat[2] = x2 + ((pcent / 100) * ix2); + animat[3] = y2 + ((pcent / 100) * iy2); + + if (pcent < 100) animateStart(); + else Selection.done(); + + if (pcent >= 99.8) pcent = 100; + + setSelectRaw(animat); + }; + }(); + + function animateStart() + { window.setTimeout(animator,interv); }; + + animateStart(); + }; + /*}}}*/ + function setSelect(rect)//{{{ + { + setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]); + }; + //}}} + function setSelectRaw(l) /*{{{*/ + { + Coords.setPressed([l[0],l[1]]); + Coords.setCurrent([l[2],l[3]]); + Selection.update(); + }; + /*}}}*/ + function setOptions(opt)/*{{{*/ + { + if (typeof(opt) != 'object') opt = { }; + options = $.extend(options,opt); + + if (typeof(options.onChange)!=='function') + options.onChange = function() { }; + + if (typeof(options.onSelect)!=='function') + options.onSelect = function() { }; + + }; + /*}}}*/ + function tellSelect()/*{{{*/ + { + return unscale(Coords.getFixed()); + }; + /*}}}*/ + function tellScaled()/*{{{*/ + { + return Coords.getFixed(); + }; + /*}}}*/ + function setOptionsNew(opt)/*{{{*/ + { + setOptions(opt); + interfaceUpdate(); + }; + /*}}}*/ + function disableCrop()//{{{ + { + options.disabled = true; + Selection.disableHandles(); + Selection.setCursor('default'); + Tracker.setCursor('default'); + }; + //}}} + function enableCrop()//{{{ + { + options.disabled = false; + interfaceUpdate(); + }; + //}}} + function cancelCrop()//{{{ + { + Selection.done(); + Tracker.activateHandlers(null,null); + }; + //}}} + function destroy()//{{{ + { + $div.remove(); + $origimg.show(); + }; + //}}} + + function interfaceUpdate(alt)//{{{ + // This method tweaks the interface based on options object. + // Called when options are changed and at end of initialization. + { + options.allowResize ? + alt?Selection.enableOnly():Selection.enableHandles(): + Selection.disableHandles(); + + Tracker.setCursor( options.allowSelect? 'crosshair': 'default' ); + Selection.setCursor( options.allowMove? 'move': 'default' ); + + $div.css('backgroundColor',options.bgColor); + + if ('setSelect' in options) { + setSelect(opt.setSelect); + Selection.done(); + delete(options.setSelect); + } + + if ('trueSize' in options) { + xscale = options.trueSize[0] / boundx; + yscale = options.trueSize[1] / boundy; + } + + xlimit = options.maxSize[0] || 0; + ylimit = options.maxSize[1] || 0; + xmin = options.minSize[0] || 0; + ymin = options.minSize[1] || 0; + + if ('outerImage' in options) + { + $img.attr('src',options.outerImage); + delete(options.outerImage); + } + + Selection.refresh(); + }; + //}}} + + // }}} + + $hdl_holder.hide(); + interfaceUpdate(true); + + var api = { + animateTo: animateTo, + setSelect: setSelect, + setOptions: setOptionsNew, + tellSelect: tellSelect, + tellScaled: tellScaled, + + disable: disableCrop, + enable: enableCrop, + cancel: cancelCrop, + + focus: KeyManager.watchKeys, + + getBounds: function() { return [ boundx * xscale, boundy * yscale ]; }, + getWidgetSize: function() { return [ boundx, boundy ]; }, + + release: Selection.release, + destroy: destroy + + }; + + $origimg.data('Jcrop',api); + return api; +}; + +$.fn.Jcrop = function(options)/*{{{*/ +{ + function attachWhenDone(from)/*{{{*/ + { + var loadsrc = options.useImg || from.src; + var img = new Image(); + img.onload = function() { $.Jcrop(from,options); }; + img.src = loadsrc; + }; + /*}}}*/ + if (typeof(options) !== 'object') options = { }; + + // Iterate over each object, attach Jcrop + this.each(function() + { + // If we've already attached to this object + if ($(this).data('Jcrop')) + { + // The API can be requested this way (undocumented) + if (options == 'api') return $(this).data('Jcrop'); + // Otherwise, we just reset the options... + else $(this).data('Jcrop').setOptions(options); + } + // If we haven't been attached, preload and attach + else attachWhenDone(this); + }); + + // Return "this" so we're chainable a la jQuery plugin-style! + return this; +}; +/*}}}*/ + +})(jQuery); diff --git a/modules/photoannotation/js/jquery.Jcrop.min.js b/modules/photoannotation/js/jquery.Jcrop.min.js new file mode 100644 index 00000000..cdf50ea7 --- /dev/null +++ b/modules/photoannotation/js/jquery.Jcrop.min.js @@ -0,0 +1,163 @@ +/** + * Jcrop v.0.9.8 (minimized) + * (c) 2008 Kelly Hallman and DeepLiquid.com + * More information: http://deepliquid.com/content/Jcrop.html + * Released under MIT License - this header must remain with code + */ + + +(function($){$.Jcrop=function(obj,opt) +{var obj=obj,opt=opt;if(typeof(obj)!=='object')obj=$(obj)[0];if(typeof(opt)!=='object')opt={};if(!('trackDocument'in opt)) +{opt.trackDocument=$.browser.msie?false:true;if($.browser.msie&&$.browser.version.split('.')[0]=='8') +opt.trackDocument=true;} +if(!('keySupport'in opt)) +opt.keySupport=$.browser.msie?false:true;var defaults={trackDocument:false,baseClass:'jcrop',addClass:null,bgColor:'black',bgOpacity:.6,borderOpacity:.4,handleOpacity:.5,handlePad:5,handleSize:9,handleOffset:5,edgeMargin:14,aspectRatio:0,keySupport:true,cornerHandles:true,sideHandles:true,drawBorders:true,dragEdges:true,boxWidth:0,boxHeight:0,boundary:8,animationDelay:20,swingSpeed:3,allowSelect:true,allowMove:true,allowResize:true,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){}};var options=defaults;setOptions(opt);var $origimg=$(obj);var $img=$origimg.clone().removeAttr('id').css({position:'absolute'});$img.width($origimg.width());$img.height($origimg.height());$origimg.after($img).hide();presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$('
').width(boundx).height(boundy).addClass(cssClass('holder')).css({position:'relative',backgroundColor:options.bgColor}).insertAfter($origimg).append($img);;if(options.addClass)$div.addClass(options.addClass);var $img2=$('').attr('src',$img.attr('src')).css('position','absolute').width(boundx).height(boundy);var $img_holder=$('
').width(pct(100)).height(pct(100)).css({zIndex:310,position:'absolute',overflow:'hidden'}).append($img2);var $hdl_holder=$('
').width(pct(100)).height(pct(100)).css('zIndex',320);var $sel=$('
').css({position:'absolute',zIndex:300}).insertBefore($img).append($img_holder,$hdl_holder);var bound=options.boundary;var $trk=newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)).css({position:'absolute',top:px(-bound),left:px(-bound),zIndex:290}).mousedown(newSelection);var xlimit,ylimit,xmin,ymin;var xscale,yscale,enabled=true;var docOffset=getPos($img),btndown,lastcurs,dimmed,animating,shift_down;var Coords=function() +{var x1=0,y1=0,x2=0,y2=0,ox,oy;function setPressed(pos) +{var pos=rebound(pos);x2=x1=pos[0];y2=y1=pos[1];};function setCurrent(pos) +{var pos=rebound(pos);ox=pos[0]-x2;oy=pos[1]-y2;x2=pos[0];y2=pos[1];};function getOffset() +{return[ox,oy];};function moveOffset(offset) +{var ox=offset[0],oy=offset[1];if(0>x1+ox)ox-=ox+x1;if(0>y1+oy)oy-=oy+y1;if(boundyboundx) +{xx=boundx;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}} +else +{xx=x2;h=rwa/aspect;yy=rh<0?y1-h:y1+h;if(yy<0) +{yy=0;w=Math.abs((yy-y1)*aspect);xx=rw<0?x1-w:w+x1;} +else if(yy>boundy) +{yy=boundy;w=Math.abs(yy-y1)*aspect;xx=rw<0?x1-w:w+x1;}} +if(xx>x1){if(xx-x1max_x){xx=x1+max_x;} +if(yy>y1){yy=y1+(xx-x1)/aspect;}else{yy=y1-(xx-x1)/aspect;}}else if(xxmax_x){xx=x1-max_x;} +if(yy>y1){yy=y1+(x1-xx)/aspect;}else{yy=y1-(x1-xx)/aspect;}} +if(xx<0){x1-=xx;xx=0;}else if(xx>boundx){x1-=xx-boundx;xx=boundx;} +if(yy<0){y1-=yy;yy=0;}else if(yy>boundy){y1-=yy-boundy;yy=boundy;} +return last=makeObj(flipCoords(x1,y1,xx,yy));};function rebound(p) +{if(p[0]<0)p[0]=0;if(p[1]<0)p[1]=0;if(p[0]>boundx)p[0]=boundx;if(p[1]>boundy)p[1]=boundy;return[p[0],p[1]];};function flipCoords(x1,y1,x2,y2) +{var xa=x1,xb=x2,ya=y1,yb=y2;if(x2xlimit)) +x2=(xsize>0)?(x1+xlimit):(x1-xlimit);if(ylimit&&(Math.abs(ysize)>ylimit)) +y2=(ysize>0)?(y1+ylimit):(y1-ylimit);if(ymin&&(Math.abs(ysize)0)?(y1+ymin):(y1-ymin);if(xmin&&(Math.abs(xsize)0)?(x1+xmin):(x1-xmin);if(x1<0){x2-=x1;x1-=x1;} +if(y1<0){y2-=y1;y1-=y1;} +if(x2<0){x1-=x2;x2-=x2;} +if(y2<0){y1-=y2;y2-=y2;} +if(x2>boundx){var delta=x2-boundx;x1-=delta;x2-=delta;} +if(y2>boundy){var delta=y2-boundy;y1-=delta;y2-=delta;} +if(x1>boundx){var delta=x1-boundy;y2-=delta;y1-=delta;} +if(y1>boundy){var delta=y1-boundy;y2-=delta;y1-=delta;} +return makeObj(flipCoords(x1,y1,x2,y2));};function makeObj(a) +{return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]};};return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed};}();var Selection=function() +{var start,end,dragmode,awake,hdep=370;var borders={};var handle={};var seehandles=false;var hhs=options.handleOffset;if(options.drawBorders){borders={top:insertBorder('hline').css('top',$.browser.msie?px(-1):px(0)),bottom:insertBorder('hline'),left:insertBorder('vline'),right:insertBorder('vline')};} +if(options.dragEdges){handle.t=insertDragbar('n');handle.b=insertDragbar('s');handle.r=insertDragbar('e');handle.l=insertDragbar('w');} +options.sideHandles&&createHandles(['n','s','e','w']);options.cornerHandles&&createHandles(['sw','nw','ne','se']);function insertBorder(type) +{var jq=$('
').css({position:'absolute',opacity:options.borderOpacity}).addClass(cssClass(type));$img_holder.append(jq);return jq;};function dragDiv(ord,zi) +{var jq=$('
').mousedown(createDragger(ord)).css({cursor:ord+'-resize',position:'absolute',zIndex:zi});$hdl_holder.append(jq);return jq;};function insertHandle(ord) +{return dragDiv(ord,hdep++).css({top:px(-hhs+1),left:px(-hhs+1),opacity:options.handleOpacity}).addClass(cssClass('handle'));};function insertDragbar(ord) +{var s=options.handleSize,o=hhs,h=s,w=s,t=o,l=o;switch(ord) +{case'n':case's':w=pct(100);break;case'e':case'w':h=pct(100);break;} +return dragDiv(ord,hdep++).width(w).height(h).css({top:px(-t+1),left:px(-l+1)});};function createHandles(li) +{for(i in li)handle[li[i]]=insertHandle(li[i]);};function moveHandles(c) +{var midvert=Math.round((c.h/2)-hhs),midhoriz=Math.round((c.w/2)-hhs),north=west=-hhs+1,east=c.w-hhs,south=c.h-hhs,x,y;'e'in handle&&handle.e.css({top:px(midvert),left:px(east)})&&handle.w.css({top:px(midvert)})&&handle.s.css({top:px(south),left:px(midhoriz)})&&handle.n.css({left:px(midhoriz)});'ne'in handle&&handle.ne.css({left:px(east)})&&handle.se.css({top:px(south),left:px(east)})&&handle.sw.css({top:px(south)});'b'in handle&&handle.b.css({top:px(south)})&&handle.r.css({left:px(east)});};function moveto(x,y) +{$img2.css({top:px(-y),left:px(-x)});$sel.css({top:px(y),left:px(x)});};function resize(w,h) +{$sel.width(w).height(h);};function refresh() +{var c=Coords.getFixed();Coords.setPressed([c.x,c.y]);Coords.setCurrent([c.x2,c.y2]);updateVisible();};function updateVisible() +{if(awake)return update();};function update() +{var c=Coords.getFixed();resize(c.w,c.h);moveto(c.x,c.y);options.drawBorders&&borders['right'].css({left:px(c.w-1)})&&borders['bottom'].css({top:px(c.h-1)});seehandles&&moveHandles(c);awake||show();options.onChange(unscale(c));};function show() +{$sel.show();$img.css('opacity',options.bgOpacity);awake=true;};function release() +{disableHandles();$sel.hide();$img.css('opacity',1);awake=false;};function showHandles() +{if(seehandles) +{moveHandles(Coords.getFixed());$hdl_holder.show();}};function enableHandles() +{seehandles=true;if(options.allowResize) +{moveHandles(Coords.getFixed());$hdl_holder.show();return true;}};function disableHandles() +{seehandles=false;$hdl_holder.hide();};function animMode(v) +{(animating=v)?disableHandles():enableHandles();};function done() +{animMode(false);refresh();};var $track=newTracker().mousedown(createDragger('move')).css({cursor:'move',position:'absolute',zIndex:360}) +$img_holder.append($track);disableHandles();return{updateVisible:updateVisible,update:update,release:release,refresh:refresh,setCursor:function(cursor){$track.css('cursor',cursor);},enableHandles:enableHandles,enableOnly:function(){seehandles=true;},showHandles:showHandles,disableHandles:disableHandles,animMode:animMode,done:done};}();var Tracker=function() +{var onMove=function(){},onDone=function(){},trackDoc=options.trackDocument;if(!trackDoc) +{$trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp);} +function toFront() +{$trk.css({zIndex:450});if(trackDoc) +{$(document).mousemove(trackMove).mouseup(trackUp);}} +function toBack() +{$trk.css({zIndex:290});if(trackDoc) +{$(document).unbind('mousemove',trackMove).unbind('mouseup',trackUp);}} +function trackMove(e) +{onMove(mouseAbs(e));};function trackUp(e) +{e.preventDefault();e.stopPropagation();if(btndown) +{btndown=false;onDone(mouseAbs(e));options.onSelect(unscale(Coords.getFixed()));toBack();onMove=function(){};onDone=function(){};} +return false;};function activateHandlers(move,done) +{btndown=true;onMove=move;onDone=done;toFront();return false;};function setCursor(t){$trk.css('cursor',t);};$img.before($trk);return{activateHandlers:activateHandlers,setCursor:setCursor};}();var KeyManager=function() +{var $keymgr=$('').css({position:'absolute',left:'-30px'}).keypress(parseKey).blur(onBlur),$keywrap=$('
').css({position:'absolute',overflow:'hidden'}).append($keymgr);function watchKeys() +{if(options.keySupport) +{$keymgr.show();$keymgr.focus();}};function onBlur(e) +{$keymgr.hide();};function doNudge(e,x,y) +{if(options.allowMove){Coords.moveOffset([x,y]);Selection.updateVisible();};e.preventDefault();e.stopPropagation();};function parseKey(e) +{if(e.ctrlKey)return true;shift_down=e.shiftKey?true:false;var nudge=shift_down?10:1;switch(e.keyCode) +{case 37:doNudge(e,-nudge,0);break;case 39:doNudge(e,nudge,0);break;case 38:doNudge(e,0,-nudge);break;case 40:doNudge(e,0,nudge);break;case 27:Selection.release();break;case 9:return true;} +return nothing(e);};if(options.keySupport)$keywrap.insertBefore($img);return{watchKeys:watchKeys};}();function px(n){return''+parseInt(n)+'px';};function pct(n){return''+parseInt(n)+'%';};function cssClass(cl){return options.baseClass+'-'+cl;};function getPos(obj) +{var pos=$(obj).offset();return[pos.left,pos.top];};function mouseAbs(e) +{return[(e.pageX-docOffset[0]),(e.pageY-docOffset[1])];};function myCursor(type) +{if(type!=lastcurs) +{Tracker.setCursor(type);lastcurs=type;}};function startDragMode(mode,pos) +{docOffset=getPos($img);Tracker.setCursor(mode=='move'?mode:mode+'-resize');if(mode=='move') +return Tracker.activateHandlers(createMover(pos),doneSelect);var fc=Coords.getFixed();var opp=oppLockCorner(mode);var opc=Coords.getCorner(oppLockCorner(opp));Coords.setPressed(Coords.getCorner(opp));Coords.setCurrent(opc);Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect);};function dragmodeHandler(mode,f) +{return function(pos){if(!options.aspectRatio)switch(mode) +{case'e':pos[1]=f.y2;break;case'w':pos[1]=f.y2;break;case'n':pos[0]=f.x2;break;case's':pos[0]=f.x2;break;} +else switch(mode) +{case'e':pos[1]=f.y+1;break;case'w':pos[1]=f.y+1;break;case'n':pos[0]=f.x+1;break;case's':pos[0]=f.x+1;break;} +Coords.setCurrent(pos);Selection.update();};};function createMover(pos) +{var lloc=pos;KeyManager.watchKeys();return function(pos) +{Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]);lloc=pos;Selection.update();};};function oppLockCorner(ord) +{switch(ord) +{case'n':return'sw';case's':return'nw';case'e':return'nw';case'w':return'ne';case'ne':return'sw';case'nw':return'se';case'se':return'nw';case'sw':return'ne';};};function createDragger(ord) +{return function(e){if(options.disabled)return false;if((ord=='move')&&!options.allowMove)return false;btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false;};};function presize($obj,w,h) +{var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0) +{nw=w;nh=(w/$obj.width())*$obj.height();} +if((nh>h)&&h>0) +{nh=h;nw=(h/$obj.height())*$obj.width();} +xscale=$obj.width()/nw;yscale=$obj.height()/nh;$obj.width(nw).height(nh);};function unscale(c) +{return{x:parseInt(c.x*xscale),y:parseInt(c.y*yscale),x2:parseInt(c.x2*xscale),y2:parseInt(c.y2*yscale),w:parseInt(c.w*xscale),h:parseInt(c.h*yscale)};};function doneSelect(pos) +{var c=Coords.getFixed();if(c.w>options.minSelect[0]&&c.h>options.minSelect[1]) +{Selection.enableHandles();Selection.done();} +else +{Selection.release();} +Tracker.setCursor(options.allowSelect?'crosshair':'default');};function newSelection(e) +{if(options.disabled)return false;if(!options.allowSelect)return false;btndown=true;docOffset=getPos($img);Selection.disableHandles();myCursor('crosshair');var pos=mouseAbs(e);Coords.setPressed(pos);Tracker.activateHandlers(selectDrag,doneSelect);KeyManager.watchKeys();Selection.update();e.stopPropagation();e.preventDefault();return false;};function selectDrag(pos) +{Coords.setCurrent(pos);Selection.update();};function newTracker() +{var trk=$('
').addClass(cssClass('tracker'));$.browser.msie&&trk.css({opacity:0,backgroundColor:'white'});return trk;};function animateTo(a) +{var x1=a[0]/xscale,y1=a[1]/yscale,x2=a[2]/xscale,y2=a[3]/yscale;if(animating)return;var animto=Coords.flipCoords(x1,y1,x2,y2);var c=Coords.getFixed();var animat=initcr=[c.x,c.y,c.x2,c.y2];var interv=options.animationDelay;var x=animat[0];var y=animat[1];var x2=animat[2];var y2=animat[3];var ix1=animto[0]-initcr[0];var iy1=animto[1]-initcr[1];var ix2=animto[2]-initcr[2];var iy2=animto[3]-initcr[3];var pcent=0;var velocity=options.swingSpeed;Selection.animMode(true);var animator=function() +{return function() +{pcent+=(100-pcent)/velocity;animat[0]=x+((pcent/100)*ix1);animat[1]=y+((pcent/100)*iy1);animat[2]=x2+((pcent/100)*ix2);animat[3]=y2+((pcent/100)*iy2);if(pcent<100)animateStart();else Selection.done();if(pcent>=99.8)pcent=100;setSelectRaw(animat);};}();function animateStart() +{window.setTimeout(animator,interv);};animateStart();};function setSelect(rect) +{setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]);};function setSelectRaw(l) +{Coords.setPressed([l[0],l[1]]);Coords.setCurrent([l[2],l[3]]);Selection.update();};function setOptions(opt) +{if(typeof(opt)!='object')opt={};options=$.extend(options,opt);if(typeof(options.onChange)!=='function') +options.onChange=function(){};if(typeof(options.onSelect)!=='function') +options.onSelect=function(){};};function tellSelect() +{return unscale(Coords.getFixed());};function tellScaled() +{return Coords.getFixed();};function setOptionsNew(opt) +{setOptions(opt);interfaceUpdate();};function disableCrop() +{options.disabled=true;Selection.disableHandles();Selection.setCursor('default');Tracker.setCursor('default');};function enableCrop() +{options.disabled=false;interfaceUpdate();};function cancelCrop() +{Selection.done();Tracker.activateHandlers(null,null);};function destroy() +{$div.remove();$origimg.show();};function interfaceUpdate(alt) +{options.allowResize?alt?Selection.enableOnly():Selection.enableHandles():Selection.disableHandles();Tracker.setCursor(options.allowSelect?'crosshair':'default');Selection.setCursor(options.allowMove?'move':'default');$div.css('backgroundColor',options.bgColor);if('setSelect'in options){setSelect(opt.setSelect);Selection.done();delete(options.setSelect);} +if('trueSize'in options){xscale=options.trueSize[0]/boundx;yscale=options.trueSize[1]/boundy;} +xlimit=options.maxSize[0]||0;ylimit=options.maxSize[1]||0;xmin=options.minSize[0]||0;ymin=options.minSize[1]||0;if('outerImage'in options) +{$img.attr('src',options.outerImage);delete(options.outerImage);} +Selection.refresh();};$hdl_holder.hide();interfaceUpdate(true);var api={animateTo:animateTo,setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled,disable:disableCrop,enable:enableCrop,cancel:cancelCrop,focus:KeyManager.watchKeys,getBounds:function(){return[boundx*xscale,boundy*yscale];},getWidgetSize:function(){return[boundx,boundy];},release:Selection.release,destroy:destroy};$origimg.data('Jcrop',api);return api;};$.fn.Jcrop=function(options) +{function attachWhenDone(from) +{var loadsrc=options.useImg||from.src;var img=new Image();img.onload=function(){$.Jcrop(from,options);};img.src=loadsrc;};if(typeof(options)!=='object')options={};this.each(function() +{if($(this).data('Jcrop')) +{if(options=='api')return $(this).data('Jcrop');else $(this).data('Jcrop').setOptions(options);} +else attachWhenDone(this);});return this;};})(jQuery); \ No newline at end of file diff --git a/modules/photoannotation/js/jquery.annotate.js b/modules/photoannotation/js/jquery.annotate.js new file mode 100644 index 00000000..264f19b2 --- /dev/null +++ b/modules/photoannotation/js/jquery.annotate.js @@ -0,0 +1,478 @@ +/// +(function($) { + + $.fn.annotateImage = function(options) { + /// + /// Creates annotations on the given image. + /// Images are loaded from the "getUrl" propety passed into the options. + /// + var opts = $.extend({}, $.fn.annotateImage.defaults, options); + var image = this; + + this.image = this; + this.mode = 'view'; + + // Assign defaults + this.getUrl = opts.getUrl; + this.saveUrl = opts.saveUrl; + this.deleteUrl = opts.deleteUrl; + this.currentUrl = opts.currentUrl; + this.deleteUrl = opts.deleteUrl; + this.editable = opts.editable; + this.useAjax = opts.useAjax; + this.tags = opts.tags; + this.notes = opts.notes; + this.labels = opts.labels; + this.csrf = opts.csrf; + + // Add the canvas + this.canvas = $('
'); + this.canvas.children('.image-annotate-edit').hide(); + this.canvas.children('.image-annotate-view').hide(); + this.image.after(this.canvas); + + // Give the canvas and the container their size and background + this.canvas.height(this.height()); + this.canvas.width(this.width()); + this.canvas.css('background-image', 'url("' + this.attr('src') + '")'); + this.canvas.children('.image-annotate-view, .image-annotate-edit').height(this.height()); + this.canvas.children('.image-annotate-view, .image-annotate-edit').width(this.width()); + + // Add the behavior: hide/show the notes when hovering the picture + this.canvas.hover(function() { + if ($(this).children('.image-annotate-edit').css('display') == 'none') { + $(this).children('.image-annotate-view').show(); + } + }, function() { + $(this).children('.image-annotate-view').hide(); + $(this).children('.image-annotate-note').hide(); + }); + + this.canvas.children('.image-annotate-view').hover(function() { + $(this).show(); + }, function() { + $(this).hide(); + $(this).children('.image-annotate-note').hide(); + }); + + // load the notes + if (this.useAjax) { + $.fn.annotateImage.ajaxLoad(this); + } else { + $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl); + } + + // Add the "Add a note" button + if ($('#g-photoannotation-link').length != 0) { + this.button = $('#g-photoannotation-link'); + this.button.click(function() { + $.fn.annotateImage.add(image, opts.tags, opts.labels, opts.saveUrl, opts.currentUrl, opts.csrf); + }); + //this.canvas.after(this.button); + } + + // Hide the original + this.hide(); + + return this; + }; + + /** + * Plugin Defaults + **/ + $.fn.annotateImage.defaults = { + getUrl: 'your-get.rails', + saveUrl: 'your-save.rails', + deleteUrl: 'your-delete.rails', + editable: true, + useAjax: true, + tags: new Array(), + notes: new Array() + }; + + $.fn.annotateImage.clear = function(image) { + /// + /// Clears all existing annotations from the image. + /// + for (var i = 0; i < image.notes.length; i++) { + image.notes[image.notes[i]].destroy(); + } + image.notes = new Array(); + }; + + $.fn.annotateImage.ajaxLoad = function(image) { + /// + /// Loads the annotations from the "getUrl" property passed in on the + /// options object. + /// + $.getJSON(image.getUrl + '?ticks=' + $.fn.annotateImage.getTicks(), function(data) { + image.notes = data; + $.fn.annotateImage.load(image); + }); + }; + + $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl) { + /// + /// Loads the annotations from the notes property passed in on the + /// options object. + /// + for (var i = 0; i < image.notes.length; i++) { + image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], labels, editable, csrf, deleteUrl); + } + }; + + $.fn.annotateImage.getTicks = function() { + /// + /// Gets a count og the ticks for the current date. + /// This is used to ensure that URLs are always unique and not cached by the browser. + /// + var now = new Date(); + return now.getTime(); + }; + + $.fn.annotateImage.add = function(image, tags, labels, saveUrl, currentUrl, csrf) { + /// + /// Adds a note to the image. + /// + if (image.mode == 'view') { + image.mode = 'edit'; + + // Create/prepare the editable note elements + var editable = new $.fn.annotateEdit(image, null, tags, labels, saveUrl, currentUrl, csrf); + + $.fn.annotateImage.createSaveButton(editable, image); + $.fn.annotateImage.createCancelButton(editable, image); + } + }; + + $.fn.annotateImage.createSaveButton = function(editable, image, note) { + /// + /// Creates a Save button on the editable note. + /// + var ok = $('OK'); + + ok.click(function() { + var form = $('#image-annotate-edit-form form'); + var text = $('#image-annotate-text').val(); + $.fn.annotateImage.appendPosition(form, editable) + image.mode = 'view'; + + form.submit(); + + editable.destroy(); + }); + editable.form.append(ok); + }; + + $.fn.annotateImage.createCancelButton = function(editable, image) { + /// + /// Creates a Cancel button on the editable note. + /// + var cancel = $('Cancel'); + cancel.click(function() { + editable.destroy(); + image.mode = 'view'; + }); + editable.form.append(cancel); + }; + + $.fn.annotateImage.saveAsHtml = function(image, target) { + var element = $(target); + var html = ""; + for (var i = 0; i < image.notes.length; i++) { + html += $.fn.annotateImage.createHiddenField("text_" + i, image.notes[i].text); + html += $.fn.annotateImage.createHiddenField("top_" + i, image.notes[i].top); + html += $.fn.annotateImage.createHiddenField("left_" + i, image.notes[i].left); + html += $.fn.annotateImage.createHiddenField("height_" + i, image.notes[i].height); + html += $.fn.annotateImage.createHiddenField("width_" + i, image.notes[i].width); + } + element.html(html); + }; + + $.fn.annotateImage.createHiddenField = function(name, value) { + return '<input type="hidden" name="' + name + '" value="' + value + '" />
'; + }; + + $.fn.annotateEdit = function(image, note, tags, labels, saveUrl, currentUrl, csrf) { + /// + /// Defines an editable annotation area. + /// + this.image = image; + + if (note) { + this.note = note; + } else { + var newNote = new Object(); + newNote.id = "new"; + newNote.top = 30; + newNote.left = 30; + newNote.width = 30; + newNote.height = 30; + newNote.text = ""; + this.note = newNote; + } + + // Set area + var area = image.canvas.children('.image-annotate-edit').children('.image-annotate-edit-area'); + this.area = area; + this.area.css('height', this.note.height + 'px'); + this.area.css('width', this.note.width + 'px'); + this.area.css('left', this.note.left + 'px'); + this.area.css('top', this.note.top + 'px'); + + // Show the edition canvas and hide the view canvas + image.canvas.children('.image-annotate-view').hide(); + image.canvas.children('.image-annotate-edit').show(); + + // Add the note (which we'll load with the form afterwards) + var tagdropdown = labels[0] + ''; + var form = $('
' + tagdropdown + labels[1] + '' + labels[2] + '
'); + this.form = form; + + $('body').append(this.form); + this.form.css('left', this.area.offset().left + 'px'); + this.form.css('top', (parseInt(this.area.offset().top) + parseInt(this.area.height()) + 7) + 'px'); + + // Set the area as a draggable/resizable element contained in the image canvas. + // Would be better to use the containment option for resizable but buggy + area.resizable({ + handles: 'all', + + stop: function(e, ui) { + form.css('left', area.offset().left + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + } + }) + .draggable({ + containment: image.canvas, + drag: function(e, ui) { + form.css('left', area.offset().left + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + }, + stop: function(e, ui) { + form.css('left', area.offset().left + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + } + }); + return this; + }; + + $.fn.annotateEdit.prototype.destroy = function() { + /// + /// Destroys an editable annotation area. + /// + this.image.canvas.children('.image-annotate-edit').hide(); + this.area.resizable('destroy'); + this.area.draggable('destroy'); + this.area.css('height', ''); + this.area.css('width', ''); + this.area.css('left', ''); + this.area.css('top', ''); + this.form.remove(); + } + + $.fn.annotateView = function(image, note, labels, editable, csrf, deleteUrl) { + /// + /// Defines a annotation area. + /// + this.image = image; + + this.note = note; + + // Add the area + this.area = $('
'); + image.canvas.children('.image-annotate-view').prepend(this.area); + + if (editable) { + this.delarea = $('
'); + image.canvas.children('.image-annotate-view').prepend(this.delarea); + this.delarea.bind('click',function () { + if (confirm(labels[3])) { + var alink = $(".g-fullsize-link"); + alink.unbind(); + alink.attr ('href', '#'); + alink.removeAttr ('rel'); + window.location = deleteUrl + "/" + csrf; + } + }) + this.delarea.hide(); + } + + // Add the note + this.form = $('
' + note.text + '
'); + this.form.hide(); + image.canvas.children('.image-annotate-view').append(this.form); + this.form.children('span.actions').hide(); + + // Set the position and size of the note + this.setPosition(); + + // Add the behavior: hide/display the note when hovering the area + var annotation = this; + this.area.hover(function() { + annotation.show(); + if (annotation.delarea != undefined) { + annotation.delarea.show(); + } + }, function() { + annotation.hide(); + if (annotation.delarea != undefined) { + annotation.delarea.hide(); + } + }); + + if (editable) { + this.delarea.hover(function() { + annotation.delarea.show(); + }, function() { + annotation.delarea.hide(); + }); + } + // Edit a note feature + if (note.url != "" && note.url != null) { + this.area.bind('click',function () { + var alink = $(".g-fullsize-link"); + alink.unbind(); + alink.attr ('href', '#'); + alink.removeAttr ('rel'); + window.location = note.url; + }) + } + + + + }; + + $.fn.annotateView.prototype.setPosition = function() { + /// + /// Sets the position of an annotation. + /// + this.area.children('div').height((parseInt(this.note.height) - 2) + 'px'); + this.area.children('div').width((parseInt(this.note.width) - 2) + 'px'); + this.area.css('left', (this.note.left) + 'px'); + this.area.css('top', (this.note.top) + 'px'); + this.form.css('left', (this.note.left) + 'px'); + this.form.css('top', (parseInt(this.note.top) + parseInt(this.note.height) + 7) + 'px'); + + if (this.delarea != undefined) { + this.delarea.children('div').height('14px'); + this.delarea.children('div').width('14px'); + this.delarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); + this.delarea.css('top', (this.note.top) + 'px'); + } + }; + + $.fn.annotateView.prototype.show = function() { + /// + /// Highlights the annotation + /// + this.form.fadeIn(250); + if (!this.note.editable) { + this.area.addClass('image-annotate-area-hover'); + } else { + this.area.addClass('image-annotate-area-editable-hover'); + } + }; + + $.fn.annotateView.prototype.hide = function() { + /// + /// Removes the highlight from the annotation. + /// + this.form.fadeOut(250); + this.area.removeClass('image-annotate-area-hover'); + this.area.removeClass('image-annotate-area-editable-hover'); + }; + + $.fn.annotateView.prototype.destroy = function() { + /// + /// Destroys the annotation. + /// + this.area.remove(); + this.form.remove(); + } + + $.fn.annotateView.prototype.edit = function() { + /// + /// Edits the annotation. + /// + if (this.image.mode == 'view') { + this.image.mode = 'edit'; + var annotation = this; + + // Create/prepare the editable note elements + var editable = new $.fn.annotateEdit(this.image, this.note); + + $.fn.annotateImage.createSaveButton(editable, this.image, annotation); + + // Add the delete button + var del = $('Delete'); + del.click(function() { + var form = $('#image-annotate-edit-form form'); + + $.fn.annotateImage.appendPosition(form, editable) + + if (annotation.image.useAjax) { + $.ajax({ + url: annotation.image.deleteUrl, + data: form.serialize(), + error: function(e) { alert("An error occured deleting that note.") } + }); + } + + annotation.image.mode = 'view'; + editable.destroy(); + annotation.destroy(); + }); + editable.form.append(del); + + $.fn.annotateImage.createCancelButton(editable, this.image); + } + }; + + $.fn.annotateImage.appendPosition = function(form, editable) { + /// + /// Appends the annotations coordinates to the given form that is posted to the server. + /// + var areaFields = $('' + + '' + + '' + + '' + + ''); + form.append(areaFields); + } + + $.fn.annotateView.prototype.resetPosition = function(editable, text) { + /// + /// Sets the position of an annotation. + /// + this.form.html(text); + this.form.hide(); + + // Resize + this.area.children('div').height(editable.area.height() + 'px'); + this.area.children('div').width((editable.area.width() - 2) + 'px'); + this.area.css('left', (editable.area.position().left) + 'px'); + this.area.css('top', (editable.area.position().top) + 'px'); + this.form.css('left', (editable.area.position().left) + 'px'); + this.form.css('top', (parseInt(editable.area.position().top) + parseInt(editable.area.height()) + 7) + 'px'); + + // Save new position to note + this.note.top = editable.area.position().top; + this.note.left = editable.area.position().left; + this.note.height = editable.area.height(); + this.note.width = editable.area.width(); + this.note.text = text; + this.note.id = editable.note.id; + this.editable = true; + }; + +})(jQuery); diff --git a/modules/photoannotation/js/jquery.annotate.min.js b/modules/photoannotation/js/jquery.annotate.min.js new file mode 100644 index 00000000..e56337fd --- /dev/null +++ b/modules/photoannotation/js/jquery.annotate.min.js @@ -0,0 +1 @@ +(function($){$.fn.annotateImage=function(options){var opts=$.extend({},$.fn.annotateImage.defaults,options);var image=this;this.image=this;this.mode='view';this.getUrl=opts.getUrl;this.saveUrl=opts.saveUrl;this.deleteUrl=opts.deleteUrl;this.editable=opts.editable;this.useAjax=opts.useAjax;this.notes=opts.notes;this.canvas=$('
');this.canvas.children('.image-annotate-edit').hide();this.canvas.children('.image-annotate-view').hide();this.image.after(this.canvas);this.canvas.height(this.height());this.canvas.width(this.width());this.canvas.css('background-image','url("'+this.attr('src')+'")');this.canvas.children('.image-annotate-view, .image-annotate-edit').height(this.height());this.canvas.children('.image-annotate-view, .image-annotate-edit').width(this.width());this.canvas.hover(function(){if($(this).children('.image-annotate-edit').css('display')=='none'){$(this).children('.image-annotate-view').show()}},function(){$(this).children('.image-annotate-view').hide();$(this).children('.image-annotate-note').hide()});this.canvas.children('.image-annotate-view').hover(function(){$(this).show()},function(){$(this).hide();$(this).children('.image-annotate-note').hide()});if(this.useAjax){$.fn.annotateImage.ajaxLoad(this)}else{$.fn.annotateImage.load(this)}if(this.editable){this.button=$('Add Note');this.button.click(function(){$.fn.annotateImage.add(image)});this.canvas.after(this.button)}this.hide();return this};$.fn.annotateImage.defaults={getUrl:'your-get.rails',saveUrl:'your-save.rails',deleteUrl:'your-delete.rails',editable:true,useAjax:true,notes:new Array()};$.fn.annotateImage.clear=function(image){for(var i=0;iOK');ok.click(function(){var form=$('#image-annotate-edit-form form');var text=$('#image-annotate-text').val();$.fn.annotateImage.appendPosition(form,editable)image.mode='view';if(image.useAjax){$.ajax({url:image.saveUrl,data:form.serialize(),error:function(e){alert("An error occured saving that note.")},success:function(data){if(data.annotation_id!=undefined){editable.note.id=data.annotation_id}},dataType:"json"})}if(note){note.resetPosition(editable,text)}else{editable.note.editable=true;note=new $.fn.annotateView(image,editable.note)note.resetPosition(editable,text);image.notes.push(editable.note)}editable.destroy()});editable.form.append(ok)};$.fn.annotateImage.createCancelButton=function(editable,image){var cancel=$('Cancel');cancel.click(function(){editable.destroy();image.mode='view'});editable.form.append(cancel)};$.fn.annotateImage.saveAsHtml=function(image,target){var element=$(target);var html="";for(var i=0;i'};$.fn.annotateEdit=function(image,note){this.image=image;if(note){this.note=note}else{var newNote=new Object();newNote.id="new";newNote.top=30;newNote.left=30;newNote.width=30;newNote.height=30;newNote.text="";this.note=newNote}var area=image.canvas.children('.image-annotate-edit').children('.image-annotate-edit-area');this.area=area;this.area.css('height',this.note.height+'px');this.area.css('width',this.note.width+'px');this.area.css('left',this.note.left+'px');this.area.css('top',this.note.top+'px');image.canvas.children('.image-annotate-view').hide();image.canvas.children('.image-annotate-edit').show();var form=$('
');this.form=form;$('body').append(this.form);this.form.css('left',this.area.offset().left+'px');this.form.css('top',(parseInt(this.area.offset().top)+parseInt(this.area.height())+7)+'px');area.resizable({handles:'all',stop:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')}}).draggable({containment:image.canvas,drag:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')},stop:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')}});return this};$.fn.annotateEdit.prototype.destroy=function(){this.image.canvas.children('.image-annotate-edit').hide();this.area.resizable('destroy');this.area.draggable('destroy');this.area.css('height','');this.area.css('width','');this.area.css('left','');this.area.css('top','');this.form.remove()}$.fn.annotateView=function(image,note){this.image=image;this.note=note;this.area=$('
');image.canvas.children('.image-annotate-view').prepend(this.area);this.form=$('
'+note.text+'
');this.form.hide();image.canvas.children('.image-annotate-view').append(this.form);this.form.children('span.actions').hide();this.setPosition();var annotation=this;this.area.hover(function(){annotation.show()},function(){annotation.hide()});if(note.url!=""&¬e.url!=null){this.area.bind('click',function(){window.location=note.url})}};$.fn.annotateView.prototype.setPosition=function(){this.area.children('div').height((parseInt(this.note.height)-2)+'px');this.area.children('div').width((parseInt(this.note.width)-2)+'px');this.area.css('left',(this.note.left)+'px');this.area.css('top',(this.note.top)+'px');this.form.css('left',(this.note.left)+'px');this.form.css('top',(parseInt(this.note.top)+parseInt(this.note.height)+7)+'px')};$.fn.annotateView.prototype.show=function(){this.form.fadeIn(250);if(!this.editable){this.area.addClass('image-annotate-area-hover')}else{this.area.addClass('image-annotate-area-editable-hover')}};$.fn.annotateView.prototype.hide=function(){this.form.fadeOut(250);this.area.removeClass('image-annotate-area-hover');this.area.removeClass('image-annotate-area-editable-hover')};$.fn.annotateView.prototype.destroy=function(){this.area.remove();this.form.remove()}$.fn.annotateView.prototype.edit=function(){if(this.image.mode=='view'){this.image.mode='edit';var annotation=this;var editable=new $.fn.annotateEdit(this.image,this.note);$.fn.annotateImage.createSaveButton(editable,this.image,annotation);var del=$('Delete');del.click(function(){var form=$('#image-annotate-edit-form form');$.fn.annotateImage.appendPosition(form,editable)if(annotation.image.useAjax){$.ajax({url:annotation.image.deleteUrl,data:form.serialize(),error:function(e){alert("An error occured deleting that note.")}})}annotation.image.mode='view';editable.destroy();annotation.destroy()});editable.form.append(del);$.fn.annotateImage.createCancelButton(editable,this.image)}};$.fn.annotateImage.appendPosition=function(form,editable){var areaFields=$(''+''+''+''+'');form.append(areaFields)}$.fn.annotateView.prototype.resetPosition=function(editable,text){this.form.html(text);this.form.hide();this.area.children('div').height(editable.area.height()+'px');this.area.children('div').width((editable.area.width()-2)+'px');this.area.css('left',(editable.area.position().left)+'px');this.area.css('top',(editable.area.position().top)+'px');this.form.css('left',(editable.area.position().left)+'px');this.form.css('top',(parseInt(editable.area.position().top)+parseInt(editable.area.height())+7)+'px');this.note.top=editable.area.position().top;this.note.left=editable.area.position().left;this.note.height=editable.area.height();this.note.width=editable.area.width();this.note.text=text;this.note.id=editable.note.id;this.editable=true}})(jQuery); diff --git a/modules/photoannotation/js/jquery.min.js b/modules/photoannotation/js/jquery.min.js new file mode 100644 index 00000000..55c2e6d7 --- /dev/null +++ b/modules/photoannotation/js/jquery.min.js @@ -0,0 +1,19 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/modules/photoannotation/models/items_face.php b/modules/photoannotation/models/items_face.php new file mode 100644 index 00000000..70395b35 --- /dev/null +++ b/modules/photoannotation/models/items_face.php @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + +
+ dynamic_top() ?> +
+

+

+ resize_img(array("id" => "g-select-photo-id-{$item->id}", "class" => "g-select-resize", "style" => "position: fixed;")) ?> +
+
+ + + +
+ +
+ +


+ +
+
+

+ +
+
+ +
+ + + +dynamic_bottom() ?> diff --git a/modules/photoannotation/views/photoannotation_highlight_block.html.php b/modules/photoannotation/views/photoannotation_highlight_block.html.php new file mode 100644 index 00000000..bc18d181 --- /dev/null +++ b/modules/photoannotation/views/photoannotation_highlight_block.html.php @@ -0,0 +1,79 @@ +where("item_id", "=", $item->id) + ->find_all(); + $existingNotes = ORM::factory("items_note") + ->where("item_id", "=", $item->id) + ->find_all(); + $tags_arraystring = ""; + $jscode = ""; + // If it does, then insert some javascript and display an image map + // to show where the faces are at. + if ((count($existingFaces) > 0) || (count($existingNotes) > 0)) { + $jscode = "notes: [ "; + foreach ($existingFaces as $oneFace) { + $oneTag = ORM::factory("tag", $oneFace->tag_id); + $jscode .= "{ \"top\": ". $oneFace->y1 .",\n"; + $jscode .= "\"left\": ". $oneFace->x1 .",\n"; + $jscode .= "\"width\": ". ($oneFace->x2 - $oneFace->x1) .",\n"; + $jscode .= "\"height\": ". ($oneFace->y2 - $oneFace->y1) .",\n"; + $jscode .= "\"text\": \"". html::clean($oneTag->name) ."\",\n"; + $jscode .= "\"noteid\": ". $oneNote->id .",\n"; + $jscode .= "\"editable\": true,\n"; + $jscode .= "\"url\": \"". $oneTag->url() ."\" },\n"; + } + + foreach ($existingNotes as $oneNote) { + $tagdesc = ""; + if ($oneNote->description) { + $tagdesc = "
". html::clean($oneNote->description); + } + $jscode .= "{ \"top\": ". $oneNote->y1 .",\n"; + $jscode .= "\"left\": ". $oneNote->x1 .",\n"; + $jscode .= "\"width\": ". ($oneNote->x2 - $oneNote->x1) .",\n"; + $jscode .= "\"height\": ". ($oneNote->y2 - $oneNote->y1) .",\n"; + $jscode .= "\"text\": \"". html::clean($oneNote->title) . $tagdesc ."\",\n"; + $jscode .= "\"noteid\": ". $oneNote->id .",\n"; + $jscode .= "\"editable\": false,\n"; + $jscode .= "\"url\": \"\" },\n"; + } + $jscode = trim($jscode, ",\n"); + $jscode .= " ],"; + } + $item_tags = ORM::factory("tag") + ->join("items_tags", "tags.id", "items_tags.tag_id") + ->where("items_tags.item_id", "=", $item->id) + ->find_all(); + $tags_arraystring = "tags: [ "; + foreach ($item_tags as $current_tag) { + $tags_arraystring .= "{'name':'". html::clean($current_tag->name) ."','id':'". $current_tag->id ."'},"; + } + $tags_arraystring = trim($tags_arraystring, ","); + $tags_arraystring .= " ],"; + $labels_arraystring = "labels: [ '". t("Tag:") ."','". t("Note Title:") ."','". t("Description (optional):") ."','". t("Are you sure you want to delete this annotation?") ."' ],"; +?> + + + + From 92ac174dd9e142d89cc97e34793f065869948771 Mon Sep 17 00:00:00 2001 From: hukoeth Date: Sat, 28 Aug 2010 10:49:50 +0200 Subject: [PATCH 30/55] Removed tagfaces interface, annotations can now be deleted on the photo, annotations can be displayed under the photo --- .../controllers/admin_photoannotation.php | 57 + .../controllers/photoannotation.php | 476 ++----- .../photoannotation/css/photoannotation.css | 382 +++--- .../helpers/photoannotation_event.php | 174 +-- .../helpers/photoannotation_installer.php | 172 +-- .../helpers/photoannotation_theme.php | 64 +- modules/photoannotation/images/jcrop.gif | Bin 329 -> 0 bytes modules/photoannotation/js/jquery.Jcrop.js | 1197 ----------------- .../photoannotation/js/jquery.Jcrop.min.js | 163 --- modules/photoannotation/js/jquery.annotate.js | 957 ++++++------- .../photoannotation/js/jquery.annotate.min.js | 3 +- modules/photoannotation/js/jquery.min.js | 19 - modules/photoannotation/models/items_face.php | 40 +- modules/photoannotation/models/items_note.php | 40 +- modules/photoannotation/module.info | 2 +- .../views/admin_photoannotation.html.php | 11 + .../views/photoannotation.html.php | 141 -- .../photoannotation_highlight_block.html.php | 187 +-- 18 files changed, 1198 insertions(+), 2887 deletions(-) create mode 100644 modules/photoannotation/controllers/admin_photoannotation.php delete mode 100644 modules/photoannotation/images/jcrop.gif delete mode 100644 modules/photoannotation/js/jquery.Jcrop.js delete mode 100644 modules/photoannotation/js/jquery.Jcrop.min.js delete mode 100644 modules/photoannotation/js/jquery.min.js create mode 100644 modules/photoannotation/views/admin_photoannotation.html.php delete mode 100644 modules/photoannotation/views/photoannotation.html.php diff --git a/modules/photoannotation/controllers/admin_photoannotation.php b/modules/photoannotation/controllers/admin_photoannotation.php new file mode 100644 index 00000000..58d53444 --- /dev/null +++ b/modules/photoannotation/controllers/admin_photoannotation.php @@ -0,0 +1,57 @@ +_get_view(); + } + + public function handler() { + access::verify_csrf(); + + $form = $this->_get_form(); + if ($form->validate()) { + module::set_var( + "photoannotation", "showfaces", $form->photoannotation->showfaces->value, true); + module::set_var( + "photoannotation", "shownotes", $form->photoannotation->shownotes->value, true); + message::success(t("Your settings have been saved.")); + url::redirect("admin/photoannotation"); + } + print $this->_get_view($form); + } + + private function _get_view($form=null) { + $v = new Admin_View("admin.html"); + $v->content = new View("admin_photoannotation.html"); + $v->content->form = empty($form) ? $this->_get_form() : $form; + return $v; + } + + private function _get_form() { + $form = new Forge("admin/photoannotation/handler", "", "post", array("id" => "g-admin-form")); + $group = $form->group("photoannotation")->label(t("Photo annotation settings")); + $group->checkbox("showfaces")->label(t("Show face annotation below photo.")) + ->checked(module::get_var("photoannotation", "showfaces", false)); + $group->checkbox("shownotes")->label(t("Show note annotations below photo.")) + ->checked(module::get_var("photoannotation", "shownotes", false)); + $form->submit("submit")->value(t("Save")); + return $form; + } +} diff --git a/modules/photoannotation/controllers/photoannotation.php b/modules/photoannotation/controllers/photoannotation.php index 8395d726..4e690115 100644 --- a/modules/photoannotation/controllers/photoannotation.php +++ b/modules/photoannotation/controllers/photoannotation.php @@ -1,364 +1,112 @@ -item_id = $item_data; - $newnote->x1 = $str_x1; - $newnote->y1 = $str_y1; - $newnote->x2 = $str_x2; - $newnote->y2 = $str_y2; - $newnote->title = $str_face_title; - $newnote->description = $str_face_description; - $newnote->save(); - } else { - // Check to see if the tag already has a face associated with it. - $existingFace = ORM::factory("items_face") - ->where("tag_id", "=", $tag_data) - ->where("item_id", "=", $item_data) - ->find_all(); - - if (count($existingFace) == 0) { - // Save the new face to the database. - $newface = ORM::factory("items_face"); - $newface->tag_id = $tag_data; - $newface->item_id = $item_data; - $newface->x1 = $str_x1; - $newface->y1 = $str_y1; - $newface->x2 = $str_x2; - $newface->y2 = $str_y2; - $newface->description = $str_face_description; - $newface->save(); - } else { - // Update the coordinates of an existing face. - $updatedFace = ORM::factory("items_face", $existingFace[0]->id); - $updatedFace->x1 = $str_x1; - $updatedFace->y1 = $str_y1; - $updatedFace->x2 = $str_x2; - $updatedFace->y2 = $str_y2; - $updatedFace->description = $str_face_description; - $updatedFace->save(); - } - } - message::success(t("Face saved.")); - url::redirect($redir_uri); - return; - } - - public function drawfaces($id) { - // Generate the page that allows the user to draw boxes over a photo. - // Make sure user has access to view and edit the photo. - $item = ORM::factory("item", $id); - access::required("view", $item); - access::required("edit", $item); - - // Create the page. - $template = new Theme_View("page.html", "other", "photoannotation"); - $template->set_global("item_id", $id); - $template->set_global("page_title", t("Draw Faces")); - $template->set_global("page_type", "other"); - $template->set_global("page_subtype", "photoface"); - $template->content = new View("photoannotation.html"); - $template->content->title = t("Tag Faces"); - $template->content->form = $this->_get_faces_form($id); - $template->content->delete_form = $this->_get_delfaces_form($id); - - // Display the page. - print $template; - } - - public function delface() { - // Delete the specified face data from the photo. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Convert submitted data to local variables. - // Figure out which tagged faces and notes to delete. - $tag_data = Input::instance()->post("facesList"); - $note_data = Input::instance()->post("notesList"); - // Figure out the item id, in order to reload the correct face tagging page. - $item_data = Input::instance()->post("item_id"); - - // If the user didn't select a tag or note, display and error and abort. - if ((count($tag_data) == 0) && (count($note_data) == 0)) { - message::error(t("Please select a tag or note to delete.")); - url::redirect("photoannotation/drawfaces/$item_data"); - return; - } - - // Delete the face(s) from the database. - foreach ($tag_data as $one_tag) { - db::build()->delete("items_faces")->where("id", "=", $one_tag)->execute(); - } - - // Delete the notes(s) from the database. - foreach ($note_data as $one_note) { - db::build()->delete("items_notes")->where("id", "=", $one_note)->execute(); - } - - // Display a success message for deleted faces. - if (count($tag_data) == 1) { - message::success(t("One face deleted.")); - } elseif (count($tag_data) > 1) { - message::success(count($tag_data) . t(" faces deleted.")); - } - - // Display a success message for deleted notes. - if (count($note_data) == 1) { - message::success(t("One note deleted.")); - } elseif (count($note_data) > 1) { - message::success(count($note_data) . t(" notes deleted.")); - } - - // Re-load the face tagging page. - url::redirect("photoannotation/drawfaces/$item_data"); - } - - public function saveface() { - // Save the face coordinates to the specified tag. - - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - // Convert submitted data to local variables. - $tag_data = Input::instance()->post("tagsList"); - $str_face_title = str_replace("'", "\'", Input::instance()->post("face_title")); - $str_face_description = str_replace("'", "\'", Input::instance()->post("face_description")); - $item_data = Input::instance()->post("item_id"); - $str_x1 = Input::instance()->post("x1"); - $str_y1 = Input::instance()->post("y1"); - $str_x2 = Input::instance()->post("x2"); - $str_y2 = Input::instance()->post("y2"); - - // If the user didn't select a face, display an error and abort. - if (($str_x1 == "") || ($str_x2 == "") || ($str_y1 == "") || ($str_y2 == "")) { - message::error(t("Please select a face.")); - url::redirect("photoannotation/drawfaces/$item_data"); - return; - } - - // Decide if we are saving a face or a note. - if ($tag_data == -1) { - // Make sure there's a title. - if ($str_face_title == "") { - message::error(t("Please select a Tag or specify a Title.")); - url::redirect("photoannotation/drawfaces/$item_data"); - return; - } - - // Save a new Note to the database. - $newnote = ORM::factory("items_note"); - $newnote->item_id = $item_data; - $newnote->x1 = $str_x1; - $newnote->y1 = $str_y1; - $newnote->x2 = $str_x2; - $newnote->y2 = $str_y2; - $newnote->title = $str_face_title; - $newnote->description = $str_face_description; - $newnote->save(); - - } else { - // Check to see if the tag already has a face associated with it. - $existingFace = ORM::factory("items_face") - ->where("tag_id", "=", $tag_data) - ->where("item_id", "=", $item_data) - ->find_all(); - - if (count($existingFace) == 0) { - // Save the new face to the database. - $newface = ORM::factory("items_face"); - $newface->tag_id = $tag_data; - $newface->item_id = $item_data; - $newface->x1 = $str_x1; - $newface->y1 = $str_y1; - $newface->x2 = $str_x2; - $newface->y2 = $str_y2; - $newface->description = $str_face_description; - $newface->save(); - } else { - // Update the coordinates of an existing face. - $updatedFace = ORM::factory("items_face", $existingFace[0]->id); - $updatedFace->x1 = $str_x1; - $updatedFace->y1 = $str_y1; - $updatedFace->x2 = $str_x2; - $updatedFace->y2 = $str_y2; - $updatedFace->description = $str_face_description; - $updatedFace->save(); - } - } - - // Redirect back to the main screen and display a "success" message. - message::success(t("Annotation saved.")); - url::redirect("photoannotation/drawfaces/$item_data"); - } - - private function _get_faces_form($id) { - // Generate the form that allows the user to select a tag to - // save the face too. Also displays the coordinates of the face - // and the "Save face" button. - - // Make a new Form. - $form = new Forge("photoannotation/saveface", "", "post", - array("id" => "g-tag-faces-form")); - - // Create an array of all the tags for the current item. - $all_tags = ORM::factory("tag") - ->join("items_tags", "tags.id", "items_tags.tag_id") - ->where("items_tags.item_id", "=", $id) - ->find_all(); - - // Generate an array of tags to use as checkboxes. - $array_tags = ""; - $array_tags[-1] = t("No Tag"); - foreach ($all_tags as $oneTag) { - $array_tags[$oneTag->id] = $oneTag->name; - } - - // Make a checklist of tags on the form. - $tags_group = $form->group("FaceTag") - ->label(t("Select a tag or enter in a title:")); - - $tags_group->dropdown('tagsList') - ->label(t("Tag:")) - ->id('tagsList') - ->options($array_tags); - - $tags_group->input("face_title") - ->id('face_title') - ->label(t("Note Title:")); - - $tags_description = $form->group("TagsDescription") - ->label(t("Description (optional):")); - $tags_description->input("face_description") - ->id('face_description'); - - // Generate input boxes to hold the coordinates of the face. - $coordinates_group = $form->group("FaceCoordinates") - ->label(t("Coordinates:")); - $coordinates_group->input('x1') - ->id('x1') - ->label(t("X1")); - $coordinates_group->input("y1") - ->id('y1') - ->label(t("Y1")); - $coordinates_group->input("x2") - ->id('x2') - ->label(t("X2")); - $coordinates_group->input("y2") - ->id('y2') - ->label(t("Y2")); - - // Add the id# of the photo and a save button to the form. - $coordinates_group->hidden("item_id")->value($id); - $form->submit("SaveFace")->value(t("Save face")); - - // Return the newly generated form. - return $form; - } - - private function _get_delfaces_form($id) { - // Generate a form to allow the user to remove face data - // from a photo. - // Make a new Form. - $form = new Forge("photoannotation/delface", "", "post", - array("id" => "g-tag-del-faces-form")); - - // Create an array of all the tags that already have faces. - $existing_faces = ORM::factory("items_face") - ->where("item_id", "=", $id) - ->find_all(); - - // turn the $existing_faces array into an array that can be used - // for a checklist. - $array_faces = ""; - foreach ($existing_faces as $oneFace) { - $array_faces[$oneFace->id] = array(ORM::factory("tag", - $oneFace->tag_id)->name, false); - } - - if ($array_faces) { - // Add a checklist to the form. - $tags_group = $form->group("ExistingFaces") - ->label(t("Tags with faces:")); - // Add the id# of the photo and a delete button to the form. - $tags_group->hidden("item_id")->value($id); - - $tags_group->checklist("facesList") - ->options($array_faces) - ->label(t("Select the tag(s) that correspond(s) to the face(s) you wish to delete:")); - } - - // Create an array of all the notes associated with this photo. - $existing_notes = ORM::factory("items_note") - ->where("item_id", "=", $id) - ->find_all(); - - // turn the $existing_notes array into an array that can be used - // for a checklist. - $array_notes = ""; - foreach ($existing_notes as $oneNote) { - $array_notes[$oneNote->id] = array($oneNote->title, false); - } - - if ($array_notes) { - // Add a checklist to the form. - $notes_group = $form->group("ExistingNotes") - ->label(t("Notes:")); - // Add the id# of the photo and a delete button to the form. - $notes_group->hidden("item_id")->value($id); - - $notes_group->checklist("notesList") - ->options($array_notes) - ->label(t("Select the notes you wish to delete:")); - } - - // Hide the delete button when there's nothing to delete. - if (($array_notes) || ($array_faces)) { - $form->submit("DeleteFace")->value(t("Delete face(s) / note(s)")); - } else { - $form->group("NoFacesNotes")->label(t("There is nothing to delete for this photo.")); - } - - // Return the newly generated form. - return $form; - } -} +item_id = $item_data; + $newnote->x1 = $str_x1; + $newnote->y1 = $str_y1; + $newnote->x2 = $str_x2; + $newnote->y2 = $str_y2; + $newnote->title = $str_face_title; + $newnote->description = $str_face_description; + $newnote->save(); + } else { + // Check to see if the tag already has a face associated with it. + $existingFace = ORM::factory("items_face") + ->where("tag_id", "=", $tag_data) + ->where("item_id", "=", $item_data) + ->find_all(); + + if (count($existingFace) == 0) { + // Save the new face to the database. + $newface = ORM::factory("items_face"); + $newface->tag_id = $tag_data; + $newface->item_id = $item_data; + $newface->x1 = $str_x1; + $newface->y1 = $str_y1; + $newface->x2 = $str_x2; + $newface->y2 = $str_y2; + $newface->description = $str_face_description; + $newface->save(); + } else { + // Update the coordinates of an existing face. + $updatedFace = ORM::factory("items_face", $existingFace[0]->id); + $updatedFace->x1 = $str_x1; + $updatedFace->y1 = $str_y1; + $updatedFace->x2 = $str_x2; + $updatedFace->y2 = $str_y2; + $updatedFace->description = $str_face_description; + $updatedFace->save(); + } + } + message::success(t("Annotation saved.")); + url::redirect($redir_uri); + return; + } + + public function delete() { + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + //Get form data + $noteid = $_POST["noteid"]; + $notetype = $_POST["notetype"]; + $redir_uri = $_POST["currenturl"]; + + if ($noteid == "" || $notetype == "") { + message::error(t("Please select a tag or note to delete.")); + url::redirect($redir_uri); + return; + } + + if ($notetype == "face") { + db::build()->delete("items_faces")->where("id", "=", $noteid)->execute(); + message::success(t("Annotation deleted.")); + } elseif ($notetype == "note") { + db::build()->delete("items_notes")->where("id", "=", $noteid)->execute(); + message::success(t("Annotation deleted.")); + } else { + message::error(t("Please select a tag or note to delete.")); + } + url::redirect($redir_uri); + } +} diff --git a/modules/photoannotation/css/photoannotation.css b/modules/photoannotation/css/photoannotation.css index bc2f7f86..eb63b714 100644 --- a/modules/photoannotation/css/photoannotation.css +++ b/modules/photoannotation/css/photoannotation.css @@ -1,200 +1,182 @@ -.image-annotate-add { - background: #fff url(../images/asterisk_yellow.png) no-repeat 3px 3px; - color: #000 !important; - cursor: pointer; - display: block; - float: left; - font-family: Verdana, Sans-Serif; - font-size: 12px; - height: 18px; - line-height: 18px; - padding: 2px 0 2px 24px; - margin: 5px 0; - width: 64px; - text-decoration: none; -} -.image-annotate-add:hover { - background-color: #eee; -} -.image-annotate-canvas { - background-position: left top; - background-repeat: no-repeat; - display: block; - margin: 0 auto; - position: relative; -} -.image-annotate-view { - display: none; - position: relative; -} -.image-annotate-area { - border: 1px solid #000000; - position: absolute; - cursor: default; -} -.image-annotate-area div { - border: 1px solid #FFFFFF; - display: block; -} -.image-annotate-area-editable { - cursor: pointer; -} -.image-annotate-area-editable-hover div { - border-color: #00AD00 !important; -} -.image-annotate-note { - background: #000000 none repeat scroll 0 0; - color: #FFFFFF; - display: none; - font-family: Verdana, Sans-Serif; - font-size: 1.4em; - max-width: 200px; - padding: 3px 7px; - position: absolute; -} -.image-annotate-note .actions { - display: block; - font-size: 80%; -} -.image-annotate-edit { - display: none; -} -#image-annotate-edit-form { - background: #FFFFFF none repeat scroll 0 0; - border: 1px solid #000000; - height: 220px; - padding: 7px; - position: absolute; - width: 250px; -} -#image-annotate-edit-form form { - clear: right; - margin: 0 !important; - padding: 0; - z-index: 999; - text-align: left; - color: #000000; -} -#image-annotate-edit-form .box { - margin: 0; -} -#image-annotate-edit-form input.form-text, #image-annotate-edit-form #edit-comment-wrapper textarea { - width: 90%; -} -#image-annotate-edit-form textarea { - height: 50px; - font-family: Verdana, Sans-Serif; - font-size: 12px; - width: 248px; -} -#image-annotate-edit-form fieldset { - background: transparent none repeat scroll 0 0; -} -#image-annotate-edit-form .form-item { - margin: 0 0 5px; -} -#image-annotate-edit-form .form-button, #image-annotate-edit-form .form-submit { - margin: 0; -} -#image-annotate-edit-form a { - cursor: pointer; - display: block; - float: left; - margin: 3px 6px 3px 0; -} -.image-annotate-edit-area { - border: 1px solid black; - cursor: move; - display: block; - height: 60px; - left: 10px; - margin: 0; - padding: 0; - position: absolute; - top: 10px; - width: 60px; -} -.image-annotate-edit-area .ui-resizable-handle { - opacity: 0.8; -} -.image-annotate-edit-ok { - /*background-image: url(../images/accept.png);*/ -} -.image-annotate-edit-delete { - background-image: url(../images/delete.png); -} -.image-annotate-edit-close { - /*background-image: url(../images/cross.png);*/ -} -.ui-resizable { - position: relative; -} -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - z-index: 99999; - display: block; -} -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable- autohide .ui-resizable-handle { - display: block; -} -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0px; -} -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0px; -} -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; - top: 0px; - height: 100%; -} -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0px; - height: 100%; -} -.ui-resizable-se { - cursor: se-resize; - width: 12px; - height: 12px; - right: 1px; - bottom: 1px; -} -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: -5px; - bottom: -5px; -} -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: -5px; - top: -5px; -} -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: -5px; - top: -5px; -} -.photoannotation-del-button { - background-image: url('../images/delete.png'); - cursor: pointer; -} +.image-annotate-canvas { + background-position: left top; + background-repeat: no-repeat; + display: block; + margin: 0 auto; + position: relative; +} +.image-annotate-view { + display: none; + position: relative; +} +.image-annotate-area { + border: 1px solid #000000; + position: absolute; + cursor: default; +} +.image-annotate-area div { + border: 1px solid #FFFFFF; + display: block; +} +.image-annotate-area-editable { + cursor: pointer; +} +.image-annotate-area-editable-hover div { + border-color: #00AD00 !important; +} +.image-annotate-note { + background: #000000 none repeat scroll 0 0; + color: #FFFFFF; + display: none; + font-family: Verdana, Sans-Serif; + font-size: 1.4em; + max-width: 200px; + padding: 3px 7px; + position: absolute; +} +.image-annotate-note .actions { + display: block; + font-size: 80%; +} +.image-annotate-edit { + display: none; +} +#image-annotate-edit-form { + background: #FFFFFF none repeat scroll 0 0; + border: 1px solid #000000; + height: 220px; + padding: 7px; + position: absolute; + width: 250px; +} +#image-annotate-edit-form form { + clear: right; + margin: 0 !important; + padding: 0; + z-index: 999; + text-align: left; + color: #000000; +} +#image-annotate-edit-form .box { + margin: 0; +} +#image-annotate-edit-form input.form-text, #image-annotate-edit-form #edit-comment-wrapper textarea { + width: 90%; +} +#image-annotate-edit-form textarea { + height: 50px; + font-family: Verdana, Sans-Serif; + font-size: 12px; + width: 248px; +} +#image-annotate-edit-form fieldset { + background: transparent none repeat scroll 0 0; +} +#image-annotate-edit-form .form-item { + margin: 0 0 5px; +} +#image-annotate-edit-form .form-button, #image-annotate-edit-form .form-submit { + margin: 0; +} +#image-annotate-edit-form a { + cursor: pointer; + display: block; + float: left; + margin: 3px 6px 3px 0; +} +.image-annotate-edit-area { + border: 1px solid black; + cursor: move; + display: block; + height: 60px; + left: 10px; + margin: 0; + padding: 0; + position: absolute; + top: 10px; + width: 60px; +} +.image-annotate-edit-area .ui-resizable-handle { + opacity: 0.8; +} +.image-annotate-edit-ok { + /*background-image: url(../images/accept.png);*/ +} +.image-annotate-edit-delete { + background-image: url(../images/delete.png); +} +.image-annotate-edit-close { + /*background-image: url(../images/cross.png);*/ +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + z-index: 99999; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable- autohide .ui-resizable-handle { + display: block; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0px; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0px; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0px; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0px; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.photoannotation-del-button { + background-image: url('../images/delete.png'); + cursor: pointer; +} diff --git a/modules/photoannotation/helpers/photoannotation_event.php b/modules/photoannotation/helpers/photoannotation_event.php index 011a3f09..2a40e8ae 100644 --- a/modules/photoannotation/helpers/photoannotation_event.php +++ b/modules/photoannotation/helpers/photoannotation_event.php @@ -1,86 +1,88 @@ -deactivate)) { - site_status::warning( - t("The Photo Annotation module requires the Tags module. " . - "Activate the Tags module now", - array("url" => url::site("admin/modules"))), - "photoannotation_needs_tag"); - } else { - site_status::clear("photoannotation_needs_tag"); - } - if (module::is_active("tagfaces") || in_array("tagfaces", $changes->activate)) { - site_status::warning( - t("The Photo Annotation module cannot be used together with the TagFaces module. " . - "Dectivate the TagFaces module now", - array("url" => url::site("admin/modules"))), - "photoannotation_incompatibility_tagfaces"); - } else { - site_status::clear("photoannotation_incompatibility_tagfaces"); - } - } - - static function site_menu($menu, $theme) { - // Create a menu option for adding face data. - if (!$theme->item()) { - return; - } - - $item = $theme->item(); - - if ($item->is_photo()) { - if ((access::can("view", $item)) && (access::can("edit", $item))) { - $menu->get("options_menu") - ->append(Menu::factory("link") - ->id("photoannotation") - ->label(t("Add annotation")) - ->css_id("g-photoannotation-link") - ->url("#")); - $menu->get("options_menu") - ->append(Menu::factory("link") - ->id("photoannotation_edit") - ->label(t("Edit annotations")) - ->css_id("g-photoannotation-edit-link") - ->url(url::site("photoannotation/drawfaces/" . $item->id))); - } - } - } - - static function item_deleted($item) { - // Check for and delete existing Faces and Notes. - $existingFaces = ORM::factory("items_face") - ->where("item_id", "=", $item->id) - ->find_all(); - if (count($existingFaces) > 0) { - db::build()->delete("items_faces")->where("item_id", "=", $item->id)->execute(); - } - - $existingNotes = ORM::factory("items_note") - ->where("item_id", "=", $item->id) - ->find_all(); - if (count($existingNotes) > 0) { - db::build()->delete("items_notes")->where("item_id", "=", $item->id)->execute(); - } - } -} +deactivate)) { + site_status::warning( + t("The Photo Annotation module requires the Tags module. " . + "Activate the Tags module now", + array("url" => url::site("admin/modules"))), + "photoannotation_needs_tag"); + } else { + site_status::clear("photoannotation_needs_tag"); + } + if (module::is_active("tagfaces") || in_array("tagfaces", $changes->activate)) { + site_status::warning( + t("The Photo Annotation module cannot be used together with the TagFaces module. " . + "Dectivate the TagFaces module now", + array("url" => url::site("admin/modules"))), + "photoannotation_incompatibility_tagfaces"); + } else { + site_status::clear("photoannotation_incompatibility_tagfaces"); + } + } + + static function site_menu($menu, $theme) { + // Create a menu option for adding face data. + if (!$theme->item()) { + return; + } + + $item = $theme->item(); + + if ($item->is_photo()) { + if ((access::can("view", $item)) && (access::can("edit", $item))) { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("photoannotation") + ->label(t("Add annotation")) + ->css_id("g-photoannotation-link") + ->url("#")); + } + } + } + + static function item_deleted($item) { + // Check for and delete existing Faces and Notes. + $existingFaces = ORM::factory("items_face") + ->where("item_id", "=", $item->id) + ->find_all(); + if (count($existingFaces) > 0) { + db::build()->delete("items_faces")->where("item_id", "=", $item->id)->execute(); + } + + $existingNotes = ORM::factory("items_note") + ->where("item_id", "=", $item->id) + ->find_all(); + if (count($existingNotes) > 0) { + db::build()->delete("items_notes")->where("item_id", "=", $item->id)->execute(); + } + } + + static function admin_menu($menu, $theme) { + $menu->get("settings_menu") + ->append(Menu::factory("link") + ->id("photoannotation_menu") + ->label(t("Photo Annotation")) + ->url(url::site("admin/photoannotation"))); + } +} diff --git a/modules/photoannotation/helpers/photoannotation_installer.php b/modules/photoannotation/helpers/photoannotation_installer.php index ea3b7c0f..0f84aad8 100644 --- a/modules/photoannotation/helpers/photoannotation_installer.php +++ b/modules/photoannotation/helpers/photoannotation_installer.php @@ -1,86 +1,86 @@ -query("CREATE TABLE IF NOT EXISTS {items_faces} ( - `id` int(9) NOT NULL auto_increment, - `tag_id` int(9) NOT NULL, - `item_id` int(9) NOT NULL, - `x1` int(9) NOT NULL, - `y1` int(9) NOT NULL, - `x2` int(9) NOT NULL, - `y2` int(9) NOT NULL, - `description` varchar(2048) default NULL, - PRIMARY KEY (`id`)) - DEFAULT CHARSET=utf8;"); - - $db->query("CREATE TABLE IF NOT EXISTS {items_notes} ( - `id` int(9) NOT NULL auto_increment, - `item_id` int(9) NOT NULL, - `x1` int(9) NOT NULL, - `y1` int(9) NOT NULL, - `x2` int(9) NOT NULL, - `y2` int(9) NOT NULL, - `title` varchar(64) NOT NULL, - `description` varchar(2048) default NULL, - PRIMARY KEY (`id`)) - DEFAULT CHARSET=utf8;"); - - // Set the module's version number. - module::set_version("photoannotation", 1); - } - - static function upgrade($version) { - $db = Database::instance(); - if ($version == 1) { - $db->query("ALTER TABLE {items_faces} ADD `description` varchar(2048) default NULL"); - - $db->query("CREATE TABLE IF NOT EXISTS {items_notes} ( - `id` int(9) NOT NULL auto_increment, - `item_id` int(9) NOT NULL, - `x1` int(9) NOT NULL, - `y1` int(9) NOT NULL, - `x2` int(9) NOT NULL, - `y2` int(9) NOT NULL, - `title` varchar(64) NOT NULL, - `description` varchar(2048) default NULL, - PRIMARY KEY (`id`)) - DEFAULT CHARSET=utf8;"); - - module::set_version("photoannotation", $version = 1); - } - } - - static function deactivate() { - // Clear the require tags message when photoannotation is deactivated. - site_status::clear("photoannotation_needs_tag"); - site_status::clear("photoannotation_incompatibility_tagfaces"); - } - - static function uninstall() { - // Delete the face table before uninstalling. - $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS {items_faces};"); - $db->query("DROP TABLE IF EXISTS {items_notes};"); - module::delete("photoannotation"); - } -} +query("CREATE TABLE IF NOT EXISTS {items_faces} ( + `id` int(9) NOT NULL auto_increment, + `tag_id` int(9) NOT NULL, + `item_id` int(9) NOT NULL, + `x1` int(9) NOT NULL, + `y1` int(9) NOT NULL, + `x2` int(9) NOT NULL, + `y2` int(9) NOT NULL, + `description` varchar(2048) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + + $db->query("CREATE TABLE IF NOT EXISTS {items_notes} ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `x1` int(9) NOT NULL, + `y1` int(9) NOT NULL, + `x2` int(9) NOT NULL, + `y2` int(9) NOT NULL, + `title` varchar(64) NOT NULL, + `description` varchar(2048) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + + // Set the module's version number. + module::set_version("photoannotation", 1); + } + + static function upgrade($version) { + $db = Database::instance(); + if ($version == 1) { + $db->query("ALTER TABLE {items_faces} ADD `description` varchar(2048) default NULL"); + + $db->query("CREATE TABLE IF NOT EXISTS {items_notes} ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `x1` int(9) NOT NULL, + `y1` int(9) NOT NULL, + `x2` int(9) NOT NULL, + `y2` int(9) NOT NULL, + `title` varchar(64) NOT NULL, + `description` varchar(2048) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + + module::set_version("photoannotation", $version = 1); + } + } + + static function deactivate() { + // Clear the require tags message when photoannotation is deactivated. + site_status::clear("photoannotation_needs_tag"); + site_status::clear("photoannotation_incompatibility_tagfaces"); + } + + static function uninstall() { + // Delete the face table before uninstalling. + $db = Database::instance(); + $db->query("DROP TABLE IF EXISTS {items_faces};"); + $db->query("DROP TABLE IF EXISTS {items_notes};"); + module::delete("photoannotation"); + } +} diff --git a/modules/photoannotation/helpers/photoannotation_theme.php b/modules/photoannotation/helpers/photoannotation_theme.php index 27661c92..88ac00f4 100644 --- a/modules/photoannotation/helpers/photoannotation_theme.php +++ b/modules/photoannotation/helpers/photoannotation_theme.php @@ -1,32 +1,32 @@ -css("photoannotation.css"); - //$theme->script("jquery.annotate.js"); - Return ""; - } - - static function photo_bottom($theme) { - // If it does, add an image map to the page to display them. - return new View("photoannotation_highlight_block.html"); - } -} +css("photoannotation.css"); + $theme->script("jquery.annotate.js"); + //Return ""; + } + + static function photo_bottom($theme) { + // If it does, add an image map to the page to display them. + return new View("photoannotation_highlight_block.html"); + } +} diff --git a/modules/photoannotation/images/jcrop.gif b/modules/photoannotation/images/jcrop.gif deleted file mode 100644 index 72ea7ccb5321d5384d70437cfaac73011237901e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmZ?wbhEHb9b#5NV>2k zBC~b@b~P=nNfWAe-b%_i6tS^-1y(h@EsB~1TqDA_h@fkxG$bHgvj}VxE1JLgr!*!^ ILUxTc0Q$^Q5C8xG diff --git a/modules/photoannotation/js/jquery.Jcrop.js b/modules/photoannotation/js/jquery.Jcrop.js deleted file mode 100644 index 9d68d589..00000000 --- a/modules/photoannotation/js/jquery.Jcrop.js +++ /dev/null @@ -1,1197 +0,0 @@ -/** - * jquery.Jcrop.js v0.9.8 - * jQuery Image Cropping Plugin - * @author Kelly Hallman - * Copyright (c) 2008-2009 Kelly Hallman - released under MIT License {{{ - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - - * }}} - */ - -(function($) { - -$.Jcrop = function(obj,opt) -{ - // Initialization {{{ - - // Sanitize some options {{{ - var obj = obj, opt = opt; - - if (typeof(obj) !== 'object') obj = $(obj)[0]; - if (typeof(opt) !== 'object') opt = { }; - - // Some on-the-fly fixes for MSIE...sigh - if (!('trackDocument' in opt)) - { - opt.trackDocument = $.browser.msie ? false : true; - if ($.browser.msie && $.browser.version.split('.')[0] == '8') - opt.trackDocument = true; - } - - if (!('keySupport' in opt)) - opt.keySupport = $.browser.msie ? false : true; - - // }}} - // Extend the default options {{{ - var defaults = { - - // Basic Settings - trackDocument: false, - baseClass: 'jcrop', - addClass: null, - - // Styling Options - bgColor: 'black', - bgOpacity: .6, - borderOpacity: .4, - handleOpacity: .5, - - handlePad: 5, - handleSize: 9, - handleOffset: 5, - edgeMargin: 14, - - aspectRatio: 0, - keySupport: true, - cornerHandles: true, - sideHandles: true, - drawBorders: true, - dragEdges: true, - - boxWidth: 0, - boxHeight: 0, - - boundary: 8, - animationDelay: 20, - swingSpeed: 3, - - allowSelect: true, - allowMove: true, - allowResize: true, - - minSelect: [ 0, 0 ], - maxSize: [ 0, 0 ], - minSize: [ 0, 0 ], - - // Callbacks / Event Handlers - onChange: function() { }, - onSelect: function() { } - - }; - var options = defaults; - setOptions(opt); - - // }}} - // Initialize some jQuery objects {{{ - - var $origimg = $(obj); - var $img = $origimg.clone().removeAttr('id').css({ position: 'static' }); - - $img.width($origimg.width()); - $img.height($origimg.height()); - $origimg.after($img).hide(); - - presize($img,options.boxWidth,options.boxHeight); - - var boundx = $img.width(), - boundy = $img.height(), - - $div = $('
') - .width(boundx).height(boundy) - .addClass(cssClass('holder')) - .css({ - position: 'relative', - backgroundColor: options.bgColor - }).insertAfter($origimg).append($img); - ; - - if (options.addClass) $div.addClass(options.addClass); - //$img.wrap($div); - - var $img2 = $('')/*{{{*/ - .attr('src',$img.attr('src')) - .css('position','absolute') - .width(boundx).height(boundy) - ;/*}}}*/ - var $img_holder = $('
')/*{{{*/ - .width(pct(100)).height(pct(100)) - .css({ - zIndex: 310, - position: 'absolute', - overflow: 'hidden' - }) - .append($img2) - ;/*}}}*/ - var $hdl_holder = $('
')/*{{{*/ - .width(pct(100)).height(pct(100)) - .css('zIndex',320); - /*}}}*/ - var $sel = $('
')/*{{{*/ - .css({ - position: 'absolute', - zIndex: 300 - }) - .insertBefore($img) - .append($img_holder,$hdl_holder) - ;/*}}}*/ - - var bound = options.boundary; - var $trk = newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)) - .css({ position: 'absolute', top: px(-bound), left: px(-bound), zIndex: 290 }) - .mousedown(newSelection); - - /* }}} */ - // Set more variables {{{ - - var xlimit, ylimit, xmin, ymin; - var xscale, yscale, enabled = true; - var docOffset = getPos($img), - // Internal states - btndown, lastcurs, dimmed, animating, - shift_down; - - // }}} - - - // }}} - // Internal Modules {{{ - - var Coords = function()/*{{{*/ - { - var x1 = 0, y1 = 0, x2 = 0, y2 = 0, ox, oy; - - function setPressed(pos)/*{{{*/ - { - var pos = rebound(pos); - x2 = x1 = pos[0]; - y2 = y1 = pos[1]; - }; - /*}}}*/ - function setCurrent(pos)/*{{{*/ - { - var pos = rebound(pos); - ox = pos[0] - x2; - oy = pos[1] - y2; - x2 = pos[0]; - y2 = pos[1]; - }; - /*}}}*/ - function getOffset()/*{{{*/ - { - return [ ox, oy ]; - }; - /*}}}*/ - function moveOffset(offset)/*{{{*/ - { - var ox = offset[0], oy = offset[1]; - - if (0 > x1 + ox) ox -= ox + x1; - if (0 > y1 + oy) oy -= oy + y1; - - if (boundy < y2 + oy) oy += boundy - (y2 + oy); - if (boundx < x2 + ox) ox += boundx - (x2 + ox); - - x1 += ox; - x2 += ox; - y1 += oy; - y2 += oy; - }; - /*}}}*/ - function getCorner(ord)/*{{{*/ - { - var c = getFixed(); - switch(ord) - { - case 'ne': return [ c.x2, c.y ]; - case 'nw': return [ c.x, c.y ]; - case 'se': return [ c.x2, c.y2 ]; - case 'sw': return [ c.x, c.y2 ]; - } - }; - /*}}}*/ - function getFixed()/*{{{*/ - { - if (!options.aspectRatio) return getRect(); - // This function could use some optimization I think... - var aspect = options.aspectRatio, - min_x = options.minSize[0]/xscale, - min_y = options.minSize[1]/yscale, - max_x = options.maxSize[0]/xscale, - max_y = options.maxSize[1]/yscale, - rw = x2 - x1, - rh = y2 - y1, - rwa = Math.abs(rw), - rha = Math.abs(rh), - real_ratio = rwa / rha, - xx, yy - ; - if (max_x == 0) { max_x = boundx * 10 } - if (max_y == 0) { max_y = boundy * 10 } - if (real_ratio < aspect) - { - yy = y2; - w = rha * aspect; - xx = rw < 0 ? x1 - w : w + x1; - - if (xx < 0) - { - xx = 0; - h = Math.abs((xx - x1) / aspect); - yy = rh < 0 ? y1 - h: h + y1; - } - else if (xx > boundx) - { - xx = boundx; - h = Math.abs((xx - x1) / aspect); - yy = rh < 0 ? y1 - h : h + y1; - } - } - else - { - xx = x2; - h = rwa / aspect; - yy = rh < 0 ? y1 - h : y1 + h; - if (yy < 0) - { - yy = 0; - w = Math.abs((yy - y1) * aspect); - xx = rw < 0 ? x1 - w : w + x1; - } - else if (yy > boundy) - { - yy = boundy; - w = Math.abs(yy - y1) * aspect; - xx = rw < 0 ? x1 - w : w + x1; - } - } - - // Magic %-) - if(xx > x1) { // right side - if(xx - x1 < min_x) { - xx = x1 + min_x; - } else if (xx - x1 > max_x) { - xx = x1 + max_x; - } - if(yy > y1) { - yy = y1 + (xx - x1)/aspect; - } else { - yy = y1 - (xx - x1)/aspect; - } - } else if (xx < x1) { // left side - if(x1 - xx < min_x) { - xx = x1 - min_x - } else if (x1 - xx > max_x) { - xx = x1 - max_x; - } - if(yy > y1) { - yy = y1 + (x1 - xx)/aspect; - } else { - yy = y1 - (x1 - xx)/aspect; - } - } - - if(xx < 0) { - x1 -= xx; - xx = 0; - } else if (xx > boundx) { - x1 -= xx - boundx; - xx = boundx; - } - - if(yy < 0) { - y1 -= yy; - yy = 0; - } else if (yy > boundy) { - y1 -= yy - boundy; - yy = boundy; - } - - return last = makeObj(flipCoords(x1,y1,xx,yy)); - }; - /*}}}*/ - function rebound(p)/*{{{*/ - { - if (p[0] < 0) p[0] = 0; - if (p[1] < 0) p[1] = 0; - - if (p[0] > boundx) p[0] = boundx; - if (p[1] > boundy) p[1] = boundy; - - return [ p[0], p[1] ]; - }; - /*}}}*/ - function flipCoords(x1,y1,x2,y2)/*{{{*/ - { - var xa = x1, xb = x2, ya = y1, yb = y2; - if (x2 < x1) - { - xa = x2; - xb = x1; - } - if (y2 < y1) - { - ya = y2; - yb = y1; - } - return [ Math.round(xa), Math.round(ya), Math.round(xb), Math.round(yb) ]; - }; - /*}}}*/ - function getRect()/*{{{*/ - { - var xsize = x2 - x1; - var ysize = y2 - y1; - - if (xlimit && (Math.abs(xsize) > xlimit)) - x2 = (xsize > 0) ? (x1 + xlimit) : (x1 - xlimit); - if (ylimit && (Math.abs(ysize) > ylimit)) - y2 = (ysize > 0) ? (y1 + ylimit) : (y1 - ylimit); - - if (ymin && (Math.abs(ysize) < ymin)) - y2 = (ysize > 0) ? (y1 + ymin) : (y1 - ymin); - if (xmin && (Math.abs(xsize) < xmin)) - x2 = (xsize > 0) ? (x1 + xmin) : (x1 - xmin); - - if (x1 < 0) { x2 -= x1; x1 -= x1; } - if (y1 < 0) { y2 -= y1; y1 -= y1; } - if (x2 < 0) { x1 -= x2; x2 -= x2; } - if (y2 < 0) { y1 -= y2; y2 -= y2; } - if (x2 > boundx) { var delta = x2 - boundx; x1 -= delta; x2 -= delta; } - if (y2 > boundy) { var delta = y2 - boundy; y1 -= delta; y2 -= delta; } - if (x1 > boundx) { var delta = x1 - boundy; y2 -= delta; y1 -= delta; } - if (y1 > boundy) { var delta = y1 - boundy; y2 -= delta; y1 -= delta; } - - return makeObj(flipCoords(x1,y1,x2,y2)); - }; - /*}}}*/ - function makeObj(a)/*{{{*/ - { - return { x: a[0], y: a[1], x2: a[2], y2: a[3], - w: a[2] - a[0], h: a[3] - a[1] }; - }; - /*}}}*/ - - return { - flipCoords: flipCoords, - setPressed: setPressed, - setCurrent: setCurrent, - getOffset: getOffset, - moveOffset: moveOffset, - getCorner: getCorner, - getFixed: getFixed - }; - }(); - - /*}}}*/ - var Selection = function()/*{{{*/ - { - var start, end, dragmode, awake, hdep = 370; - var borders = { }; - var handle = { }; - var seehandles = false; - var hhs = options.handleOffset; - - /* Insert draggable elements {{{*/ - - // Insert border divs for outline - if (options.drawBorders) { - borders = { - top: insertBorder('hline') - .css('top',$.browser.msie?px(-1):px(0)), - bottom: insertBorder('hline'), - left: insertBorder('vline'), - right: insertBorder('vline') - }; - } - - // Insert handles on edges - if (options.dragEdges) { - handle.t = insertDragbar('n'); - handle.b = insertDragbar('s'); - handle.r = insertDragbar('e'); - handle.l = insertDragbar('w'); - } - - // Insert side handles - options.sideHandles && - createHandles(['n','s','e','w']); - - // Insert corner handles - options.cornerHandles && - createHandles(['sw','nw','ne','se']); - - /*}}}*/ - // Private Methods - function insertBorder(type)/*{{{*/ - { - var jq = $('
') - .css({position: 'absolute', opacity: options.borderOpacity }) - .addClass(cssClass(type)); - $img_holder.append(jq); - return jq; - }; - /*}}}*/ - function dragDiv(ord,zi)/*{{{*/ - { - var jq = $('
') - .mousedown(createDragger(ord)) - .css({ - cursor: ord+'-resize', - position: 'absolute', - zIndex: zi - }) - ; - $hdl_holder.append(jq); - return jq; - }; - /*}}}*/ - function insertHandle(ord)/*{{{*/ - { - return dragDiv(ord,hdep++) - .css({ top: px(-hhs+1), left: px(-hhs+1), opacity: options.handleOpacity }) - .addClass(cssClass('handle')); - }; - /*}}}*/ - function insertDragbar(ord)/*{{{*/ - { - var s = options.handleSize, - o = hhs, - h = s, w = s, - t = o, l = o; - - switch(ord) - { - case 'n': case 's': w = pct(100); break; - case 'e': case 'w': h = pct(100); break; - } - - return dragDiv(ord,hdep++).width(w).height(h) - .css({ top: px(-t+1), left: px(-l+1)}); - }; - /*}}}*/ - function createHandles(li)/*{{{*/ - { - for(i in li) handle[li[i]] = insertHandle(li[i]); - }; - /*}}}*/ - function moveHandles(c)/*{{{*/ - { - var midvert = Math.round((c.h / 2) - hhs), - midhoriz = Math.round((c.w / 2) - hhs), - north = west = -hhs+1, - east = c.w - hhs, - south = c.h - hhs, - x, y; - - 'e' in handle && - handle.e.css({ top: px(midvert), left: px(east) }) && - handle.w.css({ top: px(midvert) }) && - handle.s.css({ top: px(south), left: px(midhoriz) }) && - handle.n.css({ left: px(midhoriz) }); - - 'ne' in handle && - handle.ne.css({ left: px(east) }) && - handle.se.css({ top: px(south), left: px(east) }) && - handle.sw.css({ top: px(south) }); - - 'b' in handle && - handle.b.css({ top: px(south) }) && - handle.r.css({ left: px(east) }); - }; - /*}}}*/ - function moveto(x,y)/*{{{*/ - { - $img2.css({ top: px(-y), left: px(-x) }); - $sel.css({ top: px(y), left: px(x) }); - }; - /*}}}*/ - function resize(w,h)/*{{{*/ - { - $sel.width(w).height(h); - }; - /*}}}*/ - function refresh()/*{{{*/ - { - var c = Coords.getFixed(); - - Coords.setPressed([c.x,c.y]); - Coords.setCurrent([c.x2,c.y2]); - - updateVisible(); - }; - /*}}}*/ - - // Internal Methods - function updateVisible()/*{{{*/ - { if (awake) return update(); }; - /*}}}*/ - function update()/*{{{*/ - { - var c = Coords.getFixed(); - - resize(c.w,c.h); - moveto(c.x,c.y); - - options.drawBorders && - borders['right'].css({ left: px(c.w-1) }) && - borders['bottom'].css({ top: px(c.h-1) }); - - seehandles && moveHandles(c); - awake || show(); - - options.onChange(unscale(c)); - }; - /*}}}*/ - function show()/*{{{*/ - { - $sel.show(); - $img.css('opacity',options.bgOpacity); - awake = true; - }; - /*}}}*/ - function release()/*{{{*/ - { - disableHandles(); - $sel.hide(); - $img.css('opacity',1); - awake = false; - }; - /*}}}*/ - function showHandles()//{{{ - { - if (seehandles) - { - moveHandles(Coords.getFixed()); - $hdl_holder.show(); - } - }; - //}}} - function enableHandles()/*{{{*/ - { - seehandles = true; - if (options.allowResize) - { - moveHandles(Coords.getFixed()); - $hdl_holder.show(); - return true; - } - }; - /*}}}*/ - function disableHandles()/*{{{*/ - { - seehandles = false; - $hdl_holder.hide(); - }; - /*}}}*/ - function animMode(v)/*{{{*/ - { - (animating = v) ? disableHandles(): enableHandles(); - }; - /*}}}*/ - function done()/*{{{*/ - { - animMode(false); - refresh(); - }; - /*}}}*/ - - var $track = newTracker().mousedown(createDragger('move')) - .css({ cursor: 'move', position: 'absolute', zIndex: 360 }) - - $img_holder.append($track); - disableHandles(); - - return { - updateVisible: updateVisible, - update: update, - release: release, - refresh: refresh, - setCursor: function (cursor) { $track.css('cursor',cursor); }, - enableHandles: enableHandles, - enableOnly: function() { seehandles = true; }, - showHandles: showHandles, - disableHandles: disableHandles, - animMode: animMode, - done: done - }; - }(); - /*}}}*/ - var Tracker = function()/*{{{*/ - { - var onMove = function() { }, - onDone = function() { }, - trackDoc = options.trackDocument; - - if (!trackDoc) - { - $trk - .mousemove(trackMove) - .mouseup(trackUp) - .mouseout(trackUp) - ; - } - - function toFront()/*{{{*/ - { - $trk.css({zIndex:450}); - if (trackDoc) - { - $(document) - .mousemove(trackMove) - .mouseup(trackUp) - ; - } - } - /*}}}*/ - function toBack()/*{{{*/ - { - $trk.css({zIndex:290}); - if (trackDoc) - { - $(document) - .unbind('mousemove',trackMove) - .unbind('mouseup',trackUp) - ; - } - } - /*}}}*/ - function trackMove(e)/*{{{*/ - { - onMove(mouseAbs(e)); - }; - /*}}}*/ - function trackUp(e)/*{{{*/ - { - e.preventDefault(); - e.stopPropagation(); - - if (btndown) - { - btndown = false; - - onDone(mouseAbs(e)); - options.onSelect(unscale(Coords.getFixed())); - toBack(); - onMove = function() { }; - onDone = function() { }; - } - - return false; - }; - /*}}}*/ - - function activateHandlers(move,done)/* {{{ */ - { - btndown = true; - onMove = move; - onDone = done; - toFront(); - return false; - }; - /* }}} */ - - function setCursor(t) { $trk.css('cursor',t); }; - - $img.before($trk); - return { - activateHandlers: activateHandlers, - setCursor: setCursor - }; - }(); - /*}}}*/ - var KeyManager = function()/*{{{*/ - { - var $keymgr = $('') - .css({ position: 'absolute', left: '-30px' }) - .keypress(parseKey) - .blur(onBlur), - - $keywrap = $('
') - .css({ - position: 'absolute', - overflow: 'hidden' - }) - .append($keymgr) - ; - - function watchKeys()/*{{{*/ - { - if (options.keySupport) - { - $keymgr.show(); - $keymgr.focus(); - } - }; - /*}}}*/ - function onBlur(e)/*{{{*/ - { - $keymgr.hide(); - }; - /*}}}*/ - function doNudge(e,x,y)/*{{{*/ - { - if (options.allowMove) { - Coords.moveOffset([x,y]); - Selection.updateVisible(); - }; - e.preventDefault(); - e.stopPropagation(); - }; - /*}}}*/ - function parseKey(e)/*{{{*/ - { - if (e.ctrlKey) return true; - shift_down = e.shiftKey ? true : false; - var nudge = shift_down ? 10 : 1; - switch(e.keyCode) - { - case 37: doNudge(e,-nudge,0); break; - case 39: doNudge(e,nudge,0); break; - case 38: doNudge(e,0,-nudge); break; - case 40: doNudge(e,0,nudge); break; - - case 27: Selection.release(); break; - - case 9: return true; - } - - return nothing(e); - }; - /*}}}*/ - - if (options.keySupport) $keywrap.insertBefore($img); - return { - watchKeys: watchKeys - }; - }(); - /*}}}*/ - - // }}} - // Internal Methods {{{ - - function px(n) { return '' + parseInt(n) + 'px'; }; - function pct(n) { return '' + parseInt(n) + '%'; }; - function cssClass(cl) { return options.baseClass + '-' + cl; }; - function getPos(obj)/*{{{*/ - { - // Updated in v0.9.4 to use built-in dimensions plugin - var pos = $(obj).offset(); - return [ pos.left, pos.top ]; - }; - /*}}}*/ - function mouseAbs(e)/*{{{*/ - { - return [ (e.pageX - docOffset[0]), (e.pageY - docOffset[1]) ]; - }; - /*}}}*/ - function myCursor(type)/*{{{*/ - { - if (type != lastcurs) - { - Tracker.setCursor(type); - //Handles.xsetCursor(type); - lastcurs = type; - } - }; - /*}}}*/ - function startDragMode(mode,pos)/*{{{*/ - { - docOffset = getPos($img); - Tracker.setCursor(mode=='move'?mode:mode+'-resize'); - - if (mode == 'move') - return Tracker.activateHandlers(createMover(pos), doneSelect); - - var fc = Coords.getFixed(); - var opp = oppLockCorner(mode); - var opc = Coords.getCorner(oppLockCorner(opp)); - - Coords.setPressed(Coords.getCorner(opp)); - Coords.setCurrent(opc); - - Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect); - }; - /*}}}*/ - function dragmodeHandler(mode,f)/*{{{*/ - { - return function(pos) { - if (!options.aspectRatio) switch(mode) - { - case 'e': pos[1] = f.y2; break; - case 'w': pos[1] = f.y2; break; - case 'n': pos[0] = f.x2; break; - case 's': pos[0] = f.x2; break; - } - else switch(mode) - { - case 'e': pos[1] = f.y+1; break; - case 'w': pos[1] = f.y+1; break; - case 'n': pos[0] = f.x+1; break; - case 's': pos[0] = f.x+1; break; - } - Coords.setCurrent(pos); - Selection.update(); - }; - }; - /*}}}*/ - function createMover(pos)/*{{{*/ - { - var lloc = pos; - KeyManager.watchKeys(); - - return function(pos) - { - Coords.moveOffset([pos[0] - lloc[0], pos[1] - lloc[1]]); - lloc = pos; - - Selection.update(); - }; - }; - /*}}}*/ - function oppLockCorner(ord)/*{{{*/ - { - switch(ord) - { - case 'n': return 'sw'; - case 's': return 'nw'; - case 'e': return 'nw'; - case 'w': return 'ne'; - case 'ne': return 'sw'; - case 'nw': return 'se'; - case 'se': return 'nw'; - case 'sw': return 'ne'; - }; - }; - /*}}}*/ - function createDragger(ord)/*{{{*/ - { - return function(e) { - if (options.disabled) return false; - if ((ord == 'move') && !options.allowMove) return false; - btndown = true; - startDragMode(ord,mouseAbs(e)); - e.stopPropagation(); - e.preventDefault(); - return false; - }; - }; - /*}}}*/ - function presize($obj,w,h)/*{{{*/ - { - var nw = $obj.width(), nh = $obj.height(); - if ((nw > w) && w > 0) - { - nw = w; - nh = (w/$obj.width()) * $obj.height(); - } - if ((nh > h) && h > 0) - { - nh = h; - nw = (h/$obj.height()) * $obj.width(); - } - xscale = $obj.width() / nw; - yscale = $obj.height() / nh; - $obj.width(nw).height(nh); - }; - /*}}}*/ - function unscale(c)/*{{{*/ - { - return { - x: parseInt(c.x * xscale), y: parseInt(c.y * yscale), - x2: parseInt(c.x2 * xscale), y2: parseInt(c.y2 * yscale), - w: parseInt(c.w * xscale), h: parseInt(c.h * yscale) - }; - }; - /*}}}*/ - function doneSelect(pos)/*{{{*/ - { - var c = Coords.getFixed(); - if (c.w > options.minSelect[0] && c.h > options.minSelect[1]) - { - Selection.enableHandles(); - Selection.done(); - } - else - { - Selection.release(); - } - Tracker.setCursor( options.allowSelect?'crosshair':'default' ); - }; - /*}}}*/ - function newSelection(e)/*{{{*/ - { - if (options.disabled) return false; - if (!options.allowSelect) return false; - btndown = true; - docOffset = getPos($img); - Selection.disableHandles(); - myCursor('crosshair'); - var pos = mouseAbs(e); - Coords.setPressed(pos); - Tracker.activateHandlers(selectDrag,doneSelect); - KeyManager.watchKeys(); - Selection.update(); - - e.stopPropagation(); - e.preventDefault(); - return false; - }; - /*}}}*/ - function selectDrag(pos)/*{{{*/ - { - Coords.setCurrent(pos); - Selection.update(); - }; - /*}}}*/ - function newTracker() - { - var trk = $('
').addClass(cssClass('tracker')); - $.browser.msie && trk.css({ opacity: 0, backgroundColor: 'white' }); - return trk; - }; - - // }}} - // API methods {{{ - - function animateTo(a)/*{{{*/ - { - var x1 = a[0] / xscale, - y1 = a[1] / yscale, - x2 = a[2] / xscale, - y2 = a[3] / yscale; - - if (animating) return; - - var animto = Coords.flipCoords(x1,y1,x2,y2); - var c = Coords.getFixed(); - var animat = initcr = [ c.x, c.y, c.x2, c.y2 ]; - var interv = options.animationDelay; - - var x = animat[0]; - var y = animat[1]; - var x2 = animat[2]; - var y2 = animat[3]; - var ix1 = animto[0] - initcr[0]; - var iy1 = animto[1] - initcr[1]; - var ix2 = animto[2] - initcr[2]; - var iy2 = animto[3] - initcr[3]; - var pcent = 0; - var velocity = options.swingSpeed; - - Selection.animMode(true); - - var animator = function() - { - return function() - { - pcent += (100 - pcent) / velocity; - - animat[0] = x + ((pcent / 100) * ix1); - animat[1] = y + ((pcent / 100) * iy1); - animat[2] = x2 + ((pcent / 100) * ix2); - animat[3] = y2 + ((pcent / 100) * iy2); - - if (pcent < 100) animateStart(); - else Selection.done(); - - if (pcent >= 99.8) pcent = 100; - - setSelectRaw(animat); - }; - }(); - - function animateStart() - { window.setTimeout(animator,interv); }; - - animateStart(); - }; - /*}}}*/ - function setSelect(rect)//{{{ - { - setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]); - }; - //}}} - function setSelectRaw(l) /*{{{*/ - { - Coords.setPressed([l[0],l[1]]); - Coords.setCurrent([l[2],l[3]]); - Selection.update(); - }; - /*}}}*/ - function setOptions(opt)/*{{{*/ - { - if (typeof(opt) != 'object') opt = { }; - options = $.extend(options,opt); - - if (typeof(options.onChange)!=='function') - options.onChange = function() { }; - - if (typeof(options.onSelect)!=='function') - options.onSelect = function() { }; - - }; - /*}}}*/ - function tellSelect()/*{{{*/ - { - return unscale(Coords.getFixed()); - }; - /*}}}*/ - function tellScaled()/*{{{*/ - { - return Coords.getFixed(); - }; - /*}}}*/ - function setOptionsNew(opt)/*{{{*/ - { - setOptions(opt); - interfaceUpdate(); - }; - /*}}}*/ - function disableCrop()//{{{ - { - options.disabled = true; - Selection.disableHandles(); - Selection.setCursor('default'); - Tracker.setCursor('default'); - }; - //}}} - function enableCrop()//{{{ - { - options.disabled = false; - interfaceUpdate(); - }; - //}}} - function cancelCrop()//{{{ - { - Selection.done(); - Tracker.activateHandlers(null,null); - }; - //}}} - function destroy()//{{{ - { - $div.remove(); - $origimg.show(); - }; - //}}} - - function interfaceUpdate(alt)//{{{ - // This method tweaks the interface based on options object. - // Called when options are changed and at end of initialization. - { - options.allowResize ? - alt?Selection.enableOnly():Selection.enableHandles(): - Selection.disableHandles(); - - Tracker.setCursor( options.allowSelect? 'crosshair': 'default' ); - Selection.setCursor( options.allowMove? 'move': 'default' ); - - $div.css('backgroundColor',options.bgColor); - - if ('setSelect' in options) { - setSelect(opt.setSelect); - Selection.done(); - delete(options.setSelect); - } - - if ('trueSize' in options) { - xscale = options.trueSize[0] / boundx; - yscale = options.trueSize[1] / boundy; - } - - xlimit = options.maxSize[0] || 0; - ylimit = options.maxSize[1] || 0; - xmin = options.minSize[0] || 0; - ymin = options.minSize[1] || 0; - - if ('outerImage' in options) - { - $img.attr('src',options.outerImage); - delete(options.outerImage); - } - - Selection.refresh(); - }; - //}}} - - // }}} - - $hdl_holder.hide(); - interfaceUpdate(true); - - var api = { - animateTo: animateTo, - setSelect: setSelect, - setOptions: setOptionsNew, - tellSelect: tellSelect, - tellScaled: tellScaled, - - disable: disableCrop, - enable: enableCrop, - cancel: cancelCrop, - - focus: KeyManager.watchKeys, - - getBounds: function() { return [ boundx * xscale, boundy * yscale ]; }, - getWidgetSize: function() { return [ boundx, boundy ]; }, - - release: Selection.release, - destroy: destroy - - }; - - $origimg.data('Jcrop',api); - return api; -}; - -$.fn.Jcrop = function(options)/*{{{*/ -{ - function attachWhenDone(from)/*{{{*/ - { - var loadsrc = options.useImg || from.src; - var img = new Image(); - img.onload = function() { $.Jcrop(from,options); }; - img.src = loadsrc; - }; - /*}}}*/ - if (typeof(options) !== 'object') options = { }; - - // Iterate over each object, attach Jcrop - this.each(function() - { - // If we've already attached to this object - if ($(this).data('Jcrop')) - { - // The API can be requested this way (undocumented) - if (options == 'api') return $(this).data('Jcrop'); - // Otherwise, we just reset the options... - else $(this).data('Jcrop').setOptions(options); - } - // If we haven't been attached, preload and attach - else attachWhenDone(this); - }); - - // Return "this" so we're chainable a la jQuery plugin-style! - return this; -}; -/*}}}*/ - -})(jQuery); diff --git a/modules/photoannotation/js/jquery.Jcrop.min.js b/modules/photoannotation/js/jquery.Jcrop.min.js deleted file mode 100644 index cdf50ea7..00000000 --- a/modules/photoannotation/js/jquery.Jcrop.min.js +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Jcrop v.0.9.8 (minimized) - * (c) 2008 Kelly Hallman and DeepLiquid.com - * More information: http://deepliquid.com/content/Jcrop.html - * Released under MIT License - this header must remain with code - */ - - -(function($){$.Jcrop=function(obj,opt) -{var obj=obj,opt=opt;if(typeof(obj)!=='object')obj=$(obj)[0];if(typeof(opt)!=='object')opt={};if(!('trackDocument'in opt)) -{opt.trackDocument=$.browser.msie?false:true;if($.browser.msie&&$.browser.version.split('.')[0]=='8') -opt.trackDocument=true;} -if(!('keySupport'in opt)) -opt.keySupport=$.browser.msie?false:true;var defaults={trackDocument:false,baseClass:'jcrop',addClass:null,bgColor:'black',bgOpacity:.6,borderOpacity:.4,handleOpacity:.5,handlePad:5,handleSize:9,handleOffset:5,edgeMargin:14,aspectRatio:0,keySupport:true,cornerHandles:true,sideHandles:true,drawBorders:true,dragEdges:true,boxWidth:0,boxHeight:0,boundary:8,animationDelay:20,swingSpeed:3,allowSelect:true,allowMove:true,allowResize:true,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){}};var options=defaults;setOptions(opt);var $origimg=$(obj);var $img=$origimg.clone().removeAttr('id').css({position:'absolute'});$img.width($origimg.width());$img.height($origimg.height());$origimg.after($img).hide();presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$('
').width(boundx).height(boundy).addClass(cssClass('holder')).css({position:'relative',backgroundColor:options.bgColor}).insertAfter($origimg).append($img);;if(options.addClass)$div.addClass(options.addClass);var $img2=$('').attr('src',$img.attr('src')).css('position','absolute').width(boundx).height(boundy);var $img_holder=$('
').width(pct(100)).height(pct(100)).css({zIndex:310,position:'absolute',overflow:'hidden'}).append($img2);var $hdl_holder=$('
').width(pct(100)).height(pct(100)).css('zIndex',320);var $sel=$('
').css({position:'absolute',zIndex:300}).insertBefore($img).append($img_holder,$hdl_holder);var bound=options.boundary;var $trk=newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)).css({position:'absolute',top:px(-bound),left:px(-bound),zIndex:290}).mousedown(newSelection);var xlimit,ylimit,xmin,ymin;var xscale,yscale,enabled=true;var docOffset=getPos($img),btndown,lastcurs,dimmed,animating,shift_down;var Coords=function() -{var x1=0,y1=0,x2=0,y2=0,ox,oy;function setPressed(pos) -{var pos=rebound(pos);x2=x1=pos[0];y2=y1=pos[1];};function setCurrent(pos) -{var pos=rebound(pos);ox=pos[0]-x2;oy=pos[1]-y2;x2=pos[0];y2=pos[1];};function getOffset() -{return[ox,oy];};function moveOffset(offset) -{var ox=offset[0],oy=offset[1];if(0>x1+ox)ox-=ox+x1;if(0>y1+oy)oy-=oy+y1;if(boundyboundx) -{xx=boundx;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}} -else -{xx=x2;h=rwa/aspect;yy=rh<0?y1-h:y1+h;if(yy<0) -{yy=0;w=Math.abs((yy-y1)*aspect);xx=rw<0?x1-w:w+x1;} -else if(yy>boundy) -{yy=boundy;w=Math.abs(yy-y1)*aspect;xx=rw<0?x1-w:w+x1;}} -if(xx>x1){if(xx-x1max_x){xx=x1+max_x;} -if(yy>y1){yy=y1+(xx-x1)/aspect;}else{yy=y1-(xx-x1)/aspect;}}else if(xxmax_x){xx=x1-max_x;} -if(yy>y1){yy=y1+(x1-xx)/aspect;}else{yy=y1-(x1-xx)/aspect;}} -if(xx<0){x1-=xx;xx=0;}else if(xx>boundx){x1-=xx-boundx;xx=boundx;} -if(yy<0){y1-=yy;yy=0;}else if(yy>boundy){y1-=yy-boundy;yy=boundy;} -return last=makeObj(flipCoords(x1,y1,xx,yy));};function rebound(p) -{if(p[0]<0)p[0]=0;if(p[1]<0)p[1]=0;if(p[0]>boundx)p[0]=boundx;if(p[1]>boundy)p[1]=boundy;return[p[0],p[1]];};function flipCoords(x1,y1,x2,y2) -{var xa=x1,xb=x2,ya=y1,yb=y2;if(x2xlimit)) -x2=(xsize>0)?(x1+xlimit):(x1-xlimit);if(ylimit&&(Math.abs(ysize)>ylimit)) -y2=(ysize>0)?(y1+ylimit):(y1-ylimit);if(ymin&&(Math.abs(ysize)0)?(y1+ymin):(y1-ymin);if(xmin&&(Math.abs(xsize)0)?(x1+xmin):(x1-xmin);if(x1<0){x2-=x1;x1-=x1;} -if(y1<0){y2-=y1;y1-=y1;} -if(x2<0){x1-=x2;x2-=x2;} -if(y2<0){y1-=y2;y2-=y2;} -if(x2>boundx){var delta=x2-boundx;x1-=delta;x2-=delta;} -if(y2>boundy){var delta=y2-boundy;y1-=delta;y2-=delta;} -if(x1>boundx){var delta=x1-boundy;y2-=delta;y1-=delta;} -if(y1>boundy){var delta=y1-boundy;y2-=delta;y1-=delta;} -return makeObj(flipCoords(x1,y1,x2,y2));};function makeObj(a) -{return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]};};return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed};}();var Selection=function() -{var start,end,dragmode,awake,hdep=370;var borders={};var handle={};var seehandles=false;var hhs=options.handleOffset;if(options.drawBorders){borders={top:insertBorder('hline').css('top',$.browser.msie?px(-1):px(0)),bottom:insertBorder('hline'),left:insertBorder('vline'),right:insertBorder('vline')};} -if(options.dragEdges){handle.t=insertDragbar('n');handle.b=insertDragbar('s');handle.r=insertDragbar('e');handle.l=insertDragbar('w');} -options.sideHandles&&createHandles(['n','s','e','w']);options.cornerHandles&&createHandles(['sw','nw','ne','se']);function insertBorder(type) -{var jq=$('
').css({position:'absolute',opacity:options.borderOpacity}).addClass(cssClass(type));$img_holder.append(jq);return jq;};function dragDiv(ord,zi) -{var jq=$('
').mousedown(createDragger(ord)).css({cursor:ord+'-resize',position:'absolute',zIndex:zi});$hdl_holder.append(jq);return jq;};function insertHandle(ord) -{return dragDiv(ord,hdep++).css({top:px(-hhs+1),left:px(-hhs+1),opacity:options.handleOpacity}).addClass(cssClass('handle'));};function insertDragbar(ord) -{var s=options.handleSize,o=hhs,h=s,w=s,t=o,l=o;switch(ord) -{case'n':case's':w=pct(100);break;case'e':case'w':h=pct(100);break;} -return dragDiv(ord,hdep++).width(w).height(h).css({top:px(-t+1),left:px(-l+1)});};function createHandles(li) -{for(i in li)handle[li[i]]=insertHandle(li[i]);};function moveHandles(c) -{var midvert=Math.round((c.h/2)-hhs),midhoriz=Math.round((c.w/2)-hhs),north=west=-hhs+1,east=c.w-hhs,south=c.h-hhs,x,y;'e'in handle&&handle.e.css({top:px(midvert),left:px(east)})&&handle.w.css({top:px(midvert)})&&handle.s.css({top:px(south),left:px(midhoriz)})&&handle.n.css({left:px(midhoriz)});'ne'in handle&&handle.ne.css({left:px(east)})&&handle.se.css({top:px(south),left:px(east)})&&handle.sw.css({top:px(south)});'b'in handle&&handle.b.css({top:px(south)})&&handle.r.css({left:px(east)});};function moveto(x,y) -{$img2.css({top:px(-y),left:px(-x)});$sel.css({top:px(y),left:px(x)});};function resize(w,h) -{$sel.width(w).height(h);};function refresh() -{var c=Coords.getFixed();Coords.setPressed([c.x,c.y]);Coords.setCurrent([c.x2,c.y2]);updateVisible();};function updateVisible() -{if(awake)return update();};function update() -{var c=Coords.getFixed();resize(c.w,c.h);moveto(c.x,c.y);options.drawBorders&&borders['right'].css({left:px(c.w-1)})&&borders['bottom'].css({top:px(c.h-1)});seehandles&&moveHandles(c);awake||show();options.onChange(unscale(c));};function show() -{$sel.show();$img.css('opacity',options.bgOpacity);awake=true;};function release() -{disableHandles();$sel.hide();$img.css('opacity',1);awake=false;};function showHandles() -{if(seehandles) -{moveHandles(Coords.getFixed());$hdl_holder.show();}};function enableHandles() -{seehandles=true;if(options.allowResize) -{moveHandles(Coords.getFixed());$hdl_holder.show();return true;}};function disableHandles() -{seehandles=false;$hdl_holder.hide();};function animMode(v) -{(animating=v)?disableHandles():enableHandles();};function done() -{animMode(false);refresh();};var $track=newTracker().mousedown(createDragger('move')).css({cursor:'move',position:'absolute',zIndex:360}) -$img_holder.append($track);disableHandles();return{updateVisible:updateVisible,update:update,release:release,refresh:refresh,setCursor:function(cursor){$track.css('cursor',cursor);},enableHandles:enableHandles,enableOnly:function(){seehandles=true;},showHandles:showHandles,disableHandles:disableHandles,animMode:animMode,done:done};}();var Tracker=function() -{var onMove=function(){},onDone=function(){},trackDoc=options.trackDocument;if(!trackDoc) -{$trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp);} -function toFront() -{$trk.css({zIndex:450});if(trackDoc) -{$(document).mousemove(trackMove).mouseup(trackUp);}} -function toBack() -{$trk.css({zIndex:290});if(trackDoc) -{$(document).unbind('mousemove',trackMove).unbind('mouseup',trackUp);}} -function trackMove(e) -{onMove(mouseAbs(e));};function trackUp(e) -{e.preventDefault();e.stopPropagation();if(btndown) -{btndown=false;onDone(mouseAbs(e));options.onSelect(unscale(Coords.getFixed()));toBack();onMove=function(){};onDone=function(){};} -return false;};function activateHandlers(move,done) -{btndown=true;onMove=move;onDone=done;toFront();return false;};function setCursor(t){$trk.css('cursor',t);};$img.before($trk);return{activateHandlers:activateHandlers,setCursor:setCursor};}();var KeyManager=function() -{var $keymgr=$('').css({position:'absolute',left:'-30px'}).keypress(parseKey).blur(onBlur),$keywrap=$('
').css({position:'absolute',overflow:'hidden'}).append($keymgr);function watchKeys() -{if(options.keySupport) -{$keymgr.show();$keymgr.focus();}};function onBlur(e) -{$keymgr.hide();};function doNudge(e,x,y) -{if(options.allowMove){Coords.moveOffset([x,y]);Selection.updateVisible();};e.preventDefault();e.stopPropagation();};function parseKey(e) -{if(e.ctrlKey)return true;shift_down=e.shiftKey?true:false;var nudge=shift_down?10:1;switch(e.keyCode) -{case 37:doNudge(e,-nudge,0);break;case 39:doNudge(e,nudge,0);break;case 38:doNudge(e,0,-nudge);break;case 40:doNudge(e,0,nudge);break;case 27:Selection.release();break;case 9:return true;} -return nothing(e);};if(options.keySupport)$keywrap.insertBefore($img);return{watchKeys:watchKeys};}();function px(n){return''+parseInt(n)+'px';};function pct(n){return''+parseInt(n)+'%';};function cssClass(cl){return options.baseClass+'-'+cl;};function getPos(obj) -{var pos=$(obj).offset();return[pos.left,pos.top];};function mouseAbs(e) -{return[(e.pageX-docOffset[0]),(e.pageY-docOffset[1])];};function myCursor(type) -{if(type!=lastcurs) -{Tracker.setCursor(type);lastcurs=type;}};function startDragMode(mode,pos) -{docOffset=getPos($img);Tracker.setCursor(mode=='move'?mode:mode+'-resize');if(mode=='move') -return Tracker.activateHandlers(createMover(pos),doneSelect);var fc=Coords.getFixed();var opp=oppLockCorner(mode);var opc=Coords.getCorner(oppLockCorner(opp));Coords.setPressed(Coords.getCorner(opp));Coords.setCurrent(opc);Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect);};function dragmodeHandler(mode,f) -{return function(pos){if(!options.aspectRatio)switch(mode) -{case'e':pos[1]=f.y2;break;case'w':pos[1]=f.y2;break;case'n':pos[0]=f.x2;break;case's':pos[0]=f.x2;break;} -else switch(mode) -{case'e':pos[1]=f.y+1;break;case'w':pos[1]=f.y+1;break;case'n':pos[0]=f.x+1;break;case's':pos[0]=f.x+1;break;} -Coords.setCurrent(pos);Selection.update();};};function createMover(pos) -{var lloc=pos;KeyManager.watchKeys();return function(pos) -{Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]);lloc=pos;Selection.update();};};function oppLockCorner(ord) -{switch(ord) -{case'n':return'sw';case's':return'nw';case'e':return'nw';case'w':return'ne';case'ne':return'sw';case'nw':return'se';case'se':return'nw';case'sw':return'ne';};};function createDragger(ord) -{return function(e){if(options.disabled)return false;if((ord=='move')&&!options.allowMove)return false;btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false;};};function presize($obj,w,h) -{var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0) -{nw=w;nh=(w/$obj.width())*$obj.height();} -if((nh>h)&&h>0) -{nh=h;nw=(h/$obj.height())*$obj.width();} -xscale=$obj.width()/nw;yscale=$obj.height()/nh;$obj.width(nw).height(nh);};function unscale(c) -{return{x:parseInt(c.x*xscale),y:parseInt(c.y*yscale),x2:parseInt(c.x2*xscale),y2:parseInt(c.y2*yscale),w:parseInt(c.w*xscale),h:parseInt(c.h*yscale)};};function doneSelect(pos) -{var c=Coords.getFixed();if(c.w>options.minSelect[0]&&c.h>options.minSelect[1]) -{Selection.enableHandles();Selection.done();} -else -{Selection.release();} -Tracker.setCursor(options.allowSelect?'crosshair':'default');};function newSelection(e) -{if(options.disabled)return false;if(!options.allowSelect)return false;btndown=true;docOffset=getPos($img);Selection.disableHandles();myCursor('crosshair');var pos=mouseAbs(e);Coords.setPressed(pos);Tracker.activateHandlers(selectDrag,doneSelect);KeyManager.watchKeys();Selection.update();e.stopPropagation();e.preventDefault();return false;};function selectDrag(pos) -{Coords.setCurrent(pos);Selection.update();};function newTracker() -{var trk=$('
').addClass(cssClass('tracker'));$.browser.msie&&trk.css({opacity:0,backgroundColor:'white'});return trk;};function animateTo(a) -{var x1=a[0]/xscale,y1=a[1]/yscale,x2=a[2]/xscale,y2=a[3]/yscale;if(animating)return;var animto=Coords.flipCoords(x1,y1,x2,y2);var c=Coords.getFixed();var animat=initcr=[c.x,c.y,c.x2,c.y2];var interv=options.animationDelay;var x=animat[0];var y=animat[1];var x2=animat[2];var y2=animat[3];var ix1=animto[0]-initcr[0];var iy1=animto[1]-initcr[1];var ix2=animto[2]-initcr[2];var iy2=animto[3]-initcr[3];var pcent=0;var velocity=options.swingSpeed;Selection.animMode(true);var animator=function() -{return function() -{pcent+=(100-pcent)/velocity;animat[0]=x+((pcent/100)*ix1);animat[1]=y+((pcent/100)*iy1);animat[2]=x2+((pcent/100)*ix2);animat[3]=y2+((pcent/100)*iy2);if(pcent<100)animateStart();else Selection.done();if(pcent>=99.8)pcent=100;setSelectRaw(animat);};}();function animateStart() -{window.setTimeout(animator,interv);};animateStart();};function setSelect(rect) -{setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]);};function setSelectRaw(l) -{Coords.setPressed([l[0],l[1]]);Coords.setCurrent([l[2],l[3]]);Selection.update();};function setOptions(opt) -{if(typeof(opt)!='object')opt={};options=$.extend(options,opt);if(typeof(options.onChange)!=='function') -options.onChange=function(){};if(typeof(options.onSelect)!=='function') -options.onSelect=function(){};};function tellSelect() -{return unscale(Coords.getFixed());};function tellScaled() -{return Coords.getFixed();};function setOptionsNew(opt) -{setOptions(opt);interfaceUpdate();};function disableCrop() -{options.disabled=true;Selection.disableHandles();Selection.setCursor('default');Tracker.setCursor('default');};function enableCrop() -{options.disabled=false;interfaceUpdate();};function cancelCrop() -{Selection.done();Tracker.activateHandlers(null,null);};function destroy() -{$div.remove();$origimg.show();};function interfaceUpdate(alt) -{options.allowResize?alt?Selection.enableOnly():Selection.enableHandles():Selection.disableHandles();Tracker.setCursor(options.allowSelect?'crosshair':'default');Selection.setCursor(options.allowMove?'move':'default');$div.css('backgroundColor',options.bgColor);if('setSelect'in options){setSelect(opt.setSelect);Selection.done();delete(options.setSelect);} -if('trueSize'in options){xscale=options.trueSize[0]/boundx;yscale=options.trueSize[1]/boundy;} -xlimit=options.maxSize[0]||0;ylimit=options.maxSize[1]||0;xmin=options.minSize[0]||0;ymin=options.minSize[1]||0;if('outerImage'in options) -{$img.attr('src',options.outerImage);delete(options.outerImage);} -Selection.refresh();};$hdl_holder.hide();interfaceUpdate(true);var api={animateTo:animateTo,setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled,disable:disableCrop,enable:enableCrop,cancel:cancelCrop,focus:KeyManager.watchKeys,getBounds:function(){return[boundx*xscale,boundy*yscale];},getWidgetSize:function(){return[boundx,boundy];},release:Selection.release,destroy:destroy};$origimg.data('Jcrop',api);return api;};$.fn.Jcrop=function(options) -{function attachWhenDone(from) -{var loadsrc=options.useImg||from.src;var img=new Image();img.onload=function(){$.Jcrop(from,options);};img.src=loadsrc;};if(typeof(options)!=='object')options={};this.each(function() -{if($(this).data('Jcrop')) -{if(options=='api')return $(this).data('Jcrop');else $(this).data('Jcrop').setOptions(options);} -else attachWhenDone(this);});return this;};})(jQuery); \ No newline at end of file diff --git a/modules/photoannotation/js/jquery.annotate.js b/modules/photoannotation/js/jquery.annotate.js index 264f19b2..56660594 100644 --- a/modules/photoannotation/js/jquery.annotate.js +++ b/modules/photoannotation/js/jquery.annotate.js @@ -1,478 +1,479 @@ -/// -(function($) { - - $.fn.annotateImage = function(options) { - /// - /// Creates annotations on the given image. - /// Images are loaded from the "getUrl" propety passed into the options. - /// - var opts = $.extend({}, $.fn.annotateImage.defaults, options); - var image = this; - - this.image = this; - this.mode = 'view'; - - // Assign defaults - this.getUrl = opts.getUrl; - this.saveUrl = opts.saveUrl; - this.deleteUrl = opts.deleteUrl; - this.currentUrl = opts.currentUrl; - this.deleteUrl = opts.deleteUrl; - this.editable = opts.editable; - this.useAjax = opts.useAjax; - this.tags = opts.tags; - this.notes = opts.notes; - this.labels = opts.labels; - this.csrf = opts.csrf; - - // Add the canvas - this.canvas = $('
'); - this.canvas.children('.image-annotate-edit').hide(); - this.canvas.children('.image-annotate-view').hide(); - this.image.after(this.canvas); - - // Give the canvas and the container their size and background - this.canvas.height(this.height()); - this.canvas.width(this.width()); - this.canvas.css('background-image', 'url("' + this.attr('src') + '")'); - this.canvas.children('.image-annotate-view, .image-annotate-edit').height(this.height()); - this.canvas.children('.image-annotate-view, .image-annotate-edit').width(this.width()); - - // Add the behavior: hide/show the notes when hovering the picture - this.canvas.hover(function() { - if ($(this).children('.image-annotate-edit').css('display') == 'none') { - $(this).children('.image-annotate-view').show(); - } - }, function() { - $(this).children('.image-annotate-view').hide(); - $(this).children('.image-annotate-note').hide(); - }); - - this.canvas.children('.image-annotate-view').hover(function() { - $(this).show(); - }, function() { - $(this).hide(); - $(this).children('.image-annotate-note').hide(); - }); - - // load the notes - if (this.useAjax) { - $.fn.annotateImage.ajaxLoad(this); - } else { - $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl); - } - - // Add the "Add a note" button - if ($('#g-photoannotation-link').length != 0) { - this.button = $('#g-photoannotation-link'); - this.button.click(function() { - $.fn.annotateImage.add(image, opts.tags, opts.labels, opts.saveUrl, opts.currentUrl, opts.csrf); - }); - //this.canvas.after(this.button); - } - - // Hide the original - this.hide(); - - return this; - }; - - /** - * Plugin Defaults - **/ - $.fn.annotateImage.defaults = { - getUrl: 'your-get.rails', - saveUrl: 'your-save.rails', - deleteUrl: 'your-delete.rails', - editable: true, - useAjax: true, - tags: new Array(), - notes: new Array() - }; - - $.fn.annotateImage.clear = function(image) { - /// - /// Clears all existing annotations from the image. - /// - for (var i = 0; i < image.notes.length; i++) { - image.notes[image.notes[i]].destroy(); - } - image.notes = new Array(); - }; - - $.fn.annotateImage.ajaxLoad = function(image) { - /// - /// Loads the annotations from the "getUrl" property passed in on the - /// options object. - /// - $.getJSON(image.getUrl + '?ticks=' + $.fn.annotateImage.getTicks(), function(data) { - image.notes = data; - $.fn.annotateImage.load(image); - }); - }; - - $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl) { - /// - /// Loads the annotations from the notes property passed in on the - /// options object. - /// - for (var i = 0; i < image.notes.length; i++) { - image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], labels, editable, csrf, deleteUrl); - } - }; - - $.fn.annotateImage.getTicks = function() { - /// - /// Gets a count og the ticks for the current date. - /// This is used to ensure that URLs are always unique and not cached by the browser. - /// - var now = new Date(); - return now.getTime(); - }; - - $.fn.annotateImage.add = function(image, tags, labels, saveUrl, currentUrl, csrf) { - /// - /// Adds a note to the image. - /// - if (image.mode == 'view') { - image.mode = 'edit'; - - // Create/prepare the editable note elements - var editable = new $.fn.annotateEdit(image, null, tags, labels, saveUrl, currentUrl, csrf); - - $.fn.annotateImage.createSaveButton(editable, image); - $.fn.annotateImage.createCancelButton(editable, image); - } - }; - - $.fn.annotateImage.createSaveButton = function(editable, image, note) { - /// - /// Creates a Save button on the editable note. - /// - var ok = $('OK'); - - ok.click(function() { - var form = $('#image-annotate-edit-form form'); - var text = $('#image-annotate-text').val(); - $.fn.annotateImage.appendPosition(form, editable) - image.mode = 'view'; - - form.submit(); - - editable.destroy(); - }); - editable.form.append(ok); - }; - - $.fn.annotateImage.createCancelButton = function(editable, image) { - /// - /// Creates a Cancel button on the editable note. - /// - var cancel = $('Cancel'); - cancel.click(function() { - editable.destroy(); - image.mode = 'view'; - }); - editable.form.append(cancel); - }; - - $.fn.annotateImage.saveAsHtml = function(image, target) { - var element = $(target); - var html = ""; - for (var i = 0; i < image.notes.length; i++) { - html += $.fn.annotateImage.createHiddenField("text_" + i, image.notes[i].text); - html += $.fn.annotateImage.createHiddenField("top_" + i, image.notes[i].top); - html += $.fn.annotateImage.createHiddenField("left_" + i, image.notes[i].left); - html += $.fn.annotateImage.createHiddenField("height_" + i, image.notes[i].height); - html += $.fn.annotateImage.createHiddenField("width_" + i, image.notes[i].width); - } - element.html(html); - }; - - $.fn.annotateImage.createHiddenField = function(name, value) { - return '<input type="hidden" name="' + name + '" value="' + value + '" />
'; - }; - - $.fn.annotateEdit = function(image, note, tags, labels, saveUrl, currentUrl, csrf) { - /// - /// Defines an editable annotation area. - /// - this.image = image; - - if (note) { - this.note = note; - } else { - var newNote = new Object(); - newNote.id = "new"; - newNote.top = 30; - newNote.left = 30; - newNote.width = 30; - newNote.height = 30; - newNote.text = ""; - this.note = newNote; - } - - // Set area - var area = image.canvas.children('.image-annotate-edit').children('.image-annotate-edit-area'); - this.area = area; - this.area.css('height', this.note.height + 'px'); - this.area.css('width', this.note.width + 'px'); - this.area.css('left', this.note.left + 'px'); - this.area.css('top', this.note.top + 'px'); - - // Show the edition canvas and hide the view canvas - image.canvas.children('.image-annotate-view').hide(); - image.canvas.children('.image-annotate-edit').show(); - - // Add the note (which we'll load with the form afterwards) - var tagdropdown = labels[0] + ''; - var form = $('
' + tagdropdown + labels[1] + '' + labels[2] + '
'); - this.form = form; - - $('body').append(this.form); - this.form.css('left', this.area.offset().left + 'px'); - this.form.css('top', (parseInt(this.area.offset().top) + parseInt(this.area.height()) + 7) + 'px'); - - // Set the area as a draggable/resizable element contained in the image canvas. - // Would be better to use the containment option for resizable but buggy - area.resizable({ - handles: 'all', - - stop: function(e, ui) { - form.css('left', area.offset().left + 'px'); - form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); - } - }) - .draggable({ - containment: image.canvas, - drag: function(e, ui) { - form.css('left', area.offset().left + 'px'); - form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); - }, - stop: function(e, ui) { - form.css('left', area.offset().left + 'px'); - form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); - } - }); - return this; - }; - - $.fn.annotateEdit.prototype.destroy = function() { - /// - /// Destroys an editable annotation area. - /// - this.image.canvas.children('.image-annotate-edit').hide(); - this.area.resizable('destroy'); - this.area.draggable('destroy'); - this.area.css('height', ''); - this.area.css('width', ''); - this.area.css('left', ''); - this.area.css('top', ''); - this.form.remove(); - } - - $.fn.annotateView = function(image, note, labels, editable, csrf, deleteUrl) { - /// - /// Defines a annotation area. - /// - this.image = image; - - this.note = note; - - // Add the area - this.area = $('
'); - image.canvas.children('.image-annotate-view').prepend(this.area); - - if (editable) { - this.delarea = $('
'); - image.canvas.children('.image-annotate-view').prepend(this.delarea); - this.delarea.bind('click',function () { - if (confirm(labels[3])) { - var alink = $(".g-fullsize-link"); - alink.unbind(); - alink.attr ('href', '#'); - alink.removeAttr ('rel'); - window.location = deleteUrl + "/" + csrf; - } - }) - this.delarea.hide(); - } - - // Add the note - this.form = $('
' + note.text + '
'); - this.form.hide(); - image.canvas.children('.image-annotate-view').append(this.form); - this.form.children('span.actions').hide(); - - // Set the position and size of the note - this.setPosition(); - - // Add the behavior: hide/display the note when hovering the area - var annotation = this; - this.area.hover(function() { - annotation.show(); - if (annotation.delarea != undefined) { - annotation.delarea.show(); - } - }, function() { - annotation.hide(); - if (annotation.delarea != undefined) { - annotation.delarea.hide(); - } - }); - - if (editable) { - this.delarea.hover(function() { - annotation.delarea.show(); - }, function() { - annotation.delarea.hide(); - }); - } - // Edit a note feature - if (note.url != "" && note.url != null) { - this.area.bind('click',function () { - var alink = $(".g-fullsize-link"); - alink.unbind(); - alink.attr ('href', '#'); - alink.removeAttr ('rel'); - window.location = note.url; - }) - } - - - - }; - - $.fn.annotateView.prototype.setPosition = function() { - /// - /// Sets the position of an annotation. - /// - this.area.children('div').height((parseInt(this.note.height) - 2) + 'px'); - this.area.children('div').width((parseInt(this.note.width) - 2) + 'px'); - this.area.css('left', (this.note.left) + 'px'); - this.area.css('top', (this.note.top) + 'px'); - this.form.css('left', (this.note.left) + 'px'); - this.form.css('top', (parseInt(this.note.top) + parseInt(this.note.height) + 7) + 'px'); - - if (this.delarea != undefined) { - this.delarea.children('div').height('14px'); - this.delarea.children('div').width('14px'); - this.delarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); - this.delarea.css('top', (this.note.top) + 'px'); - } - }; - - $.fn.annotateView.prototype.show = function() { - /// - /// Highlights the annotation - /// - this.form.fadeIn(250); - if (!this.note.editable) { - this.area.addClass('image-annotate-area-hover'); - } else { - this.area.addClass('image-annotate-area-editable-hover'); - } - }; - - $.fn.annotateView.prototype.hide = function() { - /// - /// Removes the highlight from the annotation. - /// - this.form.fadeOut(250); - this.area.removeClass('image-annotate-area-hover'); - this.area.removeClass('image-annotate-area-editable-hover'); - }; - - $.fn.annotateView.prototype.destroy = function() { - /// - /// Destroys the annotation. - /// - this.area.remove(); - this.form.remove(); - } - - $.fn.annotateView.prototype.edit = function() { - /// - /// Edits the annotation. - /// - if (this.image.mode == 'view') { - this.image.mode = 'edit'; - var annotation = this; - - // Create/prepare the editable note elements - var editable = new $.fn.annotateEdit(this.image, this.note); - - $.fn.annotateImage.createSaveButton(editable, this.image, annotation); - - // Add the delete button - var del = $('Delete'); - del.click(function() { - var form = $('#image-annotate-edit-form form'); - - $.fn.annotateImage.appendPosition(form, editable) - - if (annotation.image.useAjax) { - $.ajax({ - url: annotation.image.deleteUrl, - data: form.serialize(), - error: function(e) { alert("An error occured deleting that note.") } - }); - } - - annotation.image.mode = 'view'; - editable.destroy(); - annotation.destroy(); - }); - editable.form.append(del); - - $.fn.annotateImage.createCancelButton(editable, this.image); - } - }; - - $.fn.annotateImage.appendPosition = function(form, editable) { - /// - /// Appends the annotations coordinates to the given form that is posted to the server. - /// - var areaFields = $('' + - '' + - '' + - '' + - ''); - form.append(areaFields); - } - - $.fn.annotateView.prototype.resetPosition = function(editable, text) { - /// - /// Sets the position of an annotation. - /// - this.form.html(text); - this.form.hide(); - - // Resize - this.area.children('div').height(editable.area.height() + 'px'); - this.area.children('div').width((editable.area.width() - 2) + 'px'); - this.area.css('left', (editable.area.position().left) + 'px'); - this.area.css('top', (editable.area.position().top) + 'px'); - this.form.css('left', (editable.area.position().left) + 'px'); - this.form.css('top', (parseInt(editable.area.position().top) + parseInt(editable.area.height()) + 7) + 'px'); - - // Save new position to note - this.note.top = editable.area.position().top; - this.note.left = editable.area.position().left; - this.note.height = editable.area.height(); - this.note.width = editable.area.width(); - this.note.text = text; - this.note.id = editable.note.id; - this.editable = true; - }; - -})(jQuery); +/// +(function($) { + + $.fn.annotateImage = function(options) { + /// + /// Creates annotations on the given image. + /// Images are loaded from the "getUrl" propety passed into the options. + /// + var opts = $.extend({}, $.fn.annotateImage.defaults, options); + var image = this; + + this.image = this; + this.mode = 'view'; + + // Assign defaults + this.getUrl = opts.getUrl; + this.saveUrl = opts.saveUrl; + this.deleteUrl = opts.deleteUrl; + this.currentUrl = opts.currentUrl; + this.deleteUrl = opts.deleteUrl; + this.editable = opts.editable; + this.useAjax = opts.useAjax; + this.tags = opts.tags; + this.notes = opts.notes; + this.labels = opts.labels; + this.csrf = opts.csrf; + + // Add the canvas + this.canvas = $('
'); + this.canvas.children('.image-annotate-edit').hide(); + this.canvas.children('.image-annotate-view').hide(); + this.image.after(this.canvas); + + // Give the canvas and the container their size and background + this.canvas.height(this.height()); + this.canvas.width(this.width()); + this.canvas.css('background-image', 'url("' + this.attr('src') + '")'); + this.canvas.children('.image-annotate-view, .image-annotate-edit').height(this.height()); + this.canvas.children('.image-annotate-view, .image-annotate-edit').width(this.width()); + + // Add the behavior: hide/show the notes when hovering the picture + this.canvas.hover(function() { + if ($(this).children('.image-annotate-edit').css('display') == 'none') { + $(this).children('.image-annotate-view').show(); + } + }, function() { + $(this).children('.image-annotate-view').hide(); + $(this).children('.image-annotate-note').hide(); + }); + + this.canvas.children('.image-annotate-view').hover(function() { + $(this).show(); + }, function() { + $(this).hide(); + $(this).children('.image-annotate-note').hide(); + }); + + // load the notes + if (this.useAjax) { + $.fn.annotateImage.ajaxLoad(this); + } else { + $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.currentUrl); + } + + // Add the "Add a note" button + if ($('#g-photoannotation-link').length != 0) { + this.button = $('#g-photoannotation-link'); + this.button.click(function() { + $.fn.annotateImage.add(image, opts.tags, opts.labels, opts.saveUrl, opts.currentUrl, opts.csrf); + }); + //this.canvas.after(this.button); + } + + // Hide the original + this.hide(); + + return this; + }; + + /** + * Plugin Defaults + **/ + $.fn.annotateImage.defaults = { + getUrl: 'your-get.rails', + saveUrl: 'your-save.rails', + deleteUrl: 'your-delete.rails', + editable: true, + useAjax: true, + tags: new Array(), + notes: new Array() + }; + + $.fn.annotateImage.clear = function(image) { + /// + /// Clears all existing annotations from the image. + /// + for (var i = 0; i < image.notes.length; i++) { + image.notes[image.notes[i]].destroy(); + } + image.notes = new Array(); + }; + + $.fn.annotateImage.ajaxLoad = function(image) { + /// + /// Loads the annotations from the "getUrl" property passed in on the + /// options object. + /// + $.getJSON(image.getUrl + '?ticks=' + $.fn.annotateImage.getTicks(), function(data) { + image.notes = data; + $.fn.annotateImage.load(image); + }); + }; + + $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, currentUrl) { + /// + /// Loads the annotations from the notes property passed in on the + /// options object. + /// + for (var i = 0; i < image.notes.length; i++) { + image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], labels, editable, csrf, deleteUrl, currentUrl); + } + }; + + $.fn.annotateImage.getTicks = function() { + /// + /// Gets a count og the ticks for the current date. + /// This is used to ensure that URLs are always unique and not cached by the browser. + /// + var now = new Date(); + return now.getTime(); + }; + + $.fn.annotateImage.add = function(image, tags, labels, saveUrl, currentUrl, csrf) { + /// + /// Adds a note to the image. + /// + if (image.mode == 'view') { + image.mode = 'edit'; + + // Create/prepare the editable note elements + var editable = new $.fn.annotateEdit(image, null, tags, labels, saveUrl, currentUrl, csrf); + + $.fn.annotateImage.createSaveButton(editable, image); + $.fn.annotateImage.createCancelButton(editable, image); + } + }; + + $.fn.annotateImage.createSaveButton = function(editable, image, note) { + /// + /// Creates a Save button on the editable note. + /// + var ok = $('OK'); + + ok.click(function() { + var form = $('#image-annotate-edit-form form'); + var text = $('#image-annotate-text').val(); + $.fn.annotateImage.appendPosition(form, editable) + image.mode = 'view'; + + form.submit(); + + editable.destroy(); + }); + editable.form.append(ok); + }; + + $.fn.annotateImage.createCancelButton = function(editable, image) { + /// + /// Creates a Cancel button on the editable note. + /// + var cancel = $('Cancel'); + cancel.click(function() { + editable.destroy(); + image.mode = 'view'; + }); + editable.form.append(cancel); + }; + + $.fn.annotateImage.saveAsHtml = function(image, target) { + var element = $(target); + var html = ""; + for (var i = 0; i < image.notes.length; i++) { + html += $.fn.annotateImage.createHiddenField("text_" + i, image.notes[i].text); + html += $.fn.annotateImage.createHiddenField("top_" + i, image.notes[i].top); + html += $.fn.annotateImage.createHiddenField("left_" + i, image.notes[i].left); + html += $.fn.annotateImage.createHiddenField("height_" + i, image.notes[i].height); + html += $.fn.annotateImage.createHiddenField("width_" + i, image.notes[i].width); + } + element.html(html); + }; + + $.fn.annotateImage.createHiddenField = function(name, value) { + return '<input type="hidden" name="' + name + '" value="' + value + '" />
'; + }; + + $.fn.annotateEdit = function(image, note, tags, labels, saveUrl, currentUrl, csrf) { + /// + /// Defines an editable annotation area. + /// + this.image = image; + + if (note) { + this.note = note; + } else { + var newNote = new Object(); + newNote.id = "new"; + newNote.top = 30; + newNote.left = 30; + newNote.width = 30; + newNote.height = 30; + newNote.text = ""; + this.note = newNote; + } + + // Set area + var area = image.canvas.children('.image-annotate-edit').children('.image-annotate-edit-area'); + this.area = area; + this.area.css('height', this.note.height + 'px'); + this.area.css('width', this.note.width + 'px'); + this.area.css('left', this.note.left + 'px'); + this.area.css('top', this.note.top + 'px'); + + // Show the edition canvas and hide the view canvas + image.canvas.children('.image-annotate-view').hide(); + image.canvas.children('.image-annotate-edit').show(); + + // Add the note (which we'll load with the form afterwards) + var tagdropdown = labels[0] + ''; + var form = $('
' + tagdropdown + labels[1] + '' + labels[2] + '
'); + this.form = form; + + $('body').append(this.form); + this.form.css('left', this.area.offset().left + 'px'); + this.form.css('top', (parseInt(this.area.offset().top) + parseInt(this.area.height()) + 7) + 'px'); + + // Set the area as a draggable/resizable element contained in the image canvas. + // Would be better to use the containment option for resizable but buggy + area.resizable({ + handles: 'all', + + stop: function(e, ui) { + form.css('left', area.offset().left + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + } + }) + .draggable({ + containment: image.canvas, + drag: function(e, ui) { + form.css('left', area.offset().left + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + }, + stop: function(e, ui) { + form.css('left', area.offset().left + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + } + }); + return this; + }; + + $.fn.annotateEdit.prototype.destroy = function() { + /// + /// Destroys an editable annotation area. + /// + this.image.canvas.children('.image-annotate-edit').hide(); + this.area.resizable('destroy'); + this.area.draggable('destroy'); + this.area.css('height', ''); + this.area.css('width', ''); + this.area.css('left', ''); + this.area.css('top', ''); + this.form.remove(); + } + + $.fn.annotateView = function(image, note, labels, editable, csrf, deleteUrl, currentUrl) { + /// + /// Defines a annotation area. + /// + this.image = image; + + this.note = note; + + // Add the area + this.area = $('
'); + image.canvas.children('.image-annotate-view').prepend(this.area); + + if (editable) { + this.delarea = $('
'); + image.canvas.children('.image-annotate-view').prepend(this.delarea); + this.delarea.bind('click',function () { + if (confirm(labels[3])) { + var alink = $(".g-fullsize-link"); + alink.unbind(); + alink.attr ('href', '#'); + alink.removeAttr ('rel'); + var delform = $(this).children('div').children('form'); + delform.submit(); + } + }) + this.delarea.hide(); + } + + // Add the note + this.form = $('
' + note.text + '
'); + this.form.hide(); + image.canvas.children('.image-annotate-view').append(this.form); + this.form.children('span.actions').hide(); + + // Set the position and size of the note + this.setPosition(); + + // Add the behavior: hide/display the note when hovering the area + var annotation = this; + this.area.hover(function() { + annotation.show(); + if (annotation.delarea != undefined) { + annotation.delarea.show(); + } + }, function() { + annotation.hide(); + if (annotation.delarea != undefined) { + annotation.delarea.hide(); + } + }); + + if (editable) { + this.delarea.hover(function() { + annotation.delarea.show(); + }, function() { + annotation.delarea.hide(); + }); + } + // Edit a note feature + if (note.url != "" && note.url != null) { + this.area.bind('click',function () { + var alink = $(".g-fullsize-link"); + alink.unbind(); + alink.attr ('href', '#'); + alink.removeAttr ('rel'); + window.location = note.url; + }) + } + + + + }; + + $.fn.annotateView.prototype.setPosition = function() { + /// + /// Sets the position of an annotation. + /// + this.area.children('div').height((parseInt(this.note.height) - 2) + 'px'); + this.area.children('div').width((parseInt(this.note.width) - 2) + 'px'); + this.area.css('left', (this.note.left) + 'px'); + this.area.css('top', (this.note.top) + 'px'); + this.form.css('left', (this.note.left) + 'px'); + this.form.css('top', (parseInt(this.note.top) + parseInt(this.note.height) + 7) + 'px'); + + if (this.delarea != undefined) { + this.delarea.children('div').height('14px'); + this.delarea.children('div').width('14px'); + this.delarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); + this.delarea.css('top', (this.note.top) + 'px'); + } + }; + + $.fn.annotateView.prototype.show = function() { + /// + /// Highlights the annotation + /// + this.form.fadeIn(250); + if (!this.note.editable) { + this.area.addClass('image-annotate-area-hover'); + } else { + this.area.addClass('image-annotate-area-editable-hover'); + } + }; + + $.fn.annotateView.prototype.hide = function() { + /// + /// Removes the highlight from the annotation. + /// + this.form.fadeOut(250); + this.area.removeClass('image-annotate-area-hover'); + this.area.removeClass('image-annotate-area-editable-hover'); + }; + + $.fn.annotateView.prototype.destroy = function() { + /// + /// Destroys the annotation. + /// + this.area.remove(); + this.form.remove(); + } + + $.fn.annotateView.prototype.edit = function() { + /// + /// Edits the annotation. + /// + if (this.image.mode == 'view') { + this.image.mode = 'edit'; + var annotation = this; + + // Create/prepare the editable note elements + var editable = new $.fn.annotateEdit(this.image, this.note); + + $.fn.annotateImage.createSaveButton(editable, this.image, annotation); + + // Add the delete button + var del = $('Delete'); + del.click(function() { + var form = $('#image-annotate-edit-form form'); + + $.fn.annotateImage.appendPosition(form, editable) + + if (annotation.image.useAjax) { + $.ajax({ + url: annotation.image.deleteUrl, + data: form.serialize(), + error: function(e) { alert("An error occured deleting that note.") } + }); + } + + annotation.image.mode = 'view'; + editable.destroy(); + annotation.destroy(); + }); + editable.form.append(del); + + $.fn.annotateImage.createCancelButton(editable, this.image); + } + }; + + $.fn.annotateImage.appendPosition = function(form, editable) { + /// + /// Appends the annotations coordinates to the given form that is posted to the server. + /// + var areaFields = $('' + + '' + + '' + + '' + + ''); + form.append(areaFields); + } + + $.fn.annotateView.prototype.resetPosition = function(editable, text) { + /// + /// Sets the position of an annotation. + /// + this.form.html(text); + this.form.hide(); + + // Resize + this.area.children('div').height(editable.area.height() + 'px'); + this.area.children('div').width((editable.area.width() - 2) + 'px'); + this.area.css('left', (editable.area.position().left) + 'px'); + this.area.css('top', (editable.area.position().top) + 'px'); + this.form.css('left', (editable.area.position().left) + 'px'); + this.form.css('top', (parseInt(editable.area.position().top) + parseInt(editable.area.height()) + 7) + 'px'); + + // Save new position to note + this.note.top = editable.area.position().top; + this.note.left = editable.area.position().left; + this.note.height = editable.area.height(); + this.note.width = editable.area.width(); + this.note.text = text; + this.note.id = editable.note.id; + this.editable = true; + }; + +})(jQuery); diff --git a/modules/photoannotation/js/jquery.annotate.min.js b/modules/photoannotation/js/jquery.annotate.min.js index e56337fd..db7667f2 100644 --- a/modules/photoannotation/js/jquery.annotate.min.js +++ b/modules/photoannotation/js/jquery.annotate.min.js @@ -1 +1,2 @@ -(function($){$.fn.annotateImage=function(options){var opts=$.extend({},$.fn.annotateImage.defaults,options);var image=this;this.image=this;this.mode='view';this.getUrl=opts.getUrl;this.saveUrl=opts.saveUrl;this.deleteUrl=opts.deleteUrl;this.editable=opts.editable;this.useAjax=opts.useAjax;this.notes=opts.notes;this.canvas=$('
');this.canvas.children('.image-annotate-edit').hide();this.canvas.children('.image-annotate-view').hide();this.image.after(this.canvas);this.canvas.height(this.height());this.canvas.width(this.width());this.canvas.css('background-image','url("'+this.attr('src')+'")');this.canvas.children('.image-annotate-view, .image-annotate-edit').height(this.height());this.canvas.children('.image-annotate-view, .image-annotate-edit').width(this.width());this.canvas.hover(function(){if($(this).children('.image-annotate-edit').css('display')=='none'){$(this).children('.image-annotate-view').show()}},function(){$(this).children('.image-annotate-view').hide();$(this).children('.image-annotate-note').hide()});this.canvas.children('.image-annotate-view').hover(function(){$(this).show()},function(){$(this).hide();$(this).children('.image-annotate-note').hide()});if(this.useAjax){$.fn.annotateImage.ajaxLoad(this)}else{$.fn.annotateImage.load(this)}if(this.editable){this.button=$('Add Note');this.button.click(function(){$.fn.annotateImage.add(image)});this.canvas.after(this.button)}this.hide();return this};$.fn.annotateImage.defaults={getUrl:'your-get.rails',saveUrl:'your-save.rails',deleteUrl:'your-delete.rails',editable:true,useAjax:true,notes:new Array()};$.fn.annotateImage.clear=function(image){for(var i=0;iOK');ok.click(function(){var form=$('#image-annotate-edit-form form');var text=$('#image-annotate-text').val();$.fn.annotateImage.appendPosition(form,editable)image.mode='view';if(image.useAjax){$.ajax({url:image.saveUrl,data:form.serialize(),error:function(e){alert("An error occured saving that note.")},success:function(data){if(data.annotation_id!=undefined){editable.note.id=data.annotation_id}},dataType:"json"})}if(note){note.resetPosition(editable,text)}else{editable.note.editable=true;note=new $.fn.annotateView(image,editable.note)note.resetPosition(editable,text);image.notes.push(editable.note)}editable.destroy()});editable.form.append(ok)};$.fn.annotateImage.createCancelButton=function(editable,image){var cancel=$('Cancel');cancel.click(function(){editable.destroy();image.mode='view'});editable.form.append(cancel)};$.fn.annotateImage.saveAsHtml=function(image,target){var element=$(target);var html="";for(var i=0;i'};$.fn.annotateEdit=function(image,note){this.image=image;if(note){this.note=note}else{var newNote=new Object();newNote.id="new";newNote.top=30;newNote.left=30;newNote.width=30;newNote.height=30;newNote.text="";this.note=newNote}var area=image.canvas.children('.image-annotate-edit').children('.image-annotate-edit-area');this.area=area;this.area.css('height',this.note.height+'px');this.area.css('width',this.note.width+'px');this.area.css('left',this.note.left+'px');this.area.css('top',this.note.top+'px');image.canvas.children('.image-annotate-view').hide();image.canvas.children('.image-annotate-edit').show();var form=$('
');this.form=form;$('body').append(this.form);this.form.css('left',this.area.offset().left+'px');this.form.css('top',(parseInt(this.area.offset().top)+parseInt(this.area.height())+7)+'px');area.resizable({handles:'all',stop:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')}}).draggable({containment:image.canvas,drag:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')},stop:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')}});return this};$.fn.annotateEdit.prototype.destroy=function(){this.image.canvas.children('.image-annotate-edit').hide();this.area.resizable('destroy');this.area.draggable('destroy');this.area.css('height','');this.area.css('width','');this.area.css('left','');this.area.css('top','');this.form.remove()}$.fn.annotateView=function(image,note){this.image=image;this.note=note;this.area=$('
');image.canvas.children('.image-annotate-view').prepend(this.area);this.form=$('
'+note.text+'
');this.form.hide();image.canvas.children('.image-annotate-view').append(this.form);this.form.children('span.actions').hide();this.setPosition();var annotation=this;this.area.hover(function(){annotation.show()},function(){annotation.hide()});if(note.url!=""&¬e.url!=null){this.area.bind('click',function(){window.location=note.url})}};$.fn.annotateView.prototype.setPosition=function(){this.area.children('div').height((parseInt(this.note.height)-2)+'px');this.area.children('div').width((parseInt(this.note.width)-2)+'px');this.area.css('left',(this.note.left)+'px');this.area.css('top',(this.note.top)+'px');this.form.css('left',(this.note.left)+'px');this.form.css('top',(parseInt(this.note.top)+parseInt(this.note.height)+7)+'px')};$.fn.annotateView.prototype.show=function(){this.form.fadeIn(250);if(!this.editable){this.area.addClass('image-annotate-area-hover')}else{this.area.addClass('image-annotate-area-editable-hover')}};$.fn.annotateView.prototype.hide=function(){this.form.fadeOut(250);this.area.removeClass('image-annotate-area-hover');this.area.removeClass('image-annotate-area-editable-hover')};$.fn.annotateView.prototype.destroy=function(){this.area.remove();this.form.remove()}$.fn.annotateView.prototype.edit=function(){if(this.image.mode=='view'){this.image.mode='edit';var annotation=this;var editable=new $.fn.annotateEdit(this.image,this.note);$.fn.annotateImage.createSaveButton(editable,this.image,annotation);var del=$('Delete');del.click(function(){var form=$('#image-annotate-edit-form form');$.fn.annotateImage.appendPosition(form,editable)if(annotation.image.useAjax){$.ajax({url:annotation.image.deleteUrl,data:form.serialize(),error:function(e){alert("An error occured deleting that note.")}})}annotation.image.mode='view';editable.destroy();annotation.destroy()});editable.form.append(del);$.fn.annotateImage.createCancelButton(editable,this.image)}};$.fn.annotateImage.appendPosition=function(form,editable){var areaFields=$(''+''+''+''+'');form.append(areaFields)}$.fn.annotateView.prototype.resetPosition=function(editable,text){this.form.html(text);this.form.hide();this.area.children('div').height(editable.area.height()+'px');this.area.children('div').width((editable.area.width()-2)+'px');this.area.css('left',(editable.area.position().left)+'px');this.area.css('top',(editable.area.position().top)+'px');this.form.css('left',(editable.area.position().left)+'px');this.form.css('top',(parseInt(editable.area.position().top)+parseInt(editable.area.height())+7)+'px');this.note.top=editable.area.position().top;this.note.left=editable.area.position().left;this.note.height=editable.area.height();this.note.width=editable.area.width();this.note.text=text;this.note.id=editable.note.id;this.editable=true}})(jQuery); + +(function($){$.fn.annotateImage=function(options){var opts=$.extend({},$.fn.annotateImage.defaults,options);var image=this;this.image=this;this.mode='view';this.getUrl=opts.getUrl;this.saveUrl=opts.saveUrl;this.deleteUrl=opts.deleteUrl;this.currentUrl=opts.currentUrl;this.deleteUrl=opts.deleteUrl;this.editable=opts.editable;this.useAjax=opts.useAjax;this.tags=opts.tags;this.notes=opts.notes;this.labels=opts.labels;this.csrf=opts.csrf;this.canvas=$('
');this.canvas.children('.image-annotate-edit').hide();this.canvas.children('.image-annotate-view').hide();this.image.after(this.canvas);this.canvas.height(this.height());this.canvas.width(this.width());this.canvas.css('background-image','url("'+this.attr('src')+'")');this.canvas.children('.image-annotate-view, .image-annotate-edit').height(this.height());this.canvas.children('.image-annotate-view, .image-annotate-edit').width(this.width());this.canvas.hover(function(){if($(this).children('.image-annotate-edit').css('display')=='none'){$(this).children('.image-annotate-view').show()}},function(){$(this).children('.image-annotate-view').hide();$(this).children('.image-annotate-note').hide()});this.canvas.children('.image-annotate-view').hover(function(){$(this).show()},function(){$(this).hide();$(this).children('.image-annotate-note').hide()});if(this.useAjax){$.fn.annotateImage.ajaxLoad(this)}else{$.fn.annotateImage.load(this,this.labels,this.editable,this.csrf,this.deleteUrl,this.currentUrl)}if($('#g-photoannotation-link').length!=0){this.button=$('#g-photoannotation-link');this.button.click(function(){$.fn.annotateImage.add(image,opts.tags,opts.labels,opts.saveUrl,opts.currentUrl,opts.csrf)})}this.hide();return this};$.fn.annotateImage.defaults={getUrl:'your-get.rails',saveUrl:'your-save.rails',deleteUrl:'your-delete.rails',editable:true,useAjax:true,tags:new Array(),notes:new Array()};$.fn.annotateImage.clear=function(image){for(var i=0;iOK');ok.click(function(){var form=$('#image-annotate-edit-form form');var text=$('#image-annotate-text').val();$.fn.annotateImage.appendPosition(form,editable)image.mode='view';form.submit();editable.destroy()});editable.form.append(ok)};$.fn.annotateImage.createCancelButton=function(editable,image){var cancel=$('Cancel');cancel.click(function(){editable.destroy();image.mode='view'});editable.form.append(cancel)};$.fn.annotateImage.saveAsHtml=function(image,target){var element=$(target);var html="";for(var i=0;i'};$.fn.annotateEdit=function(image,note,tags,labels,saveUrl,currentUrl,csrf){this.image=image;if(note){this.note=note}else{var newNote=new Object();newNote.id="new";newNote.top=30;newNote.left=30;newNote.width=30;newNote.height=30;newNote.text="";this.note=newNote}var area=image.canvas.children('.image-annotate-edit').children('.image-annotate-edit-area');this.area=area;this.area.css('height',this.note.height+'px');this.area.css('width',this.note.width+'px');this.area.css('left',this.note.left+'px');this.area.css('top',this.note.top+'px');image.canvas.children('.image-annotate-view').hide();image.canvas.children('.image-annotate-edit').show();var tagdropdown=labels[0]+'';var form=$('
'+tagdropdown+labels[1]+''+labels[2]+'
');this.form=form;$('body').append(this.form);this.form.css('left',this.area.offset().left+'px');this.form.css('top',(parseInt(this.area.offset().top)+parseInt(this.area.height())+7)+'px');area.resizable({handles:'all',stop:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')}}).draggable({containment:image.canvas,drag:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')},stop:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')}});return this};$.fn.annotateEdit.prototype.destroy=function(){this.image.canvas.children('.image-annotate-edit').hide();this.area.resizable('destroy');this.area.draggable('destroy');this.area.css('height','');this.area.css('width','');this.area.css('left','');this.area.css('top','');this.form.remove()}$.fn.annotateView=function(image,note,labels,editable,csrf,deleteUrl,currentUrl){this.image=image;this.note=note;this.area=$('
');image.canvas.children('.image-annotate-view').prepend(this.area);if(editable){this.delarea=$('
');image.canvas.children('.image-annotate-view').prepend(this.delarea);this.delarea.bind('click',function(){if(confirm(labels[3])){var alink=$(".g-fullsize-link");alink.unbind();alink.attr('href','#');alink.removeAttr('rel');var delform=$(this).children('div').children('form');delform.submit()}})this.delarea.hide()}this.form=$('
'+note.text+'
');this.form.hide();image.canvas.children('.image-annotate-view').append(this.form);this.form.children('span.actions').hide();this.setPosition();var annotation=this;this.area.hover(function(){annotation.show();if(annotation.delarea!=undefined){annotation.delarea.show()}},function(){annotation.hide();if(annotation.delarea!=undefined){annotation.delarea.hide()}});if(editable){this.delarea.hover(function(){annotation.delarea.show()},function(){annotation.delarea.hide()})}if(note.url!=""&¬e.url!=null){this.area.bind('click',function(){var alink=$(".g-fullsize-link");alink.unbind();alink.attr('href','#');alink.removeAttr('rel');window.location=note.url})}};$.fn.annotateView.prototype.setPosition=function(){this.area.children('div').height((parseInt(this.note.height)-2)+'px');this.area.children('div').width((parseInt(this.note.width)-2)+'px');this.area.css('left',(this.note.left)+'px');this.area.css('top',(this.note.top)+'px');this.form.css('left',(this.note.left)+'px');this.form.css('top',(parseInt(this.note.top)+parseInt(this.note.height)+7)+'px');if(this.delarea!=undefined){this.delarea.children('div').height('14px');this.delarea.children('div').width('14px');this.delarea.css('left',(this.note.left+parseInt(this.note.width))+'px');this.delarea.css('top',(this.note.top)+'px')}};$.fn.annotateView.prototype.show=function(){this.form.fadeIn(250);if(!this.note.editable){this.area.addClass('image-annotate-area-hover')}else{this.area.addClass('image-annotate-area-editable-hover')}};$.fn.annotateView.prototype.hide=function(){this.form.fadeOut(250);this.area.removeClass('image-annotate-area-hover');this.area.removeClass('image-annotate-area-editable-hover')};$.fn.annotateView.prototype.destroy=function(){this.area.remove();this.form.remove()}$.fn.annotateView.prototype.edit=function(){if(this.image.mode=='view'){this.image.mode='edit';var annotation=this;var editable=new $.fn.annotateEdit(this.image,this.note);$.fn.annotateImage.createSaveButton(editable,this.image,annotation);var del=$('Delete');del.click(function(){var form=$('#image-annotate-edit-form form');$.fn.annotateImage.appendPosition(form,editable)if(annotation.image.useAjax){$.ajax({url:annotation.image.deleteUrl,data:form.serialize(),error:function(e){alert("An error occured deleting that note.")}})}annotation.image.mode='view';editable.destroy();annotation.destroy()});editable.form.append(del);$.fn.annotateImage.createCancelButton(editable,this.image)}};$.fn.annotateImage.appendPosition=function(form,editable){var areaFields=$(''+''+''+''+'');form.append(areaFields)}$.fn.annotateView.prototype.resetPosition=function(editable,text){this.form.html(text);this.form.hide();this.area.children('div').height(editable.area.height()+'px');this.area.children('div').width((editable.area.width()-2)+'px');this.area.css('left',(editable.area.position().left)+'px');this.area.css('top',(editable.area.position().top)+'px');this.form.css('left',(editable.area.position().left)+'px');this.form.css('top',(parseInt(editable.area.position().top)+parseInt(editable.area.height())+7)+'px');this.note.top=editable.area.position().top;this.note.left=editable.area.position().left;this.note.height=editable.area.height();this.note.width=editable.area.width();this.note.text=text;this.note.id=editable.note.id;this.editable=true}})(jQuery); diff --git a/modules/photoannotation/js/jquery.min.js b/modules/photoannotation/js/jquery.min.js deleted file mode 100644 index 55c2e6d7..00000000 --- a/modules/photoannotation/js/jquery.min.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * jQuery JavaScript Library v1.3.2 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 - */ -(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); -/* - * Sizzle CSS Selector Engine - v0.9.3 - * Copyright 2009, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/modules/photoannotation/models/items_face.php b/modules/photoannotation/models/items_face.php index 70395b35..8f3a4072 100644 --- a/modules/photoannotation/models/items_face.php +++ b/modules/photoannotation/models/items_face.php @@ -1,21 +1,21 @@ - +
+

+

+

TagFaces module by rWatcher.
+ This means that notes and faces that you create in either one will be shown and are editable by the other module as well.
+ However since both modules do the same you cannot have both active at the same time.

+ If you decide to show annotations below the photo but they are displayed below the comments section (or any other data), + please download and install the Module order module.") ?>

+ +
diff --git a/modules/photoannotation/views/photoannotation.html.php b/modules/photoannotation/views/photoannotation.html.php deleted file mode 100644 index 83a99677..00000000 --- a/modules/photoannotation/views/photoannotation.html.php +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - -
- dynamic_top() ?> -
-

-

- resize_img(array("id" => "g-select-photo-id-{$item->id}", "class" => "g-select-resize", "style" => "position: fixed;")) ?> -
-
- - - -
- -
- -


- -
-
-

- -
-
- -
- - - -dynamic_bottom() ?> diff --git a/modules/photoannotation/views/photoannotation_highlight_block.html.php b/modules/photoannotation/views/photoannotation_highlight_block.html.php index bc18d181..78fd9abc 100644 --- a/modules/photoannotation/views/photoannotation_highlight_block.html.php +++ b/modules/photoannotation/views/photoannotation_highlight_block.html.php @@ -1,79 +1,108 @@ -where("item_id", "=", $item->id) - ->find_all(); - $existingNotes = ORM::factory("items_note") - ->where("item_id", "=", $item->id) - ->find_all(); - $tags_arraystring = ""; - $jscode = ""; - // If it does, then insert some javascript and display an image map - // to show where the faces are at. - if ((count($existingFaces) > 0) || (count($existingNotes) > 0)) { - $jscode = "notes: [ "; - foreach ($existingFaces as $oneFace) { - $oneTag = ORM::factory("tag", $oneFace->tag_id); - $jscode .= "{ \"top\": ". $oneFace->y1 .",\n"; - $jscode .= "\"left\": ". $oneFace->x1 .",\n"; - $jscode .= "\"width\": ". ($oneFace->x2 - $oneFace->x1) .",\n"; - $jscode .= "\"height\": ". ($oneFace->y2 - $oneFace->y1) .",\n"; - $jscode .= "\"text\": \"". html::clean($oneTag->name) ."\",\n"; - $jscode .= "\"noteid\": ". $oneNote->id .",\n"; - $jscode .= "\"editable\": true,\n"; - $jscode .= "\"url\": \"". $oneTag->url() ."\" },\n"; - } - - foreach ($existingNotes as $oneNote) { - $tagdesc = ""; - if ($oneNote->description) { - $tagdesc = "
". html::clean($oneNote->description); - } - $jscode .= "{ \"top\": ". $oneNote->y1 .",\n"; - $jscode .= "\"left\": ". $oneNote->x1 .",\n"; - $jscode .= "\"width\": ". ($oneNote->x2 - $oneNote->x1) .",\n"; - $jscode .= "\"height\": ". ($oneNote->y2 - $oneNote->y1) .",\n"; - $jscode .= "\"text\": \"". html::clean($oneNote->title) . $tagdesc ."\",\n"; - $jscode .= "\"noteid\": ". $oneNote->id .",\n"; - $jscode .= "\"editable\": false,\n"; - $jscode .= "\"url\": \"\" },\n"; - } - $jscode = trim($jscode, ",\n"); - $jscode .= " ],"; - } - $item_tags = ORM::factory("tag") - ->join("items_tags", "tags.id", "items_tags.tag_id") - ->where("items_tags.item_id", "=", $item->id) - ->find_all(); - $tags_arraystring = "tags: [ "; - foreach ($item_tags as $current_tag) { - $tags_arraystring .= "{'name':'". html::clean($current_tag->name) ."','id':'". $current_tag->id ."'},"; - } - $tags_arraystring = trim($tags_arraystring, ","); - $tags_arraystring .= " ],"; - $labels_arraystring = "labels: [ '". t("Tag:") ."','". t("Note Title:") ."','". t("Description (optional):") ."','". t("Are you sure you want to delete this annotation?") ."' ],"; -?> - - - - +where("item_id", "=", $item->id) + ->find_all(); + $existingNotes = ORM::factory("items_note") + ->where("item_id", "=", $item->id) + ->find_all(); + $tags_arraystring = ""; + $jscode = ""; + $legend_faces = ""; + $legend_notes = ""; + // If it does, then insert some javascript and display an image map + // to show where the faces are at. + if ((count($existingFaces) > 0) || (count($existingNotes) > 0)) { + $jscode = "notes: [ "; + foreach ($existingFaces as $oneFace) { + $oneTag = ORM::factory("tag", $oneFace->tag_id); + $tagdesc = ""; + if ($oneFace->description) { + $tagdesc = "
". html::clean($oneFace->description); + } + if (module::get_var("photoannotation", "showfaces", false)) { + $legend_faces .= "url() ."\">". html::clean($oneTag->name) .", "; + } + $jscode .= "{ \"top\": ". $oneFace->y1 .",\n"; + $jscode .= "\"left\": ". $oneFace->x1 .",\n"; + $jscode .= "\"width\": ". ($oneFace->x2 - $oneFace->x1) .",\n"; + $jscode .= "\"height\": ". ($oneFace->y2 - $oneFace->y1) .",\n"; + $jscode .= "\"text\": \"". html::clean($oneTag->name) . $tagdesc ."\",\n"; + $jscode .= "\"noteid\": ". $oneFace->id .",\n"; + $jscode .= "\"notetype\": \"face\",\n"; + $jscode .= "\"editable\": true,\n"; + $jscode .= "\"url\": \"". $oneTag->url() ."\" },\n"; + } + if ($legend_faces != "") { + $legend_faces = trim($legend_faces, ", "); + $legend_faces = t("Faces on this photo: ") . $legend_faces; + } + foreach ($existingNotes as $oneNote) { + $tagdesc = ""; + if ($oneNote->description) { + $tagdesc = "
". html::clean($oneNote->description); + } + if (module::get_var("photoannotation", "shownotes", false)) { + $legend_notes .= html::clean($oneNote->title) .", "; + } + $jscode .= "{ \"top\": ". $oneNote->y1 .",\n"; + $jscode .= "\"left\": ". $oneNote->x1 .",\n"; + $jscode .= "\"width\": ". ($oneNote->x2 - $oneNote->x1) .",\n"; + $jscode .= "\"height\": ". ($oneNote->y2 - $oneNote->y1) .",\n"; + $jscode .= "\"text\": \"". html::clean($oneNote->title) . $tagdesc ."\",\n"; + $jscode .= "\"noteid\": ". $oneNote->id .",\n"; + $jscode .= "\"notetype\": \"note\",\n"; + $jscode .= "\"editable\": false,\n"; + $jscode .= "\"url\": \"\" },\n"; + } + $jscode = trim($jscode, ",\n"); + $jscode .= " ],"; + if ($legend_notes != "") { + $legend_notes = trim($legend_notes, ", "); + $legend_notes = t("Notes on this photo: ") . $legend_notes; + } + } + $legend_display = $legend_faces; + if ($legend_display == "") { + $legend_display = $legend_notes; + } else { + if ($legend_notes != "") { + $legend_display = $legend_display ."
". $legend_notes; + } + } + $item_tags = ORM::factory("tag") + ->join("items_tags", "tags.id", "items_tags.tag_id") + ->where("items_tags.item_id", "=", $item->id) + ->find_all(); + $tags_arraystring = "tags: [ "; + foreach ($item_tags as $current_tag) { + $tags_arraystring .= "{'name':'". html::clean($current_tag->name) ."','id':'". $current_tag->id ."'},"; + } + $tags_arraystring = trim($tags_arraystring, ","); + $tags_arraystring .= " ],"; + $labels_arraystring = "labels: [ '". t("Tag:") ."','". t("Note Title:") ."','". t("Description (optional):") ."','". t("Are you sure you want to delete this annotation?") ."' ],"; +?> + + + + ". $legend_display ."
" ?> + \ No newline at end of file From 20b07f9b2043d9241ce1aa7db21f0fba7eccc490 Mon Sep 17 00:00:00 2001 From: hukoeth Date: Sat, 28 Aug 2010 18:07:08 +0200 Subject: [PATCH 31/55] Module now allows editing of annotations --- .../controllers/photoannotation.php | 118 +++++++++++++----- .../photoannotation/css/photoannotation.css | 4 + .../helpers/photoannotation_theme.php | 2 +- modules/photoannotation/images/edit.png | Bin 0 -> 208 bytes modules/photoannotation/js/jquery.annotate.js | 93 ++++++++------ .../photoannotation_highlight_block.html.php | 16 +-- 6 files changed, 150 insertions(+), 83 deletions(-) create mode 100644 modules/photoannotation/images/edit.png diff --git a/modules/photoannotation/controllers/photoannotation.php b/modules/photoannotation/controllers/photoannotation.php index 4e690115..ea697be4 100644 --- a/modules/photoannotation/controllers/photoannotation.php +++ b/modules/photoannotation/controllers/photoannotation.php @@ -23,7 +23,8 @@ class photoannotation_Controller extends Controller { access::verify_csrf(); //Get form data - $id = $_POST["id"]; //Not yet needed since we are only creating new tagfaces will be needed when editing of existing ones is implemented + $noteid = $_POST["noteid"]; + $notetype = $_POST["notetype"]; $str_y1 = $_POST["top"]; $str_x1 = $_POST["left"]; $str_y2 = $_POST["height"] + $str_y1; //Annotation uses area size, tagfaces uses positions @@ -33,30 +34,25 @@ class photoannotation_Controller extends Controller { $str_face_description = $_POST["desc"]; $redir_uri = $_POST["currenturl"]; // Decide if we are saving a face or a note. - if ($tag_data == -1) { - if ($str_face_title == "") { - message::error(t("Please select a Tag or specify a Title.")); - url::redirect($redir_uri); - return; - } - //Save note - $newnote = ORM::factory("items_note"); - $newnote->item_id = $item_data; - $newnote->x1 = $str_x1; - $newnote->y1 = $str_y1; - $newnote->x2 = $str_x2; - $newnote->y2 = $str_y2; - $newnote->title = $str_face_title; - $newnote->description = $str_face_description; - $newnote->save(); - } else { - // Check to see if the tag already has a face associated with it. - $existingFace = ORM::factory("items_face") - ->where("tag_id", "=", $tag_data) - ->where("item_id", "=", $item_data) - ->find_all(); - - if (count($existingFace) == 0) { + + if ($noteid == "new") { + if ($tag_data == -1) { + if ($str_face_title == "") { + message::error(t("Please select a Tag or specify a Title.")); + url::redirect($redir_uri); + return; + } + //Save note + $newnote = ORM::factory("items_note"); + $newnote->item_id = $item_data; + $newnote->x1 = $str_x1; + $newnote->y1 = $str_y1; + $newnote->x2 = $str_x2; + $newnote->y2 = $str_y2; + $newnote->title = $str_face_title; + $newnote->description = $str_face_description; + $newnote->save(); + } else { // Save the new face to the database. $newface = ORM::factory("items_face"); $newface->tag_id = $tag_data; @@ -67,16 +63,70 @@ class photoannotation_Controller extends Controller { $newface->y2 = $str_y2; $newface->description = $str_face_description; $newface->save(); - } else { - // Update the coordinates of an existing face. - $updatedFace = ORM::factory("items_face", $existingFace[0]->id); - $updatedFace->x1 = $str_x1; - $updatedFace->y1 = $str_y1; - $updatedFace->x2 = $str_x2; - $updatedFace->y2 = $str_y2; - $updatedFace->description = $str_face_description; - $updatedFace->save(); } + } else { //update existing annotation + if ($notetype == "face") { //this is a face + $updatedAnnotation = ORM::factory("items_face") + ->where("id", "=", $noteid) + ->find(); + if ($tag_data == -1) { //needs conversion to note + if ($str_face_title == "") { + message::error(t("Please select a Tag or specify a Title.")); + url::redirect($redir_uri); + return; + } + //Save note + $newnote = ORM::factory("items_note"); + $newnote->item_id = $item_data; + $newnote->x1 = $str_x1; + $newnote->y1 = $str_y1; + $newnote->x2 = $str_x2; + $newnote->y2 = $str_y2; + $newnote->title = $str_face_title; + $newnote->description = $str_face_description; + $newnote->save(); + $updatedAnnotation->delete(); + } else { //stays a face + $updatedAnnotation->tag_id = $tag_data; + $updatedAnnotation->item_id = $item_data; + $updatedAnnotation->x1 = $str_x1; + $updatedAnnotation->y1 = $str_y1; + $updatedAnnotation->x2 = $str_x2; + $updatedAnnotation->y2 = $str_y2; + $updatedAnnotation->description = $str_face_description; + $updatedAnnotation->save(); + } + } else { //this is a note + $updatedAnnotation = ORM::factory("items_note") + ->where("id", "=", $noteid) + ->find(); + if ($tag_data == -1) { //stays a note + if ($str_face_title == "") { + message::error(t("Please select a Tag or specify a Title.")); + url::redirect($redir_uri); + return; + } + $updatedAnnotation->item_id = $item_data; + $updatedAnnotation->x1 = $str_x1; + $updatedAnnotation->y1 = $str_y1; + $updatedAnnotation->x2 = $str_x2; + $updatedAnnotation->y2 = $str_y2; + $updatedAnnotation->title = $str_face_title; + $updatedAnnotation->description = $str_face_description; + $updatedAnnotation->save(); + } else { //needs conversion to a face + $newface = ORM::factory("items_face"); + $newface->tag_id = $tag_data; + $newface->item_id = $item_data; + $newface->x1 = $str_x1; + $newface->y1 = $str_y1; + $newface->x2 = $str_x2; + $newface->y2 = $str_y2; + $newface->description = $str_face_description; + $newface->save(); + $updatedAnnotation->delete(); + } + } } message::success(t("Annotation saved.")); url::redirect($redir_uri); diff --git a/modules/photoannotation/css/photoannotation.css b/modules/photoannotation/css/photoannotation.css index eb63b714..e578e0d9 100644 --- a/modules/photoannotation/css/photoannotation.css +++ b/modules/photoannotation/css/photoannotation.css @@ -180,3 +180,7 @@ background-image: url('../images/delete.png'); cursor: pointer; } +.photoannotation-edit-button { + background-image: url('../images/edit.png'); + cursor: pointer; +} diff --git a/modules/photoannotation/helpers/photoannotation_theme.php b/modules/photoannotation/helpers/photoannotation_theme.php index 88ac00f4..e1374aa9 100644 --- a/modules/photoannotation/helpers/photoannotation_theme.php +++ b/modules/photoannotation/helpers/photoannotation_theme.php @@ -22,7 +22,7 @@ class photoannotation_theme_Core { // If it does, add an image map to the page to display them. $theme->css("photoannotation.css"); $theme->script("jquery.annotate.js"); - //Return ""; + //Return ""; } static function photo_bottom($theme) { diff --git a/modules/photoannotation/images/edit.png b/modules/photoannotation/images/edit.png new file mode 100644 index 0000000000000000000000000000000000000000..6dbcb679f4d769ac2b2c818a361ac576a5f5d99d GIT binary patch literal 208 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1SGfcUswyI7>k44ofy`glX(f`a29w(7Bet# z3xhBt!>laaucO?Ral001;Lp09co#e=Mz=4DL>?Qx-On*zO z1iEy?u6gsH%`BAck(w}N;j}YfMT@`OXLvO6c%1ctb>`*fn;DrMLS0oh9JjqTTh*9* zjfKMdu18P1rlxRBaLJo1el=y)Jx6(`KRS!mC%w&4+3zzU3}_pJr>mdKI;Vst04gg) A)&Kwi literal 0 HcmV?d00001 diff --git a/modules/photoannotation/js/jquery.annotate.js b/modules/photoannotation/js/jquery.annotate.js index 56660594..341ffd33 100644 --- a/modules/photoannotation/js/jquery.annotate.js +++ b/modules/photoannotation/js/jquery.annotate.js @@ -59,7 +59,7 @@ if (this.useAjax) { $.fn.annotateImage.ajaxLoad(this); } else { - $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.currentUrl); + $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.currentUrl, this.tags, this.saveUrl); } // Add the "Add a note" button @@ -111,13 +111,13 @@ }); }; - $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, currentUrl) { + $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, currentUrl, tags, saveUrl) { /// /// Loads the annotations from the notes property passed in on the /// options object. /// for (var i = 0; i < image.notes.length; i++) { - image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], labels, editable, csrf, deleteUrl, currentUrl); + image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], tags, labels, editable, csrf, deleteUrl, currentUrl, saveUrl); } }; @@ -203,12 +203,14 @@ this.note = note; } else { var newNote = new Object(); - newNote.id = "new"; + newNote.noteid = "new"; newNote.top = 30; newNote.left = 30; newNote.width = 30; newNote.height = 30; newNote.text = ""; + newNote.description = ""; + newNote.notetype = ""; this.note = newNote; } @@ -225,17 +227,30 @@ image.canvas.children('.image-annotate-edit').show(); // Add the note (which we'll load with the form afterwards) - var tagdropdown = labels[0] + ''; if (tags) { for (var tag in tags) { var tagval = tags[tag]; - tagdropdown += ''; + selectedtag = ""; + if (tagval.name == this.note.text && this.note.notetype == "face") { + selectedtag = " selected=\"selected\""; + } + tagdropdown += ''; } } tagdropdown += ''; - var form = $('
' + tagdropdown + labels[1] + '' + labels[2] + '
'); + var notetitle = ""; + if (this.note.notetype == "note") { + notetitle = this.note.text; + } + var form = $('
' + tagdropdown + labels[1] + '' + labels[2] + '
'); this.form = form; $('body').append(this.form); @@ -280,7 +295,7 @@ this.form.remove(); } - $.fn.annotateView = function(image, note, labels, editable, csrf, deleteUrl, currentUrl) { + $.fn.annotateView = function(image, note, tags, labels, editable, csrf, deleteUrl, currentUrl, saveUrl) { /// /// Defines a annotation area. /// @@ -294,7 +309,9 @@ if (editable) { this.delarea = $('
'); + this.editarea = $('
'); image.canvas.children('.image-annotate-view').prepend(this.delarea); + image.canvas.children('.image-annotate-view').prepend(this.editarea); this.delarea.bind('click',function () { if (confirm(labels[3])) { var alink = $(".g-fullsize-link"); @@ -305,11 +322,24 @@ delform.submit(); } }) + var form = this; + this.editarea.bind('click',function () { + var alink = $(".g-fullsize-link"); + alink.unbind(); + alink.attr ('href', '#'); + alink.removeAttr ('rel'); + form.edit(tags, labels, saveUrl, currentUrl, csrf); + }) this.delarea.hide(); + this.editarea.hide(); } // Add the note - this.form = $('
' + note.text + '
'); + var notedescription = ""; + if (note.description != "") { + notedescription = "
" + note.description; + } + this.form = $('
' + note.text + notedescription + '
'); this.form.hide(); image.canvas.children('.image-annotate-view').append(this.form); this.form.children('span.actions').hide(); @@ -323,19 +353,30 @@ annotation.show(); if (annotation.delarea != undefined) { annotation.delarea.show(); + annotation.editarea.show(); } }, function() { annotation.hide(); if (annotation.delarea != undefined) { annotation.delarea.hide(); + annotation.editarea.hide(); } }); if (editable) { this.delarea.hover(function() { annotation.delarea.show(); + annotation.editarea.show(); }, function() { annotation.delarea.hide(); + annotation.editarea.hide(); + }); + this.editarea.hover(function() { + annotation.delarea.show(); + annotation.editarea.show(); + }, function() { + annotation.delarea.hide(); + annotation.editarea.hide(); }); } // Edit a note feature @@ -348,9 +389,6 @@ window.location = note.url; }) } - - - }; $.fn.annotateView.prototype.setPosition = function() { @@ -369,6 +407,10 @@ this.delarea.children('div').width('14px'); this.delarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); this.delarea.css('top', (this.note.top) + 'px'); + this.editarea.children('div').height('14px'); + this.editarea.children('div').width('14px'); + this.editarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); + this.editarea.css('top', (this.note.top + 16) + 'px'); } }; @@ -401,7 +443,7 @@ this.form.remove(); } - $.fn.annotateView.prototype.edit = function() { + $.fn.annotateView.prototype.edit = function(tags, labels, saveUrl, currentUrl, csrf) { /// /// Edits the annotation. /// @@ -410,31 +452,8 @@ var annotation = this; // Create/prepare the editable note elements - var editable = new $.fn.annotateEdit(this.image, this.note); - + var editable = new $.fn.annotateEdit(this.image, this.note, tags, labels, saveUrl, currentUrl, csrf); $.fn.annotateImage.createSaveButton(editable, this.image, annotation); - - // Add the delete button - var del = $('Delete'); - del.click(function() { - var form = $('#image-annotate-edit-form form'); - - $.fn.annotateImage.appendPosition(form, editable) - - if (annotation.image.useAjax) { - $.ajax({ - url: annotation.image.deleteUrl, - data: form.serialize(), - error: function(e) { alert("An error occured deleting that note.") } - }); - } - - annotation.image.mode = 'view'; - editable.destroy(); - annotation.destroy(); - }); - editable.form.append(del); - $.fn.annotateImage.createCancelButton(editable, this.image); } }; diff --git a/modules/photoannotation/views/photoannotation_highlight_block.html.php b/modules/photoannotation/views/photoannotation_highlight_block.html.php index 78fd9abc..83d4011d 100644 --- a/modules/photoannotation/views/photoannotation_highlight_block.html.php +++ b/modules/photoannotation/views/photoannotation_highlight_block.html.php @@ -17,10 +17,6 @@ $jscode = "notes: [ "; foreach ($existingFaces as $oneFace) { $oneTag = ORM::factory("tag", $oneFace->tag_id); - $tagdesc = ""; - if ($oneFace->description) { - $tagdesc = "
". html::clean($oneFace->description); - } if (module::get_var("photoannotation", "showfaces", false)) { $legend_faces .= "url() ."\">". html::clean($oneTag->name) .", "; } @@ -28,7 +24,8 @@ $jscode .= "\"left\": ". $oneFace->x1 .",\n"; $jscode .= "\"width\": ". ($oneFace->x2 - $oneFace->x1) .",\n"; $jscode .= "\"height\": ". ($oneFace->y2 - $oneFace->y1) .",\n"; - $jscode .= "\"text\": \"". html::clean($oneTag->name) . $tagdesc ."\",\n"; + $jscode .= "\"text\": \"". html::clean($oneTag->name) ."\",\n"; + $jscode .= "\"description\": \"". html::clean($oneFace->description) ."\",\n"; $jscode .= "\"noteid\": ". $oneFace->id .",\n"; $jscode .= "\"notetype\": \"face\",\n"; $jscode .= "\"editable\": true,\n"; @@ -39,10 +36,6 @@ $legend_faces = t("Faces on this photo: ") . $legend_faces; } foreach ($existingNotes as $oneNote) { - $tagdesc = ""; - if ($oneNote->description) { - $tagdesc = "
". html::clean($oneNote->description); - } if (module::get_var("photoannotation", "shownotes", false)) { $legend_notes .= html::clean($oneNote->title) .", "; } @@ -50,7 +43,8 @@ $jscode .= "\"left\": ". $oneNote->x1 .",\n"; $jscode .= "\"width\": ". ($oneNote->x2 - $oneNote->x1) .",\n"; $jscode .= "\"height\": ". ($oneNote->y2 - $oneNote->y1) .",\n"; - $jscode .= "\"text\": \"". html::clean($oneNote->title) . $tagdesc ."\",\n"; + $jscode .= "\"text\": \"". html::clean($oneNote->title) ."\",\n"; + $jscode .= "\"description\": \"". html::clean($oneNote->description) ."\",\n"; $jscode .= "\"noteid\": ". $oneNote->id .",\n"; $jscode .= "\"notetype\": \"note\",\n"; $jscode .= "\"editable\": false,\n"; @@ -105,4 +99,4 @@ ". $legend_display ."
" ?> - \ No newline at end of file + From 6dfd62d01212a1697cc327cf06ee9de5c38be153 Mon Sep 17 00:00:00 2001 From: hukoeth Date: Sun, 29 Aug 2010 01:47:15 +0200 Subject: [PATCH 32/55] Made module compatible with greydragon theme, fixed clicking cancel when editing annotations --- modules/photoannotation/js/jquery.annotate.js | 16 +++++++++------- .../photoannotation_highlight_block.html.php | 10 +++++++++- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/modules/photoannotation/js/jquery.annotate.js b/modules/photoannotation/js/jquery.annotate.js index 341ffd33..30e8f8ae 100644 --- a/modules/photoannotation/js/jquery.annotate.js +++ b/modules/photoannotation/js/jquery.annotate.js @@ -24,6 +24,7 @@ this.notes = opts.notes; this.labels = opts.labels; this.csrf = opts.csrf; + this.cssaclass = opts.cssaclass; // Add the canvas this.canvas = $('
'); @@ -59,7 +60,7 @@ if (this.useAjax) { $.fn.annotateImage.ajaxLoad(this); } else { - $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.currentUrl, this.tags, this.saveUrl); + $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.currentUrl, this.tags, this.saveUrl, this.cssaclass); } // Add the "Add a note" button @@ -111,13 +112,13 @@ }); }; - $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, currentUrl, tags, saveUrl) { + $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, currentUrl, tags, saveUrl, cssaclass) { /// /// Loads the annotations from the notes property passed in on the /// options object. /// for (var i = 0; i < image.notes.length; i++) { - image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], tags, labels, editable, csrf, deleteUrl, currentUrl, saveUrl); + image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], tags, labels, editable, csrf, deleteUrl, currentUrl, saveUrl, cssaclass); } }; @@ -172,6 +173,7 @@ cancel.click(function() { editable.destroy(); image.mode = 'view'; + location.reload(); }); editable.form.append(cancel); }; @@ -295,7 +297,7 @@ this.form.remove(); } - $.fn.annotateView = function(image, note, tags, labels, editable, csrf, deleteUrl, currentUrl, saveUrl) { + $.fn.annotateView = function(image, note, tags, labels, editable, csrf, deleteUrl, currentUrl, saveUrl, cssaclass) { /// /// Defines a annotation area. /// @@ -314,7 +316,7 @@ image.canvas.children('.image-annotate-view').prepend(this.editarea); this.delarea.bind('click',function () { if (confirm(labels[3])) { - var alink = $(".g-fullsize-link"); + var alink = $(cssaclass); alink.unbind(); alink.attr ('href', '#'); alink.removeAttr ('rel'); @@ -324,7 +326,7 @@ }) var form = this; this.editarea.bind('click',function () { - var alink = $(".g-fullsize-link"); + var alink = $(cssaclass); alink.unbind(); alink.attr ('href', '#'); alink.removeAttr ('rel'); @@ -382,7 +384,7 @@ // Edit a note feature if (note.url != "" && note.url != null) { this.area.bind('click',function () { - var alink = $(".g-fullsize-link"); + var alink = $(cssaclass); alink.unbind(); alink.attr ('href', '#'); alink.removeAttr ('rel'); diff --git a/modules/photoannotation/views/photoannotation_highlight_block.html.php b/modules/photoannotation/views/photoannotation_highlight_block.html.php index 83d4011d..efde70c9 100644 --- a/modules/photoannotation/views/photoannotation_highlight_block.html.php +++ b/modules/photoannotation/views/photoannotation_highlight_block.html.php @@ -11,6 +11,13 @@ $jscode = ""; $legend_faces = ""; $legend_notes = ""; + if (module::get_var("gallery", "active_site_theme") == "greydragon") { + $css_item_id = "#g-photo-id-". $item->id; + $css_a_class = ".g-sb-preview"; + } else { + $css_item_id = "#g-item-id-". $item->id; + $css_a_class = ".g-fullsize-link"; + } // If it does, then insert some javascript and display an image map // to show where the faces are at. if ((count($existingFaces) > 0) || (count($existingNotes) > 0)) { @@ -80,7 +87,7 @@ + +
+
+
-
+ +
+
+ +
+
+ +
+
diff --git a/themes/greydragon/changelog.txt b/themes/greydragon/changelog.txt index f6750d23..3d5a1451 100644 --- a/themes/greydragon/changelog.txt +++ b/themes/greydragon/changelog.txt @@ -1,46 +1,239 @@ -Grey Dragon Theme Changelog - -version 1.5.8 -- Finally admin module for theme is there. After theme installation, visit Appearance/Theme Options to configure the theme. - If you had older version of the theme, initial setup is also required. - The following settings are available: - - Rows per album page - theme uses 3 columns layout for pictures, therefore default page_size is computed in x3 increments - - Thumb size is restricted to 200 and therefore not available for administration - - Mark to build resizes/thumbs - allows force rebuilding of images - - Show/Hide top/bottom photo navigators - - Specify allowed and default sidebar position - - Administrator can now specify Copyright message to display in the footer - - Site logo is now default to Gallery 3 logo, but admin can provide a path to custom logo. -- Sidebar session cookie is set to expire in 365 days - -version 1.5.7 -- Status message has been moved into header as popup to prevent obstruction of the main view. - jQuery is used to fade it out in 10 sec. -- Improved logic for dialogs on submit -- Theme related JS has been moved out of the page.html.php - -version 1.5.6 -- Fixed issue with tollbar buttons not properly aligned/shown when page is resized. -- Copyright info moved into DB. To change default settings add [th_greydragon/copyright] into VARS table. - -version 1.5.5 -- CSS fixes. -- Theme adjusted to be compatible with latest Git. -- Login links are moved into footer. -- Pagination module redesigned to support new structure of paging data. - -version 1.5.4 -- CSS fixes. -- Added support for Comments block. -- Improved support for Modal dialogs. - -version 1.5.3 -- Sync to git. -- Exif menu customization is now part of the theme. -- Sidebar management button is disabled for current mode. - -version 1.5.2 -- Code, layout, css cleanup. -- New thumbs for buttons. -- First set of Ajax dialogs is ready and now operational: Login, user info, edit album, exit info. +=== Grey Dragon Theme === +Grey Dragon Theme - a custom theme for Gallery 3 + +This theme was designed and built by Serguei Dosyukov, whose blog you will find at http://blog.dragonsoft.us/ +Copyright (C) 2009-2010 Serguei Dosyukov + +Tested up to: G3 3.0 RC2 (Santa Fe) Experimental +Minimum requirement: G3 3.0 RC2 (Santa Fe) Experimental +Donate link: http://blog.dragonsoft.us/gallery-3/ + +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street Fifth Floor, Boston, MA 02110-1301, USA. + +=== Open issues === +- Issue with Delete functionality +- Support for new organize module +- Support for Register module +- Issue with Comments module + +=== Changelog === + +version 2.3.1 +- Hide Rotate operations for pictures since they are not supported by the theme +- Added use of common gallery.ajax.js. Fix issue with some Ajax based links. +- Layout fixes for Translation form overlay +- Changed CSS styling for buttons to provide unified coverage for buttons and links exposed as buttons. +- ADMIN: Fixed options group styles in Theme's Admin panel +- ADMIN: Advanced Settings for Thumbs and Individual Photo are moved into separate sections. +- ADMIN: New option - display meta data in Photo description section +- ADMIN: New option/fix - SEO indexing is now allowed by default. In order to prevent your site from being indexed, you can now use "Disallow Search Engine Indexing" option + +version 2.3.0 +- Adopted for Gallery 3.0RC2 changes (minor template adjustments, css class name changes, etc.) + +version 2.2.1 +- Redesigned Ready event handler for the theme to ensure proper ShadowBox initialization +- Added support for gallery_dialog() function call used by some 3rd party modules - some sync issues are solved by imposed delay of 1 second +- GPS module - better action list alignment in the sidebar + +version 2.2.0 +- Added support for slideshow mode in Photo Preview +- Fixed issue with Info side block - missing markup +- Fixed issue with Upload dialog layout with some resolutions/fonts +- ADMIN: Added option to hide breadcrumbs +- ADMIN: Added prerequisite check for Info module - required for Thumb meta data display + +version 2.1.7 +- Added support for missing images in the thumbs to allow proper operations with empty albums or albums with broken thumbs +- Some color optimizations +- Color improvements for "Add Image" dialog +- Better support for Basket module + +version 2.1.6 +- Wind colorpack adjusted to closer match default Wind theme + +version 2.1.5 +- Minor changes in ADMIN infrastructure +- ADMIN: added check for Kbd Navigation module +- ADMIN: New color pack - carbon + +version 2.1.4 +- Minor refactoring in paginator +- Added support for keyboard navigation module (http://codex.gallery2.org/Gallery3:Modules:kbd_nav) + +version 2.1.3 +- Sidebar restricted to item related pages (album, photo, movie, etc) +- Fixed issue with bottom border not applied to all instances of H1 tag +- Min footer size set to 4em +- ADMIN: "Photo: Description Display Mode" option added +- ADMIN: Added new maintenance operation - "Reset Exif Info" + +version 2.1.2 +- Fixed issue with Album thumbs - empty space under +- Thumb Item's Title Display Mode expanded to be applied to Item's description in Photo page +- More documentations in CSS files, some movements +- Some cleanup for Wind color pack +- Fixed font name typo in screen.css +- Fixed "Waiting" roller for Wind theme to match background +- Added "up" button in navigation + +version 2.1.1 +- Increased size of Add photo dialog for better display on some lower resolutions. +- ADMIN: New option: "Thumb: Item's Title Display Mode" - specifies how to display item's title in thumbs : Overlay Bottom Hide + +version 2.1.0 +- Custom Info Block to include item's description +- Image is centered when "Actual Size" aspect is used for thumbs +- Added support for color packs - included: greydragon, wind +- ADMIN: Improved error handling +- ADMIN: Disable submit button on click to prevent Dbl-click +- ADMIN: New option: Enable page cache - adds header marker for page to be cached for 60 seconds + +version 2.0.1 +- Enable BBCode/HTML support in individual photo descriptions +- Fixed main menu overlay issue when in top position +- Theme's credits moved into dedicated method +- CSS clean up +- Comments module layout enhancements + +version 2.0.0 +- Major redesign of the gallery flow. + - Added caption and metadata (Admin/optional) overlay for thumbs. + - Added description overlay in individual Photo view (look for "Learn More" marker). + - Based on Admin setting, thumbs are adjusted to fit Digital/Film/Actual size. +- Attempt to fix issue with JS load latency to prevent unhandled AJAX calls +- Added code protection for theme initialization procedure +- ADMIN: Thumb Aspect Ratio option. See help section for more info. + +version 1.8.2 +- Increased based font size +- Layout adjusted to match new settings +- ADMIN: New option - Place Login Link in the Header + +version 1.8.1 +- ADMIN: small adjustments in layout and help info +- 3rd party module's related CSS moved into contrib.css +- Adjust user profile screen to match new layout +- initial design for calendar module + +version 1.8.0 +- ADMIN: Major redesign of the layout. Help section added. +- ADMIN: New option - Show main menu for guest user +- Minimum required Gallery version set to 30 +- When configured not to use sidebar, theme is switched into 4 columns layout + +version 1.7.6 +- Organize module: CSS improvements +- Fixed issue with Chrome browser + +version 1.7.5 +- ADMIN: Added option to reset theme to default state +- CSS: some size adjustments for dialogs. Added minimum height for overlay to keep dialogs from shrinking. + +version 1.7.4 +- ADMIN: Theme Gallery 3 core requirement changed to v.26 +- ADMIN: Most of theme's settings are documented using element's title attribute - hover over to see a description +- Edit Permissions form redesigned and enlarged to fit more information + +version 1.7.3 +- ADMIN: Default states for the theme options are no longer being stored. Please save theme settings at least once to take advantage of a new functionality. +- Photo Navigator default position is set to Top Only + +version 1.7.2 +- Fix in Uploader dialog to keep items inside respected boxes +- Organize module support has been abandoned. Please use GWT Organize module instead. Added item in Prerequisites Checklist. + +version 1.7.1 +- CSS: Fixed visibility of the "Select Photo" button in "Add photo" dialog +- CSS: Fixed "ghost" line for navigation buttons when zoomed-in in IE +- Admin: fixed issue with prerequisite check not detecting deleted modules +- /views/support folder deprecated. Logic moved into Theme_View extension class for Theme_View_Core +- Theme Options Page management, generic Page code and BBCode processor moved into Theme_View class +- HACK: Info block is not displayed if there is no description for the item + +version 1.6.4 +- Admin: Added "Show Sidebar for Albums only" option +- Admin: added error visibility to the requirements validation list +- Small CSS adjustments: Fixed footer min size issue when no site credit info is displayed; added space between Credits in the footer and Footer text area. +- Few missing parts from last git sync + +version 1.6.3 +- Kohana 2.4 support +- Support for Movie files view +- Admin: Allow hide Sidebar Block header + +version 1.6.2 +- Admin: Page navigator option changed to use combobox +- Admin: Added option to hide item description in albums + +version 1.6.2 +- Small CSS adjustments. +- All operation dialogs should be visible now +- Context menu: "Rotate 90..." items are removed due to an issue with image quality affected by the operation +- Context menu: "Choose as the album cover" is now properly handled + +version 1.6.1 +- Admin: When allowed sidebar position is "Default Only", don't disregard selected Default position +- Adjust item's toolbar buttons to align properly when side bar position is fixed +- BBCode parser improved to support stripping of BBCode for Page title and breadcrumbs +- Fixed issue with main menu missing class declaration not allowing open dialogs +- Adjust context dialogs to properly show caption info +- Caption added to Full size Preview +- "New Comment" form styled +- Admin: Option to align main menu to the top and Breadcrumbs to the left + +version 1.6.0 +- Admin: Fixed issue with "Rebuild thumbs" option in theme admin +- Admin: Fixed issue with Item's toolbar not properly aligned in Quirks Mode +- Exif data dialog Layout changes +- Item context menu improvements: + - Fixed issue with submit logic + - Layout fixes for context menu dialogs + +version 1.5.8 +- Admin: First release of the Theme admin option. After theme installation, visit Appearance/Theme + Options to configure the theme. If you had older version of the theme, initial setup is also required. + The following settings are available: + - Rows per album page - theme uses 3 columns layout for pictures, therefore default page_size is computed in x3 increments + - Thumb size is restricted to 200 and therefore not available for administration + - Mark to build resizes/thumbs - allows force rebuilding of images + - Show/Hide top/bottom photo navigators + - Specify allowed and default sidebar position + - Administrator can now specify Copyright message to display in the footer + - Site logo is now default to Gallery 3 logo, but admin can provide a path to custom logo. + - Admin module validates Theme's requirements (Shadowbox module need to be installed/active) +- Sidebar session cookie is set to expire in 365 days + +version 1.5.7 +- Status message has been moved into header as popup to prevent obstruction of the main view. + jQuery is used to fade it out in 10 sec. +- Improved logic for dialogs on submit +- Theme related JS has been moved out of the page.html.php + +version 1.5.6 +- Fixed issue with tollbar buttons not properly aligned/shown when page is resized. +- Copyright info moved into DB. To change default settings add [th_greydragon/copyright] into VARS table. + +version 1.5.5 +- CSS fixes. +- Theme adjusted to be compatible with latest Git. +- Login links are moved into footer. +- Pagination module redesigned to support new structure of paging data. + +version 1.5.4 +- CSS fixes. +- Added support for Comments block. +- Improved support for Modal dialogs. + +version 1.5.3 +- Updated to match latest git. +- Exif menu customization is now part of the theme. +- Sidebar management button is disabled for current mode. + +version 1.5.2 +- Code, layout, css cleanup. +- New thumbs for buttons. +- First set of Ajax dialogs is ready and now operational: Login, user info, edit album, exit info. - Fixed some browser related issues. \ No newline at end of file diff --git a/themes/greydragon/controllers/greydragon.php b/themes/greydragon/controllers/greydragon.php new file mode 100644 index 00000000..0796d801 --- /dev/null +++ b/themes/greydragon/controllers/greydragon.php @@ -0,0 +1,39 @@ +page_title = t("%name Profile", array("name" => $user->display_name())); + $v->content = new View("user_profile.html"); + + $v->content->user = $user; + $v->content->contactable = + !$user->guest && $user->id != identity::active_user()->id && $user->email; + $v->content->editable = + identity::is_writable() && !$user->guest && $user->id == identity::active_user()->id; + + $event_data = (object)array("user" => $user, "content" => array()); + module::event("show_user_profile", $event_data); + $v->content->info_parts = $event_data->content; + + print $v; + } +*/ +} diff --git a/themes/greydragon/css/colorpacks/carbon/colors.css b/themes/greydragon/css/colorpacks/carbon/colors.css new file mode 100644 index 00000000..57fd30dd --- /dev/null +++ b/themes/greydragon/css/colorpacks/carbon/colors.css @@ -0,0 +1,192 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: Carbon - Default color pack + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #333; } +body { color: #999; background-color: #333; } + +h1 { border-bottom: #6f6f6f 1px solid; } +a { color: #999 !important; font-weight: bold; } +.ui-icon { background-image: url(images/ui-icons.png); } + +/* styles.css - Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-header .g-message-block { border: 1px #888 solid; background-color: #AAA; color: #000; } +.g-breadcrumbs li { background: transparent url(images/ico-separator.png) no-repeat 0 0.2em; } + +/* styles.css - Content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-main { background-color: #3f3f3f; margin-left: 10px; margin-right: 10px; } + +/* styles.css - Footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ +#g-info .g-description { border: #6f6f6f 1px solid; } + +.g-thumbslide, .g-thumbslide-ext { border: 1px solid #303E43; background-color: #555; } +.g-thumbcrop { border: 1px solid #303E43; } + +.g-album .g-thumbslide, +.g-album .g-thumbslide-ext { border-top: 1px solid #6f6f6f; border-left: 1px solid #6f6f6f; border-right: 4px double #6f6f6f; border-bottom: 4px double #6f6f6f; } +.g-photo .g-thumbslide, /* Need to compensate for double border in album's thumbs */ +.g-photo .g-thumbslide-ext { margin-bottom: 3px; } + +.g-thumbslide:hover .g-description { color: #fff; border-bottom: 1px solid #999; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-album .g-thumbslide:hover .g-description, +.g-album .g-thumbslide-ext .g-description { background: #555 url(images/ico-album.png) no-repeat 4px 2px; } + +.g-thumbslide:hover .g-metadata, +.g-thumbslide-ext:hover .g-metadata { border-top: 1px solid #999; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { border: 1px solid #888; background: #555; } + +div.g-resize:hover .g-description { color: #fff; background: #1E1E1E; border-bottom: 1px solid #999; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-more { border: 1px solid #999; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +.g-movie { border: 1px solid #888; padding: 5px; background: #555; } + +/* styles.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-reauthenticate-form ul { border: 1px #888 solid; } + +/* styles.css - Sidebar Blocks ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar { border-bottom: 1px solid #737373; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block { border: 1px solid #737373; } +.g-block h2 { background: url(images/section.png) repeat-x; } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +#g-viewformat .g-viewthumb-left { background: url('images/view-left.png') no-repeat left top; } +#g-viewformat .g-viewthumb-right { background: url('images/view-right.png') no-repeat left top; } +#g-viewformat .g-viewthumb-full { background: url('images/view-full.png') no-repeat left top; } + +#g-slideshow-link { background: url("images/view-slideshow.png") top left no-repeat; } +.g-fullsize-link { background: url("images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("images/view-info.png") top left no-repeat; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li a:hover { color: #000000; background-color: #333; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #333; border-bottom: #000000 1px solid; } +#g-site-menu li ul { border: #000000 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #333; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #ddf2ff; } + +.g-item .g-context-menu { background-image: url(images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #333 none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #ddf2ff; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background: #101415 url('images/ajax-loading.gif') no-repeat center center; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background-color: #333; } + +#sb-content.html_ajax p.g-error { color: red; } +#sb-content.html_ajax form { background-color: #101415; } +#sb-content.html_ajax>div { background-color: #101415; } + +/* forms.css - Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-permissions .g-breadcrumbs { border: #303030 1px solid; } +#sb-content #g-edit-permissions-form { border: #303030 1px solid; } +#sb-content #g-move>ul { border: #303030 1px solid; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-add-photos-form .g-breadcrumbs { border: #303030 1px solid; } + +#g-add-photos-canvas { background-color: #101010; border: #303030 1px solid; } +#g-add-photos-button { border: #303030 1px solid; color: #bbb; } +#g-add-photos-status { background-color: #101010; border: #303030 1px solid; } + +#g-add-photos-status li.g-success { background: #d9efc2 url('images/ico-success.png') no-repeat .4em 50%; } +#g-add-photos-status li.g-error { background: #f6cbca url('images/ico-error.png') no-repeat .4em 50%; color: #f00; } + +/* forms.css - Organize ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content.html_ajax #g-organize { border: #303030 1px solid; } + +#g-organize-detail { border-left: #303030 1px solid; } +#g-organize .g-message-block { border-bottom: #303030 1px solid; } +.g-organize-microthumb-grid-cell { background-color: #303030; } +.g-organize-microthumb { background-color: #707070; } +#g-organize-controls { border-top: #303030 1px solid; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile .g-avatar { border: 1px solid #888; background: #555; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li a:hover { color: #000000; background-color: #303030; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #303030; border-bottom: #000000 1px solid; } +#g-site-menu li ul { border: #000000 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #212121; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #303030; } + +.g-item .g-context-menu { background-image: url(images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #181818 none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #303030; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-exif-data table { border: #303030 1px solid; } +#sb-content #g-exif-data .g-even { background-color: #404040; } +#sb-content #g-exif-data .g-odd { background-color: #303030; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #737373; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #888; background: #555; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #737373; } +#g-comment-form { border: 1px dotted #737373; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #737373; color: #BBB; } +#g-quick-search-form input[type="submit"] { background: transparent url(images/search.png) no-repeat center top; border: none; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background: url(images/section.png) repeat-x; } \ No newline at end of file diff --git a/themes/greydragon/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/carbon/images/ajax-loading.gif similarity index 100% rename from themes/greydragon/images/ajax-loading.gif rename to themes/greydragon/css/colorpacks/carbon/images/ajax-loading.gif diff --git a/themes/greydragon/css/colorpacks/carbon/images/ico-album.png b/themes/greydragon/css/colorpacks/carbon/images/ico-album.png new file mode 100644 index 0000000000000000000000000000000000000000..ac87ec4fbf6acb75ac29259e60d8a9a0992cbef0 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^0w6XA3y|d6q_!SNv7|ftIx;Y9?C1WI$O`0h7I;J! zGca%qfiUBxyLEqng6t)pzOL*yIe{8wlsqH7fI^Zbt`Q}{`DrEPiAAXl0g0J;C3=3Y zAqr*2dZv0NcD-lHfQn9fx;TbNTrR!1-|KLKgxkmXN8((Zi^|H1i>6eu&)uW=Q7Xo| zWA@_khq6m{?A&S5q0ljHmVJDXY*3-+{iizZ%>4OGF?VN4?l$6ilYV{ip{4eW-1%{9 zO{?~1yo%H3`FQqaZ~0E+&MR(NFD2)0(BAi9lW5tI?4t@LFH{yC^V06BatS`-c;k4x z{FSJ!JUb`XKRnT>-|4e-lIDjWwbO$+1*^G^tA%OxMsf5QL( literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/carbon/images/ico-error.png b/themes/greydragon/css/colorpacks/carbon/images/ico-error.png new file mode 100644 index 0000000000000000000000000000000000000000..c37bd062e60c3b38fc82e4d1f236a8ac2fae9d8c GIT binary patch literal 701 zcmV;u0z&N#0$9Ug7g~-`rQ^qx~m@y2OU8A z#zh~=7n#Z$Z*fx-GOtDf07cgx0suCz_W(2~Y(0tf@FX@P6EPuM_dgn$vj9LucO)%W zw%HgMW>=#oL>nZ>M&NEf08>)#)k<{$fCT_r>rPi=BV=hFh6WS^qqze>C6Ek}o{M5% za|@JGowu0t{&hgNzySHZxy@LTNh);YzZ2zSp_ zl$^T&Dnc|NLb&RD_!4>pt@VHdP)ZGER%5ZmWEe$lryR&y;2u^3cOkO4#6c%-(EY6a{600000NkvXXu0mjfxS2AI literal 0 HcmV?d00001 diff --git a/themes/greydragon/images/ico-separator.png b/themes/greydragon/css/colorpacks/carbon/images/ico-separator.png similarity index 100% rename from themes/greydragon/images/ico-separator.png rename to themes/greydragon/css/colorpacks/carbon/images/ico-separator.png diff --git a/themes/greydragon/css/colorpacks/carbon/images/ico-success.png b/themes/greydragon/css/colorpacks/carbon/images/ico-success.png new file mode 100644 index 0000000000000000000000000000000000000000..a9925a06ab02db30c1e7ead9c701c15bc63145cb GIT binary patch literal 537 zcmV+!0_OdRP)Hs{AQG2a)rMyf zFQK~pm1x3+7!nu%-M`k}``c>^00{o_1pjWJUTfl8mg=3qGEl8H@}^@w`VUx0_$uy4 z2FhRqKX}xI*?Tv1DJd8z#F#0c%*~rM30HE1@2o5m~}ZyoWhqv>ql{V z1ZGE0lgcoK^lx+eqc*rAX1Ky;Xx3U%u#zG!m-;eD1Qsn@kf3|F9qz~|95=&g3(7!X zB}JAT>RU;a%vaNOGnJ%e1=K6eAh43c(QN8RQ6~GP%O}Jju$~Ld*%`mO1p004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00009 za7bBm000id000id0mpBsWB>pF8FWQhbW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE;K%k z%ys|(0m?~4K~y+Tz12-i0znuD@IBO5QheEUch$Ul5JYNkUeu%nsY5STrsXZH%sPk~ zimiH4@S+F(3|0u`C-5MiJ^XVXFtD^Xlm>=*XN{J1p>GdwyygQ}{i zR;$S8^T_3L6xV7sTqF_;(YfGmcn_sg3B_U&UauE+yB(4w!Q=5DnM|V5XyEYpcrH2@ zyt=+YrBWeGuh&!8>2xp{3~)M~G?7{^YX>u#46@lQ91aJ}W;1x6hsk83*l08&olc|I z>tQDp`i9QUuuv$_k{QUB%0NL7=*qI}bUI)y8jEQITdfvGqY+gN14U7UEXx$TTrLcU zLjryNfHv?+Ez^K*w+ls42xOSs?WVnD?d|4hCtkFAzY#->1nKdNg^z zl3JdkH>uQWK%d`_%P(d4>yrO^L=tG?Eh{@2ZDlPT6>VJ=9X(ZDeN{aJH9bQ$eIs=PV@r3Rkmy~xKrNCbt`Q}{ z`DrEPiAAXl0g0J;C3=3YAqr*2dZv1Ye$Op_0u{-7x;Tb#Tu-(*@TIYnk;A?rGeoFk jrsWKY8I7Mj5||kR?70MU=8OLTDrN9=^>bP0l+XkKClfE| literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/carbon/images/ui-icons.png b/themes/greydragon/css/colorpacks/carbon/images/ui-icons.png new file mode 100644 index 0000000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F}#+Y>qhK2rAgw$;oDSx{90@6MAvH@q-%y!(NO$z@f(r7Wa`AXaO&f8r6oosJSZ9 z%`ZBpxtCa&MCxoTp=VIRrcYP|epnr64QJnuyo1n=tJ6zrSZs#&Aqf z%KL18(fF=>(0MzA;8xIyVCco5hnhWbU*V7nd%p5DD))OrD39+3%&f*1&kTo}g?kUE zQKg1uuj?BdnR!n0*KuSnzKO{Ea`@pv*6UP!1l2d3GIx_ejrw*+^m&jKHf>=WT3SBvTeKSV*V+%hPSU?#5Q2$fMLyaYvQS8wK;@>u-)A z4A4yUqd9c7ci_Pmf=pjHqd^gjRafd%KD3}CB$9hlQH};^aFVA2*$IF zav&J{5?Mxm4QD&^8QA;b)QH*P?1z!aDEKswxh2NxYaeaa)&k^E)PF%(9V|3!Vm#@m z*)Mdy|k)+CeXC&(M=JY#vuASI=T0h)aEm88m2=g%LDld!nMK|2sKrt2X#cBR4)N;IX!BYK z1R>yOaRYrhBmHueNt!3?V)PMtwz&H;s&1=46idJzrM0lU-R0TbZ8cOz@%7w86x$Iq zNRGsb>vEG(DN?#Y5sWuy=NCOnr0opuvU>PHDQUaKGIYtuJ^ly_0~V@alVnUX|42&e M%34a5iq_%(2bpt6pa1{> literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-calendar.png b/themes/greydragon/css/colorpacks/carbon/images/view-calendar.png new file mode 100644 index 0000000000000000000000000000000000000000..5442fa51321e3a2a4f0d2ce50fa651316b729fc6 GIT binary patch literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g%0VEiBdp33fDVB6cUq=Rpjs4tz5?O(Krjj7P zUE~zhw+=#aM-TBZ>d2^i z96H{8s@uD9!I~`)N;AFTzp-I`lJtPuXWe0 zc6zRUUguqgqtHInx3~UCbLZz-Y)&j`m zEbxddW?0j z`Mwlz`*|=mo;l+q@?OK4ah8EhL`srqTcw;k$0X4WY6}`n9YxI?S=MkaY%pCIeqdW7 s_l<35%tYR^I6Fp5e`{dvo(%LzPTB5*?IE4FfqrE0boFyt=akR{0KG?&;s5{u literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-full.png b/themes/greydragon/css/colorpacks/carbon/images/view-full.png new file mode 100644 index 0000000000000000000000000000000000000000..7145fd9d49d9231cfac264af85e5664f82fbcf67 GIT binary patch literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!uqB*-tAfuU^jSqmVK zv%n*=n1O-s5C}7hYIrpO1tm*dBT9nv(@M${i&7Z^5;OBk^!!{y6v~YCO!Z9cde4*r z6*YOfIEHAPPu59vV1J>cs^f5IdUNK|_x<_qjx!n?IW-QQIC0{@p%W~}1O(LG_M_NP&)JlnCE#pg!>q>BGHyKkjSU6FrT)tJy!>mw z&$QWK-Gu}dB@?yH#_Ee_A9h)!@9@m$Ns^DFX}i=yMur{toz;c;MYjW8!{F)a=d#Wz Gp$Py1x@KVj literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-fullsize.png b/themes/greydragon/css/colorpacks/carbon/images/view-fullsize.png new file mode 100644 index 0000000000000000000000000000000000000000..ebd042373ea4517a820093cd18f823a9a20a8c03 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g%0VEiBdp33fDVB6cUq=Rpjs4tz5?O(Kg=CK) zUj~LMH3o);76yi2K%s^g3=E|P3=FRl7#OT(FffQ0%-I!a1C(GY3GxeOU?`h>)&j`m zEbxddW?8eR=RLCF%=h?3y^w370~qEv=}#LT=BJwMkFg)(D3Q#}*A-ZN!D zMKe5I978nDCuG$;zFqT6?njH=WvBz2Fdc^lpJgvANs}4mnJ) zNEehi004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00009 za7bBm000ib000ib0l1NC?EnA(8FWQhbW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE;K%k z%ys|(0c%i9R7C&)02mk;PEJlFBqSOd8XzDbR8&+_Qc@-+CQ(sQWo2bpSXg9aWEmM5 zDk>^0EG#fEFf}zbH#avqIXOByIz2r-KR-V}KtMr3K|@1BL_|bKM@L9VNJ>gdOiWBq zPft`-R9aeEUS3{bUteToWMyS#XJ=<YbpP-Cc> zsi~{0tE{Z7t*x!DuCA}IuduMNv9YnTva+sxVgExy1Kf%ySu!+ zyuH1>zP`S|z`(@B#K*_S$jHda$;r;n&d<-!)z#J3*4Ee8*V)lq(=H}<;=Lxr}wEzGB4RlgYQvg0dLq|-Hp{uXa(%zSwdA|Sv0UAj}K~yNuozU4M z0$~&d@UbtsvSztR+0#%Vv}c4yK1-ABYZ1nlp=jvO_vp^ZOXupZtU0}MZ8UGjAF%800000NkvXXu0mjf@Wq7L literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-left.png b/themes/greydragon/css/colorpacks/carbon/images/view-left.png new file mode 100644 index 0000000000000000000000000000000000000000..c59af5d00dc95a3a9e5d09523e1795d93b9ac4c9 GIT binary patch literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!uqB*-tAfuU^jSqmVK zv%n*=n1O-s5C}7hYIrpO1tm*dBT9nv(@M${i&7Z^5;OBk^!!{y6v~YCO!Z9cde4*r z6?J;LIEHAPUwdIAZ?l6)^TYf8;T!Ipo!HmKE74$iX(NmF+;xXUJO$;HyacD~*`2)R z;+MCK>5AgKt=rdr+vdnHNrS7aDO^~HjmLp;NdoJ&;Nr5L$;oqM9zS6?$vElo?GI=5 zVz;sH-@B3LV?@>L>Gz)PHZQ4ER&h)C6QQ_CI6hn?A>F^Pu;|~%V~k5R+(epMs%3zV OV(@hJb6Mw<&;$VYA8Shh literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-right.png b/themes/greydragon/css/colorpacks/carbon/images/view-right.png new file mode 100644 index 0000000000000000000000000000000000000000..595054562d3a26ded057dca1ce7d79325d48ee14 GIT binary patch literal 325 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!uqB*-tAfuU^jSqmVK zv%n*=n1O-s5C}7hYIrpO1tm*dBT9nv(@M${i&7Z^5;OBk^!!{y6v~YCO!Z9cde4*r z6?J&JIEHAPUprwVZ-at>>-%_(m~)nI*4#P3IOp&=)tHk3ohKUSthnfOVtGZQ_`Ai6 zi>59y{ig;b?>_XKnTaoV6FL20)dHZK O7(8A5T-G@yGywoR&v1nR literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-slideshow.png b/themes/greydragon/css/colorpacks/carbon/images/view-slideshow.png new file mode 100644 index 0000000000000000000000000000000000000000..2fb53ad09633e73cf42669bb918e1e42aae85b2d GIT binary patch literal 1014 zcmV004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00009 za7bBm000ic000ic0Tn1pfB*mh8FWQhbW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE;K%k z%ys|(14l_jK~zXfwUzBplV=o%`2+TGe+VRen~(qjg4+i>5()+BMqnlkEy2?8VhKT_ z&=9bUECYjSmQjuJB8qP9W_c?jP@)vv2FTbZPfJJ3HZv*M!DXMvv;kXa5qXl6`^$Z< z`<(m!o!=9qR;xLVh!LSN@A;FM(SkEho}|6Koq~dbh=oK1r>Cc5O@gq&fUAg1arTII<=0H91YqpE|Hs2$WK4m=<5C+<(YHz_T3BaH5d$g z;9)Bcz)k&wlzyhAs;CK#vXM_tD7akPhJE%AK0cL8YKDTY>wUOfE)o+HBZEcd1==jm zS5sZ0qr9*lO>r<>5Byd5~r1Bg-m6SoQFBwPOChk5^rNL2C2rSDjeR;|PnZc>eO= zsUPZEbyHfV!FcmF^NYWcl#~?tjstU&oSYn@2;up2X6<&y#~(2~GJ@a~P?f5pSA__V zjg8HjoSa~8ZkAi!H>s+s;6%bl(s0;pk6Bw=!(uV-tK|a+#Qz{4hMV-bxVR6r+8T1Q zK}^oz2jwmG!^>34#K^-RtJ&2CaI1^aJvp@x~sY@5K&3Kl+tkLqA&^Fg$L< z>pvlI$o%{~GMOy02`Lo0Qqr__hOZm0QF~U0zN!P&=?WfCEn^y*;(T=-Bcl^R_`twG zWN>myisTbEtDSnap5{sey7QfUE>m%}?FNG5Ka_H~rR9p$X5aOGewkiibKOt- z-+!@7Ax-cf62div { background-color: #101415; } + +/* styles.css - Photo Slideshow ~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-counter a { color: #fff !important; font-weight: bold; font-size: 11px; } + +/* forms.css - Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-permissions .g-breadcrumbs { border: #303030 1px solid; } +#sb-content #g-edit-permissions-form { border: #303030 1px solid; } +#sb-content #g-move>ul { border: #303030 1px solid; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-add-photos-form .g-breadcrumbs { border: #303030 1px solid; } + +#g-add-photos-canvas { background-color: #101010; border: #303030 1px solid; } +#ag-add-photos-button { border: #303030 1px solid; color: #bbb; } +#g-add-photos-status { background-color: #101010; border: #303030 1px solid; } + +#g-add-photos-status li.g-success { background: url('images/ico-success.png') transparent no-repeat .4em 50%; } +#g-add-photos-status li.g-error { background: url('images/ico-error.png') transparent no-repeat .4em 50%; color: #f00; } + +/* forms.css - Organize ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content.html_ajax #g-organize { border: #303030 1px solid; } + +#g-organize-detail { border-left: #303030 1px solid; } +#g-organize .g-message-block { border-bottom: #303030 1px solid; } +.g-organize-microthumb-grid-cell { background-color: #303030; } +.g-organize-microthumb { background-color: #707070; } +#g-organize-controls { border-top: #303030 1px solid; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile .g-avatar { border: 1px solid #888; background: #555; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li a:hover { color: #000000; background-color: #303030; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #303030; border-bottom: #000000 1px solid; } +#g-site-menu li ul { border: #000000 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #212121; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #303030; } + +.g-item .g-context-menu { background-image: url(images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #181818 none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #303030; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-exif-data table { border: #303030 1px solid; } +#sb-content #g-exif-data .g-even { background-color: #404040; } +#sb-content #g-exif-data .g-odd { background-color: #303030; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #737373; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #888; background: #555; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #737373; } +#g-comment-form { border: 1px dotted #737373; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #737373; color: #BBB; } +#g-quick-search-form input[type="submit"] { background: transparent url(images/search.png) no-repeat center top; border: none; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background: url(images/section.png) repeat-x; } diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/greydragon/images/ajax-loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..0996045a0978d28e0ac2fb83a634bc349cfab407 GIT binary patch literal 4782 zcmZ|TYgAKbx(Dz#I~S6jgj~3V0BI6JNCHGc5{bCcT**aDLr5S+)PRC`EnceB+Bsn- zgaku`2o^fvAeV|lEm~`>y#>LFmeYaW+i@JF+UnSLsK?c@U2~=S8#es;&vUoG{(4EvX1zdSQ@5ckkX@SorbBA1}Q5 z=6`|3ys;k*kw~@PV^PUE7&6b*`ZBN&1ly2Tp|1{wJgadHwI^Hj2tHDvO z)7T6J(tIo?ww3$n_D4koald!~>h-nwTLUeyIN085c_JLlTH;$(M)Nv*BY>R0424Tq zJ5VR&><6sm{FT7C+NuIh1Q|mUiqv|J)w&cQrZ?INRIhBgCQlzL2<`kyRNCi@i%&`u zf+RY@CpAGpiiqWKD=|4eTXNZd*YHnPFeM|opq=&4FO~N_+Nby_;)r6ur>1i_j!q?U zJwWTHNdzNNv}MMV*hfe-(RolHDNLo!v`I8coQH^+RdX}@Mz40`UC*FTq25?cft}CaA|L_3Z$LnlJLYf z&EnuZh3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c#HEAw06?)b1~ zHoUZozx`X&F<-t$I!b>i8@?H;eh^>$`NjM)CLEWVF<)Dwx9W^qpNP>(Zz+mT*GJJn zD*;kzZ7RtfVrzWTnM)$IuLBZQa|E4H2*&Fw*N;=^UBjh5iuezWy#&YFh0Cu-i8(F>W({c^Yu-EFNx zV+{&uvBn++D<93-5HcYa8>AsJX9Ae^TZ>@xDM)TOj?$2WKHdJkdsINc5Vp)orD81G zHPy1TsA&09@_-a_xLl52zx(;dwV$=J6b-D!e{^7!73|b#lxW6cZ?c`{h~Q7$6t~c$ zVh{|&sg&fd4)twUByIQKRZWMvb}Wsox0p1eaHm)$(l3+=@WK)slE0tZ%*({CJEIZ?NnW^L~Z+z{{x@2R|o(A literal 0 HcmV?d00001 diff --git a/themes/greydragon/images/background.gif b/themes/greydragon/css/colorpacks/greydragon/images/background.gif similarity index 100% rename from themes/greydragon/images/background.gif rename to themes/greydragon/css/colorpacks/greydragon/images/background.gif diff --git a/themes/greydragon/images/footer.png b/themes/greydragon/css/colorpacks/greydragon/images/footer.png similarity index 100% rename from themes/greydragon/images/footer.png rename to themes/greydragon/css/colorpacks/greydragon/images/footer.png diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-album.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-album.png new file mode 100644 index 0000000000000000000000000000000000000000..ac87ec4fbf6acb75ac29259e60d8a9a0992cbef0 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^0w6XA3y|d6q_!SNv7|ftIx;Y9?C1WI$O`0h7I;J! zGca%qfiUBxyLEqng6t)pzOL*yIe{8wlsqH7fI^Zbt`Q}{`DrEPiAAXl0g0J;C3=3Y zAqr*2dZv0NcD-lHfQn9fx;TbNTrR!1-|KLKgxkmXN8((Zi^|H1i>6eu&)uW=Q7Xo| zWA@_khq6m{?A&S5q0ljHmVJDXY*3-+{iizZ%>4OGF?VN4?l$6ilYV{ip{4eW-1%{9 zO{?~1yo%H3`FQqaZ~0E+&MR(NFD2)0(BAi9lW5tI?4t@LFH{yC^V06BatS`-c;k4x z{FSJ!JUb`XKRnT>-|4e-lIDjWwbO$+1*^G^tA%OxMsf5QL( literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-error.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-error.png new file mode 100644 index 0000000000000000000000000000000000000000..c37bd062e60c3b38fc82e4d1f236a8ac2fae9d8c GIT binary patch literal 701 zcmV;u0z&N#0$9Ug7g~-`rQ^qx~m@y2OU8A z#zh~=7n#Z$Z*fx-GOtDf07cgx0suCz_W(2~Y(0tf@FX@P6EPuM_dgn$vj9LucO)%W zw%HgMW>=#oL>nZ>M&NEf08>)#)k<{$fCT_r>rPi=BV=hFh6WS^qqze>C6Ek}o{M5% za|@JGowu0t{&hgNzySHZxy@LTNh);YzZ2zSp_ zl$^T&Dnc|NLb&RD_!4>pt@VHdP)ZGER%5ZmWEe$lryR&y;2u^3cOkO4#6c%-(EY6a{600000NkvXXu0mjfxS2AI literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-separator.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-separator.png new file mode 100644 index 0000000000000000000000000000000000000000..3e158515556616fcf3cab5e837664263f6c58c59 GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2VkYHF5IUx~9v7|ftIx;Y9?C1WI$O_~$l?3?( zGcc4*K5GHwNtC!olmzFem6RtIr7{F0X6BXX`MHKDlo{(8o2`8QNEN6?(bL5-gyVX0 z!U4v#yhv;IWAnD9iq5gkd_O1j#iA2gADI~V9C;r3-B_CiRLtP%>gTe~DWM4fa9k}Q literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-success.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-success.png new file mode 100644 index 0000000000000000000000000000000000000000..a9925a06ab02db30c1e7ead9c701c15bc63145cb GIT binary patch literal 537 zcmV+!0_OdRP)Hs{AQG2a)rMyf zFQK~pm1x3+7!nu%-M`k}``c>^00{o_1pjWJUTfl8mg=3qGEl8H@}^@w`VUx0_$uy4 z2FhRqKX}xI*?Tv1DJd8z#F#0c%*~rM30HE1@2o5m~}ZyoWhqv>ql{V z1ZGE0lgcoK^lx+eqc*rAX1Ky;Xx3U%u#zG!m-;eD1Qsn@kf3|F9qz~|95=&g3(7!X zB}JAT>RU;a%vaNOGnJ%e1=K6eAh43c(QN8RQ6~GP%O}Jju$~Ld*%`mO1pxgn>}>2DY#bcy9GvW& zTpU2e1w`DO+&r8-JX}1y+`N3;eEdB8KqSD+FUTt($SWwsCn(G(B+M@?!Y?c;07N39 zf}&!AqT+&L;zD8)!s3#`5|SbkQX-PlqEbL4BPJ~?CL=2@BPT8^F9AeyK%^ikuPCLU z1a;#mH5vjm2mu|CnV`JD!10NJkweB~!-9j&9Ku>LCj=53+69!o=6Dn?YUpNS%eZr5 zW3oGwf^(OQ=B5TuW{u!gK9vhpo2DBi@AGlkysT-qMZVsRlbfIWu{kuFNqAjpytvq1 zUL%xCu_>4{V6od=hpn$zxFR-&-8facx^;cR{x}KmGM%=~5=JXxS34eV+g@N^FvEL# zUOS)Mr&oUuY}bz$P-NdChlxABv?lkH;JtH{d-kHeFUFR3r zua~f$)%x=C3jgg9XLpryi*JbCGsAaxS+2y6#3MJ(?k?w%G)m);_uI3hK2ZDlPT6>VJ=9X(ZDeN{aJH9bQ$eIs=PV@r3Rkmy~xKrNCbt`Q}{ z`DrEPiAAXl0g0J;C3=3YAqr*2dZv1Ye$Op_0u{-7x;Tb#Tu-(*@TIYnk;A?rGeoFk jrsWKY8I7Mj5||kR?70MU=8OLTDrN9=^>bP0l+XkKClfE| literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ui-icons.png b/themes/greydragon/css/colorpacks/greydragon/images/ui-icons.png new file mode 100644 index 0000000000000000000000000000000000000000..7ab15cae7d3a3fe41b721abe9ec09345d1e5559c GIT binary patch literal 9657 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Q9piO^pn`5GO@yl~mZ|R$>ag7BC%S-98wDY@WZP1m6d(IlRVzI6;sHUlPS(LOy zV^Fh*IV>5w9j_aek@6n;@US%a@4TI|%R=LRTj{fPYPXOBQ=tQ07Lfyd4 zuBfwZ^F%%^2n-L}cve1k$nj4+!d&*r&TZy~c6P52Vx!C5>pw99Z-TH@#vXS27WzBF zT?>kc0A?cX$YTIT*?i1A$c_qibau8SqUEQqwI64*T$@6W8KeI}x5u5*fq&j}_dH%B z`C{7kf*=V*0nlUcnS+p$l9CEda4YRQY5wy`(N50so#I%L$g}SUM@k7 z54~*rq8R9R>pLSZil zCgTk$;lm@Xt-X#<-|b+Oh=H*vP*5(}?R;+p+-c*-#}~qmGY@{B=sHFRDv^F)X=kyWMGaU%hqx)AK&IA5NSZ?$2>%cni%TlASyc zvKaS~X|&*AzSAySTw(fNLmECp3HdQ`Nr3~XBaQc6J=w&=+V%_mFdcD>r^}a)?bYI} zf-$}{g1WUaDuV#5=^LsrS{6L UeJ;!CAJ3<%sHspTZxQ~#056d*x&QzG literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-calendar.png b/themes/greydragon/css/colorpacks/greydragon/images/view-calendar.png new file mode 100644 index 0000000000000000000000000000000000000000..206ccd66e043f44319ed6bf432b3c20cedb36179 GIT binary patch literal 449 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g%0VEiBdp33fDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9F5he4R}c>anMprB-lYeY$Kep*R+Vo@qXKw@TIiJqTph(ejM zo~fSkf|rq3fu}8f=?+J9cf(xHgB?!Jz)%B3Xrf zye?n0#L_qt9%?uS)$UobXNL&KDX;GEh9BE_t|??~zwEbvZRhHuXIH+JH2=896Q=OW z>;2Kp>CfiGRn+`kI9FkxXtQd^t(3h-OG97$c{1~;tgga7)n?0%U8Zku{gLL*&$HO} z?n#`$eHo=acPrYj&U#?kY0R}tYGTWKpZ)v(JbLwccK`d^wS1lx%}=G;r#5y!P8a)f zRe{sq`tP%AuV?44-&6hP38#yM`-~g6XD2fxa2z}GWXgi(84_(0!afPIhXa@vO=K2R ziD43ShD0or;$lD}j nnV@*+#-SrT5+Mg?MmPyDm^-{Uz^N|@3SkCMS3j3^P6 literal 0 HcmV?d00001 diff --git a/themes/greydragon/images/view-comments.png b/themes/greydragon/css/colorpacks/greydragon/images/view-comments.png similarity index 100% rename from themes/greydragon/images/view-comments.png rename to themes/greydragon/css/colorpacks/greydragon/images/view-comments.png diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-full.png b/themes/greydragon/css/colorpacks/greydragon/images/view-full.png new file mode 100644 index 0000000000000000000000000000000000000000..b75de9467ef01a8907ec6f8050b1a54e57a2725d GIT binary patch literal 394 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!uqB*-tAfuU^jSqmVK zv%n*=n1O-sFbFdq&tH)O6qGD+jVKAuPb(=;EJ|evNX*PD(erZ+Q7ALkGu1P(>pfEj zRCLzU#W6(Vd~5$%t|kYO*7K`besQQpNwIESt@9#1>(&kJ9lg`GYU^rjeG$6b_~452 z%Z-~Y0$xhMyXFI3MKMQ;^UtKr;%wmpe{)w~P hjrv=ZrR%4k6R(xZJbzz1|2NQM44$rjF6*2UngI3_j9vf$ literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-fullsize.png b/themes/greydragon/css/colorpacks/greydragon/images/view-fullsize.png new file mode 100644 index 0000000000000000000000000000000000000000..ed76257a8cfc001029190d078470850d16cc7d2a GIT binary patch literal 407 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g%0VEiBdp33fDVB6cUq=Rpjs4tz5?O(Kg=CK) zUj~LMH3o);76yi2K%s^g3=E|P3=FRl7#OT(FffQ0%-I!a1C(GY3GxeOU?`h>)&j`m zEbxddW?{VmR zbkpwLuU|iVnr`&j(M7pgQILa=qgJ8s`7NDkhEg||^t+l@YK2%u=We;XCODzNfiH2A z_oRS6#;RP6@GZgo`@DaDh`AM9wJF%@%C9~5UwL0T9QpG5>gw;WS5B9x_;027NoN+D z7KHgp97eaYbI>gTe~DWM4fA=8($ literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-info.png b/themes/greydragon/css/colorpacks/greydragon/images/view-info.png new file mode 100644 index 0000000000000000000000000000000000000000..521439ce7c35951c231bf4759dd2874fc918cffd GIT binary patch literal 938 zcmV;b16BNqP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00009 za7bBm000ic000ic0Tn1pfB*mh8FWQhbW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE;K%k z%ys|(0ew(RR7C&)02mk;PEJlFBqSOd8XzDbR8&+_Qc@-+CQ(sQWo2bpSXg9aWEmM5 zDk>^0EG#fEFf}zbH#avqIXOByIy*Z%JUl!-Jv}}?K0iM{KtMo2K|w=9LqtSGM@L6U zNJvUbN=!^lPft%%Q&Ut_R9aeETwGjUUS3~cUu0xtWo2b&XJ=?=XlZF_Yinz4Y;0|9 zZEkLEZ*OmLadC2Ta&vQYbaZreb#-=jc6WDoczAevdU}0*eSUs^e}8{~fPjL6f`o*G zhK7cRhlhxWh>3}bjEszpjg5|uj*pLzkdTm)l9H2?la`j2nVFfInwp!No1LAVpP!$g zprE0lp`)Xtq@<*!rKP8*r>Uu_tE;Q5tgNlAt*)-FudlDLu&}YQv9hwVw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@)z;S5 z*VotC+1c9K+TGpV-{0Th;Na!u<>uz*=jZ2o4wQ)i000eiQchC=fEKKD8IfKqBJP%EXNC?X20K9$$o+U(W3u^QVAPXFxOl9nWi0)X&? z&1*ZdOo+0(D|K+V%&Q#9gvg2#YUVKPu?!)EoF{+s8W>&U2WRI>pcnZVO?_SuGmP+G zCzJ|*L@7kkg41$bDS*Y@Q9MlGRE$2t}mS&_C7qS&y2mPs_N$O(B0GPD`VQri#o>Ps+5+?F_zP` z(?LGTO!k8@#=aih`MIa0_s=g)Stxi1bRte8^Iq+`2OY}00000 M07*qoM6N<$f}e<{V*mgE literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-left.png b/themes/greydragon/css/colorpacks/greydragon/images/view-left.png new file mode 100644 index 0000000000000000000000000000000000000000..b5b93c7a5e0e191565a8970a8bbae7cbcbddcca5 GIT binary patch literal 393 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!uqB*-tAfuU^jSqmVK zv%n*=n1O-sFbFdq&tH)O6qGD+jVKAuPb(=;EJ|evNX*PD(erZ+Q7ALkGu1P(>pfEj zRCLDE#W6(VeCq_myh9EGuJ?PE7jTEJ^6;2u!5FfyDc`}>`MLKG20M2vy@QG?E-h<1 zx8tK9*X-2ItUsSlewO)fdTr!{l&XNw=37NCO!;-S=kQX=cJ5X`1*I7pYFv)8AuQ}N z3NxBJirCIE{8PF3Sn9yXD~Ej+vF|>sQkA#OM$Gnw(<1dr)7!OPhn`$ELF7lu)#qBO z-}C!!UcGqj!t|6Q44xmT3$r1`;yDe%%u3)VqWFH*vAvT iTAj%IJ+W#2YyEKX@E@h|rItW{F?hQAxvXNn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!uqB*-tAfuU^jSqmVK zv%n*=n1O-sFbFdq&tH)O6qGD+jVKAuPb(=;EJ|evNX*PD(erZ+Q7ALkGu1P(>pfEj zRCLzU#W6(VeD4H9zC#8)uKVxu#J)Vz(h|}seBg?9L9<`%jU6oP4`gy;nw$+b8ckhW zlIirwL}jf+!KbA!PX6oj-EHG6bXZz+S)k_Zjqi8Q)_BfsB*);Yqom}pnemP2MuF7% z;T03lHW#Y=s5oTxOCo%=004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00009 za7bBm000id000id0mpBsWB>pF8FW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/themes/greydragon/css/colorpacks/wind/colors.css new file mode 100644 index 00000000..09ab5a6a --- /dev/null +++ b/themes/greydragon/css/colorpacks/wind/colors.css @@ -0,0 +1,184 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: Wind - Wind theme-like color pack + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #ccc; } +body { color: #000; background-color: #ccc; padding-left: 10px; padding-right: 10px; } + +a { color: #33629f !important } +.ui-icon { background-image: url(images/ui-icons.png); } + +/* styles.css - Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-header { background-color: #e8e8e8; border-bottom: #ccc 1px solid; } +#g-header .g-message-block { border: 1px #888 solid; background-color: #aaa; color: #000; } +.g-breadcrumbs li { background: transparent url(images/ico-separator.png) no-repeat 0 0.2em; } + +/* styles.css - Main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-main { background-color: #fff; } + +/* styles.css - Footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-footer { background-color: #e8e8e8; border-top: #ccc 1px solid; } + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-info h1, #g-album-header h1 { border-bottom: #ccc 1px solid; } +#g-info .g-description { border: #888 1px solid; } + +.g-thumbslide { border: 1px solid #707E83; background-color: #e8e8e8; } +.g-thumbcrop { border: 1px solid #707E83; } + +.g-album .g-thumbslide, +.g-album .g-thumbslide-ext { border-top: 1px solid #707E83; border-left: 1px solid #707E83; border-right: 4px double #707E83; border-bottom: 4px double #707E83; } +.g-photo .g-thumbslide, /* Need to compensate for double border in album's thumbs */ +.g-photo .g-thumbslide-ext { margin-bottom: 3px; } + +.g-thumbslide:hover .g-description { color: #000; border-bottom: 1px solid #999; background: #e8e8e8; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-album .g-thumbslide:hover .g-description, +.g-album .g-thumbslide-ext .g-description { background: #fff url(images/ico-album.png) no-repeat 4px 2px; } + +.g-thumbslide:hover .g-metadata, +.g-thumbslide-ext:hover .g-metadata { border-top: 1px solid #999; background: #e8e8e8; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { border: 1px solid #888; background: #e8e8e8; } + +div.g-resize:hover .g-description { color: #000; background: #e8e8e8; border-bottom: 1px solid #999; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-more { border: 1px solid #999; background: #e8e8e8; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +.g-movie { border: 1px solid #888; padding: 5px; background: #e8e8e8; } + +/* styles.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-reauthenticate-form ul { border: 1px #888 solid; } + +/* styles.css - Sidebar Blocks ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar { border-bottom: 1px solid #ccc; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block { border: 1px solid #ccc; } +.g-block h2 { background-color: #e8e8e8; } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +#g-viewformat .g-viewthumb-left { background: url('images/view-left.png') no-repeat left top; } +#g-viewformat .g-viewthumb-right { background: url('images/view-right.png') no-repeat left top; } +#g-viewformat .g-viewthumb-full { background: url('images/view-full.png') no-repeat left top; } + +#g-slideshow-link { background: url("images/view-slideshow.png") top left no-repeat; } +.g-fullsize-link { background: url("images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("images/view-info.png") top left no-repeat; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background: #fff url('images/ajax-loading.gif') no-repeat center center; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background: #e8e8e8; color: #000; } +#sb-title-inner { color: #000; } + +#sb-content.html_ajax p.g-error { color: red; } +#sb-content.html_ajax form { background-color: #fff; } +#sb-content.html_ajax>div { background-color: #fff; } + +/* forms.css - Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-permissions .g-breadcrumbs { border: #303030 1px solid; } +#sb-content #g-edit-permissions-form { border: #303030 1px solid; } +#sb-content #g-move>ul { border: #303030 1px solid; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-add-photos-form .g-breadcrumbs { border: #303030 1px solid; } + +#g-add-photos-canvas { background-color: #fff; border: #303030 1px solid; } +#g-add-photos-button { border: #303030 1px solid; } +#g-add-photos-status { background-color: #fff; border: #303030 1px solid; } + +#g-add-photos-status li.g-success { background: #d9efc2 url('images/ico-success.png') no-repeat .4em 50%; } +#g-add-photos-status li.g-error { background: #f6cbca url('images/ico-error.png') no-repeat .4em 50%; color: #f00; } + +/* forms.css - Organize ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content.html_ajax #g-organize { border: #303030 1px solid; } + +#g-organize-detail { border-left: #303030 1px solid; } +#g-organize .g-message-block { border-bottom: #303030 1px solid; } +.g-organize-microthumb-grid-cell { background-color: #fff; } +.g-organize-microthumb { background-color: #fff; } +#g-organize-controls { border-top: #303030 1px solid; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile h1 { border-bottom: #ccc 1px solid; } +#g-user-profile .g-avatar { border: 1px solid #888; background: #fff; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li { background-color: #bdd2ff; } +#g-site-menu li a:hover { color: #000000; background-color: #cfdeff; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #cfdeff; border-bottom: #cfdeff 1px solid; } +#g-site-menu li ul { border: #cfdeff 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #bdd2ff; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #ddf2ff; } + +.g-item .g-context-menu { background-image: url(images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #bdd2ff none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #ddf2ff; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-exif-data table { border: #303030 1px solid; } +#sb-content #g-exif-data .g-even { background-color: #A0A0A0; } +#sb-content #g-exif-data .g-odd { background-color: #C0C0C0; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #ccc; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #888; background: #555; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #ccc; } +#g-comment-form { border: 1px dotted #ccc; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #ccc; color: #666; } +#g-quick-search-form input[type="submit"] { border: #c5dbec 1px solid; text-indent: 0; width: auto; height: auto; font: 80% arial, helvetica, clean, sans-serif; font-weight: bold; padding-top: 3px; padding-bottom: 3px; } +#g-search-results h1 { border-bottom: #ccc 1px solid; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background-color: #e8e8e8; } \ No newline at end of file diff --git a/themes/greydragon/css/colorpacks/wind/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/wind/images/ajax-loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..53dd589fa194f5db985e4301c7a73ed4f1b9ad99 GIT binary patch literal 2545 zcma*pX;2hr8VB%~zPqQp=@B)`y1PS96NXtx1_oS2g;AJ+5se@Q;|&UOs2qwM!p4Ca zhJiUal?ExBdstaT~?f3m?cZgNh{frmzMrfcJ8)3 z;P)BJevgQNtw(cfF&90SnBnnr_M&xm@O%6 zzG;!w8(-4o!w_SKEsx_t8i2dHA{$xug+5j_t}~5!rEMsQGpY^uf8#e!ez!6*c<$`# z%2he_t-h<5RT`BLN|GpKWC}6HY^k+5Dom~L=dCyXf!71bXd=Do;)LbM zv+gGZ*&l+=TYuPh^HJ+{Um3v9W8Dqi zZsIDi!j*rKg;1w`oCOc;={#&)!ZF-E-<0u^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O{?~1yo%H3`FQqaZ~0E+&MR(NFD2)0(BAi9lW5tI?4t@LFH{yC^V06BatS`-c;k4x z{FSJ!JUb`XKRnT>-|4e-lIDjWwbO$+1*^G^tA%OxMsf5QL( literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-error.png b/themes/greydragon/css/colorpacks/wind/images/ico-error.png new file mode 100644 index 0000000000000000000000000000000000000000..c37bd062e60c3b38fc82e4d1f236a8ac2fae9d8c GIT binary patch literal 701 zcmV;u0z&N#0$9Ug7g~-`rQ^qx~m@y2OU8A z#zh~=7n#Z$Z*fx-GOtDf07cgx0suCz_W(2~Y(0tf@FX@P6EPuM_dgn$vj9LucO)%W zw%HgMW>=#oL>nZ>M&NEf08>)#)k<{$fCT_r>rPi=BV=hFh6WS^qqze>C6Ek}o{M5% za|@JGowu0t{&hgNzySHZxy@LTNh);YzZ2zSp_ zl$^T&Dnc|NLb&RD_!4>pt@VHdP)ZGER%5ZmWEe$lryR&y;2u^3cOkO4#6c%-(EY6a{600000NkvXXu0mjfxS2AI literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-separator.png b/themes/greydragon/css/colorpacks/wind/images/ico-separator.png new file mode 100644 index 0000000000000000000000000000000000000000..3e158515556616fcf3cab5e837664263f6c58c59 GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2VkYHF5IUx~9v7|ftIx;Y9?C1WI$O_~$l?3?( zGcc4*K5GHwNtC!olmzFem6RtIr7{F0X6BXX`MHKDlo{(8o2`8QNEN6?(bL5-gyVX0 z!U4v#yhv;IWAnD9iq5gkd_O1j#iA2gADI~V9C;r3-B_CiRLtP%>gTe~DWM4fa9k}Q literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-success.png b/themes/greydragon/css/colorpacks/wind/images/ico-success.png new file mode 100644 index 0000000000000000000000000000000000000000..a9925a06ab02db30c1e7ead9c701c15bc63145cb GIT binary patch literal 537 z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gvWa zFU;WdnezvG*k4;@^CJ9_g}*u5z36y7&Ik~aK*`Rpg^a`#5VH|K-9z zIdAOZPaUswTH=NSoxyuMvw)^7<2Kdof}!^|cF@@N-QBIXfH$ zE6=hEP4~_ltj7?tj^P57GK5B~m|C!Z%r;TeI+$SN5+$AS Pk4-YvHMw4)?HKcaF3|lA literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/view-calendar.png b/themes/greydragon/css/colorpacks/wind/images/view-calendar.png new file mode 100644 index 0000000000000000000000000000000000000000..13e0e8fa6ad01636e87a376aebada4612d937186 GIT binary patch literal 637 zcmV-@0)qXCP)D7ei;IhljEs$qjgF3vmX?;6mzS8Bn3dCU$;rvf%gfHr&d<-!(b3V;($dq@)6~?|*4Eb7*VowC*xA|H+S=OO+}z^g z;^X7vlt)=I7_<>+9?6?CkCB?e6aG^Yioc^z_3;Z)X4i010qNS#tmY4#5Bb z4#5Gqk!$S$000?uMObuGZ)S9NVRB^vP+@6qbS_RsR3LUUE;TMRK8?(F0002gNklXRGqXq|E9aC%$SE>sC?yodM2ylL?*BGC|I-$i?Rt0TTOKCqib?KW zAaB90l*C7nq)MMQ@)~3h^ULGCrj5J;?dq0`!%dv4(?)hc4JqL+D@Vn|eU3Kr63o28 zPei?})dmV}A;b!Iw2?RPt^X|6*2dg^Iu32*oeSh65B?wfC&wND X`katw^)ehH00000NkvXXu0mjfcAGp5 literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/view-comments.png b/themes/greydragon/css/colorpacks/wind/images/view-comments.png new file mode 100644 index 0000000000000000000000000000000000000000..f33bdf1952832e6e119e24fcf3589d040bdef66b GIT binary patch literal 347 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g%!VDyDo&1~%q*&4&eH|GXHuiJ>Nn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4NyWWz$e7DaN_pUr%zwL zeEG_iD|hbPdGzSflP6D}K7IQ9`SaJWU%!3(_T9U8pFe;8^5si$(vdQtF3tjv$YKTt zzC$3)D5~Mr02Gugag8Vm&QB{TPb^Ah2uRG#E79|F4N)jF)-%;JvFkkp(pl!|;us=v zIXS_BX-|3L119G0@9yqybaKdIW`2H#lSjc(;Os@lz|w__8yj^W>M=`fQZ?AX=CE}W zn}LC*!_k={5)!Nn9`!KsoH@2fykXHE@g81@h!~jzY>b&~-#&d}n(+6HLszyai@}Z+F-V^$eg37(8A5T-G@yGywqUHG%>F literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/view-full.png b/themes/greydragon/css/colorpacks/wind/images/view-full.png new file mode 100644 index 0000000000000000000000000000000000000000..e465d36695fad7ad03029fbd8e1b54ea4b2949e5 GIT binary patch literal 537 zcmV+!0_OdRP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw0001) zP)t-sJ3Bi)Jv~K5MMg$OO-)TsPEJoxPf$=$QBhG+Qc_h_RaRD3S65e9SXfzESz20J zTU%RPTwGmUU44Che}8{*k++A3hlq%XkB^U#kdTp)k&=>SZpP$Ri%hS`-)YR16+}z^g;^gGy<>lq)=jZF|>+S9B?(XjM^Yird z^n|kOv;Y7A32;bRa{vGi!2kdb!2!6DYwZ9402y>eSaefwW^{L9a%BKeVQFr3E>1;M zAa*k@H7+zhjm&lc006~FL_t(2&yA4B4#F@L1Vatg^xi@M8yh$H|Bqv}J_Urtljbsq zk=|yD&&w9C>cPagJ{EDkoRJ9Q{pNJ``_-Iy80WS{>2|9*aWIeS!5FhYUkw_>z$kSn zZwd{fV5EeRXb=f=uO5un+w!8(AR5M67>fq6Fd@JMG)RDXRuAU;_y5*t_6D(8&q!LM z)gSs!qejvi`9Qe5Q6sX^mWrB^u<{8f`JsXppo9j75W_HDCf7 b00000NkvXXu0mjf1~lf( literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/view-fullsize.png b/themes/greydragon/css/colorpacks/wind/images/view-fullsize.png new file mode 100644 index 0000000000000000000000000000000000000000..58b3e0b471b8503f066676fa3242893124462559 GIT binary patch literal 365 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g%!3-qjE#*>x6id3JuOkD)#(wTUiL5}rLb6AY zF9SoB8UsT^3j@P1pisjL28L1t28LG&3=CE?7#PG0=Ijcz0ZP~e_=LC?PTW3y`R>!F zPoFt+=JMssSFT*SbLY z*ARs=V?9$n6T99sWk5w`o-U3d8t30$ILLQMLBKW8O=nvWx09AbaXS(L4GX%26Zrqa`1y-zm94<6=Bc<&Vx_9W1EuU}h@sqKETpNo>tU!1^R zdM9`C93f@PW4aTI@6EseQtA4s##a*Oz2f{@^8ea@+unbdA>@JJ+=dsLpMWl4@O1Ta JS?83{1OQ!uo!0;W literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/view-info.png b/themes/greydragon/css/colorpacks/wind/images/view-info.png new file mode 100644 index 0000000000000000000000000000000000000000..2cc7a68ea0d6970ddc06d7bcfb26ab9d42ef8de7 GIT binary patch literal 383 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g%!VDyDo&1~%q*&4&eH|GXHuiJ>Nn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N$@$z$e7DxMN}A#O>>L zpE`Z|^ySN!uUxru=gyr+j~+dF^5p5$r_Y~1fBpLP+qZAuy?gih^XD&Lz8Lv%@B{U7 z7I;J!GcfQS0Aa?gYn_}xLCF%=h?3y^w370~qEv=}#LT=BJwMkFg)(D3Q#}*A-ZN!D zMN>Ro977~7Up=>x^N@o`!^8jcuCw_poVq||ZmaK{BaAHJMU!}v9CY3kE!q0fHOa-G zJY98H(|wltohT>s1K Zn3G!?+Ef3|mH@hs!PC{xWt~$(698=Do3Q`@ literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/colorpacks/wind/images/view-left.png b/themes/greydragon/css/colorpacks/wind/images/view-left.png new file mode 100644 index 0000000000000000000000000000000000000000..b51e336884659567c903a75ee1d435cdebef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++5scqN~Wl&dy$Uv2!&8FhGzCyimGa%a5M jeQm_@@p7+^+ctgysS004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00024 zP)t-sTy~Ucft_!Ko^XeubBLgEh@p3krFo90ev+zxldEx&w}Oj$IH;q)Y;P0)6~?|($(75+1uLN+uYpT*xcaW-{9Qe+9|9?e6aG^Yioc^z^e>p~e6J010qNS#tmY4#5Bb4#5Gqk!$S$000?u zMObuGZ)S9NVRB^vP+@6qbS_RsR3LUUE;TMRK8?(F0001_NklG_HmA)_#vW8YlP0EEpSO{4`ODPxgZm}9#jVz(p z1~qIng8{$I33_kYEhE2%pYRQxq}cc+;tl=Ca2oN1e&qoDrNMu(KPmPD4?kHU47is& P00000NkvXXu0mjf6khul literal 0 HcmV?d00001 diff --git a/themes/greydragon/css/forms.css b/themes/greydragon/css/forms.css index e1fb0c38..ab246779 100644 --- a/themes/greydragon/css/forms.css +++ b/themes/greydragon/css/forms.css @@ -1,33 +1,107 @@ -#sb-content { padding: 0px; margin: 0; } - -#g-exif-data { width: auto; min-height: 90%; margin: 10px; text-align: center; color: #ccc; background-color: #101415; overflow: auto; } -#g-exif-data table { border: #eee 1px solid; font-size: 10pt; } -#g-exif-data .g-even { background-color: #aaa; color: #000; } -#g-exif-data .g-odd { background-color: #999; color: #fff; } - -/* Login dialog ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -form { background: #101415 url('../images/section.png') repeat-x; overflow: hidden; } -form fieldset { border: none; } -form legend { color: #bbb; padding: 6px 0 0 10px; width: 100%; } -form ul { padding: 0; } -form li { padding: 8px 0 0 20px; } -form ul>fieldset>legend { display: none; } -form label { display: block; } -form textarea { width: 98%; } -form input[type="text"], -input[type="password"] { width: 90%; } - -#sb-content.html_ajax textarea { width: 270px; } -#sb-content.html_ajax p.g-error { padding-top: 4px; color: red; } - -#g-text { min-height: 70px; } - -#g-login-form { width: 100%; } -#g-login form ul { min-height: 160px; } -#g-edit-user-form ul { min-height: 276px; } -#g-password-reset { margin-left: 8px; } -#g-edit-album-form fieldset fieldset { border: none; } -#g-edit-album-form fieldset fieldset li { float: left; display: inline; } - -#g-add-photos-form { height: 100%; } \ No newline at end of file +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules related to forms/dialogs + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +input[type="submit"], .g-button, button { cursor: pointer; /* hand-shaped cursor */ cursor: hand; /* for IE 5.x */ font-size: 0.8em; color: #333 !important; padding: 2px 10px; margin-top: 0.4em; border: 1px solid; border-color: #999 #666 #666 #999; background-color: #ddd; font-weight: normal; } + +#sb-content.html_ajax { padding: 0 0.8em; margin: 0; } +#sb-content.html_ajax p.g-error { padding-top: 0.4em; } + +#sb-content.html_ajax form { background-color: #101415; overflow: hidden; } +#sb-content.html_ajax form fieldset { border: none; } +#sb-content.html_ajax form legend { display: none; width: 100%; } +#sb-content.html_ajax form ul { padding: 0; } +#sb-content.html_ajax form li { padding-top: 0.2em; } +#sb-content.html_ajax form>fieldset>ul { margin: 0 2px; } +#sb-content.html_ajax form label { display: block; padding: 0.2em 0; } +#sb-content.html_ajax form textarea { width: 99%; height: 4em; } +#sb-content.html_ajax input[type="submit"]{ margin: 6px 0; } +#sb-content.html_ajax input[type="text"], +#sb-content.html_ajax input[type="password"] { width: 99%; } +#sb-content.html_ajax>div { height: 94%; padding-top: 0.2em; overflow: auto; } +#sb-content #g-text { min-height: 6em; } + +#sb-content fieldset fieldset { border: none; } +#sb-content fieldset fieldset li { float: left; display: inline; margin-right: 1em; } + +/* forms.css - Login ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-login-form { width: 100%; } +#sb-content #g-login form ul { min-height: 10em; } +#sb-content #g-password-reset { margin-left: 0.4em; } + +/* forms.css - Edit Permissions ~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-permissions fieldset { border: none; margin: 1px; overflow: auto; width: 100%; } +#sb-content #g-permissions .g-breadcrumbs { position: static; padding: 0.4em; font-size: small; margin: 0.4em 0; } +#sb-content #g-permissions .g-breadcrumbs .g-first { padding-left: 0; } + +#sb-content #g-edit-permissions-form { margin: 0.4px 0; } +#sb-content #g-edit-permissions-form>fieldset>legend { display: none; } +#sb-content #g-edit-permissions-form>fieldset>table { font-size: small; } +#sb-content #g-edit-permissions-form>fieldset>table th, +#sb-content #g-edit-permissions-form>fieldset>table td { padding: 1px 2px; } + +/* forms.css - Delete Item ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-confirm-delete { height: 5em; padding: 0.8em 0 0 0; } + +/* forms.css - Move Item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-move>ul { height: 290px; margin-bottom: 0.4em; padding: 10px; overflow: auto; } +#sb-content #g-move>form { background: none; } + +/* forms.css - Add photo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-add-photos-form { height: 96%; } +#sb-content #g-add-photos-form .g-breadcrumbs { position: static; margin: 4px 0 0 0; padding: 4px; font-size: x-small; } +#sb-content #g-add-photos-form .g-breadcrumbs li { padding-top: 0; } +#sb-content #g-add-photos-form .g-breadcrumbs .g-first { padding-left: 0; } + +#g-add-photos-canvas { margin-top: 4px; height: 100px; } +#g-add-photos-button { padding: 2px 8px; z-index: 10; zoom: 1; } +#g-uploadifyUploader { z-index: 1005; zoom: 1; } +#g-uploadifyQueue { overflow: auto; height: 100%; } +#g-add-photos-status { margin-top: 4px; height: 90px; overflow: auto; } +#g-add-photos-status #g-action-status { margin: 0 0 1px 0; width: 100%; } +#g-add-photos-status #g-action-status li { margin: 0 0 1px 0; padding: 2px 0; text-indent: 30px; width: 100%; } + +/* forms.css - Organize ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content.html_ajax #g-organize { height: 440px; } +#g-organize #g-organize-content-pane { display: block; height: 440px; width: 690px; margin: 0 !important; overflow: hidden; } +#g-organize #g-organize-content-pane>div { float: left; height: 440px; } +#g-organize #g-organize-content-pane #g-organize-tree-container { overflow: auto; width: 164px; height: 428px; padding: 0 2px 0 4px !important; } +#g-organize #g-organize-detail { width: 518px; } +#g-organize #g-organize-detail .g-message-block li { padding: 0; } +#g-organize #g-organize-tree-container>ul { font-size: x-small; } +#g-organize #g-organize-tree-container>ul ul { padding: 0px; } +#g-organize #g-organize-album-tree { padding: 0; } +#g-organize .g-message-block { padding: 4px 0 4px 10px; } +#g-organize-microthumb-panel { background-color: transparent; border: none; height: 360px; } +#g-organize-microthumb-grid { position: static; height: 360px; border-style: none; padding: 0 2px !important; } +.g-organize-microthumb-grid-cell { float: left; margin: 2px; } +.g-organize-microthumb-grid-cell .ui-icon-note { background-position: -194px -144px; left: 8px; bottom: 4px; } +#g-organize-controls { position: absolute; background-color: transparent; padding: 6px 10px; } +#g-organize-controls li { display: inline; } +.g-organize-album-text { border: transparent 1px solid; } +#g-organize-close { display: none; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile h1 { padding-bottom: 1px; margin: 0 0; } +#g-user-profile>div { margin: 2em 0 1em 10em; } +#g-user-profile .g-block-content { text-align: left; } +#g-user-profile .g-avatar { float: left; padding: 2px; } + +#g-user-profile th { text-align: left; padding-right: 20px; } +#g-change-email-user-form { min-height: 200px; } +#g-edit-user-form ul { min-height: 200px; } + +#g-quick-search-form input[type="submit"] { filter: none; margin-top: 0; } \ No newline at end of file diff --git a/themes/greydragon/css/layout.css b/themes/greydragon/css/layout.css index 18b76412..db55e4af 100644 --- a/themes/greydragon/css/layout.css +++ b/themes/greydragon/css/layout.css @@ -1,21 +1,38 @@ -html { overflow: auto; } -* { margin: 0px; } -body { min-width: 73em; padding: 0; margin: 0; } - -#g-header { position: relative; min-width: 73em; z-index: 5; } -#g-main, #g-main-in { min-width: 72.7em; height: auto; bottom: auto; } -#g-footer { position: relative; height: auto; min-width: 73em; clear: both; display: block; overflow: auto; } - -#g-column-left { float: left; width: 18em; min-height: 32em; overflow: hidden; height: 100%; } -#g-column-right { float: right; width: 18em; min-height: 32em; overflow: hidden; height: 100%; } -#g-column-center { margin: 0 19em 0 19em; min-height: 32em; overflow: hidden; height: 100%; } -#g-column-centerleft { margin: 0 19em 0 0; min-height: 32em; overflow: hidden; height: 100%; } -#g-column-centerright { margin: 0 0 0 19em; min-height: 32em; overflow: hidden; height: 100%; } -#g-column-centerfull { position: relative; margin: 0 0; min-height: 31em; overflow: hidden; height: 100%; } - -#g-footer-leftside { float: left; display: inline; } -#g-footer-rightside { float: right; display: inline; } - -.g-hideitem { display: none; } - -#g-main-in { overflow: auto; height: 100%; } \ No newline at end of file +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules related to general layout + * Defined as 70em wide + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* layout.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { overflow: auto; overflow: -moz-scrollbars-vertical; overflow-y: scroll; } +* { margin: 0px; } +body { min-width: 70em; padding: 0; margin: 0; } + +.g-hideitem { display: none; } + +/* layout.css - Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-header { position: relative; min-width: 70em; z-index: 5; } + +/* layout.css - Main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-main { min-width: 69.7em; height: auto; bottom: auto; } +#g-main-in { min-width: 69.7em; height: 100%; overflow: auto; bottom: auto; } +#g-column-left { float: left; width: 16em; min-height: 32em; overflow: hidden; height: 100%; } +#g-column-right { float: right; width: 16em; min-height: 32em; overflow: hidden; height: 100%; } +#g-column-center { margin: 0 17em 0 17em; min-height: 32em; overflow: hidden; height: 100%; } +#g-column-centerleft { margin: 0; min-height: 32em; overflow: hidden; height: 100%; } +#g-column-centerright { margin: 0; min-height: 32em; overflow: hidden; height: 100%; } +#g-column-centerfull { position: relative; margin: 0 0; min-height: 31em; overflow: hidden; height: 100%; } + +/* layout.css - Footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-footer { position: relative; height: auto; min-width: 70em; min-height: 4em; clear: both; display: block; overflow: auto; } +#g-footer-leftside { float: left; display: inline; } +#g-footer-rightside { float: right; display: inline; } + diff --git a/themes/greydragon/css/menus.css b/themes/greydragon/css/menus.css index 1e27610c..3ba173f2 100644 --- a/themes/greydragon/css/menus.css +++ b/themes/greydragon/css/menus.css @@ -1,27 +1,56 @@ -#g-site-menu { position: absolute; bottom: 0px; left: 310px; } -#g-site-menu ul { float: left; padding: 0px; margin: 0px; width: 100%; border: #000000 0px solid; white-space: nowrap; z-index: 100; } -#g-site-menu a { display: block; padding: 3px 5px 4px 5px; text-align: center; width: auto; letter-spacing: 0px; cursor: pointer; } -#g-site-menu li { float: left; padding: 0px; background-color: transparent; border: transparent 1px solid; } -#g-site-menu li a:hover { color: #000000; cursor: pointer; background-color: #303030; } -#g-site-menu li:hover, -#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #303030; border-bottom: #000000 1px solid; } -#g-site-menu li ul a { text-align: left; padding: 4px 0px; text-indent: 8px; letter-spacing: 0px; cursor: pointer; } -#g-site-menu li ul a:hover { background-image: none; cursor: pointer; } -#g-site-menu li ul { border: #000000 1px solid; position: absolute; margin: 0px 0px 0px -1px; width: 135px; height: auto; left: -999em; } -#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #212121; } -#g-site-menu li ul li:hover, -#g-site-menu li ul li.iemhover { border: #C0C0C0 0px solid; background-color: #303030; } - -#g-site-menu li li { width: 135px; padding-right: 0px; } -#g-site-menu li ul a { width: 135px; } -#g-site-menu li ul ul { margin: -21px 0px 0px 135px; } -#g-site-menu li:hover ul ul, -#g-site-menu li:hover ul ul ul, -#g-site-menu li.iemhover ul ul, -#g-site-menu li.iemhover ul ul ul { left: -999em; } -#g-site-menu li:hover ul, -#g-site-menu li li:hover ul, -#g-site-menu li li li:hover ul, -#g-site-menu li.iemhover ul, -#g-site-menu li li.iemhover ul, -#g-site-menu li li li.iemhover ul { left: auto; } +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules related to menus + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css - Main menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu { position: absolute; left: 24em; } +#g-site-menu.default { bottom: 0; } +#g-site-menu.top { top: 0; } +#g-site-menu ul { float: left; padding-left: 0; width: 100%; white-space: nowrap; z-index: 10; } +#g-site-menu ul ul ul { padding-top: 0; } +#g-site-menu a { display: block; padding: 0.2em 0.4em; text-align: center; width: auto; letter-spacing: 0; cursor: pointer; } +#g-site-menu li { float: left; padding: 0; background-color: transparent; border: transparent 1px solid; z-index: 10; } +#g-site-menu li a:hover { cursor: pointer; } +#g-site-menu li ul a { text-align: left; padding: 0.3em 0; text-indent: 0.8em; letter-spacing: 0; cursor: pointer; } +#g-site-menu li ul a:hover { background-image: none; cursor: pointer; } +#g-site-menu li ul { position: absolute; margin: 0 0 0 -1px; width: 14em; height: auto; left: -999em; } + +#g-site-menu li li { width: 14em; padding-right: 0; } +#g-site-menu li ul a { width: 14em; } +#g-site-menu li ul ul { margin: -1.9em 0 0 14em; } +#g-site-menu li:hover ul ul, +#g-site-menu li:hover ul ul ul, +#g-site-menu li.iemhover ul ul, +#g-site-menu li.iemhover ul ul ul { left: -999em; } +#g-site-menu li:hover ul, +#g-site-menu li li:hover ul, +#g-site-menu li li li:hover ul, +#g-site-menu li.iemhover ul, +#g-site-menu li li.iemhover ul, +#g-site-menu li li li.iemhover ul { left: auto; } + +#g-site-menu>ul>li>ul { display: none; } + +#g-site-menu .ui-icon-rotate-ccw, +#g-site-menu .ui-icon-rotate-cw { display: none; } + +/* menus.css - Context menu ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-item .g-context-menu { position: absolute; margin: 0; padding: 0; top: 6px; left: 196px; width: 14px; height: 14px; background-position: -178px -144px; z-index: 3; } +.g-item .g-context-menu li { width: 100%; padding: 0; margin: 0; text-indent: -9999px; } +.g-item .g-context-menu>li>a { font-size: 0em; } +.g-item .g-context-menu:hover { top: 4px; left: 6px; width: 200px; height: auto; z-index: 100; } +.g-item .g-context-menu ul { padding: 0; margin: 0; } +.g-item .g-context-menu li li { display: none; } +.g-item .g-context-menu li li a { display: block; padding: 4px 6px; } +.g-item .g-context-menu:hover li li { display: block; text-indent: 0px; } +.g-item .g-context-menu li li a.ui-icon-rotate-ccw, +.g-item .g-context-menu li li a.ui-icon-rotate-cw { display: none; } + +.g-item.g-detail .g-context-menu { left: auto; right: 6px; } +.g-item.g-detail .g-context-menu:hover { left: auto; right: 6px; } \ No newline at end of file diff --git a/themes/greydragon/css/modules.css b/themes/greydragon/css/modules.css new file mode 100644 index 00000000..371434f8 --- /dev/null +++ b/themes/greydragon/css/modules.css @@ -0,0 +1,135 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules related to modules + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - ShadowBox Skin ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-title { overflow: hidden; } +#sb-title-inner { font-size: 10pt; font-weight: bold; padding-left: 10px; } +#sb-nav #sb-nav-close { background-image: url('../images/close.png'); width: 60px; } +#sb-container > #sb-overlay { min-height: 530px; overflow: auto; } + +/* modules.css - Exif Data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-content #g-exif-data { width: auto; background-image: none; } +#sb-content #g-exif-data table { width: 100%; } +#sb-content #g-exif-data td { padding: 0.4em; } + +/* modules.css - Image Block ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-image-block>div { margin-left: 1px; margin-right: 1px; } +.g-image-block { text-align: center; } +.g-image-block img { padding: 5px; } + +/* modules.css - RSS Feeds ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +ul#g-feeds { padding: 0; margin: 0; } + +/* modules.css - Tags ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-tag-cloud ul { padding: 0; font-size: 100%; } +#g-tag-cloud ul li { line-height: 1.2em; } +#g-tag-cloud ul li span { display: none; } +#g-add-tag-form { display: none; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments { margin-top: 2em; padding-top: 0.4em; float: left; width: 100%; } +#g-comments ul li { margin: 0.4em 0; } +#g-comments .g-author { height: 32px; line-height: 32px; } +#g-comments .g-avatar { height: 32px; margin-right: .4em; width: 32px; } + +#g-admin-comment-button { width: 27px; right: 0.2em; text-indent: -900em; } +#g-comments-link { background-position: top left; background-repeat: no-repeat; } +#g-comments-link:hover { background-position: left bottom; } +#g-comment-detail ul { margin-top: 2em; padding: 0; } +#g-comment-detail>ul>li { margin: 4px 0; padding: 6px; min-height: 40px; } +#g-comment-detail div { margin-top: 6px; padding-bottom: 8px; } + +#g-comment-form fieldset { border: none; } +#g-comment-form legend { display: none; width: 100%; } +#g-comment-form ul { padding: 0; } +#g-comment-form>fieldset>ul { margin: 0px 10px; } +#g-comment-form label { display: block; } +#g-comment-form textarea { width: 99%; height: 140px; } +#g-comment-form input[type="text"], +#g-comment-form input[type="password"] { width: 99%; } + +/* modules.css - Gallery Stats ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-gallerystats ul { padding: 0; font-size: x-small; } + +/* modules.css - Info ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata ul { padding: 0; } +#g-metadata .g-description { margin-top: 0.4em; padding: 0.4em 0; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-calendarview-link:hover { background-position: left bottom; } + +#g-view-calendar-form fieldset { border: none; } +#g-view-calendar-form ul { padding: 8px; } +#g-view-calendar-form li { padding-top: 8px; display: inline; padding-left: 10px; } +#g-view-calendar-form label { margin: 4px 0; } +#g-view-calendar-form select { margin: 4px 10px; } + +table.calendar { border-spacing: 1px; } +table.calendar td.title a { font-weight: bold; } + +/* modules.css - ClustrMaps ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-clustrmaps .g-block-content { text-align: center; } + +/* modules.css - GPS Info ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-gps-maps ul { padding-left: 0; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form { position: absolute; top: 3em; right: 1em; background: none transparent; } +#g-quick-search-form label { display: none; } +#g-quick-search-form li { display: inline; float: left; padding: 0px; } + +#g-quick-search-form input[type="text"] { width: 150px; } +#g-quick-search-form input[type="submit"] { display: block; width: 23px; height: 23px; text-indent: -9999px; overflow: hidden; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.basketbuttons span.ui-icon { display: none; } +#payment { height: 100%; margin-left: 10px; } +#payment p { padding: 4px; } +#basketForm { width: 100%; float:right; } +#checkout { } +#checkout fieldset { border: none; } +#checkout legend { width: 100%; padding: 4px 4px 4px 8px; font-size: 1em; font-weight: bold; } +#checkout ul { padding: 8px; } +#checkout li { padding-top: 8px; display: inline; } +#checkout label { margin: 4px 0; } +#checkout select { margin: 4px 10px; } + +#checkout textarea { display: block; clear: both; padding: .2em; width: 90%; } + +/* modules.css - Register ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-welcome-message p { padding-bottom: 6px; } +#g-change-password-user-form { height: 100%; } + +/* modules.css - Localization ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#l10n-client .labels { border-top: white 1px solid; height: 1.7em; } +#l10n-client h2 { padding-top: 0.4em; padding-bottom: 0.3em; } +#l10n-client .label.translation { margin-top: -0.4em; height: 1.7em; } +#l10n-client #l10n-client-toggler { line-height: 1.7em; height: 1.7em; } +#l10n-client .string-list li { font-size: 0.8em; line-height: 1.1em; } +#l10n-client #l10n-client-string-select { width: 24%; } +#l10n-client #l10n-client-string-select .string-list { border: 1px #ccc solid; } +#l10n-client #g-l10n-search-form ul { padding: 0; } +#l10n-client #l10n-client-string-editor { margin-left: 1em; } +#l10n-client-string-editor .source .source-text { margin: 0 0.4em 0 0; border: 1px #ccc solid; padding: 0.4em; line-height: 1em; } +#l10n-client-string-editor .translation { height: 19em; } +#l10n-client #l10n-edit-translation { width: 97%; height: 17em; border: 1px #ccc solid; font-family: monospace; padding: 0.4em; } diff --git a/themes/greydragon/css/old_ie.css b/themes/greydragon/css/old_ie.css index 70556d49..9a5da7b8 100644 --- a/themes/greydragon/css/old_ie.css +++ b/themes/greydragon/css/old_ie.css @@ -1,4 +1,16 @@ -body { word-wrap: break-word; } - -.g-item .g-metadata:hover { padding: 0px 0 4px 6px; } -#g-quick-search-form input[type="submit"] { padding: 60px 0 0 0; } +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - IE 6 hacks + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* old_ie.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +body { word-wrap: break-word; font-size: 100.1%; } + +.g-item .g-metadata:hover { padding: 0px 0 4px 6px; } +#g-quick-search-form input[type="submit"] { padding: 60px 0 0 0; } +#g-column-centerleft { margin: 0 19em 0 0; } +#g-column-centerright { margin: 0 0 0 19em; } diff --git a/themes/greydragon/css/screen.css b/themes/greydragon/css/screen.css index 974521a1..17ecf082 100644 --- a/themes/greydragon/css/screen.css +++ b/themes/greydragon/css/screen.css @@ -1,211 +1,224 @@ -/** - * Gallery 3 Grey Dragon Theme - * Copyright (C) 2006-2009 Serguei Dosyukov - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with this - * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street - * - Fifth Floor, Boston, MA 02110-1301, USA. - */ - -@import url(layout.css); -@import url(forms.css); - -html { background-color: #1A2022; overflow: -moz-scrollbars-vertical; overflow-y: scroll; } -body { background: url(../images/background.gif) #1A2022 repeat-x; color: #BBB; font: 0.8em Arial, verdana, sans-serif; } - -a { color: #6392CF !important; text-decoration: none; outline: none; -moz-outline-style: none; } -a:focus, a:active, a:hover { text-decoration: none; outline: none; } -img { border: none; } -p { font-size: small; text-indent: 0; } -ul { list-style: none none; } -input[type="submit"] { cursor: pointer; /* hand-shaped cursor */ cursor: hand; /* for IE 5.x */ } - -h1 { font-weight: bold; font-size: 1.2em; } -h2 { font-weight: bold; font-size: 1.2em; } -h3 { font-weight: bold; } -h4 { font-weight: bold; } -h5 { font-weight: bold; } - -/* Common elements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -.txtright { text-align: right; } -.g-metadata { overflow: hidden; } - -.ui-icon { display: inline-block; zoom: 1; width: 16px; height: 16px; background-image: url(../images/ui-icons.png); } -.ui-icon-first { background-position: -32px -162px; } -.ui-icon-first-d { background-position: -162px -162px; } -.ui-icon-prev { background-position: -48px -162px; } -.ui-icon-prev-d { background-position: -178px -162px; } -.ui-icon-next { background-position: -64px -162px; } -.ui-icon-next-d { background-position: -194px -162px; } -.ui-icon-last { background-position: -80px -162px; } -.ui-icon-last-d { background-position: -210px -162px; } -.ui-icon-signal-diag { background-position: -16px -178px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-comment { background-position: -227px -219px; width: 27px; height: 20px; } -.ui-icon-left .ui-icon { float: left; margin-right: .2em; } -.ui-icon-right .ui-icon { float: right; margin-left: .2em; } - -.g-resize { border: 1px solid #888; padding: 5px; background: #555; } - -/* Header section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -#g-header { height: 90px; padding: 0; font-size: 80%; } -#g-logo { position: absolute; top: 8px; left: 16px; } - -#g-login-menu { position: absolute; bottom: 10px; right: 14px; background-color: transparent; } -#g-login-menu li { display: inline; padding-left: 1.2em; } - -.g-breadcrumbs { position: absolute; bottom: 4px; right: 14px; background-color: transparent; } -.g-breadcrumbs li { display: inline; padding-left: 1em; background: transparent url('../images/ico-separator.png') no-repeat 0 2px; } -.g-breadcrumbs li.g-first { background-image: none; } - -/* Main section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -#g-main { display: block; margin: 0; } -#g-main-in { display: block; position: relative; } - -#g-column-center, #g-column-centerleft { padding: 6px 6px 6px 16px; } -#g-column-centerfull { padding: 6px 12px 6px 10px; } -#g-column-centerright { padding: 6px 12px 6px 6px; } -#g-column-left { padding: 6px 4px 6px 10px; } -#g-column-right { padding: 6px 10px 6px 4px; } - -/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -.g-paginator { display: inline-block; width: 100%; padding: 4px 0 0 0; font-size: 80%; zoom: 1; } -.g-paginator li { display: inline; float: left; margin-left: 0; zoom: 1; } -.g-paginator a { padding: 0 0 0 2px; } - -.g-paginator .g-pagination { width: 80%; padding-top: 2px; } -.g-paginator .g-navigation { text-align: right; width: 20%; } - -/* Album grid ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -.g-thumbcrop { overflow: hidden; position: relative; width: 200px; height: 150px; } -#g-album-grid { padding: 6px 0 0 0; width: 100%; } -#g-album-grid .g-item { position: relative; float: left; padding: 10px 9px 0px 9px; width: 30.5%; height: 190px; background: url('../images/image_thumb.gif') no-repeat; } -#g-album-grid .g-item p { text-align: center; } -#g-album-grid h2 { position: absolute; top: 164px; left: 12px; width: 150px; font: 100%/100% Arial, Helvetica, sans-serif; } -#g-album-grid h2 a { display: block; margin-top: 4px; font: bold 70% Arial, Helvetica, Verdana, Sans-Serif; letter-spacing: 0.1em; text-transform: uppercase; min-height: 2em; } -#g-album-grid .g-album h2 { padding-left: 20px; background: url('../images/ico-album.png') no-repeat 0px 2px; } - -.g-item .g-metadata { display: block; position: absolute; margin: 0; padding: 0; top: 172px; left: 198px; width: 14px; height: 14px; background: url(../images/ui-icons.png) -162px -144px; } -.g-item .g-metadata li { padding: 0; margin: 0; text-indent: -9999px; font: bold 70% Arial, Helvetica, Verdana, Sans-Serif; letter-spacing: 0.1em; } -.g-item .g-metadata:hover { padding: 4px 0 0 6px; top: 148px; left: 6px; width: 198px; height: 32px; background: #181818 none; border: 1px #888 solid; z-index: 100; } -.g-item .g-metadata:hover li { text-indent: 0px; } - -.g-item .g-context-menu { position: absolute; margin: 0; padding: 0; top: 6px; left: 198px; width: 14px; height: 14px; background: url(../images/ui-icons.png) -178px -144px; } -.g-item .g-context-menu li { width: 100%; padding: 0; margin: 0; text-indent: -9999px; font: bold 70% Arial, Helvetica, Verdana, Sans-Serif; letter-spacing: 0.1em; } -.g-item .g-context-menu:hover { top: 4px; left: 6px; width: 204px; height: auto; background: #181818 none; border: 1px #888 solid; z-index: 100; } -.g-item .g-context-menu ul { display: block; padding: 0; margin: 0; } -.g-item .g-context-menu li li { display: none; font-size: 100%; width: 100%; } -.g-item .g-context-menu li li a { display: block; padding: 4px 6px; } -.g-item .g-context-menu:hover li li { display: block; text-indent: 0px; } -.g-item .g-context-menu li li a:hover { background-color: #303030; } - -.ul-table { text-align: center; margin: 0px auto; padding: 0; list-style-type: none; clear: both; } -.ul-table li { float: left; text-align: center; } - -#g-info { } -#g-info h1 { padding-bottom: 1px; border-bottom: 1px solid #888; } -#g-info .g-description { display: none; } -/* #g-info h1:hover .g-description { position: relative; z-index: 10; top: 10px; left: 0px; width: 90%; display: block; afloat: left; border: 1px solid #888; padding: 6px; }*/ -#g-photo { padding: 6px 0 6px 6px; text-align: center; } -#g-albumheader h1 { padding-bottom: 1px; margin-bottom: 6px; border-bottom: 1px solid #888; } - -/* Footer section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -#g-footer { padding: 6px 6px 6px 14px; background: url('../images/footer.png') #1A2022 repeat-x top !important; zoom: 1; font-size: 80%; } -#g-footer ul { float: left; color: #999; padding: 0; text-align: left; } -#g-footer li { padding: 0 0 2px 0; } - -#g-visitors { float: left; display: inline; margin: 3px 4px 3px 12px; } -#g-copyright { font-size: x-small; color: #808080; } - -#g-footer-rightside { padding-right: 6px; text-align: right; } - -/* Design blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-quick-search-form { position: absolute; top: 10px; right: 14px; background: none transparent; } -#g-quick-search-form label { display: none; } -#g-quick-search-form li { display: inline; float: left; padding: 0px; } - -#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #737373; color: #BBB; width: 150px; /* margin-left: 2px; */ } -#g-quick-search-form input[type="submit"] { display: block; width: 23px; height: 23px; text-indent: -9999px; background: transparent url(../images/search.png) no-repeat center top; border: none; overflow: hidden; } - -#g-search-results h1 { border-bottom: #888 1px solid; } - -/* Sidebar Blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -/* Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -.g-block { margin-bottom: 0.5em; padding-bottom: 4px; border: 1px solid #737373; background-color: #101415; position: relative; } -.g-block h2 { padding: 4px; font-size: 1.2em; background: url('../images/section.png') repeat-x; } -.g-block-content { margin: 4px 10px 0 10px; display: block; zoom: 1; } - -/* Image Block ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-image-block>div { margin-left: 1px; margin-right: 1px; } -.g-image-block { text-align: center; } -.g-image-block img { border: 1px solid #888; background: #555; padding: 5px; } - -/* Feeds Block ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -ul#g-feeds { padding: 0; margin: 0; } - -/* Tags and cloud ~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-tag-cloud ul { padding: 0; font-size: 100%; } -#g-tag-cloud ul li { line-height: 1.2em; } -#g-tag-cloud ul li span { display: none; } -#g-add-tag-form { display: none; } - -/* Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-admin-comment-button { width: 27px; right: 10px; text-indent: -900em; } -.g-avatar { float: right; } -#g-comments-link { background: url('../images/view-comments.png') top left no-repeat; } -#g-comments .g-block-content { margin: 0; } -#g-comment-detail ul { padding: 0px; } -#g-comment-detail > ul > li { margin: 4px; padding: 6px; min-height: 40px; border: 1px dotted #737373; } -#g-comment-detail div { margin-right: 48px; margin-top: 8px; } - -/* Buttons ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -#g-viewformat { z-index: 5; position: absolute; padding: 0; top: 6px; right: 10px; } -#g-viewformat li { float: left; margin-right: 2px; } -#g-viewformat .g-viewthumb-left { background: url('../images/view-left.png') no-repeat left top; } -#g-viewformat .g-viewthumb-right { background: url('../images/view-right.png') no-repeat left top; } -#g-viewformat .g-viewthumb-full { background: url('../images/view-full.png') no-repeat left top; } -#g-viewformat span { line-height: 1px; text-indent: -900em; width: 17px; display: block; height: 15px; } -#g-viewformat span:hover, -#g-viewformat span.g-viewthumb-current { background-position: left bottom; } - -#g-view-menu { position: absolute; top: 6px; right: 70px; height: 16px; z-index: 5; zoom: 1; margin: 0 0 6px 0; padding: 0 0 4px 0; } -.g-toolbar { height: 16px; zoom: 1; margin: 0 0 4px 0; padding: 0 0 3px 0; border-bottom: 1px solid #737373; } -.g-menu { margin: 0; padding: 0; text-align: left; } -.g-menu li { display: inline; } - -.g-menu-element, -.g-menu-link { display: inline; float: left; margin-right: 4px; } - -.g-buttonset ul { height: 16px; } -.g-buttonset .g-menu-link { text-indent: -99999px; width: 22px; height: 15px; } - -#g-slideshow-link { background: url("../images/view-slideshow.png") top left no-repeat; } -.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; } -#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; } - -#g-slideshow-link:hover, .g-fullsize-link:hover, #g-exifdata-link:hover, #g-comments-link:hover { background-position: left bottom; } - -/* ShadowBox Skin ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#sb-body { background: #101415 url('../images/ajax-loading.gif') no-repeat center center; } -#sb-title-inner { display: none; } -#sb-nav #sb-nav-close { background-image: url('../images/close.png'); width: 60px; } - -.clear { clear: both; margin-top: -1px; height: 1px; overflow: hidden; } - -.g-message-block { position: absolute; z-index: 10; min-width: 30em; padding: 4px 6px; right: 10px; top: 34px; border: 1px #888 solid; background-color: #AAA; overflow: hidden; color: #000; font: bold 9pt Arial, verdana, sans-serif; text-align: center; } +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Kitchen sync + * + * Color rules for font/background/lines can be found in dedicated colorpack files + */ + +@import url(layout.css); +@import url(menus.css); +@import url(forms.css); +@import url(modules.css); + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* screen.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +body { font-family: Arial, verdana, sans-serif; font-size: 0.9em; } + +a { text-decoration: none; outline: none; -moz-outline-style: none; } +a:focus, a:active, a:hover { text-decoration: none; outline: none; } +img { border: none; } +p { text-indent: 0; } +ul { list-style: none none; } + +h1 { font-weight: bold; font-size: 1.1em; padding-bottom: 1px; } +h2 { font-weight: bold; font-size: 1.1em; } +h3 { font-weight: bold; } +h4 { font-weight: bold; } +h5 { font-weight: bold; } + +.txtright { text-align: right; } +.g-metadata { overflow: hidden; } +.g-avatar { float: right; } + +.ui-icon { display: inline-block; zoom: 1; width: 16px; height: 15px; } +.ui-icon-first { background-position: -162px -178px; } +.ui-icon-first-d { background-position: -162px -162px; } +.ui-icon-prev { background-position: -178px -178px; } +.ui-icon-prev-d { background-position: -178px -162px; } +.ui-icon-parent { background-position: -226px -178px; } +.ui-icon-parent-d { background-position: -226px -162px; } +.ui-icon-next { background-position: -194px -178px; } +.ui-icon-next-d { background-position: -194px -162px; } +.ui-icon-last { background-position: -210px -178px; } +.ui-icon-last-d { background-position: -210px -162px; } +.ui-icon-signal-diag { background-position: -16px -178px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-plus { background-position: -14px -129px; } +.ui-icon-minus { background-position: -46px -129px; } +.ui-icon-note { background-position: -66px -98px; } + +.ui-icon-comment { background-position: -227px -219px; width: 27px; height: 20px; } +.ui-icon-left .ui-icon { float: left; margin-right: .2em; } +.ui-icon-right .ui-icon { float: right; margin-left: .2em; } + +/* screen.css - Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-header { height: 90px; padding: 0; font-size: 0.9em; } + +#g-logo { position: absolute; top: 8px; left: 16px; } + +.g-breadcrumbs { position: absolute; bottom: 4px; background-color: transparent; } +.g-breadcrumbs.default { right: 14px; } +.g-breadcrumbs.left { left: 304px; padding-left: 0; } +.g-breadcrumbs li { display: inline; padding-left: 1em; padding-right: 0.4em; } +.g-breadcrumbs li.g-first { background-image: none; } +.g-breadcrumbs li.g-active { padding-right: 0; } + +#g-header .g-message-block { position: absolute; z-index: 10; min-width: 30em; padding: 4px 6px; right: 20em; top: 34px; overflow: hidden; font: bold 9pt Arial, verdana, sans-serif; text-align: center; } + +#g-header #g-login-menu { position: absolute; top: 0.5em; right: 1em; background-color: transparent; display: none; } + +/* screen.css - Main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-main { display: block; margin: 0; } +#g-main-in { display: block; position: relative; } + +#g-column-center, #g-column-centerleft { padding: 6px 6px 6px 16px; } +#g-column-centerfull { padding: 6px 12px 6px 10px; } +#g-column-centerright { padding: 6px 12px 6px 6px; } +#g-column-left { padding: 6px 4px 6px 10px; } +#g-column-right { padding: 6px 10px 6px 4px; } + +/* screen.css - Footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-footer { padding: 6px 6px 6px 14px; zoom: 1; font-size: 0.9em; } +#g-footer ul { float: left; padding: 0; text-align: left; } +#g-footer li { padding: 0 0 2px 0; } + +#g-footer #g-login-menu { position: absolute; bottom: 0.5em; right: 1em; background-color: transparent; display: none; } + +#g-login-menu li { display: inline; padding-left: 1.2em; } +#g-logout-link { float: none; margin-right: 0; } + +#g-copyright { font-size: x-small; } +#g-footer #g-footer-rightside { float: right; padding-right: 6px; text-align: right; } +#g-credits { margin-right: 14px; } + +/* screen.css - Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-paginator { display: inline-block; width: 100%; padding: 4px 0 0 0; zoom: 1; } +.g-paginator li { display: inline; float: left; margin-left: 0; zoom: 1; } +.g-paginator a { padding: 0 0 0 2px; } + +.g-paginator .g-pagination { width: 80%; font-size: 0.8em; } +.g-paginator .g-navigation { text-align: right; width: 20%; } + +/* screen.css - Album grid ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-album-grid { padding: 6px 0 0 0; width: 100%; display: inline-block; } +#g-album-grid .g-item { position: relative; float: left; margin: 4px 0; min-width: 212px; width: 33%; zoom: 1; } /* amargin-right: 10px; */ +#g-album-grid .g-extra-column { width: 23%; } +#g-album-grid .g-item p { text-align: center; } +#g-album-grid h2 { position: absolute; top: 164px; left: 12px; width: 150px; font: 100%/100% Arial, Helvetica, sans-serif; } +#g-album-grid h2 a { display: block; margin-top: 4px; font: bold 0.8em Arial, Helvetica, Verdana, Sans-Serif; letter-spacing: 0.1em; text-transform: uppercase; min-height: 2em; } + +/* screen.css - Thumbs : Common ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-thumbcrop { overflow: hidden; position: relative; width: 200px; min-height: 133px; } + +.g-thumbtype-flm .g-thumbcrop { height: 150px; } +.g-thumbtype-dgt .g-thumbcrop { height: 133px; } +.g-thumbtype-sqr .g-thumbcrop { height: 200px; } +.g-album .g-description strong { padding-left: 16px; } + +/* screen.css - Thumbs : Overlay ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-thumbslide { font-size: 0.9em; width: 208px; min-height: 139px; padding-top: 6px; padding-left: 6px; } +.g-thumbslide.g-thumbtype-flm { height: 158px; } +.g-thumbslide.g-thumbtype-dgt { height: 141px; } +.g-thumbslide.g-thumbtype-sqr { height: 208px; } + +.g-thumbcrop a.g-thumlink { display: block; position: relative; } +.g-thumbslide .g-thumbcrop .g-description { display: none; } +.g-thumbslide:hover .g-description { display: block; position: absolute; top: 0; min-height: 32px; width: 100%; overflow: hidden; z-index: 3; font-weight: bold; font-size: 0.9em; letter-spacing: 0.1em; text-transform: uppercase; text-align: left; } +.g-thumbslide:hover .g-description strong { display: block; margin-left: 10px; padding-top: 2px; } +.g-album .g-thumbslide:hover .g-description strong { padding-left: 16px; } +.g-thumbslide .g-description strong { display: block; margin-left: 10px; padding-top: 2px; } + +.g-thumbslide .g-metadata { display: none; } +.g-thumbslide:hover .g-metadata { display: block; position: absolute; bottom: 7px; margin: 0 0 1px 1px; padding: 2px 4px 2px 6px; width: 190px; } +.g-thumbslide:hover .g-metadata li { padding: 0; margin: 0; font-size: 0.9em; } +.g-album .g-thumbslide:hover .g-metadata { bottom: 10px; } + +/* screen.css - Thumbs : Extended View mode ~~~~~~~~~~~~*/ + +.g-thumbslide-ext { font-size: 0.9em; width: 208px; min-height: 139px; padding-top: 6px; padding-left: 6px; } +.g-thumbslide-ext.g-thumbtype-flm { height: 188px; } +.g-thumbslide-ext.g-thumbtype-dgt { height: 171px; } +.g-thumbslide-ext.g-thumbtype-sqr { height: 238px; } + +.g-thumbslide-ext .g-description { display: block; margin-top: 2px; width: 200px; overflow: hidden; font-weight: bold; font-size: 0.9em; letter-spacing: 0.1em; text-transform: uppercase; text-align: left; } +.g-thumbslide-ext .g-description strong { display: block; } +.g-album .g-thumbslide-ext .g-description strong { padding-left: 24px; } + +.g-thumbslide-ext .g-metadata { display: none; } +.g-thumbslide-ext:hover .g-metadata { display: block; position: absolute; bottom: 37px; margin: 0 0 1px 1px; padding: 2px 4px 2px 6px; width: 190px; } +.g-thumbslide-ext:hover .g-metadata li { padding: 0; margin: 0; font-size: 0.9em; } +.g-album .g-thumbslide-ext:hover .g-metadata { bottom: 40px; } + +/* screen.css - Photo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-item { float: left; height: 100%; width: 100%; } +#g-photo { padding: 6px 0 6px 6px; text-align: center; float: left; height: 100%; width: 100%; } +div.g-resize { position: relative; left: 50%; float: left; padding: 5px; font-size: 0.9em; } +div.g-resize>a { float: left; overflow: hidden; } +div.g-resize>a img { float: left; } +div.g-resize .g-description { display: none; } +div.g-resize:hover .g-description { position: absolute; display: block; top: 0px; margin-top: 5px; text-align: left; padding: 10px; } +div.g-resize:hover .g-description strong { display: block; margin-bottom: 5px; text-transform: uppercase; } + +div.g-resize .g-more { display: block; position: absolute; right: 16px; top: 16px; padding: 4px 8px; } +div.g-resize:hover .g-more { display: none; visibility: hidden; } + +.ul-table { text-align: center; margin: 0px auto; padding: 0; list-style-type: none; clear: both; } +.ul-table li { float: left; text-align: center; } + +#g-info { display: inline-block; width: 100%; } +#g-info .g-description { margin-top: 4px; margin-bottom: 4px; padding: 4px; } +#g-movie { padding: 6px 0 6px 6px; position: relative; } + +.g-movie { margin: 0 auto; } + +#g-albumheader h1 { margin-bottom: 6px; } + +.g-description .g-metadata { padding: 0.4em 0 0 0; font-size: 0.8em; } +.g-description .g-metadata li { display: inline; padding-right: 1em; } + +/* screen.css - Sidebar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* screen.css - Sidebar : Common ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-block { margin-bottom: 4px; padding-bottom: 4px; position: relative; } +.g-block h2 { padding: 4px 4px 4px 8px; font-size: 1em; } +.g-block-content { margin: 4px 6px 0 6px; display: block; zoom: 1; } + +/* screen.css - Sidebar : Buttons ~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-viewformat { z-index: 5; position: absolute; padding: 0; top: 6px; right: 10px; } +#g-viewformat li { float: left; margin-right: 2px; } +#g-viewformat span { line-height: 1px; text-indent: -900em; width: 17px; display: block; height: 15px; } +#g-viewformat span:hover, +#g-viewformat span.g-viewthumb-current { background-position: left bottom; } + +#g-view-menu { position: absolute; top: 6px; right: 70px; height: 16px; z-index: 5; zoom: 1; margin: 0 0 6px 0; padding: 0 0 4px 0; } +#g-view-menu.g-buttonset-shift { right: 6px; } +.g-toolbar { height: 1.1em; zoom: 1; margin: 0 0 4px 0; padding: 1px 0 3px 0; } +.g-menu { margin: 0; padding: 0; text-align: left; } +.g-menu li { display: inline; } + +.g-menu-element, +.g-menu-link { display: inline; float: left; margin-right: 4px; } + +.g-buttonset .g-menu-link { text-indent: -99999px; width: 22px; height: 15px; } + +#g-slideshow-link:hover, .g-fullsize-link:hover, #g-exifdata-link:hover { background-position: left bottom; } + +/* screen.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-reauthenticate-form fieldset { border: none; width: 260px; } +#g-reauthenticate-form ul { padding: 8px; } +#g-reauthenticate-form li { padding-top: 8px; } +#g-reauthenticate-form label { display: block; } +#g-reauthenticate-form input[type="password"] { width: 98%; } diff --git a/themes/greydragon/helpers/exif_event.php b/themes/greydragon/helpers/exif_event.php index f61bcb7c..27b617a6 100644 --- a/themes/greydragon/helpers/exif_event.php +++ b/themes/greydragon/helpers/exif_event.php @@ -1,7 +1,7 @@ get("add_menu"); + if (!empty($submenu)) { + $item = $submenu->get("add_photos_item"); + if (!empty($item)) { $item->css_class("ui-icon-plus"); } + + $item = $submenu->get("add_album_item"); + if (!empty($item)) { $item->css_class("ui-icon-note"); } + } + + $submenu = $menu->get("options_menu"); + if (!empty($submenu)) { + $item = $submenu->get("edit_item"); + if (!empty($item)) { $item->css_class("ui-icon-pencil"); } + + $item = $submenu->get("edit_permissions"); + if (!empty($item)) { $item->css_class("ui-icon-key"); } + } + } +} diff --git a/themes/greydragon/helpers/greydragon_installer.php b/themes/greydragon/helpers/greydragon_installer.php new file mode 100644 index 00000000..461e6914 --- /dev/null +++ b/themes/greydragon/helpers/greydragon_installer.php @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/themes/greydragon/helpers/greydragon_theme.php b/themes/greydragon/helpers/greydragon_theme.php new file mode 100644 index 00000000..988da98c --- /dev/null +++ b/themes/greydragon/helpers/greydragon_theme.php @@ -0,0 +1,30 @@ +' + . $theme_info->name . ' ' . $theme_info->version . ''; + } +} + diff --git a/themes/greydragon/images/blue-grad.png b/themes/greydragon/images/blue-grad.png new file mode 100644 index 0000000000000000000000000000000000000000..36e0f6bc25b10ca27ca968108563518fe5dc49db GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^tUxT!!2~21I85*dQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jikv)M978H@CDnX=Db6gEkmSIs^Z()xp8pr0{(pS^|NIG+ z|398e{=m6H{efN6yPy6J_J`|F-ErUaKah395q{5i%p3*`AMWWWCU;$$4>XOz)78&q Iol`;+0KbGg>;M1& literal 0 HcmV?d00001 diff --git a/themes/greydragon/images/button-grad-active-vs.png b/themes/greydragon/images/button-grad-active-vs.png new file mode 100644 index 0000000000000000000000000000000000000000..dc641725f90ae1c2600aa73f61fd71852de7b2ca GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^tUxTs!2~3;Wt?9DDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_d9MOL0Jjv*Ddl1k3aJ<`B3Ln45YTUl8-&W@Q`+4B|WrDSr z1<%~X^wgl##FWaylc_d9MYf(Ujv*Ddl6qdpoNr)>`1k*R|C#h82i6y#Bx=~&{;RB1 zKk>gk{-1o?zxohU`MZ1SMP`4WKkZ?sTs#9K8^fQ=ep~#F0-b>dF?hQAxvXNn{1`T?2eVT!WkTr!?&^Y1$v$bU3)_cyQn8;92KVmR%~@c&)W>f9tIM(?IBO z>)vbAHeOn`?C|!D$G7i2J?-SRWhbv~KY4EZ$xGW$UR$uOAQEUGXMsm#F#`kNVGw3K zp1&dmC@5Lt8c`CQpH@L&ZCWNx zGxted(ER#$isbZTELLr{Gh`;dx$w>LzPG$h(aYj*XN$J`r>;4Zvw>6Ql$Cw$U%L}u p_ob@+p0?B>HSfmBFURXYFiNK=n!R29=seKn44$rjF6*2UngBBZs^b6v literal 0 HcmV?d00001 diff --git a/themes/greydragon/images/header.png b/themes/greydragon/images/header.png deleted file mode 100644 index b60c4a660c70d18c8f4bf8fb6031640bbbefbda4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 355 zcmeAS@N?(olHy`uVBq!ia0vp^j6fX4!3-q*n$Glt1d4;)ofy`glX(f`u%tWsIx;Y9 z?C1WI$O_~uBzpw;GB8xBF)%c=FfjZA3N^f7U???UV0e|lz+g3lfkC`r&aOZkpu~g# zpAc7metrP~0YM-T0s>)S5fKqlQ4vuwQ895baS1UANpVRj2`OnwX&EUQS!r20X*qcr zc|}C zGBnmUGSM+M)ip8GH8IySwa_=SG_bHTu&_3?v@x=>HMe(i^78H1VVVkbn|O(9L`iUd zT1k0gQ7S_~VrE{6o}X)oLYc9i>0Z~xCxJ?oJY5_^IIbrrED$g-GBhx3Qe+nD7UYxM jup!{)4aH4%CdG^@9~l-YyJw37RWo?H`njxgN@xNAb4N@6 diff --git a/themes/greydragon/images/ico-album.png b/themes/greydragon/images/ico-album.png deleted file mode 100644 index 01463be470f10c8f0a21e0015c6ed05814b71e7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 508 zcmVLvDdI)60-h29eSU|1bzKj$~QLi|&c z$>jJBnIevf|Bpr^i4>yxgu!q)WP>0GFq_TL>2%O&G*GM6P^na)X&OqU66Z)%pD?g( zn+-hA!+btRtJUJog+c*}q9B{iB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MuU>5kx{pL_Z1n;Qnf$(aI95y5uwcLxXjE3#Aem^`v>4cw zoCHX$O5-et?0=blH;CJr-W)omo{b&#tozGy*yr1<>n|v{b5_3#U3{AxL&D4B$Ioi^ z-M)z^IVSip8MzZHdrp0PX=BQ^<*ksHPypMRt{uN^JIh&@5AM8*mY=JcqxBJg zSm5jD*l`oG@Y2O12#iL^aj)Pmo1BQS=c-`&dvB`0udrXOyh+(-Kb-q(Z>>TXPa_!e zhT2%Qxh@}BoW4ZItvV3C8`vKA6JZ+;fOb3rk@b_n4bW{iP;zgi{(b6UEgE4g(2paX z^sDP+PJ`&5cCyo4UG_2<+s^wpxxh zdzyMsXGRqj{uDv@={T$kAuH^62(Sa(i@%rw&=W5n8w{nJbMvxi-dzNN!F{P3uxw!Q zzxC`>y_~m3$+xSQpqf{`l6SwOYoj6ob}(-b2AZBjHZn3ie&n=8e*XRCB!d$^KBTJ_ z`HCaUaMv}lzuIzs@vU@}R|zpV6LOy)DMnv7PIB+eFHA2pHUn|`&r04EJ#8|?rEh<6~v@9?_UT zN{HWI94jxs#j>tL`Nef>7e1U8S?#pSiMNNY!9Gn#>nZO0C2KV?L7!FtHZZL_@WM)9 z0^7|1J^G_rQ>8-c(rH6RfX(Hmhq7v_*Wm7GURr&%awp3>ur1(FabcF?ND?7Ta;8Kj zi3M&(QNH2^0tHrz3VBI>N6^4zas+@(MCYoAf{e_i9RF-?P#(96;}XmXHO>z%)%}Ba zKm}-Pft3)1@dk#JNA;~aJ0Tetwn_O3*)?G+#EG^kDG%i=c9lscp6*NQk`D1AK%~iT zU6~-=mv`}B{gb^8vU++pFVckcQgT+-P&~+svh9C4^pmWSd5BN-B2A4kWKC>ee(cx% VQ{!#2W*(&s;L{2M6xDGdMs diff --git a/themes/greydragon/images/missing-img.png b/themes/greydragon/images/missing-img.png new file mode 100644 index 0000000000000000000000000000000000000000..12b7394fcd832ee62201853240fb4a15a39bd793 GIT binary patch literal 33136 zcmV)sK$yRYP)5hLUCf8E+j=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C7HuqGBx2|Cp3^CAQ@A%9@8QYqJ(5vKk4aPJbmW07}-2HFc?I|S;^4k zc#drW4RPk|nPLPvxe{1O^1EVC+zgHIh}RM@)jG_iJf*>Sq4HUIzs07*qoM6N<$g5&kQ1ONa4 literal 0 HcmV?d00001 diff --git a/themes/greydragon/images/section.png b/themes/greydragon/images/section.png deleted file mode 100644 index bba5da2c8957740e8f514d6fec9916039c66b01a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^j6f{G!VDx&KI(c25-1LGcVbv~P6otbNq6*hWMJ6X z&;2Kn706de_6YK2V5m}KU}$JzVE6?TYIwoGP-?)y@G60U!DJc@9Tja|6&*cQU42zO12sKEHGLy>17k~fpOENXxj-%AC9V-A z!TD(=<%vb93;~Imc_n&&t|1C##(JiET^FAODv|SaaSY+Oo@{a8OJgS^hkZk4h)~B& g%NY_g8b1MDp~cOa_)Aff8>o`O)78&qol`;+03@nD2><{9 diff --git a/themes/greydragon/images/ui-icons.png b/themes/greydragon/images/ui-icons.png deleted file mode 100644 index 199b7fda5a1c1bfd678079befdd7f7b36ea169d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9273 zcmZX32UJtdx9>>^Rk|Qe=}k~TqzZ&krG+9OBE3nGA`qkoLX%#kNKpwWy((S0fPf&q zN|)Y46$lVszIX5UfA_98Yn?ND&RMhf?Ad$v%>GT3uJ&UJGG;OW04UVel%D_q2u}k0 zBt-Z(Cas|lUqS2@;0gfnHQ~mk6(PP&`by2%696dN|9L?4{2D0yM<#^IGlag|3xv0o zhaI46<>-nK(pE8GfBjHMTZlsJMK(r4gahynezSc2v>#+=X zDCevtdi~;sq6IDaDv0i&?DNt~>>Z^<;UR63wz^}A)!>!gkO*f2604r_uI_{Qm_d!tW#p0Q|Q(h;r!c zU>wU?r+&az)dP~kUQO18%|ht%0kS*s;@9$NTu@Ja1UrzH(*(t2(+WrCD#pnx6Op7w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X`OGT%7ZASKM30Nu$zd-?>4T=Yv7!Cp%Sxff4?c1zd)pY|+`PhxG{Gov+<5_Gxh& zBYB#?8@#rs@ZisM5B6mHhi{Vn50LFauI+DZZhFs6{SGd3o1r!m6Wvov=j+*xm`;P2_0mpTsu)qxVDid&WV zjA-JCy!L$Hg-h2A#PxC%jXT!M6$4T@@S^_;e*m)5<^2D;d#pwQJ#BXC6*tWIe&b=6 zi;IQpf%%~8tEZuS0cU?AcFqo#73Y1|@4Q~=c}sgr28~Y<0_0dU>}_O$L_AxDqgz+4 zLdKP0_f2ZGdJb3n!r$s&nZG+Ld0J-OvB`k76yTJU3am#eKBi% z9pwb7xwF3olPpK?fHstjV^C9s1^DYJ*;0m)<1dw&xs|Dt03S!;$dGbkey)4s90ssmiGYj)6D;)8ZAR=?f^4Iv$u zoGxp5d_Ej>+ys)^D2{Dr;h1g~@Iu}r8K&}zAqNGrgb05s;j2Nh-lp*#Q0EV}E~*vK z9w=b%?PJ!A&WID-$v-HX*h*SY+f%g!Nq$k*0X^5tWZ!fPF^LwZ6TtEkHoO>zC~((V zJesv6_VB*SBfZIcxv=sxndvQvNlbk0?U36^t1Ms8=v9E_@JxX7cYY|{nI>JiJ8$g? zFs;dD`K~KL0%#*@8pF}?g|KY8#Rt*UMYZ z;9&~w%~6u|2iFY!_rHjSXdDC4VMYIF=q!Tw@KGO9oTIs4(0i7{{tt9-JVn#{>+Ad4lTrKx_)V04z1Q?#73K8A|O3xNBmkx{#^mz8tB4LY}&cwsN_mWyt>l D03=e_ diff --git a/themes/greydragon/images/view-full.png b/themes/greydragon/images/view-full.png deleted file mode 100644 index e729031914f3065b9502029afbb3db3e7b585c34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 438 zcmV;n0ZIOeP)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy7j#8fbW?9;ba!ELWdKlNX>N2bPDNB8b~7$Dy+xzR0003INklsRO7GOH_l+W z$$g8H%$a#Z$K#V`#xbQ`G}BFK0?e)!-fTLQ0uxGs^XnULem0V_8c~h2Meb!asp|$q z8UWsZ93D^~xXkaZ$KgIDz&tOk#|;u8S$=0dtP+Zh$JJpK3AxB`t;Y@a#CROG#4#Qr z;Sp58%t1@fc1XQ2Y9{Q_bX7L9I;Caj;5Rx;DuMOK7VD=6U6evzK6ltWKT26?^17|? zR+G9eYa&Y+jpJ*w*?n7&A@9|X^_WvajOWknH9YpN>TCZV-V@_7W+BESq-aC2@B7@+ g69vV^!R|%;3;fc2fR4rcPyhe`07*qoM6N<$g5^=Mo&W#< diff --git a/themes/greydragon/images/view-fullsize.png b/themes/greydragon/images/view-fullsize.png deleted file mode 100644 index 5bff90dd32fda530062a04899e15c7f372402ff3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428 zcmV;d0aN~oP)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy7j#8fbW?9;ba!ELWdKlNX>N2bPDNB8b~7$Dy+xzR00038Nklb;@5CHcD*OPagV!;6`-avaziWHG3{eUQOD0l-BXIGJu7a&6siWpy%0`nmD z?8Rr`n8w=C>bx32#K{$7L_iS$VJJkByn6HYo(M5?+v~i$xygAu{aEzQJS^r$h!LoI zMJ=Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy7j#8fbW?9;ba!ELWdKlNX>N2bPDNB8b~7$Dy+xzR0003pNklZCx3_mh19tZI4EB6jfIWi^lqIF*=-{sg<=8+}^YZG%mDSakr}_vXsRoMXG_^@e z_B51wfQ4-ttUGT4S8v+XVTmNn>)*c}Xtw0e z+4h3S!h&AK>v!zj)Di;m4pbNjOydjl-OUAI!Z^aj-rgJo07Eb)CZ_})#KbVfm|z0y z7={uk6B4jc;S!iIEMUPLN0=}oV3CE90~W}&hYBMHERbsl6$SE=Gei7O&|el0u#m-CT75(3eLn5f&lSguPx#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy7j#8fbW?9;ba!ELWdKlNX>N2bPDNB8b~7$Dy+xzR00035NklGxF-inM5Jg|rl;fb08<{8u3!Y$&HWa*s_n6RZGf%J=5kX;2U?2zvYHGBC!8l5H zm%()FupK_=$FC=6O~vHJFRNd}l-P+?fkmUY%b|Z-4*g50G=hj=qL^s#qz)>A0}eka znS+SZ0UdjZN{xsy_E`Zd2s?~d z2-$N@{-ysl{_ZL@Dhx=Z;sGodD|^CrjZfe90CIWf9vwuJgV?z&P7kM-zCZs0F0p>K T=HdhD00000NkvXXu0mjfyR@aY diff --git a/themes/greydragon/images/view-right.png b/themes/greydragon/images/view-right.png deleted file mode 100644 index d1878dd689f02431724e8564363ca886532f0ca9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 418 zcmV;T0bTxyP)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy7j#8fbW?9;ba!ELWdKlNX>N2bPDNB8b~7$Dy+xzR0002}Nkl%sF-ikr5XJHTn;kbHR;IF1ECQY&Rw)H9;XP7V*m(sDFJhyxmk=z})+&OdL2?W!F9|yY~KOY`1wjye?_)x}Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBU!C{RpPMGg)QFfcGNF)=bSGBh+aHa0dlH#a#sIXXHzJ3Bi(Jv%%+ zJUu-IPxf_`#{fNhF`bc%#@k&1Jjihh)dc$krTnvQv(gM@>GhKh-bh>nho zhk%rifS!+!kd}y^nv9*2k&%&+l8};=o0FZHnVFfAqMMYcprD|prlq8&sHLZ`tE{T6 zt*xf2u%)cGuAs56r?IW3wydwPuCKMOw7Iggv$V9dy0N~wvA?>yxxT)-zQ4V>yTiJ^ z#Jsr7zren^z{|t6#l*VD!NS78!^FkL#=^tN!N<(U$H>ac$;`~p&BW2n#L~~p-`2?3 z*Uj3|(aq7)(9_b=)YQ||)z#VA+1lFL+S=RM+uqyU-QC^X($nGJ+T-8f;^o`u<>TY# z<>lt)Few3>FDh2>Fw?6?dvJ6@9^yI z@$&8V`0o4n_4W7p_xJk$_x}I;^8Weu|M>X!`S|(!`}_O){{H*_{r&y_{Qv&{|GWg? zxc~qF7j#8fbW?9;ba!ELWdKlNX>N2bPDNB8b~7$Dy+xzR0004YNklZyno{6I^f8az3@r3!jKt3Bp zID3+olbwC^B01GLAjL3Yt0j>YQx-2;Xqwz7fFvvka>dk+y2=^G3`oL^^__{9T)GVl z3K)=u8F;}YlZ^sQ7+09^v0(sU2r4NVn4tqDB?cuHOu(tcUO5kdh0ZoIoE98 zo&y&aTGHh1_6INhQN$X(=K>%w} Vbjhhwk`Dj?002ovPDHLkV1fz09`yhK diff --git a/themes/greydragon/js/dialog.js b/themes/greydragon/js/dialog.js deleted file mode 100644 index 1d11a569..00000000 --- a/themes/greydragon/js/dialog.js +++ /dev/null @@ -1,17 +0,0 @@ -function setupLoginForm() { - setupAjaxForm('#gLoginForm'); -} - -function setupAjaxForm($form_id) { - var options = { - dataType: "json", - success: function(data) { - if (data.result == "success") { - if (data.location) { window.location = data.location; } - else { window.parent.Shadowbox.close(); } - } - } - }; - - $($form_id).ajaxForm(options); -}; diff --git a/themes/greydragon/js/menus.js b/themes/greydragon/js/menus.js deleted file mode 100644 index f4f1431a..00000000 --- a/themes/greydragon/js/menus.js +++ /dev/null @@ -1,14 +0,0 @@ -// Javascript originally by Patrick Griffiths and Dan Webb. -// http://htmldog.com/articles/suckerfish/dropdowns/ - -sfHover = function() { - var sfEls = document.getElementById("gSiteMenu").getElementsByTagName("ul")[0].getElementsByTagName("li"); - if (!sfEls) { return; } - - for (var i=0; iul>li>ul").show(); + $("#g-login-menu").show(); + $(".g-context-menu").show(); + }, + +// gallery_dialog_postprocess: function(href, title) { +// Shadowbox.open({player: 'ajax', content: href, width: 500, height: 420, enableKeys: false, animate: false, title: title, onFinish: myAjaxSubmit}); +// } +}); + +/* +(function($) { + + $.widget("ui.gallery_dialog", { + _init: function() { + var self = this; + if (!self.options.immediate) { + this.element.click(function(event) { + event.preventDefault(); + var href = $(event.currentTarget).attr("href"); + var title = $(event.currentTarget).attr("title"); + setTimeout(function() { $().gallery_dialog_postprocess(href, title); }, 1000); + return false; + }); + } else { + var href = this.element.attr("href"); + var title = this.element.attr("title"); + setTimeout(function() { $().gallery_dialog_postprocess(href, title); }, 1000); + } + } + }); +})(jQuery); +*/ + +$(document).ready(function() { + $().theme_ready(); +}); diff --git a/themes/greydragon/libraries/MY_Theme_View.php b/themes/greydragon/libraries/MY_Theme_View.php new file mode 100644 index 00000000..4f579ec2 --- /dev/null +++ b/themes/greydragon/libraries/MY_Theme_View.php @@ -0,0 +1,313 @@ +ensurevalue(module::get_var("th_greydragon", $key), $default)); + } + + public function load_sessioninfo() { + $this->sidebarvisible = $_REQUEST['sb']; + + if (empty($this->sidebarvisible)): + $session = Session::instance(); + $_sidebar_mode = $session->get("gd_sidebar"); + if ($_sidebar_mode): + $this->sidebarvisible = $_sidebar_mode; + else: + $this->sidebarvisible = $this->ensureoptionsvalue("sidebar_visible", "right"); + endif; + else: + // Sidebar position is kept for 360 days + Session::instance()->set("gd_sidebar", $this->sidebarvisible, time() + 31536000); + endif; + + $this->sidebarallowed = $this->ensureoptionsvalue("sidebar_allowed", "any"); + $this->sidebarvisible = $this->ensurevalue($this->sidebarvisible, "right"); + + if ($this->sidebarallowed == "none") { $this->sidebarvisible = $this->ensureoptionsvalue("sidebar_visible", "right"); }; + if ($this->sidebarallowed == "right") { $this->sidebarvisible = "right"; } + if ($this->sidebarallowed == "left") { $this->sidebarvisible = "left"; } + + if ($this->item()): + if ($this->ensureoptionsvalue("sidebar_albumonly", FALSE)): + if (!$this->item()->is_album()): + $this->sidebarallowed = "none"; + $this->sidebarvisible = "none"; + endif; + endif; + endif; + + $this->logopath = $this->ensureoptionsvalue("logo_path", url::file("lib/images/logo.png")); + $this->show_guest_menu = $this->ensureoptionsvalue("show_guest_menu", FALSE); + $this->horizontal_crop = $this->ensureoptionsvalue("horizontal_crop", FALSE); + $this->thumb_descmode = $this->ensureoptionsvalue("thumb_descmode", "overlay"); + $this->photo_descmode = $this->ensureoptionsvalue("photo_descmode", "overlay"); + $this->is_thumbmeta_visible = ((!$this->ensureoptionsvalue("hide_thumbmeta", FALSE)) and module::is_active("info")); + $this->is_photometa_visible = ((!$this->ensureoptionsvalue("hide_photometa", TRUE)) and module::is_active("info")); + $this->disable_seosupport = $this->ensureoptionsvalue("disable_seosupport", FALSE); + $this->is_blockheader_visible = (!$this->ensureoptionsvalue("hide_blockheader", FALSE)); + $this->mainmenu_position = $this->ensureoptionsvalue("mainmenu_position", "default"); + $this->show_breadcrumbs = (!$this->ensureoptionsvalue("hide_breadcrumbs", FALSE)); + $this->loginmenu_position = ($this->ensureoptionsvalue("loginmenu_position", "default")); + $this->copyright = ($this->ensureoptionsvalue("copyright", null)); + $this->photonav_position = module::get_var("th_greydragon", "photonav_position", "top"); + $this->desc_allowbbcode = $this->ensureoptionsvalue("desc_allowbbcode", FALSE); + $this->enable_pagecache = $this->ensureoptionsvalue("enable_pagecache", FALSE); + $this->color_pack = $this->ensureoptionsvalue("color_pack", "greydragon"); + + $cssfile = gallery::find_file("css/colorpacks/" . $this->color_pack, "colors.css", false); + + if (!$cssfile): + $this->color_pack = 'greydragon'; + endif; + + switch (module::get_var("th_greydragon", "thumb_ratio")): + case "digital": + $this->crop_factor = 4/3; + $this->crop_class = 'g-thumbtype-dgt'; + break; + case "square": + $this->crop_factor = 1; + $this->crop_class = 'g-thumbtype-sqr'; + break; + case "film": + $this->crop_factor = 3/2; + $this->crop_class = 'g-thumbtype-flm'; + break; + case "photo": + default: + $this->crop_factor = 1; + $this->crop_class = 'g-thumbtype-sqr'; + break; + endswitch; + + $this->_thumb_size_y = floor($this->_thumb_size_x / $this->crop_factor); + } + + public function is_sidebarallowed($align) { + return (($this->sidebarallowed == "any") or ($this->sidebarallowed == $align)); + } + + public function breadcrumb_menu($theme, $parents) { + $content = ""; + + if ($theme->item() && !empty($parents)): + $content .= ''; + endif; + + return $content; + } + + protected function sidebar_menu_item($type, $url, $caption, $css) { + if (!$this->is_sidebarallowed($type)): + return ""; + endif; + + $iscurrent = ($this->sidebarvisible == $type); + $content_menu = '
  • '; + if (!$iscurrent): + $content_menu .= ''; + endif; + $content_menu .= '' . $caption . ''; + if (!$iscurrent): + $content_menu .= ''; + endif; + + return $content_menu . '
  • '; + } + + public function sidebar_menu($url) { + if ($this->sidebarallowed != "any"): + return ""; + endif; + + $content_menu = ($this->sidebar_menu_item("left", $url, "Sidebar Left", "left")); + $content_menu .= ($this->sidebar_menu_item("none", $url, "No Sidebar", "full")); + $content_menu .= ($this->sidebar_menu_item("right", $url, "Sidebar Right", "right")); + return '
      ' . $content_menu . '
    '; + } + + public function add_paginator($position) { + if (($this->photonav_position == "both") or ($this->photonav_position == $position)): + return ($this->paginator()); + else: + return ""; + endif; + } + + public function get_thumb_element($item, $addcontext) { + $item_class = $item->is_album() ? "g-album" : "g-photo"; + + if (($this->sidebarallowed == "none") and ($this->sidebarvisible == "none")): + $item_class .= " g-extra-column"; + endif; + + $content = '
  • '; + $content .= $this->thumb_top($item); + + if (($this->crop_factor == 1) and ($item->thumb_width > $item->thumb_height)): + $_shift = 'style="margin-top: ' . floor(($this->_thumb_size_y - $item->thumb_height) / 2) . 'px;"'; + else: + if (($this->crop_factor > 0) and ($item->thumb_width < $item->thumb_height)): + $_shift = 'style="margin-top: -' . floor(($item->thumb_height - $this->_thumb_size_y) / 2) . 'px;"'; + else: + $_shift = ""; + endif; + endif; + + $content .= '
    crop_class . '">

    '; + if ($this->thumb_descmode == "overlay"): + $content .= ''; + $content .= '' . $this->bb2html(html::purify($item->title), 2) . ''; // html::purify(text::limit_chars($item->title, 44, "…")) + $content .= ''; + endif; + $content .= ''; + if (($item->thumb_height == 0) or ($item->thumb_width == 0)): + $content .= 'No Image'; + else: + $content .= $item->thumb_img(); + endif; + $content .= '

    '; + + if ($this->thumb_descmode == "bottom"): + $content .= ''; + $content .= '' . $this->bb2html(html::purify($item->title), 2) . ''; + $content .= ''; + endif; + + if (($this->is_thumbmeta_visible) and (module::is_active("info"))): + $content .= ''; + endif; + + if ($addcontext): + $_text = $this->context_menu($item, "#g-item-id-{$item->id} .g-thumbnail"); + $content .= (stripos($_text, '
  • '))? $_text : null; + endif; + + $content .= '
  • '; + $content .= $this->thumb_bottom($item); + $content .= ''; + + return $content; + } + + // $mode: bit 1 - use mix mode ($mode in [1, 3]), bit 2 - strips bbcode ($mode in [2, 3]) + public function bb2html($text, $mode) { + // Syntax Sample: + // -------------- + // [img]http://elouai.com/images/star.gif[/img] + // [url="http://elouai.com"]eLouai[/url] + // [size="25"]HUGE[/size] + // [color="red"]RED[/color] + // [b]bold[/b] + // [i]italic[/i] + // [u]underline[/u] + // [list][*]item[*]item[*]item[/list] + // [code]value="123";[/code] + // [quote]John said yadda yadda yadda[/quote] + + static $bbcode_mappings = array( + "#\\[b\\](.*?)\\[/b\\]#" => "$1", + "#\\[i\\](.*?)\\[/i\\]#" => "$1", + "#\\[u\\](.*?)\\[/u\\]#" => "$1", + "#\\[s\\](.*?)\\[/s\\]#" => "$1", + "#\\[o\\](.*?)\\[/o\\]#" => "$1", + "#\\[url\\](.*?)\[/url\\]#" => "$1", + "#\\[url=(.*?)\\](.*?)\[/url\\]#" => "$2", + "#\\[mail=(.*?)\\](.*?)\[/mail\\]#" => "$2", + "#\\[img\\](.*?)\\[/img\\]#" => "\"\"", + "#\\[img=(.*?)\\](.*?)\[/img\\]#" => "\"$2\"", + "#\\[quote\\](.*?)\\[/quote\\]#" => "

    $1

    ", + "#\\[code\\](.*?)\\[/code\\]#" => "
    $1
    ", + "#\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]#" => "$2", + "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2", + "#\\[class=([^\\[]*)\\]([^\\[]*)\\[/class\\]#" => "$2", + "#\\[center\\](.*?)\\[/center\\]#" => "
    $1
    ", + "#\\[list\\](.*?)\\[/list\\]#" => "
      $1
    ", + "#\\[ul\\](.*?)\\[/ul\\]#" => "
      $1
    ", + "#\\[li\\](.*?)\\[/li\\]#" => "
  • $1
  • ", + ); + + static $bbcode_strip = '|[[\/\!]*?[^\[\]]*?]|si'; + + // Replace any html brackets with HTML Entities to prevent executing HTML or script + // Don't use strip_tags here because it breaks [url] search by replacing & with amp + if (($mode == 1) or ($mode == 3)): + $newtext = str_replace("<", "<", $text); + $newtext = str_replace(">", ">", $newtext); + $newtext = str_replace(""", "\"", $newtext); + else: + $newtext = str_replace("<", "<", $text); + $newtext = str_replace(">", ">", $newtext); + $newtext = str_replace("&quot;", """, $newtext); + endif; + + // Convert new line chars to html
    tags + $newtext = nl2br($newtext); + + if (strpos($text, "[") !== false): + if (($mode == 2) or ($mode == 3)): + $newtext = preg_replace($bbcode_strip, '', $newtext); + else: + $newtext = preg_replace(array_keys($bbcode_mappings), array_values($bbcode_mappings), $newtext); + endif; + endif; + + return stripslashes($newtext); //stops slashing, useful when pulling from db + } +} + +?> \ No newline at end of file diff --git a/themes/greydragon/theme.info b/themes/greydragon/theme.info index 2deac9b4..cea1d8d0 100644 --- a/themes/greydragon/theme.info +++ b/themes/greydragon/theme.info @@ -1,6 +1,6 @@ name = "Grey Dragon Theme" -description = "A Crisp theme uses on clear grey colors and minimized on JS overhead" -version = 1.5.8 -author = "2009 Serguei Dosyukov" +description = "A Crisp flexible theme with support of Color Packs and minimized on JS overhead" +version = 2.3.1 +author = "2010 Serguei Dosyukov" site = 1 admin = 0 diff --git a/themes/greydragon/thumbnail.png b/themes/greydragon/thumbnail.png index 89cd6bdad4fd47e54da6357126c7f178dfa99e44..4b80ecaf35a50ced69c426d9c6b9e16b8af6a322 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5x7`{Mm&vX91T7>Fg`ooQkNAUh|ov`QEL&MEd!kc<2kis z5NfeBn#l-!0;f@8Kx|5$k6VwvI#M-QLc|0T{8Jww2aL86a`Etdx%aDm2Mz?rdAS8e z*m?W&>qnF0Qz-E16xxY?#8Ou4Y%0tx=950C>p2;r677kl>XC)=M@5K`4%SSlHYBS*-6Okv&`(b$mp|3?J-MkHz#(Q61z=P51FNOxKxiUZBh{ON}ue)@4+5C5*deem7f{CsX+F1)W;TwH8zZCzPe zsjRFlDlV?5s)7Xn)Cb6c*9bX2{q)l>_w2E-wIx^+tO(Xtuze*m)9S$)G*4FQo zzJUQG_~+*XeSHHQ4&F_Eq|(sP)YjI9!E$&!etWB_3IA_@hkeo)*lx$!{`&UL zR$MKZ1(6g7zZLDx2wPvY;3qf~Y{CAkG)Sp^wAr$KViwySFFx{*g{75~lM^_+le3El z%qQaR?&Rp`;tJD>xO#ee+S=N>xw<+#Iyg8uLYSSsgPV&B#CNc_gRjmI6Ao~5g%BGX zTL`pwaDZdscN=RPH+K(DPY*XYcV|e^(b3h_4N`N4kCT&&i>r%^i=%_xN1i!wdjACo gKmJVoW6$va0spymf(()J0ssI207*qoM6N<$f`TeX5&!@I diff --git a/themes/greydragon/views/album.html.php b/themes/greydragon/views/album.html.php index 8164bace..49fa5cf4 100644 --- a/themes/greydragon/views/album.html.php +++ b/themes/greydragon/views/album.html.php @@ -1,51 +1,55 @@ - - -
    - album_top() ?> -

    title) ?>

    -
    description)? bb2html(html::purify($item->description), 1) : null; ?>
    -
    - - -paginator() ?> - - -
      - - $child): ?> - - is_album()): ?> - - - -
    • - thumb_top($child) ?> -

      - thumb_img() ?> -

      - thumb_bottom($child) ?> -

      title) ?>

      - context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?> - '))? $_text : null; ?> - - - -
    • - - - admin || access::can("add", $item)): ?> - id") ?> -
    • Add some.", - array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?>
    • - -
    • - - -
    -album_bottom() ?> - - -paginator() ?> - + +
    + album_top() ?> +

    bb2html(html::purify($item->title), 1) ?>

    +
    + +add_paginator("top"); ?> + +photo_descmode == "top") and ($item->description)): ?> +
    bb2html(html::purify($item->description), 1) ?>
    + + +
      + + $child): ?> + get_thumb_element($child, TRUE) ?> + + + admin || access::can("add", $item)): ?> + id") ?> +
    • Add some.", + array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?>
    • + +
    • + + +
    +album_bottom() ?> + +photo_descmode == "bottom") and ($item->description)): ?> +
    bb2html(html::purify($item->description), 1) ?>
    + + +add_paginator("bottom"); ?> diff --git a/themes/greydragon/views/block.html.php b/themes/greydragon/views/block.html.php index 699d7c22..af29546f 100644 --- a/themes/greydragon/views/block.html.php +++ b/themes/greydragon/views/block.html.php @@ -1,10 +1,33 @@ - - - - -
    -

    -
    - -
    -
    + + + + +
    + is_blockheader_visible): ?> +

    + +
    + +
    +
    diff --git a/themes/greydragon/views/dynamic.html.php b/themes/greydragon/views/dynamic.html.php index e136fd53..1f787cf3 100644 --- a/themes/greydragon/views/dynamic.html.php +++ b/themes/greydragon/views/dynamic.html.php @@ -1,35 +1,39 @@ - -
    -
    - dynamic_top() ?> -
    -

    -
    - - -paginator() ?> - - -
      - $child): ?> -
    • "> - thumb_top($child) ?> -

      - photo -

      -

      title) ?>

      - thumb_bottom($child) ?> - -
    • - -
    -dynamic_bottom() ?> - - -paginator() ?> - \ No newline at end of file + +
    +
    + dynamic_top() ?> +
    +

    +
    + +add_paginator("top"); ?> + +
      + $child): ?> + get_thumb_element($child) ?> + +
    +dynamic_bottom() ?> + +add_paginator("bottom"); ?> diff --git a/themes/greydragon/views/info_block.html.php b/themes/greydragon/views/info_block.html.php index 69f6a1e9..d3860584 100644 --- a/themes/greydragon/views/info_block.html.php +++ b/themes/greydragon/views/info_block.html.php @@ -1,9 +1,24 @@ - - - + +
      + owner): ?> +
    • + + owner->url): ?> + owner->display_name()) ?> + + owner->display_name()) ?> + +
    • + + captured): ?> +
    • + + captured)?> +
    • + + description): ?> +
    • + bb2html(html::purify($item->description), 1) ?> +
    • + +
    diff --git a/themes/greydragon/views/movie.html.php b/themes/greydragon/views/movie.html.php index e69de29b..ec870608 100644 --- a/themes/greydragon/views/movie.html.php +++ b/themes/greydragon/views/movie.html.php @@ -0,0 +1,43 @@ + +
    + photo_top() ?> + +
    +

    bb2html(html::purify($item->title), 1) ?>

    +
    bb2html(html::purify($item->description), 1) ?>
    +
    + + add_paginator("top"); ?> + +
    + resize_top($item) ?> + movie_img(array("class" => "g-movie", "id" => "g-movie-id-{$item->id}")); ?> + context_menu($item, "#g-movie-id-{$item->id}") ?> + resize_bottom($item) ?> +
    + + add_paginator("bottom"); ?> + + photo_bottom() ?> +
    diff --git a/themes/greydragon/views/no_sidebar.html.php b/themes/greydragon/views/no_sidebar.html.php index 2239cf91..dd61bb77 100644 --- a/themes/greydragon/views/no_sidebar.html.php +++ b/themes/greydragon/views/no_sidebar.html.php @@ -1,3 +1,24 @@ - - -
     
    + + 
    ?> + diff --git a/themes/greydragon/views/page.html.php b/themes/greydragon/views/page.html.php index 90a9f09c..13664d65 100644 --- a/themes/greydragon/views/page.html.php +++ b/themes/greydragon/views/page.html.php @@ -1,76 +1,66 @@ - - - - +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +load_sessioninfo(); ?> + + enable_pagecache) and ($theme->item())): + // Page will expire in 60 seconds + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 60).'GMT'); + header("Cache-Control: public"); + header("Cache-Control: post-check=3600, pre-check=43200", false); + header("Content-Type: text/html; charset=UTF-8"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + endif; ?> - - - <? if ($page_title): ?> +<?= " <title>"; ?> +<? if ($page_title): ?> <?= $page_title ?> <? else: ?> <? if ($theme->item()): ?> <? if ($theme->item()->is_album()): ?> -<?= t("Browse Album :: %album_title", array("album_title" => $theme->item()->title)) ?> +<?= t("Browse Album :: %album_title", array("album_title" => $theme->bb2html($theme->item()->title, 2))) ?> <? elseif ($theme->item()->is_photo()): ?> -<?= t("Photo :: %photo_title", array("photo_title" => $theme->item()->title)) ?> +<?= t("Photo :: %photo_title", array("photo_title" => $theme->bb2html($theme->item()->title, 2))) ?> <? else: ?> -<?= t("Movie :: %movie_title", array("movie_title" => $theme->item()->title)) ?> +<?= t("Movie :: %movie_title", array("movie_title" => $theme->bb2html($theme->item()->title, 2))) ?> <? endif ?> <? elseif ($theme->tag()): ?> -<?= t("Browse Tag :: %tag_title", array("tag_title" => $theme->tag()->name)) ?> +<?= t("Browse Tag :: %tag_title", array("tag_title" => $theme->bb2html($theme->tag()->name, 2))) ?> <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> <?= t("Gallery") ?> <? endif ?> <? endif ?> - - - - - - " type="image/x-icon" /> - - script("jquery.js") ?> - script("jquery.form.js") ?> - script("jquery-ui.js") ?> - +disable_seosupport): ?> + ' . "\n"; ?> + ' . "\n"; ?> + ' . "\n"; ?> + ' . "\n"; ?> + ' . "\n"; ?> + +" type="image/x-icon" /> +script("jquery.js") ?> +script("jquery.form.js") ?> +script("jquery-ui.js") ?> +page_subtype == "movie"): ?> +script("flowplayer.js") ?> + +script("gallery.ajax.js") ?> head() ?> +" type="text/css" media="screen,print,projection" /> +color_pack . "/colors.css") ?>" type="text/css" media="screen,print,projection" /> - " type="text/css" media="screen,print,projection" /> - " type="text/css" media="screen,print,projection" /> + + - - - - + page_top() ?> @@ -80,56 +70,30 @@ -guest): ?> -
    - site_menu("") ?> +guest) or ($theme->show_guest_menu)): ?> +
    "> + site_menu() ?>
    messages() ?> header_bottom() ?> - - + +loginmenu_position == "header"): ?> + user_menu() ?> + +show_breadcrumbs): ?> + breadcrumb_menu($theme, $parents); ?> +
    - -
      - - - -
    • '; ?>">Sidebar Left"; ?>
    • - - - -
    • '; ?>">No Sidebar"; ?>
    • - - - -
    • '; ?>">Sidebar Right"; ?>
    • - -
    - - -
    + sidebar_menu($url) ?> +
    "> album_menu() ?> @@ -141,30 +105,29 @@
    - -' ?> - - -' ?> - + sidebarvisible=="left"): ?> + ' ?> + sidebarvisible=="none"): ?> + + ' ?> + -page_subtype != "login") && ($sidebarvisible != "none")): ?> - - -" : null ?> + page_subtype != "login") and ($theme->page_subtype != "reauthenticate") and ($theme->sidebarvisible != "none")): ?> + + + sidebarvisible != "none")? "
    " : null ?> - -' ?> - -' ?> - -' ?> - + sidebarvisible == "left"): ?> + ' ?> + sidebarvisible == "none"): ?> + ' ?> + + ' ?> + -
    +
    - page_bottom() ?> - - -// -// <bgsound src="/music/collection.m3u"> -// -// -// -// -?> diff --git a/themes/greydragon/views/pager_photo.html.php b/themes/greydragon/views/pager_photo.html.php deleted file mode 100644 index 59326ae5..00000000 --- a/themes/greydragon/views/pager_photo.html.php +++ /dev/null @@ -1,106 +0,0 @@ - - -parent()->children(); - $pagination_msg = t("Photo:") . ' '; - if ($sibling_count < 13) { - - for ($i = 1; $i <= $sibling_count; $i++) { - if ($i == $position) { - $pagination_msg .= '' . t($i) . ''; - } else { - - $pagination_msg .= '' . t($i) . ''; - } - if ($i < $sibling_count) { $pagination_msg .= '·'; }; - } - - } elseif ($position < 9) { - - for ($i = 1; $i <= 10; $i++) { - if ($i == $position) { - $pagination_msg .= '' . t($i) . ''; - } else { - $pagination_msg .= '' . t($i) . ''; - } - if ($i < 10) { $pagination_msg .= '·'; }; - } - - $pagination_msg .= '…'; - $pagination_msg .= '' . t($sibling_count - 1) . ''; - $pagination_msg .= '·'; - $pagination_msg .= '' . t($sibling_count) . ''; - - } elseif ($position > $sibling_count - 8) { - - $pagination_msg .= '' . t(1) . ''; - $pagination_msg .= '·'; - $pagination_msg .= '' . t(2) . ''; - $pagination_msg .= '…'; - - for ($i = $sibling_count - 9; $i <= $sibling_count; $i++) { - if ($i == $position) { - $pagination_msg .= '' . t($i) . ''; - } else { - $pagination_msg .= '' . t($i) . ''; - } - if ($i < $sibling_count) { $pagination_msg .= '·'; }; - } - - } else { - - $pagination_msg .= '' . t(1) . ''; - $pagination_msg .= '·'; - $pagination_msg .= '' . t(2) . ''; - $pagination_msg .= '…'; - - for ($i = $position - 5; $i <= $position + 5; $i++) { - if ($i == $position) { - $pagination_msg .= '' . t($i) . ''; - } else { - $pagination_msg .= '' . t($i) . ''; - } - if ($i < $position + 5) { $pagination_msg .= '·'; }; - } - - $pagination_msg .= '…'; - $pagination_msg .= '' . t($sibling_count - 1) . ''; - $pagination_msg .= '·'; - $pagination_msg .= '' . t($sibling_count) . ''; - } - } -?> - -
      -
    • -
    • - 1): ?> - ">  - -   - - - - ">  - -   - - - - ">  - -   - - - 1) && ($sibling_count > $position)): ?> - ">  - -   - -
    • -
    \ No newline at end of file diff --git a/themes/greydragon/views/paginator.html.php b/themes/greydragon/views/paginator.html.php index e5b2460a..9b5e725e 100644 --- a/themes/greydragon/views/paginator.html.php +++ b/themes/greydragon/views/paginator.html.php @@ -1,4 +1,25 @@ - + parent(); + endif; $current_page = $page; - $total_pages = $max_pages; + $total_pages = $max_pages; // Prepare page url list - for ($i = 1; $i <= $total_pages; $i++) { + for ($i = 1; $i <= $total_pages; $i++): $_pagelist[$i] = url::site(url::merge(array("page" => $i))); - } + endfor; break; case "item": + if ($item): + $parent = $item->parent(); + endif; $current_page = $position; $total_pages = $total; $siblings = $item->parent()->children(); - for ($i = 1; $i <= $total; $i++) { + for ($i = 1; $i <= $total; $i++): $_pagelist[$i] = $siblings[$i-1]->url(); - } + endfor; break; default: $current_page = 1; @@ -55,98 +78,109 @@ break; } - if ($total_pages <= 1) { + if ($total_pages <= 1): $pagination_msg = " "; - } else { + else: $pagination_msg = t("Page:") . ' '; - if ($total_pages < 13) { - for ($i = 1; $i <= $total_pages; $i++) { - if ($i == $current_page) { + if ($total_pages < 13): + for ($i = 1; $i <= $total_pages; $i++): + if ($i == $current_page): $pagination_msg .= '' . t($i) . ''; - } else { - $pagination_msg .= '' . t($i) . ''; - } - if ($i < $total_pages) { $pagination_msg .= '·'; }; - } - } elseif ($current_page < 9) { - for ($i = 1; $i <= 10; $i++) { - if ($i == $current_page) { + else: + $pagination_msg .= '' . t($i) . ''; + endif; + if ($i < $total_pages): + $pagination_msg .= '·'; + endif; + endfor; + elseif ($current_page < 9): + for ($i = 1; $i <= 10; $i++): + if ($i == $current_page): $pagination_msg .= '' . t($i) . ''; - } else { - $pagination_msg .= '' . t($i) . ''; - } - if ($i < 10) { $pagination_msg .= '·'; }; - } + else: + $pagination_msg .= '' . t($i) . ''; + endif; + if ($i < 10): + $pagination_msg .= '·'; + endif; + endfor; $pagination_msg .= '…'; - $pagination_msg .= '' . t($total_pages - 1) . ''; + $pagination_msg .= '' . t($total_pages - 1) . ''; $pagination_msg .= '·'; - $pagination_msg .= '' . t($total_pages) . ''; + $pagination_msg .= '' . t($total_pages) . ''; - } elseif ($current_page > $total_pages - 8) { - - $pagination_msg .= '' . t(1) . ''; + elseif ($current_page > $total_pages - 8): + $pagination_msg .= '' . t(1) . ''; $pagination_msg .= '·'; - $pagination_msg .= '' . t(2) . ''; + $pagination_msg .= '' . t(2) . ''; $pagination_msg .= '…'; - for ($i = $total_pages - 9; $i <= $total_pages; $i++) { - if ($i == $current_page) { + for ($i = $total_pages - 9; $i <= $total_pages; $i++): + if ($i == $current_page): $pagination_msg .= '' . t($i) . ''; - } else { - $pagination_msg .= '' . t($i) . ''; - } - if ($i < $total_pages) { $pagination_msg .= '·'; }; - } + else: + $pagination_msg .= '' . t($i) . ''; + endif; + if ($i < $total_pages): + $pagination_msg .= '·'; + endif; + endfor; - } else { - - $pagination_msg .= '' . t(1) . ''; + else: + $pagination_msg .= '' . t(1) . ''; $pagination_msg .= '·'; - $pagination_msg .= '' . t(2) . ''; + $pagination_msg .= '' . t(2) . ''; $pagination_msg .= '…'; - for ($i = $current_page - 5; $i <= $current_page + 5; $i++) { - if ($i == $current_page) { + for ($i = $current_page - 5; $i <= $current_page + 5; $i++): + if ($i == $current_page): $pagination_msg .= '' . t($i) . ''; - } else { - $pagination_msg .= '' . t($i) . ''; - } - if ($i < $current_page + 5) { $pagination_msg .= '·'; }; - } + else: + $pagination_msg .= '' . t($i) . ''; + endif; + if ($i < $current_page + 5): + $pagination_msg .= '·'; + endif; + endfor; $pagination_msg .= '…'; - $pagination_msg .= '' . t($total_pages - 1) . ''; + $pagination_msg .= '' . t($total_pages - 1) . ''; $pagination_msg .= '·'; - $pagination_msg .= '' . t($total_pages) . ''; - } - } + $pagination_msg .= '' . t($total_pages) . ''; + endif; + endif; ?> '; ?> + + +
    + bb2html(html::purify($item->title), 1); ?> +
    +

    +
    + add_paginator("top"); ?> + photo_top() ?> + photo_descmode == "top") and ($_description)): ?> +
    + +
    + resize_top($item) ?> + + file_url() . '" class="g-sb-preview" '; ?> + + + + resize_width; ?> + parent()->children(); ?> + +
    + rand_key != $item->rand_key)); $i++): + ?> + "> + resize_img(array("id" => "g-photo-id-{$item->id}", "class" => "g-resize", "alt" => $_title)) ?> + + + photo_descmode == "overlay") and ($_description)): ?> + More + + + + + +
    + resize_bottom($item) ?> +
    + photo_descmode == "bottom") and ($_description)): ?> +
    + + add_paginator("bottom"); ?> + photo_bottom() ?> +
    diff --git a/themes/greydragon/views/search.html.php b/themes/greydragon/views/search.html.php index d8045c7d..94fc170c 100644 --- a/themes/greydragon/views/search.html.php +++ b/themes/greydragon/views/search.html.php @@ -1,37 +1,43 @@ - - +

    $q)) ?>

    - -paginator() ?> - - + add_paginator("top"); ?>
      - - is_album()): ?> - - -
    • -

      - thumb_img() ?> -

      -

      title) ?>

      -
    • + is_album() ? "g-album" : "g-photo" ?> + "> ?> + get_thumb_element($item) ?> + ?>
    - - -paginator() ?> - - + add_paginator("bottom"); ?>

     

    %term", array("term" => $q)) ?>

    -
    - +
    \ No newline at end of file diff --git a/themes/greydragon/views/sidebar.html.php b/themes/greydragon/views/sidebar.html.php index da75de54..0cad333d 100644 --- a/themes/greydragon/views/sidebar.html.php +++ b/themes/greydragon/views/sidebar.html.php @@ -1,5 +1,8 @@ - -sidebar_top() ?> -
     
    -sidebar_blocks() ?> -sidebar_bottom() ?> + + +sidebar_top() ?> +
     
    +page_subtype == "album") or ($theme->page_subtype == "photo") or ($theme->page_subtype == "movie") or ($theme->item())): ?> +sidebar_blocks() ?> + +sidebar_bottom() ?> diff --git a/themes/greydragon/views/support/bbtohtml.php b/themes/greydragon/views/support/bbtohtml.php deleted file mode 100644 index c18faf4e..00000000 --- a/themes/greydragon/views/support/bbtohtml.php +++ /dev/null @@ -1,63 +0,0 @@ - "$1", - "#\\[i\\](.*?)\\[/i\\]#" => "$1", - "#\\[u\\](.*?)\\[/u\\]#" => "$1", - "#\\[s\\](.*?)\\[/s\\]#" => "$1", - "#\\[o\\](.*?)\\[/o\\]#" => "$1", - "#\\[url\\](.*?)\[/url\\]#" => "$1", - "#\\[url=(.*?)\\](.*?)\[/url\\]#" => "$2", - "#\\[mail=(.*?)\\](.*?)\[/mail\\]#" => "$2", - "#\\[img\\](.*?)\\[/img\\]#" => "\"\"", - "#\\[img=(.*?)\\](.*?)\[/img\\]#" => "\"$2\"", - "#\\[quote\\](.*?)\\[/quote\\]#" => "

    $1

    ", - "#\\[code\\](.*?)\\[/code\\]#" => "
    $1
    ", - "#\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]#" => "$2", - "#\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]#" => "$2", - "#\\[class=([^\\[]*)\\]([^\\[]*)\\[/class\\]#" => "$2", - "#\\[center\\](.*?)\\[/center\\]#" => "
    $1
    ", - "#\\[list\\](.*?)\\[/list\\]#" => "
      $1
    ", - "#\\[ul\\](.*?)\\[/ul\\]#" => "
      $1
    ", - "#\\[li\\](.*?)\\[/li\\]#" => "
  • $1
  • ", - ); - - // Replace any html brackets with HTML Entities to prevent executing HTML or script - // Don't use strip_tags here because it breaks [url] search by replacing & with amp - if ($mixmode == 1) - { - $newtext = str_replace("<", "<", $text); - $newtext = str_replace(">", ">", $newtext); - $newtext = str_replace(""", "\"", $newtext); - } else { - $newtext = str_replace("<", "<", $text); - $newtext = str_replace(">", ">", $newtext); - $newtext = str_replace("&quot;", """, $newtext); - } - - // Convert new line chars to html
    tags - $newtext = nl2br($newtext); - - if (strpos($text, "[") !== false) { - $newtext = preg_replace(array_keys($bbcode_mappings), array_values($bbcode_mappings), $newtext); - } - - return stripslashes($newtext); //stops slashing, useful when pulling from db -} - -?> \ No newline at end of file diff --git a/themes/greydragon/views/support/pagination.php b/themes/greydragon/views/support/pagination.php deleted file mode 100644 index e69de29b..00000000 diff --git a/themes/greydragon/views/tag_block.html.php b/themes/greydragon/views/tag_block.html.php index 6cb8acb9..f9bc5886 100644 --- a/themes/greydragon/views/tag_block.html.php +++ b/themes/greydragon/views/tag_block.html.php @@ -6,9 +6,19 @@ url, { max: 30, multiple: true, - multipleSeparator: ',', - cacheLength: 1} + multipleSeparator: ',', + cacheLength: 1} ); + + $("#g-add-tag-form").ajaxForm({ + dataType: "json", + success: function(data) { + if (data.result == "success") { + $("#g-tag-cloud").html(data.cloud); + } + $("#g-add-tag-form").resetForm(); + } + }); });
    "> diff --git a/themes/greydragon/views/user_profile.html.php b/themes/greydragon/views/user_profile.html.php new file mode 100644 index 00000000..b7d92f40 --- /dev/null +++ b/themes/greydragon/views/user_profile.html.php @@ -0,0 +1,50 @@ + + + +
    +

    $user->display_name())) ?>

    + + + + " + alt="display_name()) ?>" + class="g-avatar g-left" width="40" height="40" /> + + + +
    +

    title) ?>

    +
    + view ?> +
    +
    + +
    From d01599c1c172934b0fdc79ee3249b46420424441 Mon Sep 17 00:00:00 2001 From: Thomas Bleher Date: Mon, 30 Aug 2010 03:35:18 +0800 Subject: [PATCH 34/55] Add IPTC module Taken from http://gallery.menalto.com/node/95875 (file http://gallery.menalto.com/files/iptc_0.zip) Author: gcog (I just imported it into Git unchanged) --- modules/iptc/controllers/admin_iptc.php | 84 ++++++++++ modules/iptc/helpers/iptc.php | 207 ++++++++++++++++++++++++ modules/iptc/helpers/iptc_block.php | 43 +++++ modules/iptc/helpers/iptc_event.php | 42 +++++ modules/iptc/helpers/iptc_installer.php | 46 ++++++ modules/iptc/helpers/iptc_task.php | 88 ++++++++++ modules/iptc/lib/functions.php | 97 +++++++++++ modules/iptc/models/iptc_key.php | 21 +++ modules/iptc/models/iptc_record.php | 21 +++ modules/iptc/module.info | 3 + modules/iptc/views/admin_iptc.html.php | 7 + modules/iptc/views/iptc_block.html.php | 9 ++ 12 files changed, 668 insertions(+) create mode 100644 modules/iptc/controllers/admin_iptc.php create mode 100644 modules/iptc/helpers/iptc.php create mode 100644 modules/iptc/helpers/iptc_block.php create mode 100644 modules/iptc/helpers/iptc_event.php create mode 100644 modules/iptc/helpers/iptc_installer.php create mode 100644 modules/iptc/helpers/iptc_task.php create mode 100644 modules/iptc/lib/functions.php create mode 100644 modules/iptc/models/iptc_key.php create mode 100644 modules/iptc/models/iptc_record.php create mode 100644 modules/iptc/module.info create mode 100644 modules/iptc/views/admin_iptc.html.php create mode 100644 modules/iptc/views/iptc_block.html.php diff --git a/modules/iptc/controllers/admin_iptc.php b/modules/iptc/controllers/admin_iptc.php new file mode 100644 index 00000000..dd803951 --- /dev/null +++ b/modules/iptc/controllers/admin_iptc.php @@ -0,0 +1,84 @@ +content = new View("admin_iptc.html"); + $view->content->iptc_form = $this->_get_admin_form(); + print $view; + } + + public function saveprefs() { + // Save user preferences to the database. + + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Make sure the user filled out the form properly. + $form = $this->_get_admin_form(); + if ($form->validate()) { + Kohana_Log::add("error",print_r($form,1)); + + // Save settings to Gallery's database. + foreach (iptc::keys() as $keyword => $iptcvar) { + $checkbox = false; + for ($i = 0; $i < count($form->Global->$keyword); $i++) { + if ($form->Global->$keyword->value[$i] == $keyword) { + $checkbox = true; + } + } + module::set_var("iptc", "show_".$keyword, $checkbox); + } + // Display a success message and redirect back to the TagsMap admin page. + message::success(t("Your settings have been saved.")); + url::redirect("admin/iptc"); + } + + // Else show the page with errors + $view = new Admin_View("admin.html"); + $view->content = new View("admin_iptc.html"); + $view->content->iptc_form = $form; + print $view; + } + + private function _get_admin_form() { + // Make a new Form. + $form = new Forge("admin/iptc/saveprefs", "", "post", array("id" => "g-iptc-adminForm")); + + // Create group for display settings + $iptc_display_group = $form->group("Global") + ->label(t("Display Settings")); + + $show = t("Show"); + foreach (iptc::keys() as $keyword => $iptcvar) { + unset($checkbox); + $checkbox[$keyword] = array($show." \"".$iptcvar[1]."\" ?", module::get_var("iptc", "show_".$keyword)); + $iptc_display_group->checklist($keyword) + ->options($checkbox); + } + // Add a save button to the form. + $form->submit("SaveSettings")->value(t("Save")); + + // Return the newly generated form. + return $form; + } +} diff --git a/modules/iptc/helpers/iptc.php b/modules/iptc/helpers/iptc.php new file mode 100644 index 00000000..cca0f61f --- /dev/null +++ b/modules/iptc/helpers/iptc.php @@ -0,0 +1,207 @@ +is_photo() && $item->mime_type == "image/jpeg") { + $info = getJpegHeader($item->file_path()); + if ($info !== FALSE) { + $iptcBlock = getIptcBlock($info); + if ($iptcBlock !== FALSE) { + $iptc = iptcparse($iptcBlock); + } else { + $iptc = array(); + } + $xmp = getXmpDom($info); + + foreach (self::keys() as $keyword => $iptcvar) { + $iptc_key = $iptcvar[0]; + $xpath = $iptcvar[2]; + $value = null; + if ($xpath != null) { + $value = getXmpValue($xmp, $xpath); + } + if ($value == null) { + if (!empty($iptc[$iptc_key])) { + $value = implode(";", $iptc[$iptc_key]); + if (function_exists("mb_detect_encoding") && mb_detect_encoding($value) != "UTF-8") { + $value = utf8_encode($value); + } + } + } + if ($value != null) { + $keys[$keyword] = Input::clean($value); + } + } + } + } + + $record = ORM::factory("iptc_record")->where("item_id", "=", $item->id)->find(); + if (!$record->loaded()) { + $record->item_id = $item->id; + } + $record->data = serialize($keys); + $record->key_count = count($keys); + $record->dirty = 0; + $record->save(); + } + + static function get($item) { + $iptc = array(); + $record = ORM::factory("iptc_record") + ->where("item_id", "=", $item->id) + ->find(); + if (!$record->loaded()) { + return array(); + } + + $definitions = self::keys(); + $keys = unserialize($record->data); + foreach ($keys as $key => $value) { + if (module::get_var("iptc", "show_".$key) == 1) + $iptc[] = array("caption" => $definitions[$key][1], "value" => $value); + } + + return $iptc; + } + + + public static function keys() { + if (!isset(self::$iptc_keys)) { + self::$iptc_keys = array( + "ObjectName" => array("2#005", + t("IPTC Object Name"), + "/x:xmpmeta/rdf:RDF/rdf:Description/dc:title/rdf:Alt/rdf:li" ), + "EditStatus" => array("2#007", + t("IPTC Edit Status"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@mediapro:Status" ), + "Category" => array("2#015", + t("IPTC Category"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Category" ), + "SupplementalCategories" => array("2#020", + t("IPTC Categories"), + "/x:xmpmeta/rdf:RDF/rdf:Description/photoshop:SupplementalCategories/rdf:Bag/rdf:li" ), + "FixtureIdentifier" => array("2#022", + t("IPTC Identifier"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@mediapro:Event" ), + "Keywords" => array("2#025", + t("IPTC Keywords"), + "/x:xmpmeta/rdf:RDF/rdf:Description/dc:subject/rdf:Bag/rdf:li" ), + "LocationCode" => array("2#026", + t("IPTC Location Code"), + null ), + "SpecialInstructions" => array("2#040", + t("IPTC Instructions"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Instructions" ), + "DateCreated" => array("2#055", + t("IPTC Created Date"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:DateCreated" ), + "ByLine" => array("2#080", + t("IPTC Author"), + "/x:xmpmeta/rdf:RDF/rdf:Description/dc:creator/rdf:Seq/rdf:li" ), + "ByLineTitle" => array("2#085", + t("IPTC Author Title"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:AuthorsPosition" ), + "City" => array("2#090", + t("IPTC City"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:City" ), + "SubLocation" => array("2#092", + t("IPTC SubLocation"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@Iptc4xmpCore:Location | /x:xmpmeta/rdf:RDF/rdf:Description/@mediapro:Location" ), + "ProvinceState" => array("2#095", + t("IPTC Province State"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:State" ), + "CountryCode" => array("2#100", + t("IPTC Country Code"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@Iptc4xmpCore:CountryCode" ), + "CountryName" => array("2#101", + t("IPTC Country Name"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Country" ), + "Transmission" => array("2#103", + t("IPTC Transmission,"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:TransmissionReference" ), + "HeadLine" => array("2#105", + t("IPTC HeadLine"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Headline" ), + "Credit" => array("2#110", + t("IPTC Credit"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Credit | /x:xmpmeta/rdf:RDF/rdf:Description/photoshop:Credit" ), + "Source" => array("2#115", + t("IPTC Source"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:Source" ), + "Copyright" => array("2#116", + t("IPTC Copyright"), + "/x:xmpmeta/rdf:RDF/rdf:Description/dc:rights/rdf:Alt/rdf:li" ), + "Contacts" => array("2#118", + t("IPTC Contacts"), + "/x:xmpmeta/rdf:RDF/rdf:Description/mediapro:People/rdf:Bag/rdf:li" ), + "Caption" => array("2#120", + t("IPTC Caption"), + "/x:xmpmeta/rdf:RDF/rdf:Description/dc:description/rdf:Alt/rdf:li" ), + "Redactor" => array("2#122", + t("IPTC Redactor"), + "/x:xmpmeta/rdf:RDF/rdf:Description/@photoshop:CaptionWriter" ) + ); + } + return self::$iptc_keys; + } + + + static function stats() { + $missing_iptc = db::build() + ->select("items.id") + ->from("items") + ->join("iptc_records", "items.id", "iptc_records.item_id", "left") + ->where("type", "=", "photo") + ->and_open() + ->where("iptc_records.item_id", "IS", null) + ->or_where("iptc_records.dirty", "=", 1) + ->close() + ->execute() + ->count(); + + $total_items = ORM::factory("item")->where("type", "=", "photo")->count_all(); + if (!$total_items) { + return array(0, 0, 0); + } + return array($missing_iptc, $total_items, + round(100 * (($total_items - $missing_iptc) / $total_items))); + } + + static function check_index() { + list ($remaining) = iptc::stats(); + if ($remaining) { + site_status::warning( + t('Your Iptc index needs to be updated. Fix this now', + array("url" => html::mark_clean(url::site("admin/maintenance/start/iptc_task::update_index?csrf=__CSRF__")))), + "iptc_index_out_of_date"); + } + } +} diff --git a/modules/iptc/helpers/iptc_block.php b/modules/iptc/helpers/iptc_block.php new file mode 100644 index 00000000..1a6ed955 --- /dev/null +++ b/modules/iptc/helpers/iptc_block.php @@ -0,0 +1,43 @@ + t("IPTC info")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "iptc": + if ($theme->item()) { + $details = iptc::get($theme->item()); + if (count($details) > 0) { + $block = new Block(); + $block->css_id = "g-metadata"; + $block->title = t("IPTC info"); + $block->content = new View("iptc_block.html"); + $block->content->details = $details; + } + } + break; + } + return $block; + } +} \ No newline at end of file diff --git a/modules/iptc/helpers/iptc_event.php b/modules/iptc/helpers/iptc_event.php new file mode 100644 index 00000000..c7b4a6cc --- /dev/null +++ b/modules/iptc/helpers/iptc_event.php @@ -0,0 +1,42 @@ +is_photo()) { + iptc::extract($item); + } + } + + static function item_deleted($item) { + db::build() + ->delete("iptc_records") + ->where("item_id", "=", $item->id) + ->execute(); + } + + static function admin_menu($menu, $theme) { + // Add a link to the admin page to the Settings menu. + $menu->get("settings_menu") + ->append(Menu::factory("link") + ->id("iptc") + ->label(t("IPTC Settings")) + ->url(url::site("admin/iptc"))); + } +} diff --git a/modules/iptc/helpers/iptc_installer.php b/modules/iptc/helpers/iptc_installer.php new file mode 100644 index 00000000..11a17a56 --- /dev/null +++ b/modules/iptc/helpers/iptc_installer.php @@ -0,0 +1,46 @@ +query("CREATE TABLE IF NOT EXISTS {iptc_records} ( + `id` int(9) NOT NULL auto_increment, + `item_id` INTEGER(9) NOT NULL, + `key_count` INTEGER(9) default 0, + `data` TEXT, + `dirty` BOOLEAN default 1, + PRIMARY KEY (`id`), + KEY(`item_id`)) + DEFAULT CHARSET=utf8;"); + module::set_version("iptc", 1); + } + + static function activate() { + iptc::check_index(); + } + + static function deactivate() { + site_status::clear("iptc_index_out_of_date"); + } + + static function uninstall() { + Database::instance()->query("DROP TABLE IF EXISTS {iptc_records};"); + } +} diff --git a/modules/iptc/helpers/iptc_task.php b/modules/iptc/helpers/iptc_task.php new file mode 100644 index 00000000..d4715bff --- /dev/null +++ b/modules/iptc/helpers/iptc_task.php @@ -0,0 +1,88 @@ +delete("iptc_records") + ->where("item_id", "NOT IN", + db::build()->select("id")->from("items")->where("type", "=", "photo")) + ->execute(); + + list ($remaining, $total, $percent) = iptc::stats(); + return array(Task_Definition::factory() + ->callback("iptc_task::update_index") + ->name(t("Extract Iptc data")) + ->description($remaining + ? t2("1 photo needs to be scanned", + "%count (%percent%) of your photos need to be scanned", + $remaining, array("percent" => (100 - $percent))) + : t("IPTC data is up-to-date")) + ->severity($remaining ? log::WARNING : log::SUCCESS)); + } + + static function update_index($task) { + try { + $completed = $task->get("completed", 0); + + $start = microtime(true); + foreach (ORM::factory("item") + ->join("iptc_records", "items.id", "iptc_records.item_id", "left") + ->where("type", "=", "photo") + ->and_open() + ->where("iptc_records.item_id", "IS", null) + ->or_where("iptc_records.dirty", "=", 1) + ->close() + ->find_all() as $item) { + // The query above can take a long time, so start the timer after its done + // to give ourselves a little time to actually process rows. + if (!isset($start)) { + $start = microtime(true); + } + + iptc::extract($item); + $completed++; + + if (microtime(true) - $start > 1.5) { + break; + } + } + + list ($remaining, $total, $percent) = iptc::stats(); + $task->set("completed", $completed); + if ($remaining == 0 || !($remaining + $completed)) { + $task->done = true; + $task->state = "success"; + site_status::clear("iptc_index_out_of_date"); + $task->percent_complete = 100; + } else { + $task->percent_complete = round(100 * $completed / ($remaining + $completed)); + } + $task->status = t2("one record updated, index is %percent% up-to-date", + "%count records updated, index is %percent% up-to-date", + $completed, array("percent" => $percent)); + } catch (Exception $e) { + $task->done = true; + $task->state = "error"; + $task->status = $e->getMessage(); + $task->log((string)$e); + } + } +} diff --git a/modules/iptc/lib/functions.php b/modules/iptc/lib/functions.php new file mode 100644 index 00000000..91ca129f --- /dev/null +++ b/modules/iptc/lib/functions.php @@ -0,0 +1,97 @@ + 0xD7) { + $size = fread($file, 2); + if ($size === FALSE) { + fclose($file); + return $result; + } + $sizeOfSegment = unpack("nV", $size); + $data = fread($file, $sizeOfSegment['V']-2); + if ($data === FALSE) { + fclose($file); + return $result; + } + if ($result === FALSE) + unset($result); + $result[] = array("type" => $typeOfSegment, "data" => $data); // Multiple segments can have the same type like Exif and XMP + } + } while (!feof($file)); + fclose($file); + return $result; +} + + +function getIptcBlock($jpegHeader) +{ + for ($i = 0; $i < count($jpegHeader); $i++) { + if ($jpegHeader[$i]['type'] == 0xED) { + if (strncmp($jpegHeader[$i]['data'], "Photoshop 3.0\x00", 14) == 0) { + return $jpegHeader[$i]['data']; + } + } + } + return FALSE; +} + + +function getXmpDom($jpegHeader) +{ + for ($i = 0; $i < count($jpegHeader); $i++) { + if ($jpegHeader[$i]['type'] == 0xE1) { + if (strncmp($jpegHeader[$i]['data'], "http://ns.adobe.com/xap/1.0/\x00", 29) == 0) { + $xmlstr = substr($jpegHeader[$i]['data'], 29); + $doc = new DOMDocument(); + $doc->loadXML($xmlstr); + return $doc; + } + } + } + return FALSE; +} + + +function getXmpValue($dom, $xpathQuery) +{ + if ($dom === FALSE) + return null; + $xpath = new DOMXPath($dom); + $xpath->registerNamespace('rdf', "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); + $xpath->registerNamespace('photoshop', "http://ns.adobe.com/photoshop/1.0/"); + $xpath->registerNamespace('Iptc4xmpCore', "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"); + $xpath->registerNamespace('dc', "http://purl.org/dc/elements/1.1/"); + $xpath->registerNamespace('mediapro', "http://ns.iview-multimedia.com/mediapro/1.0/"); + $nodeList = $xpath->query($xpathQuery); + $result = ""; + foreach ($nodeList as $node) { + if (!empty($result)) + $result .= ';'; + $result .= $node->nodeValue; + } + return $result; +} + diff --git a/modules/iptc/models/iptc_key.php b/modules/iptc/models/iptc_key.php new file mode 100644 index 00000000..fadcb37b --- /dev/null +++ b/modules/iptc/models/iptc_key.php @@ -0,0 +1,21 @@ + +
    +

    +
    + +
    +
    diff --git a/modules/iptc/views/iptc_block.html.php b/modules/iptc/views/iptc_block.html.php new file mode 100644 index 00000000..c446935a --- /dev/null +++ b/modules/iptc/views/iptc_block.html.php @@ -0,0 +1,9 @@ + + From b427805a69944f0c46dff96e34d3c0c0631c3a3a Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Sun, 29 Aug 2010 22:03:02 +0800 Subject: [PATCH 35/55] Merge remote branch 'gallery3-contrib/master' --- themes/browny_wind/css/fix-ie.css | 23 +++++++++++++++++++++-- themes/browny_wind/css/screen.css | 26 ++++++++++++++++++++++++++ themes/browny_wind/views/page.html.php | 2 +- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/themes/browny_wind/css/fix-ie.css b/themes/browny_wind/css/fix-ie.css index f7f08486..0633ff07 100644 --- a/themes/browny_wind/css/fix-ie.css +++ b/themes/browny_wind/css/fix-ie.css @@ -1,5 +1,5 @@ /** - * Fix display in IE 6, 7 + * Fix display in IE 6, 7, and 8 */ #g-banner { @@ -7,6 +7,10 @@ zoom: 1; } +#g-sidebar { + overflow: hidden; +} + #g-photo, #g-movie { zoom: 1; @@ -22,8 +26,23 @@ input.submit { display: inline !important; } +.g-short-form input.text, +.g-short-form input.submit { + font-size: 1em; + line-height: 1em; + padding: .38em .3em; +} + +#g-search-form input#q { + width: 300px; +} + #g-add-tag-form input.textbox { - width: 110px; + width: 110px !important; +} + +#g-add-tag-form input[type='submit'] { + padding: .3em 0 !important; } #g-dialog .g-cancel { diff --git a/themes/browny_wind/css/screen.css b/themes/browny_wind/css/screen.css index 3e16f6a6..15c04991 100644 --- a/themes/browny_wind/css/screen.css +++ b/themes/browny_wind/css/screen.css @@ -329,6 +329,32 @@ td { background-color: #fff; } +/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#g-edit-permissions-form td { + background-image: none; +} + +#g-edit-permissions-form fieldset { + border: 1px solid #ccc; +} + +#g-permissions .g-denied { + background-color: #fcc; +} + +#g-permissions .g-allowed { + background-color: #fcf9ce; +} + +#g-permissions .g-breadcrumbs a { + border: 1px solid #fff; +} + +#g-permissions .g-active a { + border: 1px solid #ddd; + background: #eee; +} + /** ******************************************************************* * 5) Navigation and menus *********************************************************************/ diff --git a/themes/browny_wind/views/page.html.php b/themes/browny_wind/views/page.html.php index ca29a809..72df044a 100644 --- a/themes/browny_wind/views/page.html.php +++ b/themes/browny_wind/views/page.html.php @@ -29,7 +29,7 @@ css("themeroller/ui.base.css") ?> css("gallery.common.css") ?> css("screen.css") ?> - From 6dfad7e9cd1e84e06705d48af0346d9d371a5eaf Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Mon, 30 Aug 2010 13:09:23 +1200 Subject: [PATCH 36/55] - Paypal IPN and order tracking. There are 3 statuses for an order 1. Awaiting Payment (red) - this will stay awaiting payment until either the admin confirms payment or paypal sends it IPN message to confirm that CC payment was successfull. 2. Payment Confirmed (green) - this means payment has been received but the item hasn't been posted. To mark as completed you will need to view the order and click "confirm order delivery" 3. completed. These aren't shown on the view orders but the order can still be viewed by typing in the order number. - Side bar integration, Basket contents appears on the sidebar. --- .../basket/controllers/admin_configure.php | 118 ++++++- .../controllers/admin_postage_bands.php | 35 +- .../controllers/admin_product_lines.php | 35 +- modules/basket/controllers/basket.php | 303 +++++++++++++--- modules/basket/css/basket.css | 16 +- modules/basket/helpers/basket.php | 311 ++++++++++++++--- modules/basket/helpers/basket_block.php | 21 ++ modules/basket/helpers/basket_event.php | 30 +- modules/basket/helpers/basket_installer.php | 125 ++++++- modules/basket/helpers/basket_theme.php | 22 +- modules/basket/helpers/postage_band.php | 6 +- modules/basket/helpers/product.php | 56 +-- modules/basket/libraries/Paypal.php | 330 ++++++++++++++++++ modules/basket/libraries/Session_Basket.php | 20 +- modules/basket/models/ipn_message.php | 16 + modules/basket/models/order.php | 56 +++ modules/basket/module.info | 2 +- modules/basket/views/add_to_basket.html.php | 7 +- .../basket/views/add_to_basket_ajax.html.php | 2 +- modules/basket/views/admin_configure.html.php | 11 +- .../basket/views/admin_postage_bands.html.php | 21 +- .../basket/views/admin_product_lines.html.php | 16 +- modules/basket/views/admin_templates.html.php | 8 + modules/basket/views/basket-side-bar.html.php | 42 +++ modules/basket/views/basket.html.php | 5 + modules/basket/views/checkout.html.php | 38 +- modules/basket/views/confirm_order.html.php | 17 +- modules/basket/views/order_complete.html.php | 10 +- modules/basket/views/paypal_redirect.html.php | 4 + modules/basket/views/pew1.html.php | 16 + modules/basket/views/pew2.html.php | 17 + modules/basket/views/print_order.html.php | 20 ++ modules/basket/views/view_basket.html.php | 100 +++--- modules/basket/views/view_ipn.html.php | 46 +++ modules/basket/views/view_order.html.php | 18 + modules/basket/views/view_orders.html.php | 67 ++++ 36 files changed, 1696 insertions(+), 271 deletions(-) create mode 100644 modules/basket/helpers/basket_block.php create mode 100644 modules/basket/libraries/Paypal.php create mode 100644 modules/basket/models/ipn_message.php create mode 100644 modules/basket/models/order.php create mode 100644 modules/basket/views/admin_templates.html.php create mode 100644 modules/basket/views/basket-side-bar.html.php create mode 100644 modules/basket/views/paypal_redirect.html.php create mode 100644 modules/basket/views/pew1.html.php create mode 100644 modules/basket/views/pew2.html.php create mode 100644 modules/basket/views/print_order.html.php create mode 100644 modules/basket/views/view_ipn.html.php create mode 100644 modules/basket/views/view_order.html.php create mode 100644 modules/basket/views/view_orders.html.php diff --git a/modules/basket/controllers/admin_configure.php b/modules/basket/controllers/admin_configure.php index 58a246ea..7831734d 100644 --- a/modules/basket/controllers/admin_configure.php +++ b/modules/basket/controllers/admin_configure.php @@ -27,14 +27,12 @@ class Admin_Configure_Controller extends Controller { $form = basket::get_configure_form(); if (request::method() == "post") { - // @todo move the "save" part of this into a separate controller function access::verify_csrf(); if ($form->validate()) { basket::extractForm($form); message::success(t("Basket Module Configured!")); - //url::redirect("admin/recaptcha"); } } else @@ -45,11 +43,121 @@ class Admin_Configure_Controller extends Controller $view = new Admin_View("admin.html"); $view->content = new View("admin_configure.html"); - - $view->content->form = $form; - //$view->content->products = ORM::factory("product")->orderby("name")->find_all(); print $view; } + + /** + * the index page of the user homes admin + */ + public function templates() + { + $form = basket::get_template_form(); + if (request::method() == "post") { + access::verify_csrf(); + + if ($form->validate()) { + + basket::extractTemplateForm($form); + message::success(t("Basket Module Configured!")); + } + } + else + { + basket::populateTemplateForm($form); + } + + $view = new Admin_View("admin.html"); + $view->content = new View("admin_templates.html"); + + $view->content->form = $form; + + print $view; + } + + public function paypal_encrypt_wizard_step1() + { + $view = new Admin_View("admin.html"); + $view->content = new View("pew1.html"); + + $view->content->form = self::keyGenerationForm(); + + print $view; + + } + + public function paypal_encrypt_wizard_step2() + { + access::verify_csrf(); + + $form = self::keyGenerationForm(); + + if (!$form->validate()) { + + self::paypal_encrypt_wizard_step1(); + return; + } + + $ssldir = str_replace('\\','/',VARPATH.'certificate'); + $ssldir= rtrim($ssldir, '/').'/'; + + if ( ! is_dir($ssldir)) + { + // Create the upload directory + mkdir($ssldir, 0777, TRUE); + } + + $prkeyfile = $ssldir . "myprvkey.pem"; + $pubcertfile = $ssldir . "mypubcert.pem"; + $certreqfile = $ssldir . "mycertreq.pem"; + + $dn = array("countryName" => $form->encrypt->countryName->value, + "stateOrProvinceName" => $form->encrypt->stateOrProvinceName->value, + "localityName" => $form->encrypt->localityName->value, + "organizationName" => $form->encrypt->organizationName->value, + "organizationalUnitName" => $form->encrypt->organizationalUnitName->value, + "commonName" => $form->encrypt->commonName->value, + "emailAddress" => $form->encrypt->emailAddress->value); + $privkeypass = $form->encrypt->privKeyPass->value; + $numberofdays = 365; + $config = array( + "private_key_bits" => 1024 + ); + + $privkey = openssl_pkey_new($config); + $csr = openssl_csr_new($dn, $privkey); + $sscert = openssl_csr_sign($csr, null, $privkey, $numberofdays); + openssl_x509_export($sscert, $publickey); + openssl_pkey_export($privkey, $privatekey, $privkeypass); + openssl_csr_export($csr, $csrStr); + + openssl_x509_export_to_file($sscert, $pubcertfile); + openssl_pkey_export_to_file ($privkey, $prkeyfile, $privkeypass); + openssl_csr_export_to_file($csr, $certreqfile); + + //echo "Your Public Certificate has been saved to " . $pubcertfile . "

    "; + //echo "Your Private Key has been saved to " . $prkeyfile . "

    "; + //echo "Your Certificate Request has been saved to " . $certreqfile . "

    "; + + //echo $privatekey; // Will hold the exported PriKey + //echo $publickey; // Will hold the exported PubKey + //echo $csrStr; // Will hold the exported Certificate + } + + private function keyGenerationForm() + { + $form = new Forge("admin/configure/paypal_encrypt_wizard_step2", "", "post", array("id" => "generateKeys", "name" =>"generateKeys")); + $group = $form->group("encrypt")->label(t("Key Generation Details")); + $group->input("countryName")->label(t("Country Name"))->id("countryName"); + $group->input("stateOrProvinceName")->label(t("State or Province Name"))->id("stateOrProvinceName"); + $group->input("localityName")->label(t("Locality Name"))->id("localityName"); + $group->input("organizationName")->label(t("Organization Name"))->id("organizationName"); + $group->input("organizationalUnitName")->label(t("Organizational Unit Name"))->id("organizationalUnitName"); + $group->input("commonName")->label(t("Common Name"))->id("commonName"); + $group->input("emailAddress")->label(t("E-Mail Address"))->id("emailAddress"); + $group->input("privKeyPass")->label(t("Private Key Pass"))->id("privkeypass"); + return $form; + } + } diff --git a/modules/basket/controllers/admin_postage_bands.php b/modules/basket/controllers/admin_postage_bands.php index f843d0ca..535ad4ed 100644 --- a/modules/basket/controllers/admin_postage_bands.php +++ b/modules/basket/controllers/admin_postage_bands.php @@ -27,7 +27,7 @@ class Admin_Postage_Bands_Controller extends Controller { $view = new Admin_View("admin.html"); $view->content = new View("admin_postage_bands.html"); - $view->content->postage_bands = ORM::factory("postage_band")->orderby("name")->find_all(); + $view->content->postage_bands = ORM::factory("postage_band")->order_by("name")->find_all(); print $view; } @@ -43,8 +43,8 @@ class Admin_Postage_Bands_Controller extends Controller $form = postage_band::get_add_form_admin(); $valid = $form->validate(); $name = $form->add_postage->inputs["name"]->value; - $postage = ORM::factory("postage_band")->where("name", $name)->find(); - if ($postage->loaded) { + $postage = ORM::factory("postage_band")->where("name","=", $name)->find(); + if ($postage->loaded()) { $form->add_postage->inputs["name"]->add_error("in_use", 1); $valid = false; } @@ -59,16 +59,15 @@ class Admin_Postage_Bands_Controller extends Controller $postage->save(); message::success(t("Created postage band %postage_name", array( "postage_name" => html::clean($postage->name)))); - print json_encode(array("result" => "success")); + print json::reply(array("result" => "success")); } else { - print json_encode(array("result" => "error", - "form" => $form->__toString())); + print $form; } } public function delete_postage_band_form($id) { $postage = ORM::factory("postage_band", $id); - if (!$postage->loaded) { + if (!$postage->loaded()) { kohana::show_404(); } print postage_band::get_delete_form_admin($postage); @@ -82,7 +81,7 @@ class Admin_Postage_Bands_Controller extends Controller } $postage = ORM::factory("postage_band", $id); - if (!$postage->loaded) { + if (!$postage->loaded()) { kohana::show_404(); } @@ -91,21 +90,20 @@ class Admin_Postage_Bands_Controller extends Controller $name = $postage->name; $postage->delete(); } else { - print json_encode(array("result" => "error", - "form" => $form->__toString())); + print $form; } $message = t("Deleted user %postage_band", array("postage_band" => html::clean($name))); log::success("user", $message); message::success($message); - print json_encode(array("result" => "success")); + print json::reply(array("result" => "success")); } public function edit_postage_band($id) { access::verify_csrf(); $postage = ORM::factory("postage_band", $id); - if (!$postage->loaded) { + if (!$postage->loaded()) { kohana::show_404(); } @@ -115,10 +113,10 @@ class Admin_Postage_Bands_Controller extends Controller $new_name = $form->edit_postage->inputs["name"]->value; if ($new_name != $postage->name && ORM::factory("postage_band") - ->where("name", $new_name) - ->where("id !=", $postage->id) + ->where("name", "=", $new_name) + ->where("id","!=", $postage->id) ->find() - ->loaded) { + ->loaded()) { $form->edit_postage->inputs["name"]->add_error("in_use", 1); $valid = false; } else { @@ -133,16 +131,15 @@ class Admin_Postage_Bands_Controller extends Controller message::success(t("Changed postage band %postage_name", array("postage_name" => html::clean($postage->name)))); - print json_encode(array("result" => "success")); + print json::reply(array("result" => "success")); } else { - print json_encode(array("result" => "error", - "form" => $form->__toString())); + print $form; } } public function edit_postage_band_form($id) { $postage = ORM::factory("postage_band", $id); - if (!$postage->loaded) { + if (!$postage->loaded()) { kohana::show_404(); } diff --git a/modules/basket/controllers/admin_product_lines.php b/modules/basket/controllers/admin_product_lines.php index f063ad36..6fd7054a 100644 --- a/modules/basket/controllers/admin_product_lines.php +++ b/modules/basket/controllers/admin_product_lines.php @@ -27,7 +27,7 @@ class Admin_Product_Lines_Controller extends Controller { $view = new Admin_View("admin.html"); $view->content = new View("admin_product_lines.html"); - $view->content->products = ORM::factory("product")->orderby("name")->find_all(); + $view->content->products = ORM::factory("product")->order_by("name")->find_all(); print $view; } @@ -43,8 +43,8 @@ class Admin_Product_Lines_Controller extends Controller $form = product::get_add_form_admin(); $valid = $form->validate(); $name = $form->add_product->inputs["name"]->value; - $product = ORM::factory("product")->where("name", $name)->find(); - if ($product->loaded) { + $product = ORM::factory("product")->where("name", "=", $name)->find(); + if ($product->loaded()) { $form->add_product->inputs["name"]->add_error("in_use", 1); $valid = false; } @@ -60,16 +60,15 @@ class Admin_Product_Lines_Controller extends Controller $product->save(); message::success(t("Created product %product_name", array( "product_name" => html::clean($product->name)))); - print json_encode(array("result" => "success")); + print json::reply(array("result" => "success")); } else { - print json_encode(array("result" => "error", - "form" => $form->__toString())); + print $form; } } public function delete_product_form($id) { $product = ORM::factory("product", $id); - if (!$product->loaded) { + if (!$product->loaded()) { kohana::show_404(); } print product::get_delete_form_admin($product); @@ -83,7 +82,7 @@ class Admin_Product_Lines_Controller extends Controller } $product = ORM::factory("product", $id); - if (!$product->loaded) { + if (!$product->loaded()) { kohana::show_404(); } @@ -92,21 +91,20 @@ class Admin_Product_Lines_Controller extends Controller $name = $product->name; $product->delete(); } else { - print json_encode(array("result" => "error", - "form" => $form->__toString())); + print $form; } $message = t("Deleted user %product_name", array("product_name" => html::clean($name))); log::success("user", $message); message::success($message); - print json_encode(array("result" => "success")); + print json::reply(array("result" => "success")); } public function edit_product($id) { access::verify_csrf(); $product = ORM::factory("product", $id); - if (!$product->loaded) { + if (!$product->loaded()) { kohana::show_404(); } @@ -116,10 +114,10 @@ class Admin_Product_Lines_Controller extends Controller $new_name = $form->edit_product->inputs["name"]->value; if ($new_name != $product->name && ORM::factory("product") - ->where("name", $new_name) - ->where("id !=", $product->id) + ->where("name", "=", $new_name) + ->where("id","!=", $product->id) ->find() - ->loaded) { + ->loaded()) { $form->edit_product->inputs["name"]->add_error("in_use", 1); $valid = false; } else { @@ -135,16 +133,15 @@ class Admin_Product_Lines_Controller extends Controller message::success(t("Changed product %product_name", array("product_name" => html::clean($product->name)))); - print json_encode(array("result" => "success")); + print json::reply(array("result" => "success")); } else { - print json_encode(array("result" => "error", - "form" => $form->__toString())); + print $form; } } public function edit_product_form($id) { $product = ORM::factory("product", $id); - if (!$product->loaded) { + if (!$product->loaded()) { kohana::show_404(); } diff --git a/modules/basket/controllers/basket.php b/modules/basket/controllers/basket.php index 2e85f60c..a4ecbee3 100644 --- a/modules/basket/controllers/basket.php +++ b/modules/basket/controllers/basket.php @@ -19,19 +19,173 @@ */ class Basket_Controller extends Controller { - public function view_basket() { + public function temp(){ + $db = Database::instance(); + $db->query("ALTER TABLE {orders} ADD COLUMN `method` int(9) DEFAULT 0;"); + } + public function view_basket($pp="") { $template = new Theme_View("page.html", "basket"); + $basket = Session_Basket::get(); + if (isset($pp)){ + if ($pp=="nopp"){ + $basket->disablepp(); + } + elseif ($pp=="ppon"){ + $basket->enablepp(); + } + } + $view = new View("view_basket.html"); - $view->basket = Session_Basket::get(); + $view->basket = $basket; + $template->content = $view; print $template; } - private function getCheckoutForm(){ + public function preview($id) { + $item = ORM::factory("item", $id); + + print ""; + + } + + public function view_orders() { + self::check_view_orders(); + $template = new Theme_View("page.html", "basket"); + + $incomplete_orders = ORM::factory("order")->where('status',"<",20)->find_all(); + + $view = new View("view_orders.html"); + + $view->orders = $incomplete_orders; + + $template->content = $view; + + print $template; + } + + + public function view_ipn($orderid){ + self::check_view_orders(); + + $template = new Theme_View("page.html", "basket"); + + $order = ORM::factory("order")->where("id","=",$orderid)->find(); + $ipn_messages = ORM::factory("ipn_message")->where("key","=",$orderid)->find_all(); + //$ipn_messages = ORM::factory("ipn_message")->find_all(); + + $view = new View("view_ipn.html"); + + $view->order = $order; + $view->ipn_messages = $ipn_messages; + + $template->content = $view; + + print $template; + + } + + public function check_view_orders() { + if (!basket::can_view_orders()){ + die("Invalid access."); + } + } + + public function print_order($id){ + + access::verify_csrf(); + self::check_view_orders(); + + + $prefix = basket::getOrderPrefix(); + $length = strlen($prefix); + if (strlen($id)>$length ){ + if ($prefix === strtolower(substr($id,0,$length ))){ + $id = substr($id,$length); + } + } + $order = ORM::factory("order", $id); + $view = new View("print_order.html"); + + if ($order->loaded()){ + $view->order = str_replace(array("\r\n", "\n", "\r"),"
    ",$order->text); + }else{ + $view->order = "Order ".$id." not found."; + } + print $view; + } + + public function show_order($id){ + + access::verify_csrf(); + self::check_view_orders(); + $prefix = basket::getOrderPrefix(); + $length = strlen($prefix); + if (strlen($id)>$length ){ + if ($prefix === strtolower(substr($id,0,$length ))){ + $id = substr($id,$length); + } + } + + $order = ORM::factory("order", $id); + + if ($order->loaded()){ + $view = new View("view_order.html"); + $view->order = $order; + print $view; + }else{ + print "Order ".$id." not found."; + } + } + + public function show_ipn($id){ + access::verify_csrf(); + self::check_view_orders(); + $ipn_message = ORM::factory("ipn_message", $id); + + if ($ipn_message->loaded()){ + print $ipn_message->text; + }else{ + print "IPN Message ".$id." not found."; + } + + } + + public function confirm_order_delivery($id){ + access::verify_csrf(); + self::check_view_orders(); + $order = ORM::factory("order", $id); + + if ($order->loaded()){ + if ($order->status == 2) + { + $order->status = 20; + $order->save(); + } + } + url::redirect("basket/view_orders"); + } + + public function confirm_order_payment($id){ + access::verify_csrf(); + self::check_view_orders(); + $order = ORM::factory("order", $id); + + if ($order->loaded()){ + if ($order->status == 1) + { + $order->status = 2; + $order->save(); + } + } + url::redirect("basket/view_orders"); + } + + private function getCheckoutForm(){ $form = new Forge("basket/confirm", "", "post", array("id" => "checkout", "name" =>"checkout")); $group = $form->group("contact")->label(t("Contact Details")); $group->input("fullname")->label(t("Name"))->id("fullname"); @@ -42,6 +196,7 @@ class Basket_Controller extends Controller { $group->input("postcode")->label(t("Postcode"))->id("postcode"); $group->input("email")->label(t("E-Mail Address"))->id("email"); $group->input("phone")->label(t("Telephone Number"))->id("phone"); + $group->hidden("paypal")->id("paypal"); return $form; } @@ -80,6 +235,12 @@ class Basket_Controller extends Controller { if ($valid){ $basket = Session_Basket::get(); + + if (!isset($basket->contents ) || count($basket->contents) == 0) { + self::view_basket(); + return; + } + $basket->name = $form->contact->fullname->value; $basket->house = $form->contact->house->value; $basket->street = $form->contact->street->value; @@ -89,14 +250,33 @@ class Basket_Controller extends Controller { $basket->email = $form->contact->email->value; $basket->phone = $form->contact->phone->value; + $paypal=$form->contact->paypal->value=="true"; $template = new Theme_View("page.html", "basket"); - $form = new Forge("basket/complete", "", "post", array("id" => "confirm", "name" =>"confirm")); - $view = new View("confirm_order.html"); - $view->basket = $basket; - $template->content = $view; - $view->form = $form; - print $template; + if ($paypal){ + // create a prelimary order + $order = basket::createOrder($basket, Order_Model::PAYMENT_PAYPAL); + $paypal = new Paypal(); + + // create the order first + $view = new View("paypal_redirect.html"); + $view ->form = $paypal->process($basket, + url::site("basket/paypal_complete/$order->id", "http"), + url::site("basket/paypal_cancel/$order->id", "http"), + url::site("basket/paypal_ipn/$order->id", "http")); + $template->content = $view; + print $template; + + // redirect to paypal + }else + { + $form = new Forge("basket/complete", "", "post", array("id" => "confirm", "name" =>"confirm")); + $view = new View("confirm_order.html"); + $view->basket = $basket; + $template->content = $view; + $view->form = $form; + print $template; + } } else { @@ -105,53 +285,80 @@ class Basket_Controller extends Controller { } } - public function complete () { - access::verify_csrf(); + function paypal_ipn($id){ + $order = ORM::factory("order")->where("id","=",$id)->find(); + if ($order->loaded()){ + + $paypal = new Paypal(); + + if ($paypal->validate_ipn($id)){ + if ($paypal->ipn_data['payment_status'] == "Completed"){ + + $order->status = Order_Model::PAYMENT_CONFIRMED; + + // send e-mails + basket::send_order($order); + basket::send_invoice($order); + + $order->save(); + } + return; + } + print "invalid access. tut tut!"; + } + return; + + } + + public function paypal_complete($id) { + $order = ORM::factory("order")->where("id","=",$id)->find(); $basket = Session_Basket::get(); + $basket->clear(); + $this->_complete($order); + } - //$admin_address = basket::getEmailAddress(); - $postage = $basket->postage_cost(); - $product_cost = $basket->cost(); + public function paypal_cancel($id){ + $order = ORM::factory("order")->where("id","=",$id)->find(); - $admin_email = "Order for : -".$basket->name." -".$basket->house." -".$basket->street." -".$basket->suburb." -".$basket->town." -".$basket->postcode." -".$basket->email." -".$basket->phone." -Placed at ".date("d F Y - H:i" ,time())." -Cost of Ordered Products = ".$product_cost." -Postage and Packaging Costs + ".$postage." -Total Owed ".($product_cost+$postage)." Total in ".basket::getCurrency()." - -Items Ordered: - -"; - - // create the order items - foreach ($basket->contents as $basket_item){ - $item = $basket_item->getItem(); - $prod = ORM::factory("product", $basket_item->product); - $admin_email = $admin_email." -".$item->title." - ".$item->url()." -".$prod->name." - ".$prod->description." -".$basket_item->quantity." @ ".$prod->cost." - -"; + if ($order->loaded()){ + $order->delete(); } + $this->checkout(); + } - $from = "From: ".basket::getEmailAddress(); - mail(basket::getEmailAddress(), "Order from ".$basket->name, $admin_email, $from); + public function complete () { + access::verify_csrf(); + $basket = Session_Basket::get(); + + if (!isset($basket->contents ) || count($basket->contents) == 0) { + self::view_basket(); + return; + } + + // create order + $order = basket::createOrder($basket, Order_Model::PAYMENT_OFFLINE); $basket->clear(); + // send e-mails + basket::send_order($order); + basket::send_invoice($order); + + + $this->_complete($order); + } + + private function _complete($order){ $template = new Theme_View("page.html", "basket"); $view = new View("order_complete.html"); + $ordernumber = basket::getOrderPrefix().$order->id; + $view->ordernumber = $ordernumber; + $view->order = $order; + $view->total_cost = $order->cost; + $template->content = $view; + print $template; } @@ -189,7 +396,11 @@ Items Ordered: $form->add_to_basket->product->value, $form->add_to_basket->quantity->value); - print json_encode(array("result" => "success")); + $item = ORM::factory("item", $form->add_to_basket->id->value); + + Session::instance()->set("redirect_home", $item->parent_id); + + print json::reply(array("result" => "success")); } else { @@ -205,7 +416,7 @@ Items Ordered: // get the item to add $item = ORM::factory("item", $id); - if (!$item->loaded) + if (!$item->loaded()) { //TODO die("Not loaded id"); diff --git a/modules/basket/css/basket.css b/modules/basket/css/basket.css index f660685d..107b8229 100644 --- a/modules/basket/css/basket.css +++ b/modules/basket/css/basket.css @@ -1,5 +1,17 @@ #basket {float:right;} #add_to_basket {float:right} -#basketForm {max-width:200px} -#basketThumb {float:left; padding:10px 10px 0 0;} +#basketForm {max-width:200px;float:left;} +#basketThumb {float:left; padding:10px;} #basketThumb img{max-width:100px;} +#payment {float:right; width:50%} +#checkout input, +#checkout select, +#checkout textarea { + display: block; + clear: both; + padding: .2em; + width: 100%; +} +#sidebar-basket {max-height:300px; overflow-y:auto; overflow-x:hidden;} +.order-status-1 a{color:#AA0000 !important} +.order-status-2 a{color:#00AA00 !important} diff --git a/modules/basket/helpers/basket.php b/modules/basket/helpers/basket.php index 45ab988f..b9be6726 100644 --- a/modules/basket/helpers/basket.php +++ b/modules/basket/helpers/basket.php @@ -40,6 +40,26 @@ class basket_Core { "MXN" => "Mexican Peso"); static $format= array( + "AUD" => "$", + "CAD" => "$", + "EUR" => "€", + "GBP" => "£", + "JPY" => "¥", + "USD" => "$", + "NZD" => "$", + "CHF" => "", + "HKD" => "$", + "SGD" => "$", + "SEK" => "", + "DKK" => "", + "PLN" => "", + "NOK" => "", + "HUF" => "", + "CZK" => "", + "ILS" => "", + "MXN" => ""); + + static $formatweb= array( "AUD" => "$", "CAD" => "$", "EUR" => "€", @@ -60,37 +80,108 @@ class basket_Core { "MXN" => ""); - static function get_configure_form() { - $form = new Forge("admin/configure", "", "post", array("id" => "gConfigureForm")); - $group = $form->group("configure")->label(t("Configure Basket")); - $group->input("email")->label(t("Offline Paying Email Address"))->id("gOrderEmailAddress"); - $group->dropdown("currency") - ->label(t("Currency")) - ->options(self::$currencies); + static public function can_view_orders() + { + if (identity::active_user()->admin){ + return true; + } - $group->checkbox("paypal")->label(t("Use Paypal"))->id("gPaypal"); - $group->input("paypal_account")->label(t("Paypal E-Mail Address"))->id("gPaypalAddress"); + print identity::active_user(); + foreach (identity::active_user()->groups() as $group){ + if ($group->name == 'shop'){ + return true; + } + } + + return false; + } + + + static function get_configure_form() { + $form = new Forge("admin/configure", "", "post", array("id" => "g-configure-form")); + $group = $form->group("configure")->label(t("Configure Basket")); + $group->input("email")->label(t("Offline Paying Email Address"))->id("g-order-email-address"); + $group->dropdown("currency") + ->label(t("Currency")) + ->options(self::$currencies); + + $group->checkbox("side_bar")->label(t("Use only side bar"))->id("g-side-bar-only"); + + $group->checkbox("paypal")->label(t("Use Paypal"))->id("g-paypal"); + $group->input("paypal_account")->label(t("Paypal E-Mail Address"))->id("g-paypal-address"); + $group->checkbox("allow_pickup")->label(t("Allow Product Pickup"))->id("g-allow-pickup"); + $group->input("order_prefix")->label(t("Order Number Prefix"))->id("g-order-prefix"); + $group->submit("")->value(t("Save")); + return $form; + } + + static function get_template_form() { + $form = new Forge("admin/configure/templates", "", "post", array("id" => "g-configure-form")); + $group = $form->group("configure")->label(t("Configure Basket")); + $group->textarea("payment_details")->label(t("Payment Details Description"))->id("g-payment-details"); + $group->textarea("order_complete_page")->label(t("Order Complete Page"))->id("g-order-complete_page"); + $group->input("order_complete_email_subject")->label(t("Order Complete Email Subject"))->id("g-order-complete_email_subject"); + $group->textarea("order_complete_email")->label(t("Order Complete Email"))->id("g-order-complete_email"); $group->submit("")->value(t("Save")); return $form; } static function populateForm($form){ - $form->configure->email->value(basket::getEmailAddress()); - $form->configure->paypal->checked(basket::isPaypal()); - $form->configure->paypal_account->value(basket::getPaypalAccount()); - $form->configure->currency->selected(basket::getCurrency()); + $form->configure->email->value(basket::getEmailAddress()); + $form->configure->side_bar->checked(basket::is_side_bar_only()); + $form->configure->paypal->checked(basket::isPaypal()); + $form->configure->paypal_account->value(basket::getPaypalAccount()); + $form->configure->currency->selected(basket::getCurrency()); + $form->configure->allow_pickup->checked(basket::isAllowPickup()); + $form->configure->order_prefix->value(basket::getOrderPrefix()); + } + + static function populateTemplateForm($form){ + $form->configure->payment_details->value(basket::getPaymentDetails()); + $form->configure->order_complete_page->value(basket::getOrderCompletePage()); + $form->configure->order_complete_email_subject->value(basket::getOrderCompleteEmailSubject()); + $form->configure->order_complete_email->value(basket::getOrderCompleteEmail()); } static function extractForm($form){ - $email = $form->configure->email->value; - $isPaypal = $form->configure->paypal->value; - $paypal_account = $form->configure->paypal_account->value; - $currency = $form->configure->currency->selected; - basket::setEmailAddress($email); - basket::setPaypal($isPaypal); - basket::setPaypalAccount($paypal_account); - basket::setCurrency($currency); + $email = $form->configure->email->value; + $is_side_bar = $form->configure->side_bar->value; + $isPaypal = $form->configure->paypal->value; + $paypal_account = $form->configure->paypal_account->value; + $currency = $form->configure->currency->selected; + $allow_pickup = $form->configure->allow_pickup->value; + $order_prefix = $form->configure->order_prefix->value; + basket::setEmailAddress($email); + basket::set_side_bar_only($is_side_bar); + basket::setPaypal($isPaypal); + basket::setPaypalAccount($paypal_account); + basket::setCurrency($currency); + basket::setAllowPickup($allow_pickup); + basket::setOrderPrefix($order_prefix); } + static function extractTemplateForm($form){ + $payment_details = $form->configure->payment_details->value; + $order_complete_page = $form->configure->order_complete_page->value; + $order_complete_email_subject = $form->configure->order_complete_email_subject->value; + $order_complete_email = $form->configure->order_complete_email->value; + basket::setPaymentDetails($payment_details); + basket::setOrderCompletePage($order_complete_page); + basket::setOrderCompleteEmailSubject($order_complete_email_subject); + basket::setOrderCompleteEmail($order_complete_email); + } + + static public function is_side_bar_only() + { + return module::get_var("basket","is_side_bar_only"); + + } + + static public function set_side_bar_only($value) + { + module::set_var("basket","is_side_bar_only",$value); + + } + static function getEmailAddress(){ return module::get_var("basket","email"); @@ -113,10 +204,51 @@ class basket_Core { return $cur; } + static function getPaymentDetails(){ + return module::get_var("basket","payment_details"); + } + + static function getOrderPrefix(){ + return module::get_var("basket","order_prefix"); + } + + static function isAllowPickup(){ + return module::get_var("basket","allow_pickup"); + } + + static function getOrderCompletePage(){ + return module::get_var("basket","order_complete_page"); + } + + static function getOrderCompleteEmail(){ + return module::get_var("basket","order_complete_email"); + } + + static function getOrderCompleteEmailSubject(){ + return module::get_var("basket","order_complete_email_subject"); + } + static function formatMoney($money){ return self::$format[self::getCurrency()].number_format($money,2); } + static function formatMoneyForWeb($money){ + return self::$formatweb[self::getCurrency()].number_format($money,2); + } + + static function replaceStrings($string, $key_values) { + // Replace x_y before replacing x. + krsort($key_values, SORT_STRING); + + $keys = array(); + $values = array(); + foreach ($key_values as $key => $value) { + $keys[] = "%$key"; + $values[] = $value; + } + return str_replace($keys, $values, $string); + } + static function setEmailAddress($email){ module::set_var("basket","email",$email); } @@ -133,32 +265,129 @@ class basket_Core { module::set_var("basket","currency",$currency); } - static function generatePaypalForm($session_basket){ - $form = " -
    - - - -"; + static function setPaymentDetails($details){ + module::set_var("basket","payment_details",$details); + } - $postage = $session_basket->postage_cost(); - if ($postage > 0) { - $form = $form." -"; + static function setAllowPickup($allow_pickup){ + module::set_var("basket","allow_pickup",$allow_pickup); + } + + static function setOrderPrefix($order_prefix){ + module::set_var("basket","order_prefix",strtolower($order_prefix)); + } + + static function setOrderCompletePage($details){ + module::set_var("basket","order_complete_page",$details); + } + + static function setOrderCompleteEmail($details){ + module::set_var("basket","order_complete_email",$details); + } + + static function setOrderCompleteEmailSubject($details){ + module::set_var("basket","order_complete_email_subject",$details); + } + + static function createOrder($basket, $method){ + + $order = ORM::factory("order"); + $order->text = "processing"; + $order->save(); + + $ordernumber = basket::getOrderPrefix().$order->id; + + //$admin_address = basket::getEmailAddress(); + $postage = $basket->postage_cost(); + $product_cost = $basket->cost(); + $ppon = $basket->ispp(); + + $text = " + Order Number : ".$ordernumber." + + for : +".$basket->name." +".$basket->house." +".$basket->street." +".$basket->suburb." +".$basket->town." +".$basket->postcode." +".$basket->email." +".$basket->phone." +Placed at ".date("d F Y - H:i" ,time())." +Cost of Ordered Products = ".$product_cost; + if ($ppon){ + $text = $text." +Postage and Packaging Costs + ".$postage." +Total Owed ".($product_cost+$postage)." Total in ".basket::getCurrency(); + } + else{ + $text = $text." +Person has chosen to pick up product. +Total Owed ".($product_cost)." Total in ".basket::getCurrency(); + } + $text = $text." + +Items Ordered: + +"; + + // create the order items + foreach ($basket->contents as $basket_item){ + $item = $basket_item->getItem(); + $prod = ORM::factory("product", $basket_item->product); + $text = $text." +".$item->title." - ".$item->url()." +".$prod->name." - ".$prod->description." +".$basket_item->quantity." @ ".$prod->cost." + +"; } - $id = 1; - foreach ($session_basket->contents as $key => $basket_item){ - $form = $form." -getCode()."\"/> -cost_per\"/> -quantity\"/>"; - $id++; + if ($ppon){ + $total_cost = ($product_cost+$postage); + } + else{ + $total_cost = $product_cost; } - $form = $form."
    "; + $order->name = $basket->name; + $order->email = $basket->email; + $order->cost = $total_cost; + $order->text = $text; + $order->status = Order_Model::WAITING_PAYMENT; + $order->method = $method; + $order->save(); + + //$basket->clear(); + + return $order; + } + + public function send_order($order){ + + $from = "From: ".basket::getEmailAddress(); + $ordernumber = basket::getOrderPrefix().$order->id; + + mail(basket::getEmailAddress(), "Order ".$ordernumber." from ".$order->name, $order->text, $from); + + } + + public function send_invoice($order) + { + + $from = "From: ".basket::getEmailAddress(); + $ordernumber = basket::getOrderPrefix().$order->id; + $invoice_email = basket::replaceStrings(basket::getOrderCompleteEmail(),Array( + "name"=>$order->name, + "order_number"=> $ordernumber, + "total_cost" =>basket::formatMoney($order->cost), + "order_details"=>$order->text)); + + mail($order->email, + basket::replaceStrings(basket::getOrderCompleteEmailSubject(),Array("order_number"=>$ordernumber)), + $invoice_email, $from); - return $form; } } \ No newline at end of file diff --git a/modules/basket/helpers/basket_block.php b/modules/basket/helpers/basket_block.php new file mode 100644 index 00000000..9263a68e --- /dev/null +++ b/modules/basket/helpers/basket_block.php @@ -0,0 +1,21 @@ + t("Basket")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "shopping": + $block = new Block(); + $block->css_id = "g-view-basket"; + $block->title = t("Basket"); + $block->content = new View("basket-side-bar.html"); + $block->content->basket = Session_Basket::get(); + break; + } + return $block; + } +} \ No newline at end of file diff --git a/modules/basket/helpers/basket_event.php b/modules/basket/helpers/basket_event.php index ade43e96..c22a48c6 100644 --- a/modules/basket/helpers/basket_event.php +++ b/modules/basket/helpers/basket_event.php @@ -34,6 +34,11 @@ class basket_event_Core{ ->label(t("Configure")) ->url(url::site("admin/configure"))); $basket_menu->append( + Menu::factory("link") + ->id("templates") + ->label(t("Templates")) + ->url(url::site("admin/configure/templates"))); + $basket_menu->append( Menu::factory("link") ->id("product_line") ->label(t("Product Lines")) @@ -43,15 +48,20 @@ class basket_event_Core{ ->id("postage_bands") ->label(t("Postage Bands")) ->url(url::site("admin/postage_bands"))); + $basket_menu->append( + Menu::factory("link") + ->id("view_orders") + ->label(t("View Orders")) + ->url(url::site("basket/view_orders"))); } static function item_edit_form($item, $form){ $group = $form->group("products")->label(t("Available Products")); - $product_override = ORM::factory("product_override")->where('item_id', $item->id)->find(); + $product_override = ORM::factory("product_override")->where('item_id', "=", $item->id)->find(); $group->checkbox("all")->label("No products except.."); - if ($product_override->loaded){ + if ($product_override->loaded()){ $group->all->checked($product_override->none); } @@ -63,11 +73,11 @@ class basket_event_Core{ $cost = $product->cost; $checked = false; - if ($product_override->loaded){ + if ($product_override->loaded()){ $item_product = ORM::factory("item_product") - ->where('product_override_id', $product_override->id) - ->where('product_id', $product->id)->find(); - if ($item_product->loaded){ + ->where('product_override_id', "=", $product_override->id) + ->where('product_id', "=", $product->id)->find(); + if ($item_product->loaded()){ $checked = $item_product->include; if ($item_product->cost != -1){ $cost = $item_product->cost; @@ -82,7 +92,7 @@ class basket_event_Core{ } static function item_edit_form_completed($item, $form){ - $product_override = ORM::factory("product_override")->where('item_id', $item->id)->find(); + $product_override = ORM::factory("product_override")->where('item_id', "=", $item->id)->find(); if ($form->products->all->checked) { @@ -93,8 +103,8 @@ class basket_event_Core{ foreach ($products as $product){ $p_group = $form->products->__get("product_$product->id"); $item_product = ORM::factory("item_product") - ->where('product_override_id', $product_override->id) - ->where('product_id', $product->id)->find(); + ->where('product_override_id', "=", $product_override->id) + ->where('product_id', "=", $product->id)->find(); $item_product->include = $p_group->__get("exclude_$product->id")->checked; $item_product->cost = $p_group->__get("cost_$product->id")->value; @@ -105,7 +115,7 @@ class basket_event_Core{ } else { - if ($product_override->loaded){ + if ($product_override->loaded()){ $product_override->delete(); } } diff --git a/modules/basket/helpers/basket_installer.php b/modules/basket/helpers/basket_installer.php index c514f4ca..b92cd694 100644 --- a/modules/basket/helpers/basket_installer.php +++ b/modules/basket/helpers/basket_installer.php @@ -57,14 +57,69 @@ class basket_installer PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $db->query("CREATE TABLE IF NOT EXISTS {orders} ( + `id` int(9) NOT NULL auto_increment, + `status` int(9) DEFAULT 0, + `name` varchar(1024), + `email` varchar(1024), + `cost` DECIMAL(10,2) default 0, + `method` int(9) DEFAULT 0, + `text` TEXT NOT NULL, + PRIMARY KEY (`id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + + $db->query("CREATE TABLE IF NOT EXISTS `ipn_messages` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `date` int(11) NOT NULL, + `key` varchar(20) NOT NULL, + `txn_id` varchar(20) NOT NULL, + `status` varchar(20) NOT NULL, + `success` bool default false, + `text` text, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + + postage_band::create("No Postage",0,0); product::create("4x6",5,"4\"x6\" print",1); product::create("8x10",25,"8\"x10\" print",1); product::create("8x12",30,"8\"x12\" print",1); + basket::setPaymentDetails( +"

    Use the following options to pay for this order.

    +

    Send a chequre to..

    +

    Visit the shop..

    +

    By using internet banking..

    " + ); + basket::setOrderPrefix("ORDER"); + basket::setOrderCompletePage( +"

    Your order number is %order_number. To pay for this order please either:

    +

    - Send a cheque for %total_cost to with reference %order_number..

    +

    - Visit the shop and quote the order %order_number..

    +

    - Transfer %total_cost using internet banking with reference %order_number..

    +

    Order will be processed as soon as payment is received. You should receive an e-mail with your order details shortly.

    " + ); + basket::setOrderCompleteEmail( +"Hi %name, - module::set_version("basket", 2); +Thank you for your order the order details are below. To pay for this order please either: + +- Send a cheque for %total_cost to with reference %order_number.. +- Visit the shop and quote the order %order_number.. +- Transfer %total_cost using internet banking with reference %order_number.. + +Order will be processed as soon as payment is received. For order pick-ups please visit.. + +Order Details +------------- +%order_details + +Thanks"); + basket::setOrderCompleteEmailSubject( +"Photography Order %order_number"); + + module::set_version("basket", 4); } @@ -89,6 +144,73 @@ class basket_installer module::set_version("basket", $version = 2); } + + if ($version == 2) { + $db->query("CREATE TABLE IF NOT EXISTS {orders} ( + `id` int(9) NOT NULL auto_increment, + `text` TEXT NOT NULL, + PRIMARY KEY (`id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + basket::setPaymentDetails( +"

    Use the following options to pay for this order.

    +

    Send a chequre to..

    +

    Visit the shop..

    +

    By using internet banking..

    " + ); + basket::setOrderPrefix("ORDER"); + basket::setOrderCompletePage( +"

    Your order number is %order_number. To pay for this order please either:

    +

    - Send a cheque for %total_cost to with reference %order_number..

    +

    - Visit the shop and quote the order %order_number..

    +

    - Transfer %total_cost using internet banking with reference %order_number..

    +

    Order will be processed as soon as payment is received. You should receive an e-mail with your order details shortly.

    " + ); + basket::setOrderCompleteEmail( +"Hi %name, + +Thank you for your order the order details are below. To pay for this order please either: + +- Send a cheque for %total_cost to with reference %order_number.. +- Visit the shop and quote the order %order_number.. +- Transfer %total_cost using internet banking with reference %order_number.. + +Order will be processed as soon as payment is received. For order pick-ups please visit.. + +Order Details +------------- +%order_details + +Thanks"); + basket::setOrderCompleteEmailSubject( +"Photography Order %order_number"); + + module::set_version("basket", $version = 3); + } + + if ($version ==3 ){ + $db->query("ALTER TABLE {orders} ADD COLUMN `status` int(9) DEFAULT 0;"); + + $db->query("CREATE TABLE IF NOT EXISTS {ipn_messages} ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `date` int(11) NOT NULL, + `key` varchar(20) NOT NULL, + `txn_id` varchar(20) NOT NULL, + `status` varchar(20) NOT NULL, + `success` bool default false, + `text` text, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + module::set_version("basket", $version = 4); + + } + + if ($version==4){ + $db->query("ALTER TABLE {orders} ADD COLUMN `name` varchar(1024);"); + $db->query("ALTER TABLE {orders} ADD COLUMN `email` varchar(1024);"); + $db->query("ALTER TABLE {orders} ADD COLUMN `method` int(9) DEFAULT 0;"); + $db->query("ALTER TABLE {orders} ADD COLUMN `cost` DECIMAL(10,2) default 0"); + module::set_version("basket", $version = 5); + } } static function uninstall(){ @@ -97,5 +219,6 @@ class basket_installer $db->query("DROP TABLE IF EXISTS {product_overrides}"); $db->query("DROP TABLE IF EXISTS {item_products}"); $db->query("DROP TABLE IF EXISTS {postage_bands}"); + $db->query("DROP TABLE IF EXISTS {orders}"); } } diff --git a/modules/basket/helpers/basket_theme.php b/modules/basket/helpers/basket_theme.php index b8d513e9..1ad535e5 100644 --- a/modules/basket/helpers/basket_theme.php +++ b/modules/basket/helpers/basket_theme.php @@ -24,10 +24,15 @@ class basket_theme_Core { } static function header_top($theme) { - $view = new View("basket.html"); - $view->basket = Session_Basket::get(); - return $view->render(); + if (!basket::is_side_bar_only()) + { + $view = new View("basket.html"); + + $view->basket = Session_Basket::get(); + return $view->render(); + } + return ""; } static function admin_head($theme) { @@ -36,12 +41,15 @@ class basket_theme_Core { } } static function photo_top($theme){ - if ( product::isForSale($theme->item()->id)){ - $view = new View("add_to_basket.html"); + if (!basket::is_side_bar_only()) + { + if ( product::isForSale($theme->item()->id)){ + $view = new View("add_to_basket.html"); - $view->item = $theme->item(); + $view->item = $theme->item(); - return $view->render(); + return $view->render(); + } } return ""; } diff --git a/modules/basket/helpers/postage_band.php b/modules/basket/helpers/postage_band.php index b69f84c4..ca679d53 100644 --- a/modules/basket/helpers/postage_band.php +++ b/modules/basket/helpers/postage_band.php @@ -28,7 +28,6 @@ class postage_band_Core { $group->input("per_item")->label(t("Per Item"))->id("gPetItem"); $group->submit("")->value(t("Add Postage Band")); $postage = ORM::factory("postage_band"); - $form->add_rules_from($postage); return $form; } @@ -44,7 +43,6 @@ class postage_band_Core { value($postage->per_item); $group->submit("")->value(t("Modify Postage Band")); - $form->add_rules_from($postage); return $form; } @@ -67,8 +65,8 @@ class postage_band_Core { * @return User_Model */ static function create($name, $flatrate, $peritemcost) { - $postage = ORM::factory("postage_band")->where("name", $name)->find(); - if ($postage->loaded) { + $postage = ORM::factory("postage_band")->where("name", "=", $name)->find(); + if ($postage->loaded()) { throw new Exception("@todo postage already EXISTS $name"); } diff --git a/modules/basket/helpers/product.php b/modules/basket/helpers/product.php index cb4261a0..a4a13c8c 100644 --- a/modules/basket/helpers/product.php +++ b/modules/basket/helpers/product.php @@ -31,11 +31,11 @@ class product_Core { ->options(postage_band::getPostageArray()); $group->submit("")->value(t("Add Product")); $product = ORM::factory("product"); - $form->add_rules_from($product); return $form; } static function get_edit_form_admin($product) { + $form = new Forge("admin/product_lines/edit_product/$product->id", "", "post", array("id" => "gEditProductForm")); $group = $form->group("edit_product")->label(t("Edit Product")); @@ -51,7 +51,6 @@ class product_Core { ->selected($product->postage_band_id); $group->submit("")->value(t("Modify Product")); - $form->add_rules_from($product); return $form; } @@ -74,8 +73,8 @@ class product_Core { * @return User_Model */ static function create($name, $cost, $description, $postage_band) { - $product = ORM::factory("product")->where("name", $name)->find(); - if ($product->loaded) { + $product = ORM::factory("product")->where("name", "=", $name)->find(); + if ($product->loaded()) { throw new Exception("@todo USER_ALREADY_EXISTS $name"); } @@ -90,9 +89,9 @@ class product_Core { static function getProductArray($id){ $producta = array(); // check for product override - $product_override = ORM::factory("product_override")->where('item_id', $id)->find(); + $product_override = ORM::factory("product_override")->where('item_id', "=", $id)->find(); - if (!$product_override->loaded){ + if (!$product_override->loaded()){ // no override found so check parents // check parents for product override $item = ORM::factory("item",$id); @@ -100,24 +99,25 @@ class product_Core { $parents = $item->parents(); foreach ($parents as $parent){ // check for product override - $product_override = ORM::factory("product_override")->where('item_id', $parent->id)->find(); - if ($product_override->loaded){ - break; + $temp_override = ORM::factory("product_override")->where('item_id', "=", $parent->id)->find(); + if ($temp_override ->loaded()){ + $product_override = $temp_override; + //break; } - } + } } $products = ORM::factory("product")->find_all(); foreach ($products as $product){ $show = true; $cost = $product->cost; - if ($product_override->loaded){ + if ($product_override->loaded()){ $show = !$product_override->none; $item_product = ORM::factory("item_product") - ->where('product_override_id', $product_override->id) - ->where('product_id', $product->id)->find(); + ->where('product_override_id', "=", $product_override->id) + ->where('product_id', "=", $product->id)->find(); - if ($item_product->loaded){ + if ($item_product->loaded()){ $cost = $item_product->cost; if (!$show){ $show = $item_product->include; @@ -127,7 +127,7 @@ class product_Core { if ($show) { - $producta[$product->id] = $product->description." (".basket::formatMoney($cost).")"; + $producta[$product->id] = html::clean($product->description)." (".basket::formatMoneyForWeb($cost).")"; } } @@ -136,10 +136,12 @@ class product_Core { static function isForSale($id){ + try + { // check for product override - $product_override = ORM::factory("product_override")->where('item_id', $id)->find(); + $product_override = ORM::factory("product_override")->where('item_id', "=", $id)->find(); - if (!$product_override->loaded){ + if (!$product_override->loaded()){ // no override found so check parents // check parents for product override $item = ORM::factory("item",$id); @@ -147,24 +149,25 @@ class product_Core { $parents = $item->parents(); foreach ($parents as $parent){ // check for product override - $product_override = ORM::factory("product_override")->where('item_id', $parent->id)->find(); - if ($product_override->loaded){ - break; + $temp_override = ORM::factory("product_override")->where('item_id', "=", $parent->id)->find(); + if ($temp_override ->loaded()){ + $product_override = $temp_override; + //break; } } } $products = ORM::factory("product")->find_all(); - if ($product_override->loaded && $product_override->none){ + if ($product_override->loaded() && $product_override->none){ foreach ($products as $product){ $item_product = ORM::factory("item_product") - ->where('product_override_id', $product_override->id) - ->where('product_id', $product->id)->find(); + ->where('product_override_id', "=", $product_override->id) + ->where('product_id', "=", $product->id)->find(); - if ($item_product->loaded){ + if ($item_product->loaded()){ if ($item_product->include){ return true; @@ -177,5 +180,10 @@ class product_Core { } else { return count($products) > 0; } + } + catch (Exception $e) + { + echo $e; + } } } \ No newline at end of file diff --git a/modules/basket/libraries/Paypal.php b/modules/basket/libraries/Paypal.php new file mode 100644 index 00000000..c18ee058 --- /dev/null +++ b/modules/basket/libraries/Paypal.php @@ -0,0 +1,330 @@ +add_field('business', 'somebody@domain.com'); + * $p->add_field('first_name', $_POST['first_name']); + * ... (add all your fields in the same manor) + * $p->submit_paypal_post(); + * + * To process an IPN, have your IPN processing file contain: + * + * $p = new paypal_class; + * if ($p->validate_ipn()) { + * ... (IPN is verified. Details are in the ipn_data() array) + * } + * + * + * In case you are new to paypal, here is some information to help you: + * + * 1. Download and read the Merchant User Manual and Integration Guide from + * http://www.paypal.com/en_US/pdf/integration_guide.pdf. This gives + * you all the information you need including the fields you can pass to + * paypal (using add_field() with this class) aswell as all the fields + * that are returned in an IPN post (stored in the ipn_data() array in + * this class). It also diagrams the entire transaction process. + * + * 2. Create a "sandbox" account for a buyer and a seller. This is just + * a test account(s) that allow you to test your site from both the + * seller and buyer perspective. The instructions for this is available + * at https://developer.paypal.com/ as well as a great forum where you + * can ask all your paypal integration questions. Make sure you follow + * all the directions in setting up a sandbox test environment, including + * the addition of fake bank accounts and credit cards. + * + ******************************************************************************* + */ + +class Paypal_Core { + + var $last_error; // holds the last error encountered + + var $ipn_response; // holds the IPN response from paypal + public $ipn_data = array(); // array contains the POST values for IPN + + var $fields = array(); // array holds the fields to submit to paypal + + + public function __construct() + { + // initialization constructor. Called when class is created. + + // sandbox paypal + + //$this->paypal_url = "https://www.sandbox.paypal.com/cgi-bin/webscr"; + //$this->secure_url = "ssl://www.sandbox.paypal.com"; + + // normal paypal + $this->paypal_url = "https://www.paypal.com/cgi-bin/webscr"; + $this->secure_url = "ssl://www.paypal.com"; + + $this->last_error = ''; + + //$this->ipn_log_file = Kohana::log_directory().Kohana::config('paypal.ipn_logfile'); + //$this->ipn_log = true; + $this->ipn_response = ''; + + // populate $fields array with a few default values. See the paypal + // documentation for a list of fields and their data types. These defaul + // values can be overwritten by the calling script. + + + } + + function add_field($field, $value) { + + // adds a key=>value pair to the fields array, which is what will be + // sent to paypal as POST variables. If the value is already in the + // array, it will be overwritten. + + $this->fields["$field"] = $value; + } + + public function process($session_basket, $return_url, $cancel_url, $notify_url){ + + $this->add_field('rm','2'); + $this->add_field('cmd','_cart'); + $this->add_field('upload','1'); + + $this->add_field('currency_code', basket::getCurrency()); + $this->add_field('business', basket::getPaypalAccount()); + + // IPN stuff + $this->add_field('return', $return_url); + $this->add_field('cancel_return', $cancel_url); + $this->add_field('notify_url', $notify_url); + + // postage + if ($session_basket->ispp()){ + $postage = $session_basket->postage_cost(); + if ($postage > 0) { + $this->add_field('shipping_1',$postage); + } + } + + // basket contents + $id = 1; + foreach ($session_basket->contents as $key => $basket_item){ + $this->add_field("item_name_$id", $basket_item->getCode()); + $this->add_field("amount_$id", $basket_item->cost_per); + $this->add_field("quantity_$id",$basket_item->quantity); + $id++; + } + + // shipping address + $this->add_field("payer_email", $session_basket->email); + $this->add_field("address_name", $session_basket->name); + $this->add_field("address_street", $session_basket->house." ".$session_basket->street); + $this->add_field("address_city", $session_basket->town); + $this->add_field("address_zip", $session_basket->postcode); + $this->add_field("contact_phone", $session_basket->phone); + + $string = "
    paypal_url."\">\n"; + + foreach ($this->fields as $name => $value) { + $string = $string."\n"; + } + + $string = $string."
    "; + return $string; + } + + function validate_ipn($key) { + + // parse the paypal URL + $url_parsed=parse_url($this->paypal_url); + + // generate the post string from the _POST vars aswell as load the + // _POST vars into an arry so we can play with them from the calling + // script. + $post_string = 'cmd=_notify-validate'; + foreach ($_POST as $field=>$value) { + $this->ipn_data["$field"] = $value; + $value = urlencode(stripslashes($value)); + $value = preg_replace('/(.*[^%^0^D])(%0A)(.*)/i','${1}%0D%0A${3}',$value); + $post_string .= '&'.$field.'='.$value; + } + + // open the connection to paypal + + $fp = fsockopen($this->secure_url,443,$err_num,$err_str,30); + if(!$fp) { + + // could not open the connection. If loggin is on, the error message + // will be in the log. + $this->last_error = "fsockopen error no. $errnum: $errstr"; + $this->log_ipn_results($key,false); + return false; + + } else { + + // Post the data back to paypal + fputs($fp, "POST ".$url_parsed['path']." HTTP/1.1\r\n"); + fputs($fp, "Host: ".$url_parsed['host']."\r\n"); + fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n"); + + fputs($fp, "Content-length: ".strlen($post_string)."\r\n\r\n"); + //fputs($fp, "Connection: close\r\n\r\n"); + fputs($fp, $post_string . "\r\n\r\n"); + + // loop through the response from the server and append to variable + while(!feof($fp)) { + $this->ipn_response .= fgets($fp, 1024); + } + + fclose($fp); // close connection + + } + + if (stristr($this->ipn_response,"VERIFIED")===false) + { + // Invalid IPN transaction. Check the log for details. + $this->last_error = 'IPN Validation Failed. '.$url_parsed['host'].'\\'.$url_parsed['path']; + $this->log_ipn_results($key,false); + return false; + } + else{ + + // Valid IPN transaction. + + // check recievers e-mail + $business = basket::getPaypalAccount(); + + if ($this->ipn_data['receiver_email']!=$business) + { + $this->last_error = 'receivers e-mail did not match '.$business; + $this->log_ipn_results($key,false); + return false; + } + + // if confirmed check message has not been received already + if ($this->ipn_data['payment_status'] == "Completed"){ + + $message = ORM::factory("ipn_message") + ->where('key',"=",$key) + ->where('status',"=",'completed') + ->where('txn_id',"=",$this->ipn_data['txn_id'])->find(); + + if ($message->loaded()){ + $this->last_error = 'Message alread received.'; + $this->log_ipn_results($key,false); + return false; + } + } + + $this->log_ipn_results($key,true); + return true; + + } + + } + + function log_ipn_results($key, $success) { + + // Timestamp + $text = '['.date('m/d/Y g:i A').'] - '; + + $message = ORM::factory("ipn_message"); + $message->date = time(); + $message->key = $key; + $message->txn_id = $this->ipn_data['txn_id']; + $message->status = $this->ipn_data['payment_status']; + $message->success = $success; + + // Success or failure being logged? + if ($success) $text .= "SUCCESS!\n"; + else $text .= 'FAIL: '.$this->last_error."\n"; + + // Log the POST variables + $text .= "IPN POST Vars from Paypal:\n"; + foreach ($this->ipn_data as $key=>$value) { + $text .= "$key=$value \n"; + } + + // Log the response from the paypal server + $text .= "\nIPN Response from Paypal Server:\n ".$this->ipn_response; + + $message->text = $text; + $message->save(); + } + + function dump_fields() { + + // Used for debugging, this function will output all the field/value pairs + // that are currently defined in the instance of the class using the + // add_field() function. + + echo "

    paypal_class->dump_fields() Output:

    "; + echo " + + + + "; + + ksort($this->fields); + foreach ($this->fields as $key => $value) { + echo ""; + } + + echo "
    Field NameValue
    $key".urldecode($value)." 

    "; + } +} + + + diff --git a/modules/basket/libraries/Session_Basket.php b/modules/basket/libraries/Session_Basket.php index 11de4db0..c73cfe36 100644 --- a/modules/basket/libraries/Session_Basket.php +++ b/modules/basket/libraries/Session_Basket.php @@ -90,14 +90,32 @@ class Session_Basket_Core { public $email = ""; public $phone = ""; + public $ppenabled = true; + public function clear(){ if (isset($this->contents)){ foreach ($this->contents as $key => $item){ unset($this->contents[$key]); } } + $this->ppenabled = true; } + public function enablepp() + { + $this->ppenabled = true; + } + + public function disablepp() + { + $this->ppenabled = false; + } + + public function ispp(){ + return $this->ppenabled; + } + + private function create_key($product, $id){ return "$product _ $id"; } @@ -116,7 +134,7 @@ class Session_Basket_Core { $key = $this->create_key($product, $id); if (isset($this->contents[$key])){ - $this->contents[$key]->add($id, $quantity); + $this->contents[$key]->add($quantity); } else { $this->contents[$key] = new basket_item($product, $id, $quantity); diff --git a/modules/basket/models/ipn_message.php b/modules/basket/models/ipn_message.php new file mode 100644 index 00000000..c6f75ffa --- /dev/null +++ b/modules/basket/models/ipn_message.php @@ -0,0 +1,16 @@ +date); + } + + public function json_encode(){ + $toReturn = array( + 'id' => $this->id, + 'date' => $this->formatedTime(), + 'text' => text::convertText($this->text)); + return $toReturn; + } +} \ No newline at end of file diff --git a/modules/basket/models/order.php b/modules/basket/models/order.php new file mode 100644 index 00000000..1dc1a627 --- /dev/null +++ b/modules/basket/models/order.php @@ -0,0 +1,56 @@ +id." ".$this->name." ".$this->status(); + } + + public function status(){ + switch ($this->status){ + case 1: + return "Waiting Payment"; + case 2: + return "Payment Confirmed"; + case 20: + return "Complete"; + + default: + return "Unknown"; + } + } + + public function payment_method(){ + switch ($this->method){ + case 1: + return "through Paypal"; + case 2: + return "offline"; + + default: + return "Unknown"; + } + } +} diff --git a/modules/basket/module.info b/modules/basket/module.info index 5bf1f888..559c59aa 100644 --- a/modules/basket/module.info +++ b/modules/basket/module.info @@ -1,3 +1,3 @@ name = "Shopping Basket" description = "Provides a simple shopping basket and checkout with paypal integration" -version = 2 +version = 5 diff --git a/modules/basket/views/add_to_basket.html.php b/modules/basket/views/add_to_basket.html.php index aad7f892..a21a74d8 100644 --- a/modules/basket/views/add_to_basket.html.php +++ b/modules/basket/views/add_to_basket.html.php @@ -1,8 +1,5 @@ - \ No newline at end of file diff --git a/modules/basket/views/add_to_basket_ajax.html.php b/modules/basket/views/add_to_basket_ajax.html.php index f4e38d83..137ecef2 100644 --- a/modules/basket/views/add_to_basket_ajax.html.php +++ b/modules/basket/views/add_to_basket_ajax.html.php @@ -1,5 +1,5 @@ -
    +
    <?= $item->title?>
    diff --git a/modules/basket/views/admin_configure.html.php b/modules/basket/views/admin_configure.html.php index 5f3ae012..9960fe01 100644 --- a/modules/basket/views/admin_configure.html.php +++ b/modules/basket/views/admin_configure.html.php @@ -1,8 +1,7 @@ -
    -

    -

    - -

    - +
    +

    +

    +

    +
    \ No newline at end of file diff --git a/modules/basket/views/admin_postage_bands.html.php b/modules/basket/views/admin_postage_bands.html.php index 436c2a83..d79fe380 100644 --- a/modules/basket/views/admin_postage_bands.html.php +++ b/modules/basket/views/admin_postage_bands.html.php @@ -21,7 +21,7 @@
    " - class="gDialogLink gButtonLink right ui-icon-left ui-state-default ui-corner-all" + class="g-dialog-link g-button right ui-icon-left ui-state-default ui-corner-all" title=""> @@ -31,8 +31,8 @@ -
    - +
    +
    @@ -41,25 +41,26 @@ $postage_band): ?> - "> + "> - diff --git a/modules/basket/views/admin_product_lines.html.php b/modules/basket/views/admin_product_lines.html.php index 29cca094..f20f2a37 100644 --- a/modules/basket/views/admin_product_lines.html.php +++ b/modules/basket/views/admin_product_lines.html.php @@ -18,10 +18,10 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ ?> -
    name) ?> - flat_rate) ?> + flat_rate) ?> - per_item) ?> + per_item) ?> + id") ?>" open_text="" - class="gPanelLink gButtonLink ui-state-default ui-corner-all ui-icon-left"> - + class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> + id") ?>" - class="gDialogLink gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> +
    +
    +
    @@ -47,7 +47,7 @@ name) ?> - diff --git a/modules/basket/views/admin_templates.html.php b/modules/basket/views/admin_templates.html.php new file mode 100644 index 00000000..263293c4 --- /dev/null +++ b/modules/basket/views/admin_templates.html.php @@ -0,0 +1,8 @@ + +
    +

    +

    + +

    + +
    \ No newline at end of file diff --git a/modules/basket/views/basket-side-bar.html.php b/modules/basket/views/basket-side-bar.html.php new file mode 100644 index 00000000..d6ac00d7 --- /dev/null +++ b/modules/basket/views/basket-side-bar.html.php @@ -0,0 +1,42 @@ +page_type != 'basket'){ + if (basket::can_view_orders()){ + ?>
    " title="">item(); + if ($item->is_photo() && product::isForSale($theme->item()->id)){ + ?>

    +id") ?>" +title="">

    +contents) && ($basket->size() > 0)) { + ?>
    - cost) ?> + cost) ?> description) ?> @@ -57,14 +57,14 @@ + id") ?>" open_text="" - class="gPanelLink gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> id") ?>" - class="gDialogLink gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left">
    contents as $key => $prod_details){ + + ?>"> + + + +"> + +
    getItem(); + + ?><?= $item->title?>
    +quantity) ?> x product_description()) ?>
    cost?>cost); ?>" class="g-button ui-state-default ui-corner-all ui-icon-left">
    Totalispp()?basket::formatMoneyForWeb($total + $postage):basket::formatMoneyForWeb($total)?>

    +

    " title="">

    + page_type != 'basket'): ?> + + " + title="">View Orders + contents) && ($basket->size() > 0)): ?>
    " diff --git a/modules/basket/views/checkout.html.php b/modules/basket/views/checkout.html.php index f651d633..b9ceaa2d 100644 --- a/modules/basket/views/checkout.html.php +++ b/modules/basket/views/checkout.html.php @@ -41,7 +41,7 @@ function ci(v) return true; } -function so(){ +function so(g){ var p=true; var d=document.checkout; if(!ci(d.fullname)){p=false;} @@ -49,16 +49,38 @@ function so(){ if(!ci(d.phone)){p=false;} if (p) { + d.paypal.value=g; d.submit(); } } -
    - + diff --git a/modules/basket/views/confirm_order.html.php b/modules/basket/views/confirm_order.html.php index a14305d8..60ff14ac 100644 --- a/modules/basket/views/confirm_order.html.php +++ b/modules/basket/views/confirm_order.html.php @@ -24,8 +24,8 @@ function so(){document.confirm.submit();}

    Basket Summary

    -
    - +
    +
    @@ -48,18 +48,18 @@ function so(){document.confirm.submit();} quantity) ?> postage_cost();?> 0):?> "> - + "> - +
    - cost)) ?> + cost) ?>
    Postage and Packagingispp()?"":"style=\"text-decoration:line-through\""; ?>>Postage and Packagingispp()?"":"style=\"text-decoration:line-through\""; ?>>
    Total Costcost() + $postage))?>Total Costispp()?basket::formatMoneyForWeb($basket->cost() + $postage):basket::formatMoneyForWeb($basket->cost()); ?>
    @@ -80,9 +80,10 @@ E-mail : email ?>
    Telephone : phone ?> -" class="left gButtonLink ui-state-default ui-corner-all ui-icon-left"> +
    diff --git a/modules/basket/views/order_complete.html.php b/modules/basket/views/order_complete.html.php index 1287f058..5f384732 100644 --- a/modules/basket/views/order_complete.html.php +++ b/modules/basket/views/order_complete.html.php @@ -18,7 +18,13 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ ?> -
    +
    +

    Thankyou for your order

    -You will be contacted soon to arrange payment and delivery. +method == Order_Model::PAYMENT_PAYPAL){ +?>Your order will be confirmed when Paypal has finished processing your order.$ordernumber, "total_cost"=>basket::formatMoneyForWeb($total_cost)));?>
    \ No newline at end of file diff --git a/modules/basket/views/paypal_redirect.html.php b/modules/basket/views/paypal_redirect.html.php new file mode 100644 index 00000000..26a2438b --- /dev/null +++ b/modules/basket/views/paypal_redirect.html.php @@ -0,0 +1,4 @@ + +

    Processing

    If you are not automatically redirected to + paypal within 5 seconds Click Here.

    + diff --git a/modules/basket/views/pew1.html.php b/modules/basket/views/pew1.html.php new file mode 100644 index 00000000..c751f7cb --- /dev/null +++ b/modules/basket/views/pew1.html.php @@ -0,0 +1,16 @@ + + \ No newline at end of file diff --git a/modules/basket/views/pew2.html.php b/modules/basket/views/pew2.html.php new file mode 100644 index 00000000..41324d2d --- /dev/null +++ b/modules/basket/views/pew2.html.php @@ -0,0 +1,17 @@ + + \ No newline at end of file diff --git a/modules/basket/views/print_order.html.php b/modules/basket/views/print_order.html.php new file mode 100644 index 00000000..63598131 --- /dev/null +++ b/modules/basket/views/print_order.html.php @@ -0,0 +1,20 @@ + + + +Print Order + + + + + + + + + + + \ No newline at end of file diff --git a/modules/basket/views/view_basket.html.php b/modules/basket/views/view_basket.html.php index 94d9bf4a..891d2647 100644 --- a/modules/basket/views/view_basket.html.php +++ b/modules/basket/views/view_basket.html.php @@ -18,32 +18,50 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ ?> -
    + +
    +
    contents ) && count($basket->contents) > 0): ?> - - - - - " - class="right gButtonLink ui-state-default ui-corner-all ui-icon-right"> - - - " - class="right gButtonLink ui-state-default ui-corner-all ui-icon-right"> - - - -

    - -

    -
    + $(document).ready(function(){ + $("#pickup").click(function(){ + if (this.checked) + { + window.location = ""; + } + else + { + window.location = ""; + } + }); + }) + + + " + class="right g-button ui-state-default ui-corner-all ui-icon-right"> + + +
    +
    contents ) && count($basket->contents) > 0): ?> @@ -63,7 +81,9 @@ - postage_cost();?> 0):?> - "> - + "> + + + "> - "> - + + "> +
    getItem(); ?>
    + <?= $item->title?> +
    @@ -74,50 +94,44 @@ cost?> - cost)) ?> + cost); ?> - + " - class="gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="g-button ui-state-default ui-corner-all ui-icon-left">
    Postage and Packaging
    ispp()?"":"style=\"text-decoration:line-through\""; ?>>Postage and Packagingispp()?"":"style=\"text-decoration:line-through\""; ?>> +
    ispp()?"":"checked"; ?>/> Select if you wish to pick up the photos.
    Total Cost
    Total Costispp()?basket::formatMoneyForWeb($total + $postage):basket::formatMoneyForWeb($total)?>
    + Shopping Basket is Empty
    +
    \ No newline at end of file diff --git a/modules/basket/views/view_ipn.html.php b/modules/basket/views/view_ipn.html.php new file mode 100644 index 00000000..6c19e27f --- /dev/null +++ b/modules/basket/views/view_ipn.html.php @@ -0,0 +1,46 @@ + +

    IPN Messages for title()?>

    +">Back to orders +
    + + +
    +
    
    +
    + diff --git a/modules/basket/views/view_order.html.php b/modules/basket/views/view_order.html.php new file mode 100644 index 00000000..d735e26f --- /dev/null +++ b/modules/basket/views/view_order.html.php @@ -0,0 +1,18 @@ + +

    title()?>

    +Payment is payment_method()?>status==Order_Model::WAITING_PAYMENT){ + ?>
    id)."?csrf=$csrf";?>">Confirm Order Payment status==Order_Model::PAYMENT_CONFIRMED){ + ?>
    id)."?csrf=$csrf";?>">Confirm Order Delivery method==Order_Model::PAYMENT_PAYPAL){ + ?>
    id);?>">View Paypal IPN Messages
    +",$order->text);?> \ No newline at end of file diff --git a/modules/basket/views/view_orders.html.php b/modules/basket/views/view_orders.html.php new file mode 100644 index 00000000..a5c90e1c --- /dev/null +++ b/modules/basket/views/view_orders.html.php @@ -0,0 +1,67 @@ + +
    +
    + + + + + + +
    +
    +
    + +
    +
    
    +
    + From a90fdc51f8efd1a52b7a71d3791ce862f53480d5 Mon Sep 17 00:00:00 2001 From: dmolavi Date: Wed, 1 Sep 2010 08:42:00 +0800 Subject: [PATCH 37/55] Autorotate module now updates Exif information after rotation. This prevents external applications from re-rotating when viewing the image. --- modules/autorotate/helpers/autorotate.php | 21 +- modules/autorotate/lib/pel/Pel.php | 337 +++ modules/autorotate/lib/pel/PelConvert.php | 397 ++++ modules/autorotate/lib/pel/PelDataWindow.php | 525 +++++ modules/autorotate/lib/pel/PelEntry.php | 382 ++++ modules/autorotate/lib/pel/PelEntryAscii.php | 482 ++++ modules/autorotate/lib/pel/PelEntryByte.php | 275 +++ modules/autorotate/lib/pel/PelEntryLong.php | 182 ++ modules/autorotate/lib/pel/PelEntryNumber.php | 309 +++ .../autorotate/lib/pel/PelEntryRational.php | 290 +++ modules/autorotate/lib/pel/PelEntryShort.php | 599 +++++ .../autorotate/lib/pel/PelEntryUndefined.php | 416 ++++ modules/autorotate/lib/pel/PelException.php | 87 + modules/autorotate/lib/pel/PelExif.php | 175 ++ modules/autorotate/lib/pel/PelFormat.php | 225 ++ modules/autorotate/lib/pel/PelIfd.php | 1200 ++++++++++ modules/autorotate/lib/pel/PelJpeg.php | 599 +++++ modules/autorotate/lib/pel/PelJpegComment.php | 121 + modules/autorotate/lib/pel/PelJpegContent.php | 82 + modules/autorotate/lib/pel/PelJpegMarker.php | 435 ++++ modules/autorotate/lib/pel/PelTag.php | 1969 +++++++++++++++++ modules/autorotate/lib/pel/PelTiff.php | 296 +++ 22 files changed, 9403 insertions(+), 1 deletion(-) create mode 100644 modules/autorotate/lib/pel/Pel.php create mode 100644 modules/autorotate/lib/pel/PelConvert.php create mode 100644 modules/autorotate/lib/pel/PelDataWindow.php create mode 100644 modules/autorotate/lib/pel/PelEntry.php create mode 100644 modules/autorotate/lib/pel/PelEntryAscii.php create mode 100644 modules/autorotate/lib/pel/PelEntryByte.php create mode 100644 modules/autorotate/lib/pel/PelEntryLong.php create mode 100644 modules/autorotate/lib/pel/PelEntryNumber.php create mode 100644 modules/autorotate/lib/pel/PelEntryRational.php create mode 100644 modules/autorotate/lib/pel/PelEntryShort.php create mode 100644 modules/autorotate/lib/pel/PelEntryUndefined.php create mode 100644 modules/autorotate/lib/pel/PelException.php create mode 100644 modules/autorotate/lib/pel/PelExif.php create mode 100644 modules/autorotate/lib/pel/PelFormat.php create mode 100644 modules/autorotate/lib/pel/PelIfd.php create mode 100644 modules/autorotate/lib/pel/PelJpeg.php create mode 100644 modules/autorotate/lib/pel/PelJpegComment.php create mode 100644 modules/autorotate/lib/pel/PelJpegContent.php create mode 100644 modules/autorotate/lib/pel/PelJpegMarker.php create mode 100644 modules/autorotate/lib/pel/PelTag.php create mode 100644 modules/autorotate/lib/pel/PelTiff.php diff --git a/modules/autorotate/helpers/autorotate.php b/modules/autorotate/helpers/autorotate.php index ddf74b78..5bfe1afe 100644 --- a/modules/autorotate/helpers/autorotate.php +++ b/modules/autorotate/helpers/autorotate.php @@ -19,6 +19,11 @@ */ class autorotate { static function rotate_item($item) { + + require_once(MODPATH . 'autorotate/lib/pel/PelDataWindow.php'); + require_once(MODPATH . 'autorotate/lib/pel/PelJpeg.php'); + require_once(MODPATH . 'autorotate/lib/pel/PelTiff.php'); + // Only try to rotate photos based on EXIF if ($item->is_photo() && $item->mime_type == "image/jpeg") { require_once(MODPATH . "exif/lib/exif.php"); @@ -38,9 +43,23 @@ class autorotate { if($degrees) { $tmpfile = tempnam(TMPPATH, "rotate"); gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees)); + // Update EXIF info + $data = new PelDataWindow(file_get_contents($tmpfile)); + if (PelJpeg::isValid($data)) { + $jpeg = $file = new PelJpeg(); + $jpeg->load($data); + $exif = $jpeg->getExif(); + if($exif !== null) { + $tiff = $exif->getTiff(); + $ifd0 = $tiff->getIfd(); + $orientation = $ifd0->getEntry(PelTag::ORIENTATION); + $orientation->setValue(1); + file_put_contents($tmpfile, $file->getBytes()); + } + } $item->set_data_file($tmpfile); $item->save(); - unlink($tmpfile); + unlink($tmpfile); } } } diff --git a/modules/autorotate/lib/pel/Pel.php b/modules/autorotate/lib/pel/Pel.php new file mode 100644 index 00000000..c1eb8264 --- /dev/null +++ b/modules/autorotate/lib/pel/Pel.php @@ -0,0 +1,337 @@ + + * @version $Revision: 463 $ + * @date $Date: 2006-11-18 23:25:24 +0100 (Sat, 18 Nov 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + + +/* Initialize Gettext, if available. This must be done before any + * part of PEL calls Pel::tra() or Pel::fmt() --- this is ensured if + * every piece of code using those two functions require() this file. + * + * If Gettext is not available, wrapper functions will be created, + * allowing PEL to function, but without any translations. + * + * The PEL translations are stored in './locale'. It is important to + * use an absolute path here because the lookups will be relative to + * the current directory. */ + +if (function_exists('dgettext')) { + bindtextdomain('pel', dirname(__FILE__) . '/locale'); +} else { + + /** + * Pretend to lookup a message in a specific domain. + * + * This is just a stub which will return the original message + * untranslated. The function will only be defined if the Gettext + * extension has not already defined it. + * + * @param string $domain the domain. + * + * @param string $str the message to be translated. + * + * @return string the original, untranslated message. + */ + function dgettext($domain, $str) { + return $str; + } +} + + +/** + * Class with miscellaneous static methods. + * + * This class will contain various methods that govern the overall + * behavior of PEL. + * + * Debugging output from PEL can be turned on and off by assigning + * true or false to {@link Pel::$debug}. + * + * @author Martin Geisler + * @package PEL + */ +class Pel { + + /** + * Flag for controlling debug information. + * + * The methods producing debug information ({@link debug()} and + * {@link warning()}) will only output something if this variable is + * set to true. + * + * @var boolean + */ + private static $debug = false; + + /** + * Flag for strictness of parsing. + * + * If this variable is set to true, then most errors while loading + * images will result in exceptions being thrown. Otherwise a + * warning will be emitted (using {@link Pel::warning}) and the + * exceptions will be appended to {@link Pel::$exceptions}. + * + * Some errors will still be fatal and result in thrown exceptions, + * but an effort will be made to skip over as much garbage as + * possible. + * + * @var boolean + */ + private static $strict = false; + + /** + * Stored exceptions. + * + * When {@link Pel::$strict} is set to false exceptions will be + * accumulated here instead of being thrown. + */ + private static $exceptions = array(); + + + /** + * Return list of stored exceptions. + * + * When PEL is parsing in non-strict mode, it will store most + * exceptions instead of throwing them. Use this method to get hold + * of them when a call returns. + * + * Code for using this could look like this: + * + * + * Pel::setStrictParsing(true); + * Pel::clearExceptions(); + * + * $jpeg = new PelJpeg($file); + * + * // Check for exceptions. + * foreach (Pel::getExceptions() as $e) { + * printf("Exception: %s\n", $e->getMessage()); + * if ($e instanceof PelEntryException) { + * // Warn about entries that couldn't be loaded. + * printf("Warning: Problem with %s.\n", + * PelTag::getName($e->getType(), $e->getTag())); + * } + * } + * + * + * This gives applications total control over the amount of error + * messages shown and (hopefully) provides the necessary information + * for proper error recovery. + * + * @return array the exceptions. + */ + static function getExceptions() { + return self::$exceptions; + } + + + /** + * Clear list of stored exceptions. + * + * Use this function before a call to some method if you intend to + * check for exceptions afterwards. + */ + static function clearExceptions() { + self::$exceptions = array(); + } + + + /** + * Conditionally throw an exception. + * + * This method will throw the passed exception when strict parsing + * in effect (see {@link setStrictParsing()}). Otherwise the + * exception is stored (it can be accessed with {@link + * getExceptions()}) and a warning is issued (with {@link + * Pel::warning}). + * + * @param PelException $e the exceptions. + */ + static function maybeThrow(PelException $e) { + if (self::$strict) { + throw $e; + } else { + self::$exceptions[] = $e; + self::warning('%s (%s:%s)', $e->getMessage(), + basename($e->getFile()), $e->getLine()); + } + } + + + /** + * Enable/disable strict parsing. + * + * If strict parsing is enabled, then most errors while loading + * images will result in exceptions being thrown. Otherwise a + * warning will be emitted (using {@link Pel::warning}) and the + * exceptions will be stored for later use via {@link + * getExceptions()}. + * + * Some errors will still be fatal and result in thrown exceptions, + * but an effort will be made to skip over as much garbage as + * possible. + * + * @param boolean $flag use true to enable strict parsing, false to + * diable. + */ + function setStrictParsing($flag) { + self::$strict = $flag; + } + + + /** + * Get current setting for strict parsing. + * + * @return boolean true if strict parsing is in effect, false + * otherwise. + */ + function getStrictParsing() { + return self::$strict; + } + + + /** + * Enable/disable debugging output. + * + * @param boolean $flag use true to enable debug output, false to + * diable. + */ + function setDebug($flag) { + self::$debug = $flag; + } + + + /** + * Get current setting for debug output. + * + * @return boolean true if debug is enabled, false otherwise. + */ + function getDebug() { + return self::$debug; + } + + + /** + * Conditionally output debug information. + * + * This method works just like printf() except that it always + * terminates the output with a newline, and that it only outputs + * something if the {@link Pel::$debug} is true. + * + * @param string $format the format string. + * + * @param mixed $args,... any number of arguments can be given. The + * arguments will be available for the format string as usual with + * sprintf(). + */ + static function debug() { + if (self::$debug) { + $args = func_get_args(); + $str = array_shift($args); + vprintf($str . "\n", $args); + } + } + + + /** + * Conditionally output a warning. + * + * This method works just like printf() except that it prepends the + * output with the string 'Warning: ', terminates the output with a + * newline, and that it only outputs something if the PEL_DEBUG + * defined to some true value. + * + * @param string $format the format string. + * + * @param mixed $args,... any number of arguments can be given. The + * arguments will be available for the format string as usual with + * sprintf(). + */ + static function warning() { + if (self::$debug) { + $args = func_get_args(); + $str = array_shift($args); + vprintf('Warning: ' . $str . "\n", $args); + } + } + + + /** + * Translate a string. + * + * This static function will use Gettext to translate a string. By + * always using this function for static string one is assured that + * the translation will be taken from the correct text domain. + * Dynamic strings should be passed to {@link fmt} instead. + * + * @param string the string that should be translated. + * + * @return string the translated string, or the original string if + * no translation could be found. + */ + static function tra($str) { + return dgettext('pel', $str); + } + + + /** + * Translate and format a string. + * + * This static function will first use Gettext to translate a format + * string, which will then have access to any extra arguments. By + * always using this function for dynamic string one is assured that + * the translation will be taken from the correct text domain. If + * the string is static, use {@link tra} instead as it will be + * faster. + * + * @param string $format the format string. This will be translated + * before being used as a format string. + * + * @param mixed $args,... any number of arguments can be given. The + * arguments will be available for the format string as usual with + * sprintf(). + * + * @return string the translated string, or the original string if + * no translation could be found. + */ + static function fmt() { + $args = func_get_args(); + $str = array_shift($args); + return vsprintf(dgettext('pel', $str), $args); + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelConvert.php b/modules/autorotate/lib/pel/PelConvert.php new file mode 100644 index 00000000..31c4b2a6 --- /dev/null +++ b/modules/autorotate/lib/pel/PelConvert.php @@ -0,0 +1,397 @@ + + * @version $Revision: 387 $ + * @date $Date: 2005-10-05 13:02:52 +0200 (Wed, 05 Oct 2005) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/** + * Conversion functions to and from bytes and integers. + * + * The functions found in this class are used to convert bytes into + * integers of several sizes ({@link bytesToShort}, {@link + * bytesToLong}, and {@link bytesToRational}) and convert integers of + * several sizes into bytes ({@link shortToBytes} and {@link + * longToBytes}). + * + * All the methods are static and they all rely on an argument that + * specifies the byte order to be used, this must be one of the class + * constants {@link LITTLE_ENDIAN} or {@link BIG_ENDIAN}. These + * constants will be referred to as the pseudo type PelByteOrder + * throughout the documentation. + * + * @author Martin Geisler + * @package PEL + */ +class PelConvert { + + /** + * Little-endian (Intel) byte order. + * + * Data stored in little-endian byte order store the least + * significant byte first, so the number 0x12345678 becomes 0x78 + * 0x56 0x34 0x12 when stored with little-endian byte order. + */ + const LITTLE_ENDIAN = true; + + /** + * Big-endian (Motorola) byte order. + * + * Data stored in big-endian byte order store the most significant + * byte first, so the number 0x12345678 becomes 0x12 0x34 0x56 0x78 + * when stored with big-endian byte order. + */ + const BIG_ENDIAN = false; + + + /** + * Convert an unsigned short into two bytes. + * + * @param int the unsigned short that will be converted. The lower + * two bytes will be extracted regardless of the actual size passed. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + * + * @return string the bytes representing the unsigned short. + */ + static function shortToBytes($value, $endian) { + if ($endian == self::LITTLE_ENDIAN) + return chr($value) . chr($value >> 8); + else + return chr($value >> 8) . chr($value); + } + + + /** + * Convert a signed short into two bytes. + * + * @param int the signed short that will be converted. The lower + * two bytes will be extracted regardless of the actual size passed. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + * + * @return string the bytes representing the signed short. + */ + static function sShortToBytes($value, $endian) { + /* We can just use shortToBytes, since signed shorts fits well + * within the 32 bit signed integers used in PHP. */ + return self::shortToBytes($value, $endian); + } + + + /** + * Convert an unsigned long into four bytes. + * + * Because PHP limits the size of integers to 32 bit signed, one + * cannot really have an unsigned integer in PHP. But integers + * larger than 2^31-1 will be promoted to 64 bit signed floating + * point numbers, and so such large numbers can be handled too. + * + * @param int the unsigned long that will be converted. The + * argument will be treated as an unsigned 32 bit integer and the + * lower four bytes will be extracted. Treating the argument as an + * unsigned integer means that the absolute value will be used. Use + * {@link sLongToBytes} to convert signed integers. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + * + * @return string the bytes representing the unsigned long. + */ + static function longToBytes($value, $endian) { + /* We cannot convert the number to bytes in the normal way (using + * shifts and modulo calculations) because the PHP operator >> and + * function chr() clip their arguments to 2^31-1, which is the + * largest signed integer known to PHP. But luckily base_convert + * handles such big numbers. */ + $hex = str_pad(base_convert($value, 10, 16), 8, '0', STR_PAD_LEFT); + if ($endian == self::LITTLE_ENDIAN) + return (chr(hexdec($hex{6} . $hex{7})) . + chr(hexdec($hex{4} . $hex{5})) . + chr(hexdec($hex{2} . $hex{3})) . + chr(hexdec($hex{0} . $hex{1}))); + else + return (chr(hexdec($hex{0} . $hex{1})) . + chr(hexdec($hex{2} . $hex{3})) . + chr(hexdec($hex{4} . $hex{5})) . + chr(hexdec($hex{6} . $hex{7}))); + } + + + /** + * Convert a signed long into four bytes. + * + * @param int the signed long that will be converted. The argument + * will be treated as a signed 32 bit integer, from which the lower + * four bytes will be extracted. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + * + * @return string the bytes representing the signed long. + */ + static function sLongToBytes($value, $endian) { + /* We can convert the number into bytes in the normal way using + * shifts and modulo calculations here (in contrast with + * longToBytes) because PHP automatically handles 32 bit signed + * integers for us. */ + if ($endian == self::LITTLE_ENDIAN) + return (chr($value) . + chr($value >> 8) . + chr($value >> 16) . + chr($value >> 24)); + else + return (chr($value >> 24) . + chr($value >> 16) . + chr($value >> 8) . + chr($value)); + } + + + /** + * Extract an unsigned byte from a string of bytes. + * + * @param string the bytes. + * + * @param int the offset. The byte found at the offset will be + * returned as an integer. The must be at least one byte available + * at offset. + * + * @return int the unsigned byte found at offset, e.g., an integer + * in the range 0 to 255. + */ + static function bytesToByte($bytes, $offset) { + return ord($bytes{$offset}); + } + + + /** + * Extract a signed byte from bytes. + * + * @param string the bytes. + * + * @param int the offset. The byte found at the offset will be + * returned as an integer. The must be at least one byte available + * at offset. + * + * @return int the signed byte found at offset, e.g., an integer in + * the range -128 to 127. + */ + static function bytesToSByte($bytes, $offset) { + $n = self::bytesToByte($bytes, $offset); + if ($n > 127) + return $n - 256; + else + return $n; + } + + + /** + * Extract an unsigned short from bytes. + * + * @param string the bytes. + * + * @param int the offset. The short found at the offset will be + * returned as an integer. There must be at least two bytes + * available beginning at the offset given. + * + * @return int the unsigned short found at offset, e.g., an integer + * in the range 0 to 65535. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + */ + static function bytesToShort($bytes, $offset, $endian) { + if ($endian == self::LITTLE_ENDIAN) + return (ord($bytes{$offset+1}) * 256 + + ord($bytes{$offset})); + else + return (ord($bytes{$offset}) * 256 + + ord($bytes{$offset+1})); + } + + + /** + * Extract a signed short from bytes. + * + * @param string the bytes. + * + * @param int the offset. The short found at offset will be returned + * as an integer. There must be at least two bytes available + * beginning at the offset given. + * + * @return int the signed byte found at offset, e.g., an integer in + * the range -32768 to 32767. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + */ + static function bytesToSShort($bytes, $offset, $endian) { + $n = self::bytesToShort($bytes, $offset, $endian); + if ($n > 32767) + return $n - 65536; + else + return $n; + } + + + /** + * Extract an unsigned long from bytes. + * + * @param string the bytes. + * + * @param int the offset. The long found at offset will be returned + * as an integer. There must be at least four bytes available + * beginning at the offset given. + * + * @return int the unsigned long found at offset, e.g., an integer + * in the range 0 to 4294967295. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + */ + static function bytesToLong($bytes, $offset, $endian) { + if ($endian == self::LITTLE_ENDIAN) + return (ord($bytes{$offset+3}) * 16777216 + + ord($bytes{$offset+2}) * 65536 + + ord($bytes{$offset+1}) * 256 + + ord($bytes{$offset})); + else + return (ord($bytes{$offset}) * 16777216 + + ord($bytes{$offset+1}) * 65536 + + ord($bytes{$offset+2}) * 256 + + ord($bytes{$offset+3})); + } + + + /** + * Extract a signed long from bytes. + * + * @param string the bytes. + * + * @param int the offset. The long found at offset will be returned + * as an integer. There must be at least four bytes available + * beginning at the offset given. + * + * @return int the signed long found at offset, e.g., an integer in + * the range -2147483648 to 2147483647. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + */ + static function bytesToSLong($bytes, $offset, $endian) { + $n = self::bytesToLong($bytes, $offset, $endian); + if ($n > 2147483647) + return $n - 4294967296; + else + return $n; + } + + + /** + * Extract an unsigned rational from bytes. + * + * @param string the bytes. + * + * @param int the offset. The rational found at offset will be + * returned as an array. There must be at least eight bytes + * available beginning at the offset given. + * + * @return array the unsigned rational found at offset, e.g., an + * array with two integers in the range 0 to 4294967295. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + */ + static function bytesToRational($bytes, $offset, $endian) { + return array(self::bytesToLong($bytes, $offset, $endian), + self::bytesToLong($bytes, $offset+4, $endian)); + } + + + /** + * Extract a signed rational from bytes. + * + * @param string the bytes. + * + * @param int the offset. The rational found at offset will be + * returned as an array. There must be at least eight bytes + * available beginning at the offset given. + * + * @return array the signed rational found at offset, e.g., an array + * with two integers in the range -2147483648 to 2147483647. + * + * @param PelByteOrder one of {@link LITTLE_ENDIAN} and {@link + * BIG_ENDIAN}. + */ + static function bytesToSRational($bytes, $offset, $endian) { + return array(self::bytesToSLong($bytes, $offset, $endian), + self::bytesToSLong($bytes, $offset+4, $endian)); + } + + + /** + * Format bytes for dumping. + * + * This method is for debug output, it will format a string as a + * hexadecimal dump suitable for display on a terminal. The output + * is printed directly to standard out. + * + * @param string the bytes that will be dumped. + * + * @param int the maximum number of bytes to dump. If this is left + * out (or left to the default of 0), then the entire string will be + * dumped. + */ + static function bytesToDump($bytes, $max = 0) { + $s = strlen($bytes); + + if ($max > 0) + $s = min($max, $s); + + $line = 24; + + for ($i = 0; $i < $s; $i++) { + printf('%02X ', ord($bytes{$i})); + + if (($i+1) % $line == 0) + print("\n"); + } + print("\n"); + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelDataWindow.php b/modules/autorotate/lib/pel/PelDataWindow.php new file mode 100644 index 00000000..523f8277 --- /dev/null +++ b/modules/autorotate/lib/pel/PelDataWindow.php @@ -0,0 +1,525 @@ + + * @version $Revision: 387 $ + * @date $Date: 2005-10-05 13:02:52 +0200 (Wed, 05 Oct 2005) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelException.php'); +require_once('PelConvert.php'); +/**#@-*/ + + +/** + * An exception thrown when an invalid offset is encountered. + * + * @package PEL + * @subpackage Exception + */ +class PelDataWindowOffsetException extends PelException {} + +/** + * An exception thrown when an invalid window is encountered. + * + * @package PEL + * @subpackage Exception + */ +class PelDataWindowWindowException extends PelException {} + +/** + * The window. + * + * @package PEL + */ +class PelDataWindow { + + /** + * The data held by this window. + * + * The string can contain any kind of data, including binary data. + * + * @var string + */ + private $data = ''; + + /** + * The byte order currently in use. + * + * This will be the byte order used when data is read using the for + * example the {@link getShort} function. It must be one of {@link + * PelConvert::LITTLE_ENDIAN} and {@link PelConvert::BIG_ENDIAN}. + * + * @var PelByteOrder + * @see setByteOrder, getByteOrder + */ + private $order; + + /** + * The start of the current window. + * + * All offsets used for access into the data will count from this + * offset, effectively limiting access to a window starting at this + * byte. + * + * @var int + * @see setWindowStart + */ + private $start = 0; + + /** + * The size of the current window. + * + * All offsets used for access into the data will be limited by this + * variable. A valid offset must be strictly less than this + * variable. + * + * @var int + * @see setWindowSize + */ + private $size = 0; + + + /** + * Construct a new data window with the data supplied. + * + * @param string the data that this window will contain. The data + * will be copied into the new data window. + * + * @param boolean the initial byte order of the window. This must + * be either {@link PelConvert::LITTLE_ENDIAN} or {@link + * PelConvert::BIG_ENDIAN}. This will be used when integers are + * read from the data, and it can be changed later with {@link + * setByteOrder()}. + */ + function __construct($d = '', $e = PelConvert::LITTLE_ENDIAN) { + $this->data = $d; + $this->order = $e; + $this->size = strlen($d); + } + + + /** + * Get the size of the data window. + * + * @return int the number of bytes covered by the window. The + * allowed offsets go from 0 up to this number minus one. + * + * @see getBytes() + */ + function getSize() { + return $this->size; + } + + + /** + * Change the byte order of the data. + * + * @param PelByteOrder the new byte order. This must be either + * {@link PelConvert::LITTLE_ENDIAN} or {@link + * PelConvert::BIG_ENDIAN}. + */ + function setByteOrder($o) { + $this->order = $o; + } + + + /** + * Get the currently used byte order. + * + * @return PelByteOrder this will be either {@link + * PelConvert::LITTLE_ENDIAN} or {@link PelConvert::BIG_ENDIAN}. + */ + function getByteOrder() { + return $this->order; + } + + + /* Move the start of the window forward. + * + * @param int the new start of the window. All new offsets will be + * calculated from this new start offset, and the size of the window + * will shrink to keep the end of the window in place. + */ + function setWindowStart($start) { + if ($start < 0 || $start > $this->size) + throw new PelDataWindowWindowException('Window [%d, %d] does ' . + 'not fit in window [0, %d]', + $start, $this->size, $this->size); + + $this->start += $start; + $this->size -= $start; + } + + + /** + * Adjust the size of the window. + * + * The size can only be made smaller. + * + * @param int the desired size of the window. If the argument is + * negative, the window will be shrunk by the argument. + */ + function setWindowSize($size) { + if ($size < 0) + $size += $this->size; + + if ($size < 0 || $size > $this->size) + throw new PelDataWindowWindowException('Window [0, %d] ' . + 'does not fit in window [0, %d]', + $size, $this->size); + $this->size = $size; + } + + + /** + * Make a new data window with the same data as the this window. + * + * @param mixed if an integer is supplied, then it will be the start + * of the window in the clone. If left unspecified, then the clone + * will inherit the start from this object. + * + * @param mixed if an integer is supplied, then it will be the size + * of the window in the clone. If left unspecified, then the clone + * will inherit the size from this object. + * + * @return PelDataWindow a new window that operates on the same data + * as this window, but (optionally) with a smaller window size. + */ + function getClone($start = false, $size = false) { + $c = clone $this; + + if (is_int($start)) + $c->setWindowStart($start); + + if (is_int($size)) + $c->setWindowSize($size); + + return $c; + } + + + /** + * Validate an offset against the current window. + * + * @param int the offset to be validated. If the offset is negative + * or if it is greater than or equal to the current window size, + * then a {@link PelDataWindowOffsetException} is thrown. + * + * @return void if the offset is valid nothing is returned, if it is + * invalid a new {@link PelDataWindowOffsetException} is thrown. + */ + private function validateOffset($o) { + if ($o < 0 || $o >= $this->size) + throw new PelDataWindowOffsetException('Offset %d not within [%d, %d]', + $o, 0, $this->size-1); + } + + + /** + * Return some or all bytes visible in the window. + * + * This method works just like the standard {@link substr()} + * function in PHP with the exception that it works within the + * window of accessible bytes and does strict range checking. + * + * @param int the offset to the first byte returned. If a negative + * number is given, then the counting will be from the end of the + * window. Invalid offsets will result in a {@link + * PelDataWindowOffsetException} being thrown. + * + * @param int the size of the sub-window. If a negative number is + * given, then that many bytes will be omitted from the result. + * + * @return string a subset of the bytes in the window. This will + * always return no more than {@link getSize()} bytes. + */ + function getBytes($start = false, $size = false) { + if (is_int($start)) { + if ($start < 0) + $start += $this->size; + + $this->validateOffset($start); + } else { + $start = 0; + } + + if (is_int($size)) { + if ($size <= 0) + $size += $this->size - $start; + + $this->validateOffset($start+$size); + } else { + $size = $this->size - $start; + } + + return substr($this->data, $this->start + $start, $size); + } + + + /** + * Return an unsigned byte from the data. + * + * @param int the offset into the data. An offset of zero will + * return the first byte in the current allowed window. The last + * valid offset is equal to {@link getSize()}-1. Invalid offsets + * will result in a {@link PelDataWindowOffsetException} being + * thrown. + * + * @return int the unsigned byte found at offset. + */ + function getByte($o = 0) { + /* Validate the offset --- this throws an exception if offset is + * out of range. */ + $this->validateOffset($o); + + /* Translate the offset into an offset into the data. */ + $o += $this->start; + + /* Return an unsigned byte. */ + return PelConvert::bytesToByte($this->data, $o); + } + + + /** + * Return a signed byte from the data. + * + * @param int the offset into the data. An offset of zero will + * return the first byte in the current allowed window. The last + * valid offset is equal to {@link getSize()}-1. Invalid offsets + * will result in a {@link PelDataWindowOffsetException} being + * thrown. + * + * @return int the signed byte found at offset. + */ + function getSByte($o = 0) { + /* Validate the offset --- this throws an exception if offset is + * out of range. */ + $this->validateOffset($o); + + /* Translate the offset into an offset into the data. */ + $o += $this->start; + + /* Return a signed byte. */ + return PelConvert::bytesToSByte($this->data, $o); + } + + + /** + * Return an unsigned short read from the data. + * + * @param int the offset into the data. An offset of zero will + * return the first short available in the current allowed window. + * The last valid offset is equal to {@link getSize()}-2. Invalid + * offsets will result in a {@link PelDataWindowOffsetException} + * being thrown. + * + * @return int the unsigned short found at offset. + */ + function getShort($o = 0) { + /* Validate the offset+1 to see if we can safely get two bytes --- + * this throws an exception if offset is out of range. */ + $this->validateOffset($o); + $this->validateOffset($o+1); + + /* Translate the offset into an offset into the data. */ + $o += $this->start; + + /* Return an unsigned short. */ + return PelConvert::bytesToShort($this->data, $o, $this->order); + } + + + /** + * Return a signed short read from the data. + * + * @param int the offset into the data. An offset of zero will + * return the first short available in the current allowed window. + * The last valid offset is equal to {@link getSize()}-2. Invalid + * offsets will result in a {@link PelDataWindowOffsetException} + * being thrown. + * + * @return int the signed short found at offset. + */ + function getSShort($o = 0) { + /* Validate the offset+1 to see if we can safely get two bytes --- + * this throws an exception if offset is out of range. */ + $this->validateOffset($o); + $this->validateOffset($o+1); + + /* Translate the offset into an offset into the data. */ + $o += $this->start; + + /* Return a signed short. */ + return PelConvert::bytesToSShort($this->data, $o, $this->order); + } + + + /** + * Return an unsigned long read from the data. + * + * @param int the offset into the data. An offset of zero will + * return the first long available in the current allowed window. + * The last valid offset is equal to {@link getSize()}-4. Invalid + * offsets will result in a {@link PelDataWindowOffsetException} + * being thrown. + * + * @return int the unsigned long found at offset. + */ + function getLong($o = 0) { + /* Validate the offset+3 to see if we can safely get four bytes + * --- this throws an exception if offset is out of range. */ + $this->validateOffset($o); + $this->validateOffset($o+3); + + /* Translate the offset into an offset into the data. */ + $o += $this->start; + + /* Return an unsigned long. */ + return PelConvert::bytesToLong($this->data, $o, $this->order); + } + + + /** + * Return a signed long read from the data. + * + * @param int the offset into the data. An offset of zero will + * return the first long available in the current allowed window. + * The last valid offset is equal to {@link getSize()}-4. Invalid + * offsets will result in a {@link PelDataWindowOffsetException} + * being thrown. + * + * @return int the signed long found at offset. + */ + function getSLong($o = 0) { + /* Validate the offset+3 to see if we can safely get four bytes + * --- this throws an exception if offset is out of range. */ + $this->validateOffset($o); + $this->validateOffset($o+3); + + /* Translate the offset into an offset into the data. */ + $o += $this->start; + + /* Return a signed long. */ + return PelConvert::bytesToSLong($this->data, $o, $this->order); + } + + + /** + * Return an unsigned rational read from the data. + * + * @param int the offset into the data. An offset of zero will + * return the first rational available in the current allowed + * window. The last valid offset is equal to {@link getSize()}-8. + * Invalid offsets will result in a {@link + * PelDataWindowOffsetException} being thrown. + * + * @return array the unsigned rational found at offset. A rational + * number is represented as an array of two numbers: the enumerator + * and denominator. Both of these numbers will be unsigned longs. + */ + function getRational($o = 0) { + return array($this->getLong($o), $this->getLong($o+4)); + } + + + /** + * Return a signed rational read from the data. + * + * @param int the offset into the data. An offset of zero will + * return the first rational available in the current allowed + * window. The last valid offset is equal to {@link getSize()}-8. + * Invalid offsets will result in a {@link + * PelDataWindowOffsetException} being thrown. + * + * @return array the signed rational found at offset. A rational + * number is represented as an array of two numbers: the enumerator + * and denominator. Both of these numbers will be signed longs. + */ + function getSRational($o = 0) { + return array($this->getSLong($o), $this->getSLong($o+4)); + } + + + /** + * String comparison on substrings. + * + * @param int the offset into the data. An offset of zero will make + * the comparison start with the very first byte available in the + * window. The last valid offset is equal to {@link getSize()} + * minus the length of the string. If the string is too long, then + * a {@link PelDataWindowOffsetException} will be thrown. + * + * @param string the string to compare with. + * + * @return boolean true if the string given matches the data in the + * window, at the specified offset, false otherwise. The comparison + * will stop as soon as a mismatch if found. + */ + function strcmp($o, $str) { + /* Validate the offset of the final character we might have to + * check. */ + $s = strlen($str); + $this->validateOffset($o); + $this->validateOffset($o + $s - 1); + + /* Translate the offset into an offset into the data. */ + $o += $this->start; + + /* Check each character, return as soon as the answer is known. */ + for ($i = 0; $i < $s; $i++) { + if ($this->data{$o + $i} != $str{$i}) + return false; + } + + /* All characters matches each other, return true. */ + return true; + } + + + /** + * Return a string representation of the data window. + * + * @return string a description of the window with information about + * the number of bytes accessible, the total number of bytes, and + * the window start and stop. + */ + function __toString() { + return Pel::fmt('DataWindow: %d bytes in [%d, %d] of %d bytes', + $this->size, + $this->start, $this->start + $this->size, + strlen($this->data)); + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelEntry.php b/modules/autorotate/lib/pel/PelEntry.php new file mode 100644 index 00000000..b3c1d15c --- /dev/null +++ b/modules/autorotate/lib/pel/PelEntry.php @@ -0,0 +1,382 @@ + + * @version $Revision: 442 $ + * @date $Date: 2006-09-17 14:45:10 +0200 (Sun, 17 Sep 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelException.php'); +require_once('PelFormat.php'); +require_once('PelTag.php'); +require_once('Pel.php'); +/**#@-*/ + + +/** + * Exception indicating a problem with an entry. + * + * @author Martin Geisler + * @package PEL + * @subpackage Exception + */ +class PelEntryException extends PelException { + + /** + * The IFD type (if known). + * + * @var int + */ + protected $type; + + /** + * The tag of the entry (if known). + * + * @var PelTag + */ + protected $tag; + + /** + * Get the IFD type associated with the exception. + * + * @return int one of {@link PelIfd::IFD0}, {@link PelIfd::IFD1}, + * {@link PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link + * PelIfd::INTEROPERABILITY}. If no type is set, null is returned. + */ + function getIfdType() { + return $this->type; + } + + + /** + * Get the tag associated with the exception. + * + * @return PelTag the tag. If no tag is set, null is returned. + */ + function getTag() { + return $this->tag; + } + +} + + +/** + * Exception indicating that an unexpected format was found. + * + * The documentation for each tag in {@link PelTag} will detail any + * constrains. + * + * @author Martin Geisler + * @package PEL + * @subpackage Exception + */ +class PelUnexpectedFormatException extends PelEntryException { + + /** + * Construct a new exception indicating an invalid format. + * + * @param int the type of IFD. + * + * @param PelTag the tag for which the violation was found. + * + * @param PelFormat the format found. + * + * @param PelFormat the expected format. + */ + function __construct($type, $tag, $found, $expected) { + parent::__construct('Unexpected format found for %s tag: PelFormat::%s. ' . + 'Expected PelFormat::%s instead.', + PelTag::getName($type, $tag), + strtoupper(PelFormat::getName($found)), + strtoupper(PelFormat::getName($expected))); + $this->tag = $tag; + $this->type = $type; + } +} + + +/** + * Exception indicating that an unexpected number of components was + * found. + * + * Some tags have strict limits as to the allowed number of + * components, and this exception is thrown if the data violates such + * a constraint. The documentation for each tag in {@link PelTag} + * explains the expected number of components. + * + * @author Martin Geisler + * @package PEL + * @subpackage Exception + */ +class PelWrongComponentCountException extends PelEntryException { + + /** + * Construct a new exception indicating a wrong number of + * components. + * + * @param int the type of IFD. + * + * @param PelTag the tag for which the violation was found. + * + * @param int the number of components found. + * + * @param int the expected number of components. + */ + function __construct($type, $tag, $found, $expected) { + parent::__construct('Wrong number of components found for %s tag: %d. ' . + 'Expected %d.', + PelTag::getName($type, $tag), $found, $expected); + $this->tag = $tag; + $this->type = $type; + } +} + + +/** + * Common ancestor class of all {@link PelIfd} entries. + * + * As this class is abstract you cannot instantiate objects from it. + * It only serves as a common ancestor to define the methods common to + * all entries. The most important methods are {@link getValue()} and + * {@link setValue()}, both of which is abstract in this class. The + * descendants will give concrete implementations for them. + * + * If you have some data coming from an image (some raw bytes), then + * the static method {@link newFromData()} is helpful --- it will look + * at the data and give you a proper decendent of {@link PelEntry} + * back. + * + * If you instead want to have an entry for some data which take the + * form of an integer, a string, a byte, or some other PHP type, then + * don't use this class. You should instead create an object of the + * right subclass ({@link PelEntryShort} for short integers, {@link + * PelEntryAscii} for strings, and so on) directly. + * + * @author Martin Geisler + * @package PEL + */ +abstract class PelEntry { + + /** + * Type of IFD containing this tag. + * + * This must be one of the constants defined in {@link PelIfd}: + * {@link PelIfd::IFD0} for the main image IFD, {@link PelIfd::IFD1} + * for the thumbnail image IFD, {@link PelIfd::EXIF} for the Exif + * sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or {@link + * PelIfd::INTEROPERABILITY} for the interoperability sub-IFD. + * + * @var int + */ + protected $ifd_type; + + /** + * The bytes representing this entry. + * + * Subclasses must either override {@link getBytes()} or, if + * possible, maintain this property so that it always contains a + * true representation of the entry. + * + * @var string + */ + protected $bytes = ''; + + /** + * The {@link PelTag} of this entry. + * + * @var PelTag + */ + protected $tag; + + /** + * The {@link PelFormat} of this entry. + * + * @var PelFormat + */ + protected $format; + + /** + * The number of components of this entry. + * + * @var int + */ + protected $components; + + + /** + * Return the tag of this entry. + * + * @return PelTag the tag of this entry. + */ + function getTag() { + return $this->tag; + } + + + /** + * Return the type of IFD which holds this entry. + * + * @return int one of the constants defined in {@link PelIfd}: + * {@link PelIfd::IFD0} for the main image IFD, {@link PelIfd::IFD1} + * for the thumbnail image IFD, {@link PelIfd::EXIF} for the Exif + * sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or {@link + * PelIfd::INTEROPERABILITY} for the interoperability sub-IFD. + */ + function getIfdType() { + return $this->ifd_type; + } + + + /** + * Update the IFD type. + * + * @param int must be one of the constants defined in {@link + * PelIfd}: {@link PelIfd::IFD0} for the main image IFD, {@link + * PelIfd::IFD1} for the thumbnail image IFD, {@link PelIfd::EXIF} + * for the Exif sub-IFD, {@link PelIfd::GPS} for the GPS sub-IFD, or + * {@link PelIfd::INTEROPERABILITY} for the interoperability + * sub-IFD. + */ + function setIfdType($type) { + $this->ifd_type = $type; + } + + + /** + * Return the format of this entry. + * + * @return PelFormat the format of this entry. + */ + function getFormat() { + return $this->format; + } + + + /** + * Return the number of components of this entry. + * + * @return int the number of components of this entry. + */ + function getComponents() { + return $this->components; + } + + + /** + * Turn this entry into bytes. + * + * @param PelByteOrder the desired byte order, which must be either + * {@link Convert::LITTLE_ENDIAN} or {@link Convert::BIG_ENDIAN}. + * + * @return string bytes representing this entry. + */ + function getBytes($o) { + return $this->bytes; + } + + + /** + * Get the value of this entry as text. + * + * The value will be returned in a format suitable for presentation, + * e.g., rationals will be returned as 'x/y', ASCII strings will be + * returned as themselves etc. + * + * @param boolean some values can be returned in a long or more + * brief form, and this parameter controls that. + * + * @return string the value as text. + */ + abstract function getText($brief = false); + + + /** + * Get the value of this entry. + * + * The value returned will generally be the same as the one supplied + * to the constructor or with {@link setValue()}. For a formatted + * version of the value, one should use {@link getText()} instead. + * + * @return mixed the unformatted value. + */ + abstract function getValue(); + + + /** + * Set the value of this entry. + * + * The value should be in the same format as for the constructor. + * + * @param mixed the new value. + * + * @abstract + */ + function setValue($value) { + /* This (fake) abstract method is here to make it possible for the + * documentation to refer to PelEntry::setValue(). + * + * It cannot declared abstract in the proper PHP way, for then PHP + * wont allow subclasses to define it with two arguments (which is + * what PelEntryCopyright does). + */ + throw new PelException('setValue() is abstract.'); + } + + + /** + * Turn this entry into a string. + * + * @return string a string representation of this entry. This is + * mostly for debugging. + */ + function __toString() { + $str = Pel::fmt(" Tag: 0x%04X (%s)\n", + $this->tag, PelTag::getName($this->ifd_type, $this->tag)); + $str .= Pel::fmt(" Format : %d (%s)\n", + $this->format, PelFormat::getName($this->format)); + $str .= Pel::fmt(" Components: %d\n", $this->components); + if ($this->getTag() != PelTag::MAKER_NOTE && + $this->getTag() != PelTag::PRINT_IM) + $str .= Pel::fmt(" Value : %s\n", print_r($this->getValue(), true)); + $str .= Pel::fmt(" Text : %s\n", $this->getText()); + return $str; + } +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelEntryAscii.php b/modules/autorotate/lib/pel/PelEntryAscii.php new file mode 100644 index 00000000..bdffe4bb --- /dev/null +++ b/modules/autorotate/lib/pel/PelEntryAscii.php @@ -0,0 +1,482 @@ + + * @version $Revision: 443 $ + * @date $Date: 2006-09-17 20:32:04 +0200 (Sun, 17 Sep 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelEntry.php'); +/**#@-*/ + + +/** + * Class for holding a plain ASCII string. + * + * This class can hold a single ASCII string, and it will be used as in + * + * $entry = $ifd->getEntry(PelTag::IMAGE_DESCRIPTION); + * print($entry->getValue()); + * $entry->setValue('This is my image. I like it.'); + * + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryAscii extends PelEntry { + + /** + * The string hold by this entry. + * + * This is the string that was given to the {@link __construct + * constructor} or later to {@link setValue}, without any final NULL + * character. + * + * @var string + */ + private $str; + + + /** + * Make a new PelEntry that can hold an ASCII string. + * + * @param int the tag which this entry represents. This should be + * one of the constants defined in {@link PelTag}, e.g., {@link + * PelTag::IMAGE_DESCRIPTION}, {@link PelTag::MODEL}, or any other + * tag with format {@link PelFormat::ASCII}. + * + * @param string the string that this entry will represent. The + * string must obey the same rules as the string argument to {@link + * setValue}, namely that it should be given without any trailing + * NULL character and that it must be plain 7-bit ASCII. + */ + function __construct($tag, $str = '') { + $this->tag = $tag; + $this->format = PelFormat::ASCII; + $this->setValue($str); + } + + + /** + * Give the entry a new ASCII value. + * + * This will overwrite the previous value. The value can be + * retrieved later with the {@link getValue} method. + * + * @param string the new value of the entry. This should be given + * without any trailing NULL character. The string must be plain + * 7-bit ASCII, the string should contain no high bytes. + * + * @todo Implement check for high bytes? + */ + function setValue($str) { + $this->components = strlen($str)+1; + $this->str = $str; + $this->bytes = $str . chr(0x00); + } + + + /** + * Return the ASCII string of the entry. + * + * @return string the string held, without any final NULL character. + * The string will be the same as the one given to {@link setValue} + * or to the {@link __construct constructor}. + */ + function getValue() { + return $this->str; + } + + + /** + * Return the ASCII string of the entry. + * + * This methods returns the same as {@link getValue}. + * + * @param boolean not used with ASCII entries. + * + * @return string the string held, without any final NULL character. + * The string will be the same as the one given to {@link setValue} + * or to the {@link __construct constructor}. + */ + function getText($brief = false) { + return $this->str; + } + +} + + +/** + * Class for holding a date and time. + * + * This class can hold a timestamp, and it will be used as + * in this example where the time is advanced by one week: + * + * $entry = $ifd->getEntry(PelTag::DATE_TIME_ORIGINAL); + * $time = $entry->getValue(); + * print('The image was taken on the ' . date($time, 'jS')); + * $entry->setValue($time + 7 * 24 * 3600); + * + * + * The example used a standard UNIX timestamp, which is the default + * for this class. + * + * But the Exif format defines dates outside the range of a UNIX + * timestamp (about 1970 to 2038) and so you can also get access to + * the timestamp in two other formats: a simple string or a Julian Day + * Count. Please see the Calendar extension in the PHP Manual for more + * information about the Julian Day Count. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryTime extends PelEntryAscii { + + /** + * Constant denoting a UNIX timestamp. + */ + const UNIX_TIMESTAMP = 1; + /** + * Constant denoting a Exif string. + */ + const EXIF_STRING = 2; + /** + * Constant denoting a Julian Day Count. + */ + const JULIAN_DAY_COUNT = 3; + + /** + * The Julian Day Count of the timestamp held by this entry. + * + * This is an integer counting the number of whole days since + * January 1st, 4713 B.C. The fractional part of the timestamp held + * by this entry is stored in {@link $seconds}. + * + * @var int + */ + private $day_count; + + /** + * The number of seconds into the day of the timestamp held by this + * entry. + * + * The number of whole days is stored in {@link $day_count} and the + * number of seconds left-over is stored here. + * + * @var int + */ + private $seconds; + + + /** + * Make a new entry for holding a timestamp. + * + * @param int the Exif tag which this entry represents. There are + * only three standard tags which hold timestamp, so this should be + * one of the constants {@link PelTag::DATE_TIME}, {@link + * PelTag::DATE_TIME_ORIGINAL}, or {@link + * PelTag::DATE_TIME_DIGITIZED}. + * + * @param int the timestamp held by this entry in the correct form + * as indicated by the third argument. For {@link UNIX_TIMESTAMP} + * this is an integer counting the number of seconds since January + * 1st 1970, for {@link EXIF_STRING} this is a string of the form + * 'YYYY:MM:DD hh:mm:ss', and for {@link JULIAN_DAY_COUNT} this is a + * floating point number where the integer part denotes the day + * count and the fractional part denotes the time of day (0.25 means + * 6:00, 0.75 means 18:00). + * + * @param int the type of the timestamp. This must be one of + * {@link UNIX_TIMESTAMP}, {@link EXIF_STRING}, or + * {@link JULIAN_DAY_COUNT}. + */ + function __construct($tag, $timestamp, $type = self::UNIX_TIMESTAMP) { + parent::__construct($tag); + $this->setValue($timestamp, $type); + } + + + /** + * Return the timestamp of the entry. + * + * The timestamp held by this entry is returned in one of three + * formats: as a standard UNIX timestamp (default), as a fractional + * Julian Day Count, or as a string. + * + * @param int the type of the timestamp. This must be one of + * {@link UNIX_TIMESTAMP}, {@link EXIF_STRING}, or + * {@link JULIAN_DAY_COUNT}. + * + * @return int the timestamp held by this entry in the correct form + * as indicated by the type argument. For {@link UNIX_TIMESTAMP} + * this is an integer counting the number of seconds since January + * 1st 1970, for {@link EXIF_STRING} this is a string of the form + * 'YYYY:MM:DD hh:mm:ss', and for {@link JULIAN_DAY_COUNT} this is a + * floating point number where the integer part denotes the day + * count and the fractional part denotes the time of day (0.25 means + * 6:00, 0.75 means 18:00). + */ + function getValue($type = self::UNIX_TIMESTAMP) { + switch ($type) { + case self::UNIX_TIMESTAMP: + $seconds = jdtounix($this->day_count); + if ($seconds === false) + /* jdtounix() return false if the Julian Day Count is outside + * the range of a UNIX timestamp. */ + return false; + else + return $seconds + $this->seconds; + + case self::EXIF_STRING: + list($month, $day, $year) = explode('/', jdtogregorian($this->day_count)); + $hours = (int)($this->seconds / 3600); + $minutes = (int)($this->seconds % 3600 / 60); + $seconds = $this->seconds % 60; + return sprintf('%04d:%02d:%02d %02d:%02d:%02d', + $year, $month, $day, $hours, $minutes, $seconds); + case self::JULIAN_DAY_COUNT: + return $this->day_count + $this->seconds / 86400; + default: + throw new PelInvalidArgumentException('Expected UNIX_TIMESTAMP (%d), ' . + 'EXIF_STRING (%d), or ' . + 'JULIAN_DAY_COUNT (%d) for $type, '. + 'got %d.', + self::UNIX_TIMESTAMP, + self::EXIF_STRING, + self::JULIAN_DAY_COUNT, + $type); + } + } + + + /** + * Update the timestamp held by this entry. + * + * @param int the timestamp held by this entry in the correct form + * as indicated by the third argument. For {@link UNIX_TIMESTAMP} + * this is an integer counting the number of seconds since January + * 1st 1970, for {@link EXIF_STRING} this is a string of the form + * 'YYYY:MM:DD hh:mm:ss', and for {@link JULIAN_DAY_COUNT} this is a + * floating point number where the integer part denotes the day + * count and the fractional part denotes the time of day (0.25 means + * 6:00, 0.75 means 18:00). + * + * @param int the type of the timestamp. This must be one of + * {@link UNIX_TIMESTAMP}, {@link EXIF_STRING}, or + * {@link JULIAN_DAY_COUNT}. + * + * @todo How to deal with timezones? Use the TimeZoneOffset tag + * 0x882A? + */ + function setValue($timestamp, $type = self::UNIX_TIMESTAMP) { + switch ($type) { + case self::UNIX_TIMESTAMP: + $this->day_count = unixtojd($timestamp); + $this->seconds = $timestamp % 86400; + break; + + case self::EXIF_STRING: + /* Clean the timestamp: some timestamps are broken other + * separators than ':' and ' '. */ + $d = split('[^0-9]+', $timestamp); + $this->day_count = gregoriantojd($d[1], $d[2], $d[0]); + $this->seconds = $d[3]*3600 + $d[4]*60 + $d[5]; + break; + + case self::JULIAN_DAY_COUNT: + $this->day_count = (int)floor($timestamp); + $this->seconds = (int)(86400 * ($timestamp - floor($timestamp))); + break; + + default: + throw new PelInvalidArgumentException('Expected UNIX_TIMESTAMP (%d), ' . + 'EXIF_STRING (%d), or ' . + 'JULIAN_DAY_COUNT (%d) for $type, '. + 'got %d.', + self::UNIX_TIMESTAMP, + self::EXIF_STRING, + self::JULIAN_DAY_COUNT, + $type); + } + + /* Now finally update the string which will be used when this is + * turned into bytes. */ + parent::setValue($this->getValue(self::EXIF_STRING)); + } +} + + +/** + * Class for holding copyright information. + * + * The Exif standard specifies a certain format for copyright + * information where the one {@link PelTag::COPYRIGHT copyright + * tag} holds both the photographer and editor copyrights, separated + * by a NULL character. + * + * This class is used to manipulate that tag so that the format is + * kept to the standard. A common use would be to add a new copyright + * tag to an image, since most cameras do not add this tag themselves. + * This would be done like this: + * + * + * $entry = new PelEntryCopyright('Copyright, Martin Geisler, 2004'); + * $ifd0->addEntry($entry); + * + * + * Here we only set the photographer copyright, use the optional + * second argument to specify the editor copyright. If there is only + * an editor copyright, then let the first argument be the empty + * string. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryCopyright extends PelEntryAscii { + + /** + * The photographer copyright. + * + * @var string + */ + private $photographer; + + /** + * The editor copyright. + * + * @var string + */ + private $editor; + + + /** + * Make a new entry for holding copyright information. + * + * @param string the photographer copyright. Use the empty string + * if there is no photographer copyright. + * + * @param string the editor copyright. Use the empty string if + * there is no editor copyright. + */ + function __construct($photographer = '', $editor = '') { + parent::__construct(PelTag::COPYRIGHT); + $this->setValue($photographer, $editor); + } + + + /** + * Update the copyright information. + * + * @param string the photographer copyright. Use the empty string + * if there is no photographer copyright. + * + * @param string the editor copyright. Use the empty string if + * there is no editor copyright. + */ + function setValue($photographer = '', $editor = '') { + $this->photographer = $photographer; + $this->editor = $editor; + + if ($photographer == '' && $editor != '') + $photographer = ' '; + + if ($editor == '') + parent::setValue($photographer); + else + parent::setValue($photographer . chr(0x00) . $editor); + } + + + /** + * Retrive the copyright information. + * + * The strings returned will be the same as the one used previously + * with either {@link __construct the constructor} or with {@link + * setValue}. + * + * @return array an array with two strings, the photographer and + * editor copyrights. The two fields will be returned in that + * order, so that the first array index will be the photographer + * copyright, and the second will be the editor copyright. + */ + function getValue() { + return array($this->photographer, $this->editor); + } + + + /** + * Return a text string with the copyright information. + * + * The photographer and editor copyright fields will be returned + * with a '-' in between if both copyright fields are present, + * otherwise only one of them will be returned. + * + * @param boolean if false, then the strings '(Photographer)' and + * '(Editor)' will be appended to the photographer and editor + * copyright fields (if present), otherwise the fields will be + * returned as is. + * + * @return string the copyright information in a string. + */ + function getText($brief = false) { + if ($brief) { + $p = ''; + $e = ''; + } else { + $p = ' ' . Pel::tra('(Photographer)'); + $e = ' ' . Pel::tra('(Editor)'); + } + + if ($this->photographer != '' && $this->editor != '') + return $this->photographer . $p . ' - ' . $this->editor . $e; + + if ($this->photographer != '') + return $this->photographer . $p; + + if ($this->editor != '') + return $this->editor . $e; + + return ''; + } +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelEntryByte.php b/modules/autorotate/lib/pel/PelEntryByte.php new file mode 100644 index 00000000..f6482d0c --- /dev/null +++ b/modules/autorotate/lib/pel/PelEntryByte.php @@ -0,0 +1,275 @@ + + * @version $Revision: 419 $ + * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelEntryNumber.php'); +/**#@-*/ + + +/** + * Class for holding unsigned bytes. + * + * This class can hold bytes, either just a single byte or an array of + * bytes. The class will be used to manipulate any of the Exif tags + * which has format {@link PelFormat::BYTE}. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryByte extends PelEntryNumber { + + /** + * Make a new entry that can hold an unsigned byte. + * + * The method accept several integer arguments. The {@link + * getValue} method will always return an array except for when a + * single integer argument is given here. + * + * @param PelTag the tag which this entry represents. This + * should be one of the constants defined in {@link PelTag} + * which has format {@link PelFormat::BYTE}. + * + * @param int $value... the byte(s) that this entry will represent. + * The argument passed must obey the same rules as the argument to + * {@link setValue}, namely that it should be within range of an + * unsigned byte, that is between 0 and 255 (inclusive). If not, + * then a {@link PelOverflowException} will be thrown. + */ + function __construct($tag /* $value... */) { + $this->tag = $tag; + $this->min = 0; + $this->max = 255; + $this->format = PelFormat::BYTE; + + $value = func_get_args(); + array_shift($value); + $this->setValueArray($value); + } + + + /** + * Convert a number into bytes. + * + * @param int the number that should be converted. + * + * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and + * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. + * + * @return string bytes representing the number given. + */ + function numberToBytes($number, $order) { + return chr($number); + } + +} + + +/** + * Class for holding signed bytes. + * + * This class can hold bytes, either just a single byte or an array of + * bytes. The class will be used to manipulate any of the Exif tags + * which has format {@link PelFormat::BYTE}. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntrySByte extends PelEntryNumber { + + /** + * Make a new entry that can hold a signed byte. + * + * The method accept several integer arguments. The {@link getValue} + * method will always return an array except for when a single + * integer argument is given here. + * + * @param PelTag the tag which this entry represents. This + * should be one of the constants defined in {@link PelTag} + * which has format {@link PelFormat::BYTE}. + * + * @param int $value... the byte(s) that this entry will represent. + * The argument passed must obey the same rules as the argument to + * {@link setValue}, namely that it should be within range of a + * signed byte, that is between -128 and 127 (inclusive). If not, + * then a {@link PelOverflowException} will be thrown. + */ + function __construct($tag /* $value... */) { + $this->tag = $tag; + $this->min = -128; + $this->max = 127; + $this->format = PelFormat::SBYTE; + + $value = func_get_args(); + array_shift($value); + $this->setValueArray($value); + } + + + /** + * Convert a number into bytes. + * + * @param int the number that should be converted. + * + * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and + * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. + * + * @return string bytes representing the number given. + */ + function numberToBytes($number, $order) { + return chr($number); + } + +} + + +/** + * Class used to manipulate strings in the format Windows XP uses. + * + * When examining the file properties of an image in Windows XP one + * can fill in title, comment, author, keyword, and subject fields. + * Filling those fields and pressing OK will result in the data being + * written into the Exif data in the image. + * + * The data is written in a non-standard format and can thus not be + * loaded directly --- this class is needed to translate it into + * normal strings. + * + * It is important that entries from this class are only created with + * the {@link PelTag::XP_TITLE}, {@link PelTag::XP_COMMENT}, {@link + * PelTag::XP_AUTHOR}, {@link PelTag::XP_KEYWORD}, and {@link + * PelTag::XP_SUBJECT} tags. If another tag is used the data will no + * longer be correctly decoded when reloaded with PEL. (The data will + * be loaded as an {@link PelEntryByte} entry, which isn't as useful.) + * + * This class is to be used as in + * + * $entry = $ifd->getEntry(PelTag::XP_TITLE); + * print($entry->getValue()); + * $entry->setValue('My favorite cat'); + * + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryWindowsString extends PelEntry { + + /** + * The string hold by this entry. + * + * This is the string that was given to the {@link __construct + * constructor} or later to {@link setValue}, without any extra NULL + * characters or any such nonsense. + * + * @var string + */ + private $str; + + + /** + * Make a new PelEntry that can hold a Windows XP specific string. + * + * @param int the tag which this entry represents. This should be + * one of {@link PelTag::XP_TITLE}, {@link PelTag::XP_COMMENT}, + * {@link PelTag::XP_AUTHOR}, {@link PelTag::XP_KEYWORD}, and {@link + * PelTag::XP_SUBJECT} tags. If another tag is used, then this + * entry will be incorrectly reloaded as a {@link PelEntryByte}. + * + * @param string the string that this entry will represent. It will + * be passed to {@link setValue} and thus has to obey its + * requirements. + */ + function __construct($tag, $str = '') { + $this->tag = $tag; + $this->format = PelFormat::BYTE; + $this->setValue($str); + } + + + /** + * Give the entry a new value. + * + * This will overwrite the previous value. The value can be + * retrieved later with the {@link getValue} method. + * + * @param string the new value of the entry. This should be use the + * Latin-1 encoding and be given without any extra NULL characters. + */ + function setValue($str) { + $l = strlen($str); + + $this->components = 2 * ($l + 1); + $this->str = $str; + $this->bytes = ''; + for ($i = 0; $i < $l; $i++) + $this->bytes .= $str{$i} . chr(0x00); + + $this->bytes .= chr(0x00) . chr(0x00); + } + + + /** + * Return the string of the entry. + * + * @return string the string held, without any extra NULL + * characters. The string will be the same as the one given to + * {@link setValue} or to the {@link __construct constructor}. + */ + function getValue() { + return $this->str; + } + + + /** + * Return the string of the entry. + * + * This methods returns the same as {@link getValue}. + * + * @param boolean not used. + * + * @return string the string held, without any extra NULL + * characters. The string will be the same as the one given to + * {@link setValue} or to the {@link __construct constructor}. + */ + function getText($brief = false) { + return $this->str; + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelEntryLong.php b/modules/autorotate/lib/pel/PelEntryLong.php new file mode 100644 index 00000000..1ae4b30b --- /dev/null +++ b/modules/autorotate/lib/pel/PelEntryLong.php @@ -0,0 +1,182 @@ + + * @version $Revision: 419 $ + * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelEntryNumber.php'); +/**#@-*/ + + +/** + * Class for holding unsigned longs. + * + * This class can hold longs, either just a single long or an array of + * longs. The class will be used to manipulate any of the Exif tags + * which can have format {@link PelFormat::LONG} like in this + * example: + * + * $w = $ifd->getEntry(PelTag::EXIF_IMAGE_WIDTH); + * $w->setValue($w->getValue() / 2); + * $h = $ifd->getEntry(PelTag::EXIF_IMAGE_HEIGHT); + * $h->setValue($h->getValue() / 2); + * + * Here the width and height is updated to 50% of their original + * values. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryLong extends PelEntryNumber { + + /** + * Make a new entry that can hold an unsigned long. + * + * The method accept its arguments in two forms: several integer + * arguments or a single array argument. The {@link getValue} + * method will always return an array except for when a single + * integer argument is given here, or when an array with just a + * single integer is given. + * + * This means that one can conveniently use objects like this: + * + * $a = new PelEntryLong(PelTag::EXIF_IMAGE_WIDTH, 123456); + * $b = $a->getValue() - 654321; + * + * where the call to {@link getValue} will return an integer instead + * of an array with one integer element, which would then have to be + * extracted. + * + * @param PelTag the tag which this entry represents. This + * should be one of the constants defined in {@link PelTag}, + * e.g., {@link PelTag::IMAGE_WIDTH}, or any other tag which can + * have format {@link PelFormat::LONG}. + * + * @param int $value... the long(s) that this entry will + * represent or an array of longs. The argument passed must obey + * the same rules as the argument to {@link setValue}, namely that + * it should be within range of an unsigned long (32 bit), that is + * between 0 and 4294967295 (inclusive). If not, then a {@link + * PelExifOverflowException} will be thrown. + */ + function __construct($tag /* $value... */) { + $this->tag = $tag; + $this->min = 0; + $this->max = 4294967295; + $this->format = PelFormat::LONG; + + $value = func_get_args(); + array_shift($value); + $this->setValueArray($value); + } + + + /** + * Convert a number into bytes. + * + * @param int the number that should be converted. + * + * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and + * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. + * + * @return string bytes representing the number given. + */ + function numberToBytes($number, $order) { + return PelConvert::longToBytes($number, $order); + } +} + + +/** + * Class for holding signed longs. + * + * This class can hold longs, either just a single long or an array of + * longs. The class will be used to manipulate any of the Exif tags + * which can have format {@link PelFormat::SLONG}. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntrySLong extends PelEntryNumber { + + /** + * Make a new entry that can hold a signed long. + * + * The method accept its arguments in two forms: several integer + * arguments or a single array argument. The {@link getValue} + * method will always return an array except for when a single + * integer argument is given here, or when an array with just a + * single integer is given. + * + * @param PelTag the tag which this entry represents. This + * should be one of the constants defined in {@link PelTag} + * which have format {@link PelFormat::SLONG}. + * + * @param int $value... the long(s) that this entry will represent + * or an array of longs. The argument passed must obey the same + * rules as the argument to {@link setValue}, namely that it should + * be within range of a signed long (32 bit), that is between + * -2147483648 and 2147483647 (inclusive). If not, then a {@link + * PelOverflowException} will be thrown. + */ + function __construct($tag /* $value... */) { + $this->tag = $tag; + $this->min = -2147483648; + $this->max = 2147483647; + $this->format = PelFormat::SLONG; + + $value = func_get_args(); + array_shift($value); + $this->setValueArray($value); + } + + + /** + * Convert a number into bytes. + * + * @param int the number that should be converted. + * + * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and + * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. + * + * @return string bytes representing the number given. + */ + function numberToBytes($number, $order) { + return PelConvert::sLongToBytes($number, $order); + } +} + + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelEntryNumber.php b/modules/autorotate/lib/pel/PelEntryNumber.php new file mode 100644 index 00000000..2301bb62 --- /dev/null +++ b/modules/autorotate/lib/pel/PelEntryNumber.php @@ -0,0 +1,309 @@ + + * @version $Revision: 419 $ + * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelException.php'); +require_once('PelEntry.php'); +/**#@-*/ + + +/** + * Exception cast when numbers overflow. + * + * @author Martin Geisler + * @package PEL + * @subpackage Exception + */ +class PelOverflowException extends PelException { + + /** + * Construct a new overflow exception. + * + * @param int the value that is out of range. + * + * @param int the minimum allowed value. + * + * @param int the maximum allowed value. + */ + function __construct($v, $min, $max) { + parent::__construct('Value %.0f out of range [%.0f, %.0f]', + $v, $min, $max); + } +} + + +/** + * Class for holding numbers. + * + * This class can hold numbers, with range checks. + * + * @author Martin Geisler + * @package PEL + */ +abstract class PelEntryNumber extends PelEntry { + + /** + * The value held by this entry. + * + * @var array + */ + protected $value = array(); + + /** + * The minimum allowed value. + * + * Any attempt to change the value below this variable will result + * in a {@link PelOverflowException} being thrown. + * + * @var int + */ + protected $min; + + /** + * The maximum allowed value. + * + * Any attempt to change the value over this variable will result in + * a {@link PelOverflowException} being thrown. + * + * @var int + */ + protected $max; + + /** + * The dimension of the number held. + * + * Normal numbers have a dimension of one, pairs have a dimension of + * two, etc. + * + * @var int + */ + protected $dimension = 1; + + + /** + * Change the value. + * + * This method can change both the number of components and the + * value of the components. Range checks will be made on the new + * value, and a {@link PelOverflowException} will be thrown if the + * value is found to be outside the legal range. + * + * The method accept several number arguments. The {@link getValue} + * method will always return an array except for when a single + * number is given here. + * + * @param int|array $value... the new value(s). This can be zero or + * more numbers, that is, either integers or arrays. The input will + * be checked to ensure that the numbers are within the valid range. + * If not, then a {@link PelOverflowException} will be thrown. + * + * @see getValue + */ + function setValue(/* $value... */) { + $value = func_get_args(); + $this->setValueArray($value); + } + + + /** + * Change the value. + * + * This method can change both the number of components and the + * value of the components. Range checks will be made on the new + * value, and a {@link PelOverflowException} will be thrown if the + * value is found to be outside the legal range. + * + * @param array the new values. The array must contain the new + * numbers. + * + * @see getValue + */ + function setValueArray($value) { + foreach ($value as $v) + $this->validateNumber($v); + + $this->components = count($value); + $this->value = $value; + } + + + /** + * Return the numeric value held. + * + * @return int|array this will either be a single number if there is + * only one component, or an array of numbers otherwise. + */ + function getValue() { + if ($this->components == 1) + return $this->value[0]; + else + return $this->value; + } + + + /** + * Validate a number. + * + * This method will check that the number given is within the range + * given my {@link getMin()} and {@link getMax()}, inclusive. If + * not, then a {@link PelOverflowException} is thrown. + * + * @param int|array the number in question. + * + * @return void nothing, but will throw a {@link + * PelOverflowException} if the number is found to be outside the + * legal range and {@link Pel::$strict} is true. + */ + function validateNumber($n) { + if ($this->dimension == 1) { + if ($n < $this->min || $n > $this->max) + Pel::maybeThrow(new PelOverflowException($n, + $this->min, + $this->max)); + } else { + for ($i = 0; $i < $this->dimension; $i++) + if ($n[$i] < $this->min || $n[$i] > $this->max) + Pel::maybeThrow(new PelOverflowException($n[$i], + $this->min, + $this->max)); + } + } + + + /** + * Add a number. + * + * This appends a number to the numbers already held by this entry, + * thereby increasing the number of components by one. + * + * @param int|array the number to be added. + */ + function addNumber($n) { + $this->validateNumber($n); + $this->value[] = $n; + $this->components++; + } + + + /** + * Convert a number into bytes. + * + * The concrete subclasses will have to implement this method so + * that the numbers represented can be turned into bytes. + * + * The method will be called once for each number held by the entry. + * + * @param int the number that should be converted. + * + * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and + * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. + * + * @return string bytes representing the number given. + */ + abstract function numberToBytes($number, $order); + + + /** + * Turn this entry into bytes. + * + * @param PelByteOrder the desired byte order, which must be either + * {@link PelConvert::LITTLE_ENDIAN} or {@link + * PelConvert::BIG_ENDIAN}. + * + * @return string bytes representing this entry. + */ + function getBytes($o) { + $bytes = ''; + for ($i = 0; $i < $this->components; $i++) { + if ($this->dimension == 1) { + $bytes .= $this->numberToBytes($this->value[$i], $o); + } else { + for ($j = 0; $j < $this->dimension; $j++) { + $bytes .= $this->numberToBytes($this->value[$i][$j], $o); + } + } + } + return $bytes; + } + + + /** + * Format a number. + * + * This method is called by {@link getText} to format numbers. + * Subclasses should override this method if they need more + * sophisticated behavior than the default, which is to just return + * the number as is. + * + * @param int the number which will be formatted. + * + * @param boolean it could be that there is both a verbose and a + * brief formatting available, and this argument controls that. + * + * @return string the number formatted as a string suitable for + * display. + */ + function formatNumber($number, $brief = false) { + return $number; + } + + + /** + * Get the numeric value of this entry as text. + * + * @param boolean use brief output? The numbers will be separated + * by a single space if brief output is requested, otherwise a space + * and a comma will be used. + * + * @return string the numbers(s) held by this entry. + */ + function getText($brief = false) { + if ($this->components == 0) + return ''; + + $str = $this->formatNumber($this->value[0]); + for ($i = 1; $i < $this->components; $i++) { + $str .= ($brief ? ' ' : ', '); + $str .= $this->formatNumber($this->value[$i]); + } + + return $str; + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelEntryRational.php b/modules/autorotate/lib/pel/PelEntryRational.php new file mode 100644 index 00000000..3dd503c8 --- /dev/null +++ b/modules/autorotate/lib/pel/PelEntryRational.php @@ -0,0 +1,290 @@ + + * @version $Revision: 419 $ + * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelEntryLong.php'); +/**#@-*/ + + +/** + * Class for holding unsigned rational numbers. + * + * This class can hold rational numbers, consisting of a numerator and + * denominator both of which are of type unsigned long. Each rational + * is represented by an array with just two entries: the numerator and + * the denominator, in that order. + * + * The class can hold either just a single rational or an array of + * rationals. The class will be used to manipulate any of the Exif + * tags which can have format {@link PelFormat::RATIONAL} like in this + * example: + * + * + * $resolution = $ifd->getEntry(PelTag::X_RESOLUTION); + * $resolution->setValue(array(1, 300)); + * + * + * Here the x-resolution is adjusted to 1/300, which will be 300 DPI, + * unless the {@link PelTag::RESOLUTION_UNIT resolution unit} is set + * to something different than 2 which means inches. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryRational extends PelEntryLong { + + /** + * Make a new entry that can hold an unsigned rational. + * + * @param PelTag the tag which this entry represents. This should + * be one of the constants defined in {@link PelTag}, e.g., {@link + * PelTag::X_RESOLUTION}, or any other tag which can have format + * {@link PelFormat::RATIONAL}. + * + * @param array $value... the rational(s) that this entry will + * represent. The arguments passed must obey the same rules as the + * argument to {@link setValue}, namely that each argument should be + * an array with two entries, both of which must be within range of + * an unsigned long (32 bit), that is between 0 and 4294967295 + * (inclusive). If not, then a {@link PelOverflowException} will be + * thrown. + */ + function __construct($tag /* $value... */) { + $this->tag = $tag; + $this->format = PelFormat::RATIONAL; + $this->dimension = 2; + $this->min = 0; + $this->max = 4294967295; + + $value = func_get_args(); + array_shift($value); + $this->setValueArray($value); + } + + + /** + * Format a rational number. + * + * The rational will be returned as a string with a slash '/' + * between the numerator and denominator. + * + * @param array the rational which will be formatted. + * + * @param boolean not used. + * + * @return string the rational formatted as a string suitable for + * display. + */ + function formatNumber($number, $brief = false) { + return $number[0] . '/' . $number[1]; + } + + + /** + * Get the value of an entry as text. + * + * The value will be returned in a format suitable for presentation, + * e.g., rationals will be returned as 'x/y', ASCII strings will be + * returned as themselves etc. + * + * @param boolean some values can be returned in a long or more + * brief form, and this parameter controls that. + * + * @return string the value as text. + */ + function getText($brief = false) { + if (isset($this->value[0])) + $v = $this->value[0]; + + switch ($this->tag) { + case PelTag::FNUMBER: + //CC (e->components, 1, v); + return Pel::fmt('f/%.01f', $v[0]/$v[1]); + + case PelTag::APERTURE_VALUE: + //CC (e->components, 1, v); + //if (!v_rat.denominator) return (NULL); + return Pel::fmt('f/%.01f', pow(2, $v[0]/$v[1]/2)); + + case PelTag::FOCAL_LENGTH: + //CC (e->components, 1, v); + //if (!v_rat.denominator) return (NULL); + return Pel::fmt('%.1f mm', $v[0]/$v[1]); + + case PelTag::SUBJECT_DISTANCE: + //CC (e->components, 1, v); + //if (!v_rat.denominator) return (NULL); + return Pel::fmt('%.1f m', $v[0]/$v[1]); + + case PelTag::EXPOSURE_TIME: + //CC (e->components, 1, v); + //if (!v_rat.denominator) return (NULL); + if ($v[0]/$v[1] < 1) + return Pel::fmt('1/%d sec.', $v[1]/$v[0]); + else + return Pel::fmt('%d sec.', $v[0]/$v[1]); + + case PelTag::GPS_LATITUDE: + case PelTag::GPS_LONGITUDE: + $degrees = $this->value[0][0]/$this->value[0][1]; + $minutes = $this->value[1][0]/$this->value[1][1]; + $seconds = $this->value[2][0]/$this->value[2][1]; + + return sprintf('%s° %s\' %s" (%.2f°)', + $degrees, $minutes, $seconds, + $degrees + $minutes/60 + $seconds/3600); + + default: + return parent::getText($brief); + } + } +} + + +/** + * Class for holding signed rational numbers. + * + * This class can hold rational numbers, consisting of a numerator and + * denominator both of which are of type unsigned long. Each rational + * is represented by an array with just two entries: the numerator and + * the denominator, in that order. + * + * The class can hold either just a single rational or an array of + * rationals. The class will be used to manipulate any of the Exif + * tags which can have format {@link PelFormat::SRATIONAL}. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntrySRational extends PelEntrySLong { + + /** + * Make a new entry that can hold a signed rational. + * + * @param PelTag the tag which this entry represents. This should + * be one of the constants defined in {@link PelTag}, e.g., {@link + * PelTag::SHUTTER_SPEED_VALUE}, or any other tag which can have + * format {@link PelFormat::SRATIONAL}. + * + * @param array $value... the rational(s) that this entry will + * represent. The arguments passed must obey the same rules as the + * argument to {@link setValue}, namely that each argument should be + * an array with two entries, both of which must be within range of + * a signed long (32 bit), that is between -2147483648 and + * 2147483647 (inclusive). If not, then a {@link + * PelOverflowException} will be thrown. + */ + function __construct($tag /* $value... */) { + $this->tag = $tag; + $this->format = PelFormat::SRATIONAL; + $this->dimension = 2; + $this->min = -2147483648; + $this->max = 2147483647; + + $value = func_get_args(); + array_shift($value); + $this->setValueArray($value); + } + + + /** + * Format a rational number. + * + * The rational will be returned as a string with a slash '/' + * between the numerator and denominator. Care is taken to display + * '-1/2' instead of the ugly but mathematically equivalent '1/-2'. + * + * @param array the rational which will be formatted. + * + * @param boolean not used. + * + * @return string the rational formatted as a string suitable for + * display. + */ + function formatNumber($number, $brief = false) { + if ($number[1] < 0) + /* Turn output like 1/-2 into -1/2. */ + return (-$number[0]) . '/' . (-$number[1]); + else + return $number[0] . '/' . $number[1]; + } + + + /** + * Get the value of an entry as text. + * + * The value will be returned in a format suitable for presentation, + * e.g., rationals will be returned as 'x/y', ASCII strings will be + * returned as themselves etc. + * + * @param boolean some values can be returned in a long or more + * brief form, and this parameter controls that. + * + * @return string the value as text. + */ + function getText($brief = false) { + if (isset($this->value[0])) + $v = $this->value[0]; + + switch ($this->tag) { + case PelTag::SHUTTER_SPEED_VALUE: + //CC (e->components, 1, v); + //if (!v_srat.denominator) return (NULL); + return Pel::fmt('%.0f/%.0f sec. (APEX: %d)', + $v[0], $v[1], pow(sqrt(2), $v[0]/$v[1])); + + case PelTag::BRIGHTNESS_VALUE: + //CC (e->components, 1, v); + // + // TODO: figure out the APEX thing, or remove this so that it is + // handled by the default clause at the bottom. + return sprintf('%d/%d', $v[0], $v[1]); + //FIXME: How do I calculate the APEX value? + + case PelTag::EXPOSURE_BIAS_VALUE: + //CC (e->components, 1, v); + //if (!v_srat.denominator) return (NULL); + return sprintf('%s%.01f', $v[0]*$v[1] > 0 ? '+' : '', $v[0]/$v[1]); + + default: + return parent::getText($brief); + } + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelEntryShort.php b/modules/autorotate/lib/pel/PelEntryShort.php new file mode 100644 index 00000000..72e499d7 --- /dev/null +++ b/modules/autorotate/lib/pel/PelEntryShort.php @@ -0,0 +1,599 @@ + + * @version $Revision: 419 $ + * @date $Date: 2006-02-20 17:22:36 +0100 (Mon, 20 Feb 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelEntryNumber.php'); +require_once('PelConvert.php'); +require_once('Pel.php'); +/**#@-*/ + + +/** + * Class for holding signed shorts. + * + * This class can hold shorts, either just a single short or an array + * of shorts. The class will be used to manipulate any of the Exif + * tags which has format {@link PelFormat::SHORT} like in this + * example: + * + * + * $w = $ifd->getEntry(PelTag::EXIF_IMAGE_WIDTH); + * $w->setValue($w->getValue() / 2); + * $h = $ifd->getEntry(PelTag::EXIF_IMAGE_HEIGHT); + * $h->setValue($h->getValue() / 2); + * + * + * Here the width and height is updated to 50% of their original + * values. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryShort extends PelEntryNumber { + + /** + * Make a new entry that can hold an unsigned short. + * + * The method accept several integer arguments. The {@link + * getValue} method will always return an array except for when a + * single integer argument is given here. + * + * This means that one can conveniently use objects like this: + * + * $a = new PelEntryShort(PelTag::EXIF_IMAGE_HEIGHT, 42); + * $b = $a->getValue() + 314; + * + * where the call to {@link getValue} will return an integer + * instead of an array with one integer element, which would then + * have to be extracted. + * + * @param PelTag the tag which this entry represents. This should be + * one of the constants defined in {@link PelTag}, e.g., {@link + * PelTag::IMAGE_WIDTH}, {@link PelTag::ISO_SPEED_RATINGS}, + * or any other tag with format {@link PelFormat::SHORT}. + * + * @param int $value... the short(s) that this entry will + * represent. The argument passed must obey the same rules as the + * argument to {@link setValue}, namely that it should be within + * range of an unsigned short, that is between 0 and 65535 + * (inclusive). If not, then a {@link PelOverFlowException} will be + * thrown. + */ + function __construct($tag /* $value... */) { + $this->tag = $tag; + $this->min = 0; + $this->max = 65535; + $this->format = PelFormat::SHORT; + + $value = func_get_args(); + array_shift($value); + $this->setValueArray($value); + } + + + /** + * Convert a number into bytes. + * + * @param int the number that should be converted. + * + * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and + * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. + * + * @return string bytes representing the number given. + */ + function numberToBytes($number, $order) { + return PelConvert::shortToBytes($number, $order); + } + + + /** + * Get the value of an entry as text. + * + * The value will be returned in a format suitable for presentation, + * e.g., instead of returning '2' for a {@link + * PelTag::METERING_MODE} tag, 'Center-Weighted Average' is + * returned. + * + * @param boolean some values can be returned in a long or more + * brief form, and this parameter controls that. + * + * @return string the value as text. + */ + function getText($brief = false) { + switch ($this->tag) { + case PelTag::METERING_MODE: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Unknown'); + case 1: + return Pel::tra('Average'); + case 2: + return Pel::tra('Center-Weighted Average'); + case 3: + return Pel::tra('Spot'); + case 4: + return Pel::tra('Multi Spot'); + case 5: + return Pel::tra('Pattern'); + case 6: + return Pel::tra('Partial'); + case 255: + return Pel::tra('Other'); + default: + return $this->value[0]; + } + + case PelTag::COMPRESSION: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 1: + return Pel::tra('Uncompressed'); + case 6: + return Pel::tra('JPEG compression'); + default: + return $this->value[0]; + + } + + case PelTag::PLANAR_CONFIGURATION: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 1: + return Pel::tra('chunky format'); + case 2: + return Pel::tra('planar format'); + default: + return $this->value[0]; + } + + case PelTag::SENSING_METHOD: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 1: + return Pel::tra('Not defined'); + case 2: + return Pel::tra('One-chip color area sensor'); + case 3: + return Pel::tra('Two-chip color area sensor'); + case 4: + return Pel::tra('Three-chip color area sensor'); + case 5: + return Pel::tra('Color sequential area sensor'); + case 7: + return Pel::tra('Trilinear sensor'); + case 8: + return Pel::tra('Color sequential linear sensor'); + default: + return $this->value[0]; + } + + case PelTag::LIGHT_SOURCE: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Unknown'); + case 1: + return Pel::tra('Daylight'); + case 2: + return Pel::tra('Fluorescent'); + case 3: + return Pel::tra('Tungsten (incandescent light)'); + case 4: + return Pel::tra('Flash'); + case 9: + return Pel::tra('Fine weather'); + case 10: + return Pel::tra('Cloudy weather'); + case 11: + return Pel::tra('Shade'); + case 12: + return Pel::tra('Daylight fluorescent'); + case 13: + return Pel::tra('Day white fluorescent'); + case 14: + return Pel::tra('Cool white fluorescent'); + case 15: + return Pel::tra('White fluorescent'); + case 17: + return Pel::tra('Standard light A'); + case 18: + return Pel::tra('Standard light B'); + case 19: + return Pel::tra('Standard light C'); + case 20: + return Pel::tra('D55'); + case 21: + return Pel::tra('D65'); + case 22: + return Pel::tra('D75'); + case 24: + return Pel::tra('ISO studio tungsten'); + case 255: + return Pel::tra('Other'); + default: + return $this->value[0]; + } + + case PelTag::FOCAL_PLANE_RESOLUTION_UNIT: + case PelTag::RESOLUTION_UNIT: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 2: + return Pel::tra('Inch'); + case 3: + return Pel::tra('Centimeter'); + default: + return $this->value[0]; + } + + case PelTag::EXPOSURE_PROGRAM: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Not defined'); + case 1: + return Pel::tra('Manual'); + case 2: + return Pel::tra('Normal program'); + case 3: + return Pel::tra('Aperture priority'); + case 4: + return Pel::tra('Shutter priority'); + case 5: + return Pel::tra('Creative program (biased toward depth of field)'); + case 6: + return Pel::tra('Action program (biased toward fast shutter speed)'); + case 7: + return Pel::tra('Portrait mode (for closeup photos with the background out of focus'); + case 8: + return Pel::tra('Landscape mode (for landscape photos with the background in focus'); + default: + return $this->value[0]; + } + + case PelTag::ORIENTATION: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 1: + return Pel::tra('top - left'); + case 2: + return Pel::tra('top - right'); + case 3: + return Pel::tra('bottom - right'); + case 4: + return Pel::tra('bottom - left'); + case 5: + return Pel::tra('left - top'); + case 6: + return Pel::tra('right - top'); + case 7: + return Pel::tra('right - bottom'); + case 8: + return Pel::tra('left - bottom'); + default: + return $this->value[0]; + } + + case PelTag::YCBCR_POSITIONING: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 1: + return Pel::tra('centered'); + case 2: + return Pel::tra('co-sited'); + default: + return $this->value[0]; + } + + case PelTag::YCBCR_SUB_SAMPLING: + //CC (e->components, 2, v); + if ($this->value[0] == 2 && $this->value[1] == 1) + return 'YCbCr4:2:2'; + if ($this->value[0] == 2 && $this->value[1] == 2) + return 'YCbCr4:2:0'; + + return $this->value[0] . ', ' . $this->value[1]; + + case PelTag::PHOTOMETRIC_INTERPRETATION: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 2: + return 'RGB'; + case 6: + return 'YCbCr'; + default: + return $this->value[0]; + } + + case PelTag::COLOR_SPACE: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 1: + return 'sRGB'; + case 2: + return 'Adobe RGB'; + case 0xffff: + return Pel::tra('Uncalibrated'); + default: + return $this->value[0]; + } + + case PelTag::FLASH: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0x0000: + return Pel::tra('Flash did not fire.'); + case 0x0001: + return Pel::tra('Flash fired.'); + case 0x0005: + return Pel::tra('Strobe return light not detected.'); + case 0x0007: + return Pel::tra('Strobe return light detected.'); + case 0x0009: + return Pel::tra('Flash fired, compulsory flash mode.'); + case 0x000d: + return Pel::tra('Flash fired, compulsory flash mode, return light not detected.'); + case 0x000f: + return Pel::tra('Flash fired, compulsory flash mode, return light detected.'); + case 0x0010: + return Pel::tra('Flash did not fire, compulsory flash mode.'); + case 0x0018: + return Pel::tra('Flash did not fire, auto mode.'); + case 0x0019: + return Pel::tra('Flash fired, auto mode.'); + case 0x001d: + return Pel::tra('Flash fired, auto mode, return light not detected.'); + case 0x001f: + return Pel::tra('Flash fired, auto mode, return light detected.'); + case 0x0020: + return Pel::tra('No flash function.'); + case 0x0041: + return Pel::tra('Flash fired, red-eye reduction mode.'); + case 0x0045: + return Pel::tra('Flash fired, red-eye reduction mode, return light not detected.'); + case 0x0047: + return Pel::tra('Flash fired, red-eye reduction mode, return light detected.'); + case 0x0049: + return Pel::tra('Flash fired, compulsory flash mode, red-eye reduction mode.'); + case 0x004d: + return Pel::tra('Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected.'); + case 0x004f: + return Pel::tra('Flash fired, compulsory flash mode, red-eye reduction mode, return light detected.'); + case 0x0058: + return Pel::tra('Flash did not fire, auto mode, red-eye reduction mode.'); + case 0x0059: + return Pel::tra('Flash fired, auto mode, red-eye reduction mode.'); + case 0x005d: + return Pel::tra('Flash fired, auto mode, return light not detected, red-eye reduction mode.'); + case 0x005f: + return Pel::tra('Flash fired, auto mode, return light detected, red-eye reduction mode.'); + default: + return $this->value[0]; + } + + case PelTag::CUSTOM_RENDERED: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Normal process'); + case 1: + return Pel::tra('Custom process'); + default: + return $this->value[0]; + } + + case PelTag::EXPOSURE_MODE: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Auto exposure'); + case 1: + return Pel::tra('Manual exposure'); + case 2: + return Pel::tra('Auto bracket'); + default: + return $this->value[0]; + } + + case PelTag::WHITE_BALANCE: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Auto white balance'); + case 1: + return Pel::tra('Manual white balance'); + default: + return $this->value[0]; + } + + case PelTag::SCENE_CAPTURE_TYPE: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Standard'); + case 1: + return Pel::tra('Landscape'); + case 2: + return Pel::tra('Portrait'); + case 3: + return Pel::tra('Night scene'); + default: + return $this->value[0]; + } + + case PelTag::GAIN_CONTROL: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Normal'); + case 1: + return Pel::tra('Low gain up'); + case 2: + return Pel::tra('High gain up'); + case 3: + return Pel::tra('Low gain down'); + case 4: + return Pel::tra('High gain down'); + default: + return $this->value[0]; + } + + case PelTag::SATURATION: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Normal'); + case 1: + return Pel::tra('Low saturation'); + case 2: + return Pel::tra('High saturation'); + default: + return $this->value[0]; + } + + case PelTag::CONTRAST: + case PelTag::SHARPNESS: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Normal'); + case 1: + return Pel::tra('Soft'); + case 2: + return Pel::tra('Hard'); + default: + return $this->value[0]; + } + + case PelTag::SUBJECT_DISTANCE_RANGE: + //CC (e->components, 1, v); + switch ($this->value[0]) { + case 0: + return Pel::tra('Unknown'); + case 1: + return Pel::tra('Macro'); + case 2: + return Pel::tra('Close view'); + case 3: + return Pel::tra('Distant view'); + default: + return $this->value[0]; + } + + case PelTag::SUBJECT_AREA: + switch ($this->components) { + case 2: + return Pel::fmt('(x,y) = (%d,%d)', $this->value[0], $this->value[1]); + case 3: + return Pel::fmt('Within distance %d of (x,y) = (%d,%d)', + $this->value[0], $this->value[1], $this->value[2]); + case 4: + return Pel::fmt('Within rectangle (width %d, height %d) around (x,y) = (%d,%d)', + $this->value[0], $this->value[1], + $this->value[2], $this->value[3]); + + default: + return Pel::fmt('Unexpected number of components (%d, expected 2, 3, or 4).', $this->components); + } + + default: + return parent::getText($brief); + } + } +} + + +/** + * Class for holding signed shorts. + * + * This class can hold shorts, either just a single short or an array + * of shorts. The class will be used to manipulate any of the Exif + * tags which has format {@link PelFormat::SSHORT}. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntrySShort extends PelEntryNumber { + + /** + * Make a new entry that can hold a signed short. + * + * The method accept several integer arguments. The {@link + * getValue} method will always return an array except for when a + * single integer argument is given here. + * + * @param PelTag the tag which this entry represents. This + * should be one of the constants defined in {@link PelTag} + * which has format {@link PelFormat::SSHORT}. + * + * @param int $value... the signed short(s) that this entry will + * represent. The argument passed must obey the same rules as the + * argument to {@link setValue}, namely that it should be within + * range of a signed short, that is between -32768 to 32767 + * (inclusive). If not, then a {@link PelOverFlowException} will be + * thrown. + */ + function __construct($tag /* $value... */) { + $this->tag = $tag; + $this->min = -32768; + $this->max = 32767; + $this->format = PelFormat::SSHORT; + + $value = func_get_args(); + array_shift($value); + $this->setValueArray($value); + } + + + /** + * Convert a number into bytes. + * + * @param int the number that should be converted. + * + * @param PelByteOrder one of {@link PelConvert::LITTLE_ENDIAN} and + * {@link PelConvert::BIG_ENDIAN}, specifying the target byte order. + * + * @return string bytes representing the number given. + */ + function numberToBytes($number, $order) { + return PelConvert::sShortToBytes($number, $order); + } +} + + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelEntryUndefined.php b/modules/autorotate/lib/pel/PelEntryUndefined.php new file mode 100644 index 00000000..8ee8df34 --- /dev/null +++ b/modules/autorotate/lib/pel/PelEntryUndefined.php @@ -0,0 +1,416 @@ + + * @version $Revision: 380 $ + * @date $Date: 2005-10-03 14:01:28 +0200 (Mon, 03 Oct 2005) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelEntry.php'); +/**#@-*/ + + +/** + * Class for holding data of any kind. + * + * This class can hold bytes of undefined format. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryUndefined extends PelEntry { + + /** + * Make a new PelEntry that can hold undefined data. + * + * @param PelTag the tag which this entry represents. This + * should be one of the constants defined in {@link PelTag}, + * e.g., {@link PelTag::SCENE_TYPE}, {@link + * PelTag::MAKER_NOTE} or any other tag with format {@link + * PelFormat::UNDEFINED}. + * + * @param string the data that this entry will be holding. Since + * the format is undefined, no checking will be done on the data. + */ + function __construct($tag, $data = '') { + $this->tag = $tag; + $this->format = PelFormat::UNDEFINED; + $this->setValue($data); + } + + + /** + * Set the data of this undefined entry. + * + * @param string the data that this entry will be holding. Since + * the format is undefined, no checking will be done on the data. + */ + function setValue($data) { + $this->components = strlen($data); + $this->bytes = $data; + } + + + /** + * Get the data of this undefined entry. + * + * @return string the data that this entry is holding. + */ + function getValue() { + return $this->bytes; + } + + + /** + * Get the value of this entry as text. + * + * The value will be returned in a format suitable for presentation. + * + * @param boolean some values can be returned in a long or more + * brief form, and this parameter controls that. + * + * @return string the value as text. + */ + function getText($brief = false) { + switch ($this->tag) { + case PelTag::FILE_SOURCE: + //CC (e->components, 1, v); + switch (ord($this->bytes{0})) { + case 0x03: + return 'DSC'; + default: + return sprintf('0x%02X', ord($this->bytes{0})); + } + + case PelTag::SCENE_TYPE: + //CC (e->components, 1, v); + switch (ord($this->bytes{0})) { + case 0x01: + return 'Directly photographed'; + default: + return sprintf('0x%02X', ord($this->bytes{0})); + } + + case PelTag::COMPONENTS_CONFIGURATION: + //CC (e->components, 4, v); + $v = ''; + for ($i = 0; $i < 4; $i++) { + switch (ord($this->bytes{$i})) { + case 0: + $v .= '-'; + break; + case 1: + $v .= 'Y'; + break; + case 2: + $v .= 'Cb'; + break; + case 3: + $v .= 'Cr'; + break; + case 4: + $v .= 'R'; + break; + case 5: + $v .= 'G'; + break; + case 6: + $v .= 'B'; + break; + default: + $v .= 'reserved'; + break; + } + if ($i < 3) $v .= ' '; + } + return $v; + + case PelTag::MAKER_NOTE: + // TODO: handle maker notes. + return $this->components . ' bytes unknown MakerNote data'; + + default: + return '(undefined)'; + } + } + +} + + +/** + * Class for a user comment. + * + * This class is used to hold user comments, which can come in several + * different character encodings. The Exif standard specifies a + * certain format of the {@link PelTag::USER_COMMENT user comment + * tag}, and this class will make sure that the format is kept. + * + * The most basic use of this class simply stores an ASCII encoded + * string for later retrieval using {@link getValue}: + * + * + * $entry = new PelEntryUserComment('An ASCII string'); + * echo $entry->getValue(); + * + * + * The string can be encoded with a different encoding, and if so, the + * encoding must be given using the second argument. The Exif + * standard specifies three known encodings: 'ASCII', 'JIS', and + * 'Unicode'. If the user comment is encoded using a character + * encoding different from the tree known encodings, then the empty + * string should be passed as encoding, thereby specifying that the + * encoding is undefined. + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryUserComment extends PelEntryUndefined { + + /** + * The user comment. + * + * @var string + */ + private $comment; + + /** + * The encoding. + * + * This should be one of 'ASCII', 'JIS', 'Unicode', or ''. + * + * @var string + */ + private $encoding; + + /** + * Make a new entry for holding a user comment. + * + * @param string the new user comment. + * + * @param string the encoding of the comment. This should be either + * 'ASCII', 'JIS', 'Unicode', or the empty string specifying an + * undefined encoding. + */ + function __construct($comment = '', $encoding = 'ASCII') { + parent::__construct(PelTag::USER_COMMENT); + $this->setValue($comment, $encoding); + } + + + /** + * Set the user comment. + * + * @param string the new user comment. + * + * @param string the encoding of the comment. This should be either + * 'ASCII', 'JIS', 'Unicode', or the empty string specifying an + * unknown encoding. + */ + function setValue($comment = '', $encoding = 'ASCII') { + $this->comment = $comment; + $this->encoding = $encoding; + parent::setValue(str_pad($encoding, 8, chr(0)) . $comment); + } + + + /** + * Returns the user comment. + * + * The comment is returned with the same character encoding as when + * it was set using {@link setValue} or {@link __construct the + * constructor}. + * + * @return string the user comment. + */ + function getValue() { + return $this->comment; + } + + + /** + * Returns the encoding. + * + * @return string the encoding of the user comment. + */ + function getEncoding() { + return $this->encoding; + } + + + /** + * Returns the user comment. + * + * @return string the user comment. + */ + function getText($brief = false) { + return $this->comment; + } + +} + + +/** + * Class to hold version information. + * + * There are three Exif entries that hold version information: the + * {@link PelTag::EXIF_VERSION}, {@link + * PelTag::FLASH_PIX_VERSION}, and {@link + * PelTag::INTEROPERABILITY_VERSION} tags. This class manages + * those tags. + * + * The class is used in a very straight-forward way: + * + * $entry = new PelEntryVersion(PelTag::EXIF_VERSION, 2.2); + * + * This creates an entry for an file complying to the Exif 2.2 + * standard. It is easy to test for standards level of an unknown + * entry: + * + * if ($entry->getTag() == PelTag::EXIF_VERSION && + * $entry->getValue() > 2.0) { + * echo 'Recent Exif version.'; + * } + * + * + * @author Martin Geisler + * @package PEL + */ +class PelEntryVersion extends PelEntryUndefined { + + /** + * The version held by this entry. + * + * @var float + */ + private $version; + + + /** + * Make a new entry for holding a version. + * + * @param PelTag the tag. This should be one of {@link + * PelTag::EXIF_VERSION}, {@link PelTag::FLASH_PIX_VERSION}, + * or {@link PelTag::INTEROPERABILITY_VERSION}. + * + * @param float the version. The size of the entries leave room for + * exactly four digits: two digits on either side of the decimal + * point. + */ + function __construct($tag, $version = 0.0) { + parent::__construct($tag); + $this->setValue($version); + } + + + /** + * Set the version held by this entry. + * + * @param float the version. The size of the entries leave room for + * exactly four digits: two digits on either side of the decimal + * point. + */ + function setValue($version = 0.0) { + $this->version = $version; + $major = floor($version); + $minor = ($version - $major)*100; + parent::setValue(sprintf('%02.0f%02.0f', $major, $minor)); + } + + + /** + * Return the version held by this entry. + * + * @return float the version. This will be the same as the value + * given to {@link setValue} or {@link __construct the + * constructor}. + */ + function getValue() { + return $this->version; + } + + + /** + * Return a text string with the version. + * + * @param boolean controls if the output should be brief. Brief + * output omits the word 'Version' so the result is just 'Exif x.y' + * instead of 'Exif Version x.y' if the entry holds information + * about the Exif version --- the output for FlashPix is similar. + * + * @return string the version number with the type of the tag, + * either 'Exif' or 'FlashPix'. + */ + function getText($brief = false) { + $v = $this->version; + + /* Versions numbers like 2.0 would be output as just 2 if we don't + * add the '.0' ourselves. */ + if (floor($this->version) == $this->version) + $v .= '.0'; + + switch ($this->tag) { + case PelTag::EXIF_VERSION: + if ($brief) + return Pel::fmt('Exif %s', $v); + else + return Pel::fmt('Exif Version %s', $v); + + case PelTag::FLASH_PIX_VERSION: + if ($brief) + return Pel::fmt('FlashPix %s', $v); + else + return Pel::fmt('FlashPix Version %s', $v); + + case PelTag::INTEROPERABILITY_VERSION: + if ($brief) + return Pel::fmt('Interoperability %s', $v); + else + return Pel::fmt('Interoperability Version %s', $v); + } + + if ($brief) + return $v; + else + return Pel::fmt('Version %s', $v); + + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelException.php b/modules/autorotate/lib/pel/PelException.php new file mode 100644 index 00000000..b090fd0e --- /dev/null +++ b/modules/autorotate/lib/pel/PelException.php @@ -0,0 +1,87 @@ + + * @version $Revision: 396 $ + * @date $Date: 2005-10-24 00:36:10 +0200 (Mon, 24 Oct 2005) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/** + * A printf() capable exception. + * + * This class is a simple extension of the standard Exception class in + * PHP, and all the methods defined there retain their original + * meaning. + * + * @package PEL + * @subpackage Exception + */ +class PelException extends Exception { + + /** + * Construct a new PEL exception. + * + * @param string $fmt an optional format string can be given. It + * will be used as a format string for vprintf(). The remaining + * arguments will be available for the format string as usual with + * vprintf(). + * + * @param mixed $args,... any number of arguments to be used with + * the format string. + */ + function __construct(/* fmt, args... */) { + $args = func_get_args(); + $fmt = array_shift($args); + parent::__construct(vsprintf($fmt, $args)); + } +} + + +/** + * Exception throw if invalid data is found. + * + * @author Martin Geisler + * @package PEL + * @subpackage Exception + */ +class PelInvalidDataException extends PelException {} + +/** + * Exception throw if an invalid argument is passed. + * + * @author Martin Geisler + * @package PEL + * @subpackage Exception + */ +class PelInvalidArgumentException extends PelException {} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelExif.php b/modules/autorotate/lib/pel/PelExif.php new file mode 100644 index 00000000..6f85d695 --- /dev/null +++ b/modules/autorotate/lib/pel/PelExif.php @@ -0,0 +1,175 @@ + + * @version $Revision: 380 $ + * @date $Date: 2005-10-03 14:01:28 +0200 (Mon, 03 Oct 2005) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelJpegContent.php'); +require_once('PelException.php'); +require_once('PelFormat.php'); +require_once('PelEntry.php'); +require_once('PelTiff.php'); +require_once('PelIfd.php'); +require_once('PelTag.php'); +require_once('Pel.php'); +/**#@-*/ + + +/** + * Class representing Exif data. + * + * Exif data resides as {@link PelJpegContent data} and consists of a + * header followed by a number of {@link PelJpegIfd IFDs}. + * + * The interesting method in this class is {@link getTiff()} which + * will return the {@link PelTiff} object which really holds the data + * which one normally think of when talking about Exif data. This is + * because Exif data is stored as an extension of the TIFF file + * format. + * + * @author Martin Geisler + * @package PEL + */ +class PelExif extends PelJpegContent { + + /** + * Exif header. + * + * The Exif data must start with these six bytes to be considered + * valid. + */ + const EXIF_HEADER = "Exif\0\0"; + + /** + * The PelTiff object contained within. + * + * @var PelTiff + */ + private $tiff = null; + + + /** + * Construct a new Exif object. + * + * The new object will be empty --- use the {@link load()} method to + * load Exif data from a {@link PelDataWindow} object, or use the + * {@link setTiff()} to change the {@link PelTiff} object, which is + * the true holder of the Exif {@link PelEntry entries}. + */ + function __construct() { + + } + + + /** + * Load and parse Exif data. + * + * This will populate the object with Exif data, contained as a + * {@link PelTiff} object. This TIFF object can be accessed with + * the {@link getTiff()} method. + */ + function load(PelDataWindow $d) { + Pel::debug('Parsing %d bytes of Exif data...', $d->getSize()); + + /* There must be at least 6 bytes for the Exif header. */ + if ($d->getSize() < 6) + throw new PelInvalidDataException('Expected at least 6 bytes of Exif ' . + 'data, found just %d bytes.', + $d->getSize()); + + /* Verify the Exif header */ + if ($d->strcmp(0, self::EXIF_HEADER)) { + $d->setWindowStart(strlen(self::EXIF_HEADER)); + } else { + throw new PelInvalidDataException('Exif header not found.'); + } + + /* The rest of the data is TIFF data. */ + $this->tiff = new PelTiff(); + $this->tiff->load($d); + } + + + /** + * Change the TIFF information. + * + * Exif data is really stored as TIFF data, and this method can be + * used to change this data from one {@link PelTiff} object to + * another. + * + * @param PelTiff the new TIFF object. + */ + function setTiff(PelTiff $tiff) { + $this->tiff = $tiff; + } + + + /** + * Get the underlying TIFF object. + * + * The actual Exif data is stored in a {@link PelTiff} object, and + * this method provides access to it. + * + * @return PelTiff the TIFF object with the Exif data. + */ + function getTiff() { + return $this->tiff; + } + + + /** + * Produce bytes for the Exif data. + * + * @return string bytes representing this object. + */ + function getBytes() { + return self::EXIF_HEADER . $this->tiff->getBytes(); + } + + + /** + * Return a string representation of this object. + * + * @return string a string describing this object. This is mostly + * useful for debugging. + */ + function __toString() { + return Pel::tra("Dumping Exif data...\n") . + $this->tiff->__toString(); + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelFormat.php b/modules/autorotate/lib/pel/PelFormat.php new file mode 100644 index 00000000..4b2badcd --- /dev/null +++ b/modules/autorotate/lib/pel/PelFormat.php @@ -0,0 +1,225 @@ + + * @version $Revision: 380 $ + * @date $Date: 2005-10-03 14:01:28 +0200 (Mon, 03 Oct 2005) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/** + * Namespace for functions operating on Exif formats. + * + * This class defines the constants that are to be used whenever one + * has to refer to the format of an Exif tag. They will be + * collectively denoted by the pseudo-type PelFormat throughout the + * documentation. + * + * All the methods defined here are static, and they all operate on a + * single argument which should be one of the class constants. + * + * @author Martin Geisler + * @package PEL + */ +class PelFormat { + + /** + * Unsigned byte. + * + * Each component will be an unsigned 8-bit integer with a value + * between 0 and 255. + * + * Modelled with the {@link PelEntryByte} class. + */ + const BYTE = 1; + + /** + * ASCII string. + * + * Each component will be an ASCII character. + * + * Modelled with the {@link PelEntryAscii} class. + */ + const ASCII = 2; + + /** + * Unsigned short. + * + * Each component will be an unsigned 16-bit integer with a value + * between 0 and 65535. + * + * Modelled with the {@link PelEntryShort} class. + */ + const SHORT = 3; + + /** + * Unsigned long. + * + * Each component will be an unsigned 32-bit integer with a value + * between 0 and 4294967295. + * + * Modelled with the {@link PelEntryLong} class. + */ + const LONG = 4; + + /** + * Unsigned rational number. + * + * Each component will consist of two unsigned 32-bit integers + * denoting the enumerator and denominator. Each integer will have + * a value between 0 and 4294967295. + * + * Modelled with the {@link PelEntryRational} class. + */ + const RATIONAL = 5; + + /** + * Signed byte. + * + * Each component will be a signed 8-bit integer with a value + * between -128 and 127. + * + * Modelled with the {@link PelEntrySByte} class. + */ + const SBYTE = 6; + + /** + * Undefined byte. + * + * Each component will be a byte with no associated interpretation. + * + * Modelled with the {@link PelEntryUndefined} class. + */ + const UNDEFINED = 7; + + /** + * Signed short. + * + * Each component will be a signed 16-bit integer with a value + * between -32768 and 32767. + * + * Modelled with the {@link PelEntrySShort} class. + */ + const SSHORT = 8; + + /** + * Signed long. + * + * Each component will be a signed 32-bit integer with a value + * between -2147483648 and 2147483647. + * + * Modelled with the {@link PelEntrySLong} class. + */ + const SLONG = 9; + + /** + * Signed rational number. + * + * Each component will consist of two signed 32-bit integers + * denoting the enumerator and denominator. Each integer will have + * a value between -2147483648 and 2147483647. + * + * Modelled with the {@link PelEntrySRational} class. + */ + const SRATIONAL = 10; + + /** + * Floating point number. + * + * Entries with this format are not currently implemented. + */ + const FLOAT = 11; + + /** + * Double precision floating point number. + * + * Entries with this format are not currently implemented. + */ + const DOUBLE = 12; + + + /** + * Returns the name of a format. + * + * @param PelFormat the format. + * + * @return string the name of the format, e.g., 'Ascii' for the + * {@link ASCII} format etc. + */ + static function getName($type) { + switch ($type) { + case self::ASCII: return 'Ascii'; + case self::BYTE: return 'Byte'; + case self::SHORT: return 'Short'; + case self::LONG: return 'Long'; + case self::RATIONAL: return 'Rational'; + case self::SBYTE: return 'SByte'; + case self::SSHORT: return 'SShort'; + case self::SLONG: return 'SLong'; + case self::SRATIONAL: return 'SRational'; + case self::FLOAT: return 'Float'; + case self::DOUBLE: return 'Double'; + case self::UNDEFINED: return 'Undefined'; + default: + return Pel::fmt('Unknown format: 0x%X', $type); + } + } + + + /** + * Return the size of components in a given format. + * + * @param PelFormat the format. + * + * @return the size in bytes needed to store one component with the + * given format. + */ + static function getSize($type) { + switch ($type) { + case self::ASCII: return 1; + case self::BYTE: return 1; + case self::SHORT: return 2; + case self::LONG: return 4; + case self::RATIONAL: return 8; + case self::SBYTE: return 1; + case self::SSHORT: return 2; + case self::SLONG: return 4; + case self::SRATIONAL: return 8; + case self::FLOAT: return 4; + case self::DOUBLE: return 8; + case self::UNDEFINED: return 1; + default: + return Pel::fmt('Unknown format: 0x%X', $type); + } + } + +} +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelIfd.php b/modules/autorotate/lib/pel/PelIfd.php new file mode 100644 index 00000000..86c7fad1 --- /dev/null +++ b/modules/autorotate/lib/pel/PelIfd.php @@ -0,0 +1,1200 @@ + + * @version $Revision: 443 $ + * @date $Date: 2006-09-17 20:32:04 +0200 (Sun, 17 Sep 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelEntryUndefined.php'); +require_once('PelEntryRational.php'); +require_once('PelDataWindow.php'); +require_once('PelEntryAscii.php'); +require_once('PelEntryShort.php'); +require_once('PelEntryByte.php'); +require_once('PelEntryLong.php'); +require_once('PelException.php'); +require_once('PelFormat.php'); +require_once('PelEntry.php'); +require_once('PelTag.php'); +require_once('Pel.php'); +/**#@-*/ + + +/** + * Exception indicating a general problem with the IFD. + * + * @author Martin Geisler + * @package PEL + * @subpackage Exception + */ +class PelIfdException extends PelException {} + +/** + * Class representing an Image File Directory (IFD). + * + * {@link PelTiff TIFF data} is structured as a number of Image File + * Directories, IFDs for short. Each IFD contains a number of {@link + * PelEntry entries}, some data and finally a link to the next IFD. + * + * @author Martin Geisler + * @package PEL + */ +class PelIfd implements IteratorAggregate, ArrayAccess { + + /** + * Main image IFD. + * + * Pass this to the constructor when creating an IFD which will be + * the IFD of the main image. + */ + const IFD0 = 0; + + /** + * Thumbnail image IFD. + * + * Pass this to the constructor when creating an IFD which will be + * the IFD of the thumbnail image. + */ + const IFD1 = 1; + + /** + * Exif IFD. + * + * Pass this to the constructor when creating an IFD which will be + * the Exif sub-IFD. + */ + const EXIF = 2; + + /** + * GPS IFD. + * + * Pass this to the constructor when creating an IFD which will be + * the GPS sub-IFD. + */ + const GPS = 3; + + /** + * Interoperability IFD. + * + * Pass this to the constructor when creating an IFD which will be + * the interoperability sub-IFD. + */ + const INTEROPERABILITY = 4; + + /** + * The entries held by this directory. + * + * Each tag in the directory is represented by a {@link PelEntry} + * object in this array. + * + * @var array + */ + private $entries = array(); + + /** + * The type of this directory. + * + * Initialized in the constructor. Must be one of {@link IFD0}, + * {@link IFD1}, {@link EXIF}, {@link GPS}, or {@link + * INTEROPERABILITY}. + * + * @var int + */ + private $type; + + /** + * The next directory. + * + * This will be initialized in the constructor, or be left as null + * if this is the last directory. + * + * @var PelIfd + */ + private $next = null; + + /** + * Sub-directories pointed to by this directory. + * + * This will be an array of ({@link PelTag}, {@link PelIfd}) pairs. + * + * @var array + */ + private $sub = array(); + + /** + * The thumbnail data. + * + * This will be initialized in the constructor, or be left as null + * if there are no thumbnail as part of this directory. + * + * @var PelDataWindow + */ + private $thumb_data = null; + // TODO: use this format to choose between the + // JPEG_INTERCHANGE_FORMAT and STRIP_OFFSETS tags. + // private $thumb_format; + + + /** + * Construct a new Image File Directory (IFD). + * + * The IFD will be empty, use the {@link addEntry()} method to add + * an {@link PelEntry}. Use the {@link setNext()} method to link + * this IFD to another. + * + * @param int type the type of this IFD. Must be one of {@link + * IFD0}, {@link IFD1}, {@link EXIF}, {@link GPS}, or {@link + * INTEROPERABILITY}. An {@link PelIfdException} will be thrown + * otherwise. + */ + function __construct($type) { + if ($type != PelIfd::IFD0 && $type != PelIfd::IFD1 && + $type != PelIfd::EXIF && $type != PelIfd::GPS && + $type != PelIfd::INTEROPERABILITY) + throw new PelIfdException('Unknown IFD type: %d', $type); + + $this->type = $type; + } + + + /** + * Load data into a Image File Directory (IFD). + * + * @param PelDataWindow the data window that will provide the data. + * + * @param int the offset within the window where the directory will + * be found. + */ + function load(PelDataWindow $d, $offset) { + $thumb_offset = 0; + $thumb_length = 0; + + Pel::debug('Constructing IFD at offset %d from %d bytes...', + $offset, $d->getSize()); + + /* Read the number of entries */ + $n = $d->getShort($offset); + Pel::debug('Loading %d entries...', $n); + + $offset += 2; + + /* Check if we have enough data. */ + if ($offset + 12 * $n > $d->getSize()) { + $n = floor(($offset - $d->getSize()) / 12); + Pel::maybeThrow(new PelIfdException('Adjusted to: %d.', $n)); + } + + for ($i = 0; $i < $n; $i++) { + // TODO: increment window start instead of using offsets. + $tag = $d->getShort($offset + 12 * $i); + Pel::debug('Loading entry with tag 0x%04X: %s (%d of %d)...', + $tag, PelTag::getName($this->type, $tag), $i + 1, $n); + + switch ($tag) { + case PelTag::EXIF_IFD_POINTER: + case PelTag::GPS_INFO_IFD_POINTER: + case PelTag::INTEROPERABILITY_IFD_POINTER: + $o = $d->getLong($offset + 12 * $i + 8); + Pel::debug('Found sub IFD at offset %d', $o); + + /* Map tag to IFD type. */ + if ($tag == PelTag::EXIF_IFD_POINTER) + $type = PelIfd::EXIF; + elseif ($tag == PelTag::GPS_INFO_IFD_POINTER) + $type = PelIfd::GPS; + elseif ($tag == PelTag::INTEROPERABILITY_IFD_POINTER) + $type = PelIfd::INTEROPERABILITY; + + $this->sub[$type] = new PelIfd($type); + $this->sub[$type]->load($d, $o); + break; + case PelTag::JPEG_INTERCHANGE_FORMAT: + $thumb_offset = $d->getLong($offset + 12 * $i + 8); + $this->safeSetThumbnail($d, $thumb_offset, $thumb_length); + break; + case PelTag::JPEG_INTERCHANGE_FORMAT_LENGTH: + $thumb_length = $d->getLong($offset + 12 * $i + 8); + $this->safeSetThumbnail($d, $thumb_offset, $thumb_length); + break; + default: + $format = $d->getShort($offset + 12 * $i + 2); + $components = $d->getLong($offset + 12 * $i + 4); + + /* The data size. If bigger than 4 bytes, the actual data is + * not in the entry but somewhere else, with the offset stored + * in the entry. + */ + $s = PelFormat::getSize($format) * $components; + if ($s > 0) { + $doff = $offset + 12 * $i + 8; + if ($s > 4) + $doff = $d->getLong($doff); + + $data = $d->getClone($doff, $s); + } else { + $data = new PelDataWindow(); + } + + try { + $entry = $this->newEntryFromData($tag, $format, $components, $data); + + if ($this->isValidTag($tag)) { + $entry->setIfdType($this->type); + $this->entries[$tag] = $entry; + } else { + Pel::maybeThrow(new PelInvalidDataException("IFD %s cannot hold\n%s", + $this->getName(), + $entry->__toString())); + } + } catch (PelException $e) { + /* Throw the exception when running in strict mode, store + * otherwise. */ + Pel::maybeThrow($e); + } + + /* The format of the thumbnail is stored in this tag. */ +// TODO: handle TIFF thumbnail. +// if ($tag == PelTag::COMPRESSION) { +// $this->thumb_format = $data->getShort(); +// } + break; + } + } + + /* Offset to next IFD */ + $o = $d->getLong($offset + 12 * $n); + Pel::debug('Current offset is %d, link at %d points to %d.', + $offset, $offset + 12 * $n, $o); + + if ($o > 0) { + /* Sanity check: we need 6 bytes */ + if ($o > $d->getSize() - 6) { + Pel::maybeThrow(new PelIfdException('Bogus offset to next IFD: ' . + '%d > %d!', + $o, $d->getSize() - 6)); + } else { + if ($this->type == PelIfd::IFD1) // IFD1 shouldn't link further... + Pel::maybeThrow(new PelIfdException('IFD1 links to another IFD!')); + + $this->next = new PelIfd(PelIfd::IFD1); + $this->next->load($d, $o); + } + } else { + Pel::debug('Last IFD.'); + } + } + + + /** + * Make a new entry from a bunch of bytes. + * + * This method will create the proper subclass of {@link PelEntry} + * corresponding to the {@link PelTag} and {@link PelFormat} given. + * The entry will be initialized with the data given. + * + * Please note that the data you pass to this method should come + * from an image, that is, it should be raw bytes. If instead you + * want to create an entry for holding, say, an short integer, then + * create a {@link PelEntryShort} object directly and load the data + * into it. + * + * A {@link PelUnexpectedFormatException} is thrown if a mismatch is + * discovered between the tag and format, and likewise a {@link + * PelWrongComponentCountException} is thrown if the number of + * components does not match the requirements of the tag. The + * requirements for a given tag (if any) can be found in the + * documentation for {@link PelTag}. + * + * @param PelTag the tag of the entry. + * + * @param PelFormat the format of the entry. + * + * @param int the components in the entry. + * + * @param PelDataWindow the data which will be used to construct the + * entry. + * + * @return PelEntry a newly created entry, holding the data given. + */ + function newEntryFromData($tag, $format, $components, PelDataWindow $data) { + + /* First handle tags for which we have a specific PelEntryXXX + * class. */ + + switch ($this->type) { + + case self::IFD0: + case self::IFD1: + case self::EXIF: + case self::INTEROPERABILITY: + + switch ($tag) { + case PelTag::DATE_TIME: + case PelTag::DATE_TIME_ORIGINAL: + case PelTag::DATE_TIME_DIGITIZED: + if ($format != PelFormat::ASCII) + throw new PelUnexpectedFormatException($this->type, $tag, $format, + PelFormat::ASCII); + + if ($components != 20) + throw new PelWrongComponentCountException($this->type, $tag, $components, 20); + + // TODO: handle timezones. + return new PelEntryTime($tag, $data->getBytes(0, -1), PelEntryTime::EXIF_STRING); + + case PelTag::COPYRIGHT: + if ($format != PelFormat::ASCII) + throw new PelUnexpectedFormatException($this->type, $tag, $format, + PelFormat::ASCII); + + $v = explode("\0", trim($data->getBytes(), ' ')); + return new PelEntryCopyright($v[0], $v[1]); + + case PelTag::EXIF_VERSION: + case PelTag::FLASH_PIX_VERSION: + case PelTag::INTEROPERABILITY_VERSION: + if ($format != PelFormat::UNDEFINED) + throw new PelUnexpectedFormatException($this->type, $tag, $format, + PelFormat::UNDEFINED); + + return new PelEntryVersion($tag, $data->getBytes() / 100); + + case PelTag::USER_COMMENT: + if ($format != PelFormat::UNDEFINED) + throw new PelUnexpectedFormatException($this->type, $tag, $format, + PelFormat::UNDEFINED); + if ($data->getSize() < 8) { + return new PelEntryUserComment(); + } else { + return new PelEntryUserComment($data->getBytes(8), + rtrim($data->getBytes(0, 8))); + } + + case PelTag::XP_TITLE: + case PelTag::XP_COMMENT: + case PelTag::XP_AUTHOR: + case PelTag::XP_KEYWORDS: + case PelTag::XP_SUBJECT: + if ($format != PelFormat::BYTE) + throw new PelUnexpectedFormatException($this->type, $tag, $format, + PelFormat::BYTE); + + $v = ''; + for ($i = 0; $i < $components; $i++) { + $b = $data->getByte($i); + /* Convert the byte to a character if it is non-null --- + * information about the character encoding of these entries + * would be very nice to have! So far my tests have shown + * that characters in the Latin-1 character set are stored in + * a single byte followed by a NULL byte. */ + if ($b != 0) + $v .= chr($b); + } + + return new PelEntryWindowsString($tag, $v); + } + + case self::GPS: + + default: + /* Then handle the basic formats. */ + switch ($format) { + case PelFormat::BYTE: + $v = new PelEntryByte($tag); + for ($i = 0; $i < $components; $i++) + $v->addNumber($data->getByte($i)); + return $v; + + case PelFormat::SBYTE: + $v = new PelEntrySByte($tag); + for ($i = 0; $i < $components; $i++) + $v->addNumber($data->getSByte($i)); + return $v; + + case PelFormat::ASCII: + return new PelEntryAscii($tag, $data->getBytes(0, -1)); + + case PelFormat::SHORT: + $v = new PelEntryShort($tag); + for ($i = 0; $i < $components; $i++) + $v->addNumber($data->getShort($i*2)); + return $v; + + case PelFormat::SSHORT: + $v = new PelEntrySShort($tag); + for ($i = 0; $i < $components; $i++) + $v->addNumber($data->getSShort($i*2)); + return $v; + + case PelFormat::LONG: + $v = new PelEntryLong($tag); + for ($i = 0; $i < $components; $i++) + $v->addNumber($data->getLong($i*4)); + return $v; + + case PelFormat::SLONG: + $v = new PelEntrySLong($tag); + for ($i = 0; $i < $components; $i++) + $v->addNumber($data->getSLong($i*4)); + return $v; + + case PelFormat::RATIONAL: + $v = new PelEntryRational($tag); + for ($i = 0; $i < $components; $i++) + $v->addNumber($data->getRational($i*8)); + return $v; + + case PelFormat::SRATIONAL: + $v = new PelEntrySRational($tag); + for ($i = 0; $i < $components; $i++) + $v->addNumber($data->getSRational($i*8)); + return $v; + + case PelFormat::UNDEFINED: + return new PelEntryUndefined($tag, $data->getBytes()); + + default: + throw new PelException('Unsupported format: %s', + PelFormat::getName($format)); + } + } + } + + + + + /** + * Extract thumbnail data safely. + * + * It is safe to call this method repeatedly with either the offset + * or the length set to zero, since it requires both of these + * arguments to be positive before the thumbnail is extracted. + * + * When both parameters are set it will check the length against the + * available data and adjust as necessary. Only then is the + * thumbnail data loaded. + * + * @param PelDataWindow the data from which the thumbnail will be + * extracted. + * + * @param int the offset into the data. + * + * @param int the length of the thumbnail. + */ + private function safeSetThumbnail(PelDataWindow $d, $offset, $length) { + /* Load the thumbnail if both the offset and the length is + * available. */ + if ($offset > 0 && $length > 0) { + /* Some images have a broken length, so we try to carefully + * check the length before we store the thumbnail. */ + if ($offset + $length > $d->getSize()) { + Pel::maybeThrow(new PelIfdException('Thumbnail length %d bytes ' . + 'adjusted to %d bytes.', + $length, + $d->getSize() - $offset)); + $length = $d->getSize() - $offset; + } + + /* Now set the thumbnail normally. */ + $this->setThumbnail($d->getClone($offset, $length)); + } + } + + + /** + * Set thumbnail data. + * + * Use this to embed an arbitrary JPEG image within this IFD. The + * data will be checked to ensure that it has a proper {@link + * PelJpegMarker::EOI} at the end. If not, then the length is + * adjusted until one if found. An {@link PelIfdException} might be + * thrown (depending on {@link Pel::$strict}) this case. + * + * @param PelDataWindow the thumbnail data. + */ + function setThumbnail(PelDataWindow $d) { + $size = $d->getSize(); + /* Now move backwards until we find the EOI JPEG marker. */ + while ($d->getByte($size - 2) != 0xFF || + $d->getByte($size - 1) != PelJpegMarker::EOI) { + $size--; + } + + if ($size != $d->getSize()) + Pel::maybeThrow(new PelIfdException('Decrementing thumbnail size ' . + 'to %d bytes', $size)); + + $this->thumb_data = $d->getClone(0, $size); + } + + + /** + * Get the type of this directory. + * + * @return int of {@link PelIfd::IFD0}, {@link PelIfd::IFD1}, {@link + * PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link + * PelIfd::INTEROPERABILITY}. + */ + function getType() { + return $this->type; + } + + + /** + * Is a given tag valid for this IFD? + * + * Different types of IFDs can contain different kinds of tags --- + * the {@link IFD0} type, for example, cannot contain a {@link + * PelTag::GPS_LONGITUDE} tag. + * + * A special exception is tags with values above 0xF000. They are + * treated as private tags and will be allowed everywhere (use this + * for testing or for implementing your own types of tags). + * + * @param PelTag the tag. + * + * @return boolean true if the tag is considered valid in this IFD, + * false otherwise. + * + * @see getValidTags() + */ + function isValidTag($tag) { + return $tag > 0xF000 || in_array($tag, $this->getValidTags()); + } + + + /** + * Returns a list of valid tags for this IFD. + * + * @return array an array of {@link PelTag}s which are valid for + * this IFD. + */ + function getValidTags() { + switch ($this->type) { + case PelIfd::IFD0: + case PelIfd::IFD1: + return array(PelTag::IMAGE_WIDTH, + PelTag::IMAGE_LENGTH, + PelTag::BITS_PER_SAMPLE, + PelTag::COMPRESSION, + PelTag::PHOTOMETRIC_INTERPRETATION, + PelTag::IMAGE_DESCRIPTION, + PelTag::MAKE, + PelTag::MODEL, + PelTag::STRIP_OFFSETS, + PelTag::ORIENTATION, + PelTag::SAMPLES_PER_PIXEL, + PelTag::ROWS_PER_STRIP, + PelTag::STRIP_BYTE_COUNTS, + PelTag::X_RESOLUTION, + PelTag::Y_RESOLUTION, + PelTag::PLANAR_CONFIGURATION, + PelTag::RESOLUTION_UNIT, + PelTag::TRANSFER_FUNCTION, + PelTag::SOFTWARE, + PelTag::DATE_TIME, + PelTag::ARTIST, + PelTag::WHITE_POINT, + PelTag::PRIMARY_CHROMATICITIES, + PelTag::JPEG_INTERCHANGE_FORMAT, + PelTag::JPEG_INTERCHANGE_FORMAT_LENGTH, + PelTag::YCBCR_COEFFICIENTS, + PelTag::YCBCR_SUB_SAMPLING, + PelTag::YCBCR_POSITIONING, + PelTag::REFERENCE_BLACK_WHITE, + PelTag::COPYRIGHT, + PelTag::EXIF_IFD_POINTER, + PelTag::GPS_INFO_IFD_POINTER, + PelTag::PRINT_IM); + + case PelIfd::EXIF: + return array(PelTag::EXPOSURE_TIME, + PelTag::FNUMBER, + PelTag::EXPOSURE_PROGRAM, + PelTag::SPECTRAL_SENSITIVITY, + PelTag::ISO_SPEED_RATINGS, + PelTag::OECF, + PelTag::EXIF_VERSION, + PelTag::DATE_TIME_ORIGINAL, + PelTag::DATE_TIME_DIGITIZED, + PelTag::COMPONENTS_CONFIGURATION, + PelTag::COMPRESSED_BITS_PER_PIXEL, + PelTag::SHUTTER_SPEED_VALUE, + PelTag::APERTURE_VALUE, + PelTag::BRIGHTNESS_VALUE, + PelTag::EXPOSURE_BIAS_VALUE, + PelTag::MAX_APERTURE_VALUE, + PelTag::SUBJECT_DISTANCE, + PelTag::METERING_MODE, + PelTag::LIGHT_SOURCE, + PelTag::FLASH, + PelTag::FOCAL_LENGTH, + PelTag::MAKER_NOTE, + PelTag::USER_COMMENT, + PelTag::SUB_SEC_TIME, + PelTag::SUB_SEC_TIME_ORIGINAL, + PelTag::SUB_SEC_TIME_DIGITIZED, + PelTag::XP_TITLE, + PelTag::XP_COMMENT, + PelTag::XP_AUTHOR, + PelTag::XP_KEYWORDS, + PelTag::XP_SUBJECT, + PelTag::FLASH_PIX_VERSION, + PelTag::COLOR_SPACE, + PelTag::PIXEL_X_DIMENSION, + PelTag::PIXEL_Y_DIMENSION, + PelTag::RELATED_SOUND_FILE, + PelTag::FLASH_ENERGY, + PelTag::SPATIAL_FREQUENCY_RESPONSE, + PelTag::FOCAL_PLANE_X_RESOLUTION, + PelTag::FOCAL_PLANE_Y_RESOLUTION, + PelTag::FOCAL_PLANE_RESOLUTION_UNIT, + PelTag::SUBJECT_LOCATION, + PelTag::EXPOSURE_INDEX, + PelTag::SENSING_METHOD, + PelTag::FILE_SOURCE, + PelTag::SCENE_TYPE, + PelTag::CFA_PATTERN, + PelTag::CUSTOM_RENDERED, + PelTag::EXPOSURE_MODE, + PelTag::WHITE_BALANCE, + PelTag::DIGITAL_ZOOM_RATIO, + PelTag::FOCAL_LENGTH_IN_35MM_FILM, + PelTag::SCENE_CAPTURE_TYPE, + PelTag::GAIN_CONTROL, + PelTag::CONTRAST, + PelTag::SATURATION, + PelTag::SHARPNESS, + PelTag::DEVICE_SETTING_DESCRIPTION, + PelTag::SUBJECT_DISTANCE_RANGE, + PelTag::IMAGE_UNIQUE_ID, + PelTag::INTEROPERABILITY_IFD_POINTER, + PelTag::GAMMA); + + case PelIfd::GPS: + return array(PelTag::GPS_VERSION_ID, + PelTag::GPS_LATITUDE_REF, + PelTag::GPS_LATITUDE, + PelTag::GPS_LONGITUDE_REF, + PelTag::GPS_LONGITUDE, + PelTag::GPS_ALTITUDE_REF, + PelTag::GPS_ALTITUDE, + PelTag::GPS_TIME_STAMP, + PelTag::GPS_SATELLITES, + PelTag::GPS_STATUS, + PelTag::GPS_MEASURE_MODE, + PelTag::GPS_DOP, + PelTag::GPS_SPEED_REF, + PelTag::GPS_SPEED, + PelTag::GPS_TRACK_REF, + PelTag::GPS_TRACK, + PelTag::GPS_IMG_DIRECTION_REF, + PelTag::GPS_IMG_DIRECTION, + PelTag::GPS_MAP_DATUM, + PelTag::GPS_DEST_LATITUDE_REF, + PelTag::GPS_DEST_LATITUDE, + PelTag::GPS_DEST_LONGITUDE_REF, + PelTag::GPS_DEST_LONGITUDE, + PelTag::GPS_DEST_BEARING_REF, + PelTag::GPS_DEST_BEARING, + PelTag::GPS_DEST_DISTANCE_REF, + PelTag::GPS_DEST_DISTANCE, + PelTag::GPS_PROCESSING_METHOD, + PelTag::GPS_AREA_INFORMATION, + PelTag::GPS_DATE_STAMP, + PelTag::GPS_DIFFERENTIAL); + + case PelIfd::INTEROPERABILITY: + return array(PelTag::INTEROPERABILITY_INDEX, + PelTag::INTEROPERABILITY_VERSION, + PelTag::RELATED_IMAGE_FILE_FORMAT, + PelTag::RELATED_IMAGE_WIDTH, + PelTag::RELATED_IMAGE_LENGTH); + + /* TODO: Where do these tags belong? +PelTag::FILL_ORDER, +PelTag::DOCUMENT_NAME, +PelTag::TRANSFER_RANGE, +PelTag::JPEG_PROC, +PelTag::BATTERY_LEVEL, +PelTag::IPTC_NAA, +PelTag::INTER_COLOR_PROFILE, +PelTag::CFA_REPEAT_PATTERN_DIM, + */ + } + } + + + /** + * Get the name of an IFD type. + * + * @param int one of {@link PelIfd::IFD0}, {@link PelIfd::IFD1}, + * {@link PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link + * PelIfd::INTEROPERABILITY}. + * + * @return string the name of type. + */ + static function getTypeName($type) { + switch ($type) { + case self::IFD0: + return '0'; + case self::IFD1: + return '1'; + case self::EXIF: + return 'Exif'; + case self::GPS: + return 'GPS'; + case self::INTEROPERABILITY: + return 'Interoperability'; + default: + throw new PelIfdException('Unknown IFD type: %d', $type); + } + } + + + /** + * Get the name of this directory. + * + * @return string the name of this directory. + */ + function getName() { + return $this->getTypeName($this->type); + } + + + /** + * Adds an entry to the directory. + * + * @param PelEntry the entry that will be added. + * + * @todo The entry will be identified with its tag, so each + * directory can only contain one entry with each tag. Is this a + * bug? + */ + function addEntry(PelEntry $e) { + $this->entries[$e->getTag()] = $e; + } + + + /** + * Does a given tag exist in this IFD? + * + * This methods is part of the ArrayAccess SPL interface for + * overriding array access of objects, it allows you to check for + * existance of an entry in the IFD: + * + * + * if (isset($ifd[PelTag::FNUMBER])) + * // ... do something with the F-number. + * + * + * @param PelTag the offset to check. + * + * @return boolean whether the tag exists. + */ + function offsetExists($tag) { + return isset($this->entries[$tag]); + } + + + /** + * Retrieve a given tag from this IFD. + * + * This methods is part of the ArrayAccess SPL interface for + * overriding array access of objects, it allows you to read entries + * from the IFD the same was as for an array: + * + * + * $entry = $ifd[PelTag::FNUMBER]; + * + * + * @param PelTag the tag to return. It is an error to ask for a tag + * which is not in the IFD, just like asking for a non-existant + * array entry. + * + * @return PelEntry the entry. + */ + function offsetGet($tag) { + return $this->entries[$tag]; + } + + + /** + * Set or update a given tag in this IFD. + * + * This methods is part of the ArrayAccess SPL interface for + * overriding array access of objects, it allows you to add new + * entries or replace esisting entries by doing: + * + * + * $ifd[PelTag::EXPOSURE_BIAS_VALUE] = $entry; + * + * + * Note that the actual array index passed is ignored! Instead the + * {@link PelTag} from the entry is used. + * + * @param PelTag the offset to update. + * + * @param PelEntry the new value. + */ + function offsetSet($tag, $e) { + if ($e instanceof PelEntry) { + $tag = $e->getTag(); + $this->entries[$tag] = $e; + } else { + throw new PelInvalidArgumentException('Argument "%s" must be a PelEntry.', $e); + } + } + + + /** + * Unset a given tag in this IFD. + * + * This methods is part of the ArrayAccess SPL interface for + * overriding array access of objects, it allows you to delete + * entries in the IFD by doing: + * + * + * unset($ifd[PelTag::EXPOSURE_BIAS_VALUE]) + * + * + * @param PelTag the offset to delete. + */ + function offsetUnset($tag) { + unset($this->entries[$tag]); + } + + + /** + * Retrieve an entry. + * + * @param PelTag the tag identifying the entry. + * + * @return PelEntry the entry associated with the tag, or null if no + * such entry exists. + */ + function getEntry($tag) { + if (isset($this->entries[$tag])) + return $this->entries[$tag]; + else + return null; + } + + + /** + * Returns all entries contained in this IFD. + * + * @return array an array of {@link PelEntry} objects, or rather + * descendant classes. The array has {@link PelTag}s as keys + * and the entries as values. + * + * @see getEntry + * @see getIterator + */ + function getEntries() { + return $this->entries; + } + + + /** + * Return an iterator for all entries contained in this IFD. + * + * Used with foreach as in + * + * + * foreach ($ifd as $tag => $entry) { + * // $tag is now a PelTag and $entry is a PelEntry object. + * } + * + * + * @return Iterator an iterator using the {@link PelTag tags} as + * keys and the entries as values. + */ + function getIterator() { + return new ArrayIterator($this->entries); + } + + + /** + * Returns available thumbnail data. + * + * @return string the bytes in the thumbnail, if any. If the IFD + * does not contain any thumbnail data, the empty string is + * returned. + * + * @todo Throw an exception instead when no data is available? + * + * @todo Return the $this->thumb_data object instead of the bytes? + */ + function getThumbnailData() { + if ($this->thumb_data != null) + return $this->thumb_data->getBytes(); + else + return ''; + } + + + /** + * Make this directory point to a new directory. + * + * @param PelIfd the IFD that this directory will point to. + */ + function setNextIfd(PelIfd $i) { + $this->next = $i; + } + + + /** + * Return the IFD pointed to by this directory. + * + * @return PelIfd the next IFD, following this IFD. If this is the + * last IFD, null is returned. + */ + function getNextIfd() { + return $this->next; + } + + + /** + * Check if this is the last IFD. + * + * @return boolean true if there are no following IFD, false + * otherwise. + */ + function isLastIfd() { + return $this->next == null; + } + + + /** + * Add a sub-IFD. + * + * Any previous sub-IFD of the same type will be overwritten. + * + * @param PelIfd the sub IFD. The type of must be one of {@link + * PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link + * PelIfd::INTEROPERABILITY}. + */ + function addSubIfd(PelIfd $sub) { + $this->sub[$sub->type] = $sub; + } + + + /** + * Return a sub IFD. + * + * @param int the type of the sub IFD. This must be one of {@link + * PelIfd::EXIF}, {@link PelIfd::GPS}, or {@link + * PelIfd::INTEROPERABILITY}. + * + * @return PelIfd the IFD associated with the type, or null if that + * sub IFD does not exist. + */ + function getSubIfd($type) { + if (isset($this->sub[$type])) + return $this->sub[$type]; + else + return null; + } + + + /** + * Get all sub IFDs. + * + * @return array an associative array with (IFD-type, {@link + * PelIfd}) pairs. + */ + function getSubIfds() { + return $this->sub; + } + + + /** + * Turn this directory into bytes. + * + * This directory will be turned into a byte string, with the + * specified byte order. The offsets will be calculated from the + * offset given. + * + * @param int the offset of the first byte of this directory. + * + * @param PelByteOrder the byte order that should be used when + * turning integers into bytes. This should be one of {@link + * PelConvert::LITTLE_ENDIAN} and {@link PelConvert::BIG_ENDIAN}. + */ + function getBytes($offset, $order) { + $bytes = ''; + $extra_bytes = ''; + + Pel::debug('Bytes from IDF will start at offset %d within Exif data', + $offset); + + $n = count($this->entries) + count($this->sub); + if ($this->thumb_data != null) { + /* We need two extra entries for the thumbnail offset and + * length. */ + $n += 2; + } + + $bytes .= PelConvert::shortToBytes($n, $order); + + /* Initialize offset of extra data. This included the bytes + * preceding this IFD, the bytes needed for the count of entries, + * the entries themselves (and sub entries), the extra data in the + * entries, and the IFD link. + */ + $end = $offset + 2 + 12 * $n + 4; + + foreach ($this->entries as $tag => $entry) { + /* Each entry is 12 bytes long. */ + $bytes .= PelConvert::shortToBytes($entry->getTag(), $order); + $bytes .= PelConvert::shortToBytes($entry->getFormat(), $order); + $bytes .= PelConvert::longToBytes($entry->getComponents(), $order); + + /* + * Size? If bigger than 4 bytes, the actual data is not in + * the entry but somewhere else. + */ + $data = $entry->getBytes($order); + $s = strlen($data); + if ($s > 4) { + Pel::debug('Data size %d too big, storing at offset %d instead.', + $s, $end); + $bytes .= PelConvert::longToBytes($end, $order); + $extra_bytes .= $data; + $end += $s; + } else { + Pel::debug('Data size %d fits.', $s); + /* Copy data directly, pad with NULL bytes as necessary to + * fill out the four bytes available.*/ + $bytes .= $data . str_repeat(chr(0), 4 - $s); + } + } + + if ($this->thumb_data != null) { + Pel::debug('Appending %d bytes of thumbnail data at %d', + $this->thumb_data->getSize(), $end); + // TODO: make PelEntry a class that can be constructed with + // arguments corresponding to the newt four lines. + $bytes .= PelConvert::shortToBytes(PelTag::JPEG_INTERCHANGE_FORMAT_LENGTH, + $order); + $bytes .= PelConvert::shortToBytes(PelFormat::LONG, $order); + $bytes .= PelConvert::longToBytes(1, $order); + $bytes .= PelConvert::longToBytes($this->thumb_data->getSize(), + $order); + + $bytes .= PelConvert::shortToBytes(PelTag::JPEG_INTERCHANGE_FORMAT, + $order); + $bytes .= PelConvert::shortToBytes(PelFormat::LONG, $order); + $bytes .= PelConvert::longToBytes(1, $order); + $bytes .= PelConvert::longToBytes($end, $order); + + $extra_bytes .= $this->thumb_data->getBytes(); + $end += $this->thumb_data->getSize(); + } + + + /* Find bytes from sub IFDs. */ + $sub_bytes = ''; + foreach ($this->sub as $type => $sub) { + if ($type == PelIfd::EXIF) + $tag = PelTag::EXIF_IFD_POINTER; + elseif ($type == PelIfd::GPS) + $tag = PelTag::GPS_INFO_IFD_POINTER; + elseif ($type == PelIfd::INTEROPERABILITY) + $tag = PelTag::INTEROPERABILITY_IFD_POINTER; + + /* Make an aditional entry with the pointer. */ + $bytes .= PelConvert::shortToBytes($tag, $order); + /* Next the format, which is always unsigned long. */ + $bytes .= PelConvert::shortToBytes(PelFormat::LONG, $order); + /* There is only one component. */ + $bytes .= PelConvert::longToBytes(1, $order); + + $data = $sub->getBytes($end, $order); + $s = strlen($data); + $sub_bytes .= $data; + + $bytes .= PelConvert::longToBytes($end, $order); + $end += $s; + } + + /* Make link to next IFD, if any*/ + if ($this->isLastIFD()) { + $link = 0; + } else { + $link = $end; + } + + Pel::debug('Link to next IFD: %d', $link); + + $bytes .= PelConvert::longtoBytes($link, $order); + + $bytes .= $extra_bytes . $sub_bytes; + + if (!$this->isLastIfd()) + $bytes .= $this->next->getBytes($end, $order); + + return $bytes; + } + + + /** + * Turn this directory into text. + * + * @return string information about the directory, mainly for + * debugging. + */ + function __toString() { + $str = Pel::fmt("Dumping IFD %s with %d entries...\n", + $this->getName(), count($this->entries)); + + foreach ($this->entries as $entry) + $str .= $entry->__toString(); + + $str .= Pel::fmt("Dumping %d sub IFDs...\n", count($this->sub)); + + foreach ($this->sub as $type => $ifd) + $str .= $ifd->__toString(); + + if ($this->next != null) + $str .= $this->next->__toString(); + + return $str; + } + + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelJpeg.php b/modules/autorotate/lib/pel/PelJpeg.php new file mode 100644 index 00000000..f1fb0a7c --- /dev/null +++ b/modules/autorotate/lib/pel/PelJpeg.php @@ -0,0 +1,599 @@ + + * @version $Revision: 473 $ + * @date $Date: 2006-11-24 00:12:21 +0100 (Fri, 24 Nov 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelJpegComment.php'); +require_once('PelJpegContent.php'); +require_once('PelDataWindow.php'); +require_once('PelJpegMarker.php'); +require_once('PelException.php'); +require_once('PelExif.php'); +require_once('Pel.php'); +/**#@-*/ + + +/** + * Exception thrown when an invalid marker is found. + * + * This exception is thrown when PEL expects to find a {@link + * PelJpegMarker} and instead finds a byte that isn't a known marker. + * + * @author Martin Geisler + * @package PEL + * @subpackage Exception + */ +class PelJpegInvalidMarkerException extends PelException { + + /** + * Construct a new invalid marker exception. + * + * The exception will contain a message describing the error, + * including the byte found and the offset of the offending byte. + * + * @param int the byte found. + * + * @param int the offset in the data. + */ + function __construct($marker, $offset) { + parent::__construct('Invalid marker found at offset %d: 0x%2X', + $offset, $marker); + } +} + +/** + * Class for handling JPEG data. + * + * The {@link PelJpeg} class defined here provides an abstraction for + * dealing with a JPEG file. The file will be contain a number of + * sections containing some {@link PelJpegContent content} identified + * by a {@link PelJpegMarker marker}. + * + * The {@link getExif()} method is used get hold of the {@link + * PelJpegMarker::APP1 APP1} section which stores Exif data. So if + * the name of the JPEG file is stored in $filename, then one would + * get hold of the Exif data by saying: + * + * + * $jpeg = new PelJpeg($filename); + * $exif = $jpeg->getExif(); + * $tiff = $exif->getTiff(); + * $ifd0 = $tiff->getIfd(); + * $exif = $ifd0->getSubIfd(PelIfd::EXIF); + * $ifd1 = $ifd0->getNextIfd(); + * + * + * The $idf0 and $ifd1 variables will then be two {@link PelTiff TIFF} + * {@link PelIfd Image File Directories}, in which the data is stored + * under the keys found in {@link PelTag}. + * + * Should one have some image data (in the form of a {@link + * PelDataWindow}) of an unknown type, then the {@link + * PelJpeg::isValid()} function is handy: it will quickly test if the + * data could be valid JPEG data. The {@link PelTiff::isValid()} + * function does the same for TIFF images. + * + * @author Martin Geisler + * @package PEL + */ +class PelJpeg { + + /** + * The sections in the JPEG data. + * + * A JPEG file is built up as a sequence of sections, each section + * is identified with a {@link PelJpegMarker}. Some sections can + * occur more than once in the JPEG stream (the {@link + * PelJpegMarker::DQT DQT} and {@link PelJpegMarker::DHT DTH} + * markers for example) and so this is an array of ({@link + * PelJpegMarker}, {@link PelJpegContent}) pairs. + * + * The content can be either generic {@link PelJpegContent JPEG + * content} or {@link PelExif Exif data}. + * + * @var array + */ + private $sections = array(); + + /** + * The JPEG image data. + * + * @var PelDataWindow + */ + private $jpeg_data = null; + + /** + * Construct a new JPEG object. + * + * The new object will be empty unless an argument is given from + * which it can initialize itself. This can either be the filename + * of a JPEG image, a {@link PelDataWindow} object or a PHP image + * resource handle. + * + * New Exif data (in the form of a {@link PelExif} object) can be + * inserted with the {@link setExif()} method: + * + * + * $jpeg = new PelJpeg($data); + * // Create container for the Exif information: + * $exif = new PelExif(); + * // Now Add a PelTiff object with a PelIfd object with one or more + * // PelEntry objects to $exif... Finally add $exif to $jpeg: + * $jpeg->setExif($exif); + * + */ + function __construct($data = false) { + if ($data === false) + return; + + if (is_string($data)) { + Pel::debug('Initializing PelJpeg object from %s', $data); + $this->loadFile($data); + } elseif ($data instanceof PelDataWindow) { + Pel::debug('Initializing PelJpeg object from PelDataWindow.'); + $this->load($data); + } elseif (is_resource($data) && get_resource_type($data) == 'gd') { + Pel::debug('Initializing PelJpeg object from image resource.'); + /* The ImageJpeg() function insists on printing the bytes + * instead of returning them in a more civil way as a string, so + * we have to buffer the output... */ + ob_start(); + ImageJpeg($data); + $bytes = ob_get_clean(); + $this->load(new PelDataWindow($bytes)); + } else { + throw new PelInvalidArgumentException('Bad type for $data: %s', + gettype($data)); + } + } + + /** + * Load data into a JPEG object. + * + * The data supplied will be parsed and turned into an object + * structure representing the image. This structure can then be + * manipulated and later turned back into an string of bytes. + * + * This methods can be called at any time after a JPEG object has + * been constructed, also after the {@link appendSection()} has been + * called to append custom sections. Loading several JPEG images + * into one object will accumulate the sections, but there will only + * be one {@link PelJpegMarker::SOS} section at any given time. + * + * @param PelDataWindow the data that will be turned into JPEG + * sections. + */ + function load(PelDataWindow $d) { + + Pel::debug('Parsing %d bytes...', $d->getSize()); + + /* JPEG data is stored in big-endian format. */ + $d->setByteOrder(PelConvert::BIG_ENDIAN); + + /* Run through the data to read the sections in the image. After + * each section is read, the start of the data window will be + * moved forward, and after the last section we'll terminate with + * no data left in the window. */ + while ($d->getSize() > 0) { + /* JPEG sections start with 0xFF. The first byte that is not + * 0xFF is a marker (hopefully). + */ + for ($i = 0; $i < 7; $i++) + if ($d->getByte($i) != 0xFF) + break; + + $marker = $d->getByte($i); + + if (!PelJpegMarker::isValid($marker)) + throw new PelJpegInvalidMarkerException($marker, $i); + + /* Move window so first byte becomes first byte in this + * section. */ + $d->setWindowStart($i+1); + + if ($marker == PelJpegMarker::SOI || $marker == PelJpegMarker::EOI) { + $content = new PelJpegContent(new PelDataWindow()); + $this->appendSection($marker, $content); + } else { + /* Read the length of the section. The length includes the + * two bytes used to store the length. */ + $len = $d->getShort(0) - 2; + + Pel::debug('Found %s section of length %d', + PelJpegMarker::getName($marker), $len); + + /* Skip past the length. */ + $d->setWindowStart(2); + + if ($marker == PelJpegMarker::APP1) { + + try { + $content = new PelExif(); + $content->load($d->getClone(0, $len)); + } catch (PelInvalidDataException $e) { + /* We store the data as normal JPEG content if it could + * not be parsed as Exif data. */ + $content = new PelJpegContent($d->getClone(0, $len)); + } + + $this->appendSection($marker, $content); + /* Skip past the data. */ + $d->setWindowStart($len); + + } elseif ($marker == PelJpegMarker::COM) { + + $content = new PelJpegComment(); + $content->load($d->getClone(0, $len)); + $this->appendSection($marker, $content); + $d->setWindowStart($len); + + } else { + + $content = new PelJpegContent($d->getClone(0, $len)); + $this->appendSection($marker, $content); + /* Skip past the data. */ + $d->setWindowStart($len); + + /* In case of SOS, image data will follow. */ + if ($marker == PelJpegMarker::SOS) { + /* Some images have some trailing (garbage?) following the + * EOI marker. To handle this we seek backwards until we + * find the EOI marker. Any trailing content is stored as + * a PelJpegContent object. */ + + $length = $d->getSize(); + while ($d->getByte($length-2) != 0xFF || + $d->getByte($length-1) != PelJpegMarker::EOI) { + $length--; + } + + $this->jpeg_data = $d->getClone(0, $length-2); + Pel::debug('JPEG data: ' . $this->jpeg_data->__toString()); + + /* Append the EOI. */ + $this->appendSection(PelJpegMarker::EOI, + new PelJpegContent(new PelDataWindow())); + + /* Now check to see if there are any trailing data. */ + if ($length != $d->getSize()) { + Pel::maybeThrow(new PelException('Found trailing content ' . + 'after EOI: %d bytes', + $d->getSize() - $length)); + $content = new PelJpegContent($d->getClone($length)); + /* We don't have a proper JPEG marker for trailing + * garbage, so we just use 0x00... */ + $this->appendSection(0x00, $content); + } + + /* Done with the loop. */ + break; + } + } + } + } /* while ($d->getSize() > 0) */ + } + + + /** + * Load data from a file into a JPEG object. + * + * @param string the filename. This must be a readable file. + */ + function loadFile($filename) { + $this->load(new PelDataWindow(file_get_contents($filename))); + } + + + /** + * Set Exif data. + * + * Use this to set the Exif data in the image. This will overwrite + * any old Exif information in the image. + * + * @param PelExif the Exif data. + */ + function setExif(PelExif $exif) { + $app0_offset = 1; + $app1_offset = -1; + + /* Search through all sections looking for APP0 or APP1. */ + for ($i = 0; $i < count($this->sections); $i++) { + if ($this->sections[$i][0] == PelJpegMarker::APP0) { + $app0_offset = $i; + } elseif ($this->sections[$i][0] == PelJpegMarker::APP1) { + $app1_offset = $i; + break; + } + } + + /* Store the Exif data at the appropriate place, either where the + * old Exif data was stored ($app1_offset) or right after APP0 + * ($app0_offset+1). */ + if ($app1_offset > 0) + $this->sections[$app1_offset][1] = $exif; + else + $this->insertSection(PelJpegMarker::APP1, $exif, $app0_offset+1); + } + + + /** + * Get Exif data. + * + * Use this to get the @{link PelExif Exif data} stored. + * + * @return PelExif the Exif data found or null if the image has no + * Exif data. + */ + function getExif() { + $exif = $this->getSection(PelJpegMarker::APP1); + if ($exif instanceof PelExif) + return $exif; + else + return null; + } + + + /** + * Clear any Exif data. + * + * This method will only clear the first @{link PelJpegMarker::APP1} + * section found (there should normally be just one). + */ + function clearExif() { + for ($i = 0; $i < count($this->sections); $i++) { + if ($this->sections[$i][0] == PelJpegMarker::APP1) { + unset($this->sections[$i]); + return; + } + } + } + + + /** + * Append a new section. + * + * Used only when loading an image. If it used again later, then the + * section will end up after the @{link PelJpegMarker::EOI EOI + * marker} and will probably not be useful. + * + * Please use @{link setExif()} instead if you intend to add Exif + * information to an image as that function will know the right + * place to insert the data. + * + * @param PelJpegMarker the marker identifying the new section. + * + * @param PelJpegContent the content of the new section. + */ + function appendSection($marker, PelJpegContent $content) { + $this->sections[] = array($marker, $content); + } + + + /** + * Insert a new section. + * + * Please use @{link setExif()} instead if you intend to add Exif + * information to an image as that function will know the right + * place to insert the data. + * + * @param PelJpegMarker the marker for the new section. + * + * @param PelJpegContent the content of the new section. + * + * @param int the offset where the new section will be inserted --- + * use 0 to insert it at the very beginning, use 1 to insert it + * between sections 1 and 2, etc. + */ + function insertSection($marker, PelJpegContent $content, $offset) { + array_splice($this->sections, $offset, 0, array(array($marker, $content))); + } + + + /** + * Get a section corresponding to a particular marker. + * + * Please use the {@link getExif()} if you just need the Exif data. + * + * This will search through the sections of this JPEG object, + * looking for a section identified with the specified {@link + * PelJpegMarker marker}. The {@link PelJpegContent content} will + * then be returned. The optional argument can be used to skip over + * some of the sections. So if one is looking for the, say, third + * {@link PelJpegMarker::DHT DHT} section one would do: + * + * + * $dht3 = $jpeg->getSection(PelJpegMarker::DHT, 2); + * + * + * @param PelJpegMarker the marker identifying the section. + * + * @param int the number of sections to be skipped. This must be a + * non-negative integer. + * + * @return PelJpegContent the content found, or null if there is no + * content available. + */ + function getSection($marker, $skip = 0) { + foreach ($this->sections as $s) { + if ($s[0] == $marker) + if ($skip > 0) + $skip--; + else + return $s[1]; + } + + return null; + } + + + /** + * Get all sections. + * + * @return array an array of ({@link PelJpegMarker}, {@link + * PelJpegContent}) pairs. Each pair is an array with the {@link + * PelJpegMarker} as the first element and the {@link + * PelJpegContent} as the second element, so the return type is an + * array of arrays. + * + * So to loop through all the sections in a given JPEG image do + * this: + * + * + * foreach ($jpeg->getSections() as $section) { + * $marker = $section[0]; + * $content = $section[1]; + * // Use $marker and $content here. + * } + * + * + * instead of this: + * + * + * foreach ($jpeg->getSections() as $marker => $content) { + * // Does not work the way you would think... + * } + * + * + * The problem is that there could be several sections with the same + * marker, and thus a simple associative array does not suffice. + */ + function getSections() { + return $this->sections; + } + + + /** + * Turn this JPEG object into bytes. + * + * The bytes returned by this method is ready to be stored in a file + * as a valid JPEG image. + * + * @return string bytes representing this JPEG object, including all + * its sections and their associated data. + */ + function getBytes() { + $bytes = ''; + + foreach ($this->sections as $section) { + $m = $section[0]; + $c = $section[1]; + + /* Write the marker */ + $bytes .= "\xFF" . PelJpegMarker::getBytes($m); + /* Skip over empty markers. */ + if ($m == PelJpegMarker::SOI || $m == PelJpegMarker::EOI) + continue; + + $data = $c->getBytes(); + $size = strlen($data) + 2; + + $bytes .= PelConvert::shortToBytes($size, PelConvert::BIG_ENDIAN); + $bytes .= $data; + + /* In case of SOS, we need to write the JPEG data. */ + if ($m == PelJpegMarker::SOS) + $bytes .= $this->jpeg_data->getBytes(); + } + + return $bytes; + + } + + + /** + * Make a string representation of this JPEG object. + * + * This is mainly usefull for debugging. It will show the structure + * of the image, and its sections. + * + * @return string debugging information about this JPEG object. + */ + function __toString() { + $str = Pel::tra("Dumping JPEG data...\n"); + for ($i = 0; $i < count($this->sections); $i++) { + $m = $this->sections[$i][0]; + $c = $this->sections[$i][1]; + $str .= Pel::fmt("Section %d (marker 0x%02X - %s):\n", + $i, $m, PelJpegMarker::getName($m)); + $str .= Pel::fmt(" Description: %s\n", + PelJpegMarker::getDescription($m)); + + if ($m == PelJpegMarker::SOI || + $m == PelJpegMarker::EOI) + continue; + + if ($c instanceof PelExif) { + $str .= Pel::tra(" Content : Exif data\n"); + $str .= $c->__toString() . "\n"; + } elseif ($c instanceof PelJpegComment) { + $str .= Pel::fmt(" Content : %s\n", $c->getValue()); + } else { + $str .= Pel::tra(" Content : Unknown\n"); + } + } + + return $str; + } + + + /** + * Test data to see if it could be a valid JPEG image. + * + * The function will only look at the first few bytes of the data, + * and try to determine if it could be a valid JPEG image based on + * those bytes. This means that the check is more like a heuristic + * than a rigorous check. + * + * @param PelDataWindow the bytes that will be checked. + * + * @return boolean true if the bytes look like the beginning of a + * JPEG image, false otherwise. + * + * @see PelTiff::isValid() + */ + static function isValid(PelDataWindow $d) { + /* JPEG data is stored in big-endian format. */ + $d->setByteOrder(PelConvert::BIG_ENDIAN); + + for ($i = 0; $i < 7; $i++) + if ($d->getByte($i) != 0xFF) + break; + + return $d->getByte($i) == PelJpegMarker::SOI; + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelJpegComment.php b/modules/autorotate/lib/pel/PelJpegComment.php new file mode 100644 index 00000000..feb62c30 --- /dev/null +++ b/modules/autorotate/lib/pel/PelJpegComment.php @@ -0,0 +1,121 @@ + + * @version $Revision: 397 $ + * @date $Date: 2005-10-24 00:40:26 +0200 (Mon, 24 Oct 2005) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelJpegContent.php'); +/**#@-*/ + + +/** + * Class representing JPEG comments. + * + * @author Martin Geisler + * @package PEL + */ +class PelJpegComment extends PelJpegContent { + + /** + * The comment. + * + * @var string + */ + private $comment = ''; + + /** + * Construct a new JPEG comment. + * + * The new comment will contain the string given. + */ + function __construct($comment = '') { + $this->comment = $comment; + } + + + /** + * Load and parse data. + * + * This will load the comment from the data window passed. + */ + function load(PelDataWindow $d) { + $this->comment = $d->getBytes(); + } + + + /** + * Update the value with a new comment. + * + * Any old comment will be overwritten. + * + * @param string the new comment. + */ + function setValue($comment) { + $this->comment = $comment; + } + + + /** + * Get the comment. + * + * @return string the comment. + */ + function getValue() { + return $this->comment; + } + + + /** + * Turn this comment into bytes. + * + * @return string bytes representing this comment. + */ + function getBytes() { + $this->comment; + } + + + /** + * Return a string representation of this object. + * + * @return string the same as {@link getValue()}. + */ + function __toString() { + return $this->getValue(); + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelJpegContent.php b/modules/autorotate/lib/pel/PelJpegContent.php new file mode 100644 index 00000000..93eea2ae --- /dev/null +++ b/modules/autorotate/lib/pel/PelJpegContent.php @@ -0,0 +1,82 @@ + + * @version $Revision: 380 $ + * @date $Date: 2005-10-03 14:01:28 +0200 (Mon, 03 Oct 2005) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelDataWindow.php'); +/**#@-*/ + + +/** + * Class representing content in a JPEG file. + * + * A JPEG file consists of a sequence of each of which has an + * associated {@link PelJpegMarker marker} and some content. This + * class represents the content, and this basic type is just a simple + * holder of such content, represented by a {@link PelDataWindow} + * object. The {@link PelExif} class is an example of more + * specialized JPEG content. + * + * @author Martin Geisler + * @package PEL + */ +class PelJpegContent { + private $data = null; + + /** + * Make a new piece of JPEG content. + * + * @param PelDataWindow the content. + */ + function __construct(PelDataWindow $data) { + $this->data = $data; + } + + + /** + * Return the bytes of the content. + * + * @return string bytes representing this JPEG content. These bytes + * will match the bytes given to {@link __construct the + * constructor}. + */ + function getBytes() { + return $this->data->getBytes(); + } + +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelJpegMarker.php b/modules/autorotate/lib/pel/PelJpegMarker.php new file mode 100644 index 00000000..377b279b --- /dev/null +++ b/modules/autorotate/lib/pel/PelJpegMarker.php @@ -0,0 +1,435 @@ + + * @version $Revision: 432 $ + * @date $Date: 2006-09-06 00:13:00 +0200 (Wed, 06 Sep 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('Pel.php'); +/**#@-*/ + + +/** + * Class with static methods for JPEG markers. + * + * This class defines the constants to be used whenever one refers to + * a JPEG marker. All the methods defined are static, and they all + * operate on one argument which should be one of the class constants. + * They will all be denoted by PelJpegMarker in the documentation. + * + * @author Martin Geisler + * @package PEL + */ +class PelJpegMarker { + + /** Encoding (baseline) */ + const SOF0 = 0xC0; + /** Encoding (extended sequential) */ + const SOF1 = 0xC1; + /** Encoding (progressive) */ + const SOF2 = 0xC2; + /** Encoding (lossless) */ + const SOF3 = 0xC3; + /** Define Huffman table */ + const DHT = 0xC4; + /** Encoding (differential sequential) */ + const SOF5 = 0xC5; + /** Encoding (differential progressive) */ + const SOF6 = 0xC6; + /** Encoding (differential lossless) */ + const SOF7 = 0xC7; + /** Extension */ + const JPG = 0xC8; + /** Encoding (extended sequential, arithmetic) */ + const SOF9 = 0xC9; + /** Encoding (progressive, arithmetic) */ + const SOF10 = 0xCA; + /** Encoding (lossless, arithmetic) */ + const SOF11 = 0xCB; + /** Define arithmetic coding conditioning */ + const DAC = 0xCC; + /** Encoding (differential sequential, arithmetic) */ + const SOF13 = 0xCD; + /** Encoding (differential progressive, arithmetic) */ + const SOF14 = 0xCE; + /** Encoding (differential lossless, arithmetic) */ + const SOF15 = 0xCF; + /** Restart 0 */ + const RST0 = 0xD0; + /** Restart 1 */ + const RST1 = 0xD1; + /** Restart 2 */ + const RST2 = 0xD2; + /** Restart 3 */ + const RST3 = 0xD3; + /** Restart 4 */ + const RST4 = 0xD4; + /** Restart 5 */ + const RST5 = 0xD5; + /** Restart 6 */ + const RST6 = 0xD6; + /** Restart 7 */ + const RST7 = 0xD7; + /** Start of image */ + const SOI = 0xD8; + /** End of image */ + const EOI = 0xD9; + /** Start of scan */ + const SOS = 0xDA; + /** Define quantization table */ + const DQT = 0xDB; + /** Define number of lines */ + const DNL = 0xDC; + /** Define restart interval */ + const DRI = 0xDD; + /** Define hierarchical progression */ + const DHP = 0xDE; + /** Expand reference component */ + const EXP = 0xDF; + /** Application segment 0 */ + const APP0 = 0xE0; + /** + * Application segment 1 + * + * When a JPEG image contains Exif data, the data will normally be + * stored in this section and a call to {@link PelJpeg::getExif()} + * will return a {@link PelExif} object representing it. + */ + const APP1 = 0xE1; + /** Application segment 2 */ + const APP2 = 0xE2; + /** Application segment 3 */ + const APP3 = 0xE3; + /** Application segment 4 */ + const APP4 = 0xE4; + /** Application segment 5 */ + const APP5 = 0xE5; + /** Application segment 6 */ + const APP6 = 0xE6; + /** Application segment 7 */ + const APP7 = 0xE7; + /** Application segment 8 */ + const APP8 = 0xE8; + /** Application segment 9 */ + const APP9 = 0xE9; + /** Application segment 10 */ + const APP10 = 0xEA; + /** Application segment 11 */ + const APP11 = 0xEB; + /** Application segment 12 */ + const APP12 = 0xEC; + /** Application segment 13 */ + const APP13 = 0xED; + /** Application segment 14 */ + const APP14 = 0xEE; + /** Application segment 15 */ + const APP15 = 0xEF; + /** Extension 0 */ + const JPG0 = 0xF0; + /** Extension 1 */ + const JPG1 = 0xF1; + /** Extension 2 */ + const JPG2 = 0xF2; + /** Extension 3 */ + const JPG3 = 0xF3; + /** Extension 4 */ + const JPG4 = 0xF4; + /** Extension 5 */ + const JPG5 = 0xF5; + /** Extension 6 */ + const JPG6 = 0xF6; + /** Extension 7 */ + const JPG7 = 0xF7; + /** Extension 8 */ + const JPG8 = 0xF8; + /** Extension 9 */ + const JPG9 = 0xF9; + /** Extension 10 */ + const JPG10 = 0xFA; + /** Extension 11 */ + const JPG11 = 0xFB; + /** Extension 12 */ + const JPG12 = 0xFC; + /** Extension 13 */ + const JPG13 = 0xFD; + /** Comment */ + const COM = 0xFE; + + /** + * Check if a byte is a valid JPEG marker. + * + * @param PelJpegMarker the byte that will be checked. + * + * @return boolean if the byte is recognized true is returned, + * otherwise false will be returned. + */ + static function isValid($m) { + return ($m >= self::SOF0 && $m <= self::COM); + } + + /** + * Turn a JPEG marker into bytes. + * + * @param PelJpegMarker the marker. + * + * @return string the marker as a string. This will be a string + * with just a single byte since all JPEG markers are simply single + * bytes. + */ + static function getBytes($m) { + return chr($m); + } + + /** + * Return the short name for a marker. + * + * @param PelJpegMarker the marker. + * + * @return string the name of the marker, e.g., 'SOI' for the Start + * of Image marker. + */ + static function getName($m) { + switch ($m) { + case self::SOF0: return 'SOF0'; + case self::SOF1: return 'SOF1'; + case self::SOF2: return 'SOF2'; + case self::SOF3: return 'SOF3'; + case self::SOF5: return 'SOF5'; + case self::SOF6: return 'SOF6'; + case self::SOF7: return 'SOF7'; + case self::SOF9: return 'SOF9'; + case self::SOF10: return 'SOF10'; + case self::SOF11: return 'SOF11'; + case self::SOF13: return 'SOF13'; + case self::SOF14: return 'SOF14'; + case self::SOF15: return 'SOF15'; + case self::SOI: return 'SOI'; + case self::EOI: return 'EOI'; + case self::SOS: return 'SOS'; + case self::COM: return 'COM'; + case self::DHT: return 'DHT'; + case self::JPG: return 'JPG'; + case self::DAC: return 'DAC'; + case self::RST0: return 'RST0'; + case self::RST1: return 'RST1'; + case self::RST2: return 'RST2'; + case self::RST3: return 'RST3'; + case self::RST4: return 'RST4'; + case self::RST5: return 'RST5'; + case self::RST6: return 'RST6'; + case self::RST7: return 'RST7'; + case self::DQT: return 'DQT'; + case self::DNL: return 'DNL'; + case self::DRI: return 'DRI'; + case self::DHP: return 'DHP'; + case self::EXP: return 'EXP'; + case self::APP0: return 'APP0'; + case self::APP1: return 'APP1'; + case self::APP2: return 'APP2'; + case self::APP3: return 'APP3'; + case self::APP4: return 'APP4'; + case self::APP5: return 'APP5'; + case self::APP6: return 'APP6'; + case self::APP7: return 'APP7'; + case self::APP8: return 'APP8'; + case self::APP9: return 'APP9'; + case self::APP10: return 'APP10'; + case self::APP11: return 'APP11'; + case self::APP12: return 'APP12'; + case self::APP13: return 'APP13'; + case self::APP14: return 'APP14'; + case self::APP15: return 'APP15'; + case self::JPG0: return 'JPG0'; + case self::JPG1: return 'JPG1'; + case self::JPG2: return 'JPG2'; + case self::JPG3: return 'JPG3'; + case self::JPG4: return 'JPG4'; + case self::JPG5: return 'JPG5'; + case self::JPG6: return 'JPG6'; + case self::JPG7: return 'JPG7'; + case self::JPG8: return 'JPG8'; + case self::JPG9: return 'JPG9'; + case self::JPG10: return 'JPG10'; + case self::JPG11: return 'JPG11'; + case self::JPG12: return 'JPG12'; + case self::JPG13: return 'JPG13'; + case self::COM: return 'COM'; + default: return Pel::fmt('Unknown marker: 0x%02X', $m); + } + } + + /** + * Returns a description of a JPEG marker. + * + * @param PelJpegMarker the marker. + * + * @return string the description of the marker. + */ + static function getDescription($m) { + switch ($m) { + case self::SOF0: + return Pel::tra('Encoding (baseline)'); + case self::SOF1: + return Pel::tra('Encoding (extended sequential)'); + case self::SOF2: + return Pel::tra('Encoding (progressive)'); + case self::SOF3: + return Pel::tra('Encoding (lossless)'); + case self::SOF5: + return Pel::tra('Encoding (differential sequential)'); + case self::SOF6: + return Pel::tra('Encoding (differential progressive)'); + case self::SOF7: + return Pel::tra('Encoding (differential lossless)'); + case self::SOF9: + return Pel::tra('Encoding (extended sequential, arithmetic)'); + case self::SOF10: + return Pel::tra('Encoding (progressive, arithmetic)'); + case self::SOF11: + return Pel::tra('Encoding (lossless, arithmetic)'); + case self::SOF13: + return Pel::tra('Encoding (differential sequential, arithmetic)'); + case self::SOF14: + return Pel::tra('Encoding (differential progressive, arithmetic)'); + case self::SOF15: + return Pel::tra('Encoding (differential lossless, arithmetic)'); + case self::SOI: + return Pel::tra('Start of image'); + case self::EOI: + return Pel::tra('End of image'); + case self::SOS: + return Pel::tra('Start of scan'); + case self::COM: + return Pel::tra('Comment'); + case self::DHT: + return Pel::tra('Define Huffman table'); + case self::JPG: + return Pel::tra('Extension'); + case self::DAC: + return Pel::tra('Define arithmetic coding conditioning'); + case self::RST0: + return Pel::fmt('Restart %d', 0); + case self::RST1: + return Pel::fmt('Restart %d', 1); + case self::RST2: + return Pel::fmt('Restart %d', 2); + case self::RST3: + return Pel::fmt('Restart %d', 3); + case self::RST4: + return Pel::fmt('Restart %d', 4); + case self::RST5: + return Pel::fmt('Restart %d', 5); + case self::RST6: + return Pel::fmt('Restart %d', 6); + case self::RST7: + return Pel::fmt('Restart %d', 7); + case self::DQT: + return Pel::tra('Define quantization table'); + case self::DNL: + return Pel::tra('Define number of lines'); + case self::DRI: + return Pel::tra('Define restart interval'); + case self::DHP: + return Pel::tra('Define hierarchical progression'); + case self::EXP: + return Pel::tra('Expand reference component'); + case self::APP0: + return Pel::fmt('Application segment %d', 0); + case self::APP1: + return Pel::fmt('Application segment %d', 1); + case self::APP2: + return Pel::fmt('Application segment %d', 2); + case self::APP3: + return Pel::fmt('Application segment %d', 3); + case self::APP4: + return Pel::fmt('Application segment %d', 4); + case self::APP5: + return Pel::fmt('Application segment %d', 5); + case self::APP6: + return Pel::fmt('Application segment %d', 6); + case self::APP7: + return Pel::fmt('Application segment %d', 7); + case self::APP8: + return Pel::fmt('Application segment %d', 8); + case self::APP9: + return Pel::fmt('Application segment %d', 9); + case self::APP10: + return Pel::fmt('Application segment %d', 10); + case self::APP11: + return Pel::fmt('Application segment %d', 11); + case self::APP12: + return Pel::fmt('Application segment %d', 12); + case self::APP13: + return Pel::fmt('Application segment %d', 13); + case self::APP14: + return Pel::fmt('Application segment %d', 14); + case self::APP15: + return Pel::fmt('Application segment %d', 15); + case self::JPG0: + return Pel::fmt('Extension %d', 0); + case self::JPG1: + return Pel::fmt('Extension %d', 1); + case self::JPG2: + return Pel::fmt('Extension %d', 2); + case self::JPG3: + return Pel::fmt('Extension %d', 3); + case self::JPG4: + return Pel::fmt('Extension %d', 4); + case self::JPG5: + return Pel::fmt('Extension %d', 5); + case self::JPG6: + return Pel::fmt('Extension %d', 6); + case self::JPG7: + return Pel::fmt('Extension %d', 7); + case self::JPG8: + return Pel::fmt('Extension %d', 8); + case self::JPG9: + return Pel::fmt('Extension %d', 9); + case self::JPG10: + return Pel::fmt('Extension %d', 10); + case self::JPG11: + return Pel::fmt('Extension %d', 11); + case self::JPG12: + return Pel::fmt('Extension %d', 12); + case self::JPG13: + return Pel::fmt('Extension %d', 13); + case self::COM: + return Pel::tra('Comment'); + default: + return Pel::fmt('Unknown marker: 0x%02X', $m); + } + } +} + +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelTag.php b/modules/autorotate/lib/pel/PelTag.php new file mode 100644 index 00000000..5000811e --- /dev/null +++ b/modules/autorotate/lib/pel/PelTag.php @@ -0,0 +1,1969 @@ + + * @version $Revision: 472 $ + * @date $Date: 2006-11-19 21:29:14 +0100 (Sun, 19 Nov 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('Pel.php'); +require_once('PelIfd.php'); +/**#@-*/ + + +/** + * Class with static methods for Exif tags. + * + * This class defines the constants that represents the Exif tags + * known to PEL. They are supposed to be used whenever one needs to + * specify an Exif tag, and they will be denoted by the pseudo-type + * {@link PelTag} throughout the documentation. + * + * Please note that the constrains on the format and number of + * components given here are advisory only. To follow the Exif + * specification one should obey them, but there is nothing that + * prevents you from creating an {@link IMAGE_LENGTH} entry with two + * or more components, even though the standard says that there should + * be exactly one component. + * + * All the methods in this class are static and should be called with + * the Exif tag on which they should operate. + * + * @author Martin Geisler + * @package PEL + */ +class PelTag { + + /** + * Interoperability index. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 4. + */ + const INTEROPERABILITY_INDEX = 0x0001; + + /** + * Interoperability version. + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: 4. + */ + const INTEROPERABILITY_VERSION = 0x0002; + + /** + * Image width. + * + * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. + * + * Components: 1. + */ + const IMAGE_WIDTH = 0x0100; + + /** + * Image length. + * + * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. + * + * Components: 1. + */ + const IMAGE_LENGTH = 0x0101; + + /** + * Number of bits per component. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 3. + */ + const BITS_PER_SAMPLE = 0x0102; + + /** + * Compression scheme. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const COMPRESSION = 0x0103; + + /** + * Pixel composition. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const PHOTOMETRIC_INTERPRETATION = 0x0106; + + /** + * Fill Orde + * + * Format: Unknown. + * + * Components: Unknown. + */ + const FILL_ORDER = 0x010A; + + /** + * Document Name + * + * Format: Unknown. + * + * Components: Unknown. + */ + const DOCUMENT_NAME = 0x010D; + + /** + * Image Description + * + * Format: {@link PelEntryAscii}. + * + * Components: any number. + */ + const IMAGE_DESCRIPTION = 0x010E; + + /** + * Manufacturer + * + * Format: {@link PelEntryAscii}. + * + * Components: any number. + */ + const MAKE = 0x010F; + + /** + * Model + * + * Format: {@link PelFormat::ASCII}. + * + * Components: any number. + */ + const MODEL = 0x0110; + + /** + * Strip Offsets + * + * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. + * + * Components: any number. + */ + const STRIP_OFFSETS = 0x0111; + + /** + * Orientation of image. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const ORIENTATION = 0x0112; + + /** + * Number of components. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const SAMPLES_PER_PIXEL = 0x0115; + + /** + * Rows per Strip + * + * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. + * + * Components: 1. + */ + const ROWS_PER_STRIP = 0x0116; + + /** + * Strip Byte Count + * + * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. + * + * Components: any number. + */ + const STRIP_BYTE_COUNTS = 0x0117; + + /** + * Image resolution in width direction. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const X_RESOLUTION = 0x011A; + + /** + * Image resolution in height direction. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const Y_RESOLUTION = 0x011B; + + /** + * Image data arrangement. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const PLANAR_CONFIGURATION = 0x011C; + + /** + * Unit of X and Y resolution. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const RESOLUTION_UNIT = 0x0128; + + /** + * Transfer function. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 3. + */ + const TRANSFER_FUNCTION = 0x012D; + + /** + * Software used. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: any number. + */ + const SOFTWARE = 0x0131; + + /** + * File change date and time. + * + * Format: {@link PelFormat::ASCII}, modelled by the {@link + * PelEntryTime} class. + * + * Components: 20. + */ + const DATE_TIME = 0x0132; + + /** + * Person who created the image. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: any number. + */ + const ARTIST = 0x013B; + + /** + * White point chromaticity. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 2. + */ + const WHITE_POINT = 0x013E; + + /** + * Chromaticities of primaries. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 6. + */ + const PRIMARY_CHROMATICITIES = 0x013F; + + /** + * Transfer Range + * + * Format: Unknown. + * + * Components: Unknown. + */ + const TRANSFER_RANGE = 0x0156; + + /** + * JPEGProc + * + * Format: Unknown. + * + * Components: Unknown. + */ + const JPEG_PROC = 0x0200; + + /** + * Offset to JPEG SOI. + * + * Format: {@link PelFormat::LONG}. + * + * Components: 1. + */ + const JPEG_INTERCHANGE_FORMAT = 0x0201; + + /** + * Bytes of JPEG data. + * + * Format: {@link PelFormat::LONG}. + * + * Components: 1. + */ + const JPEG_INTERCHANGE_FORMAT_LENGTH = 0x0202; + + /** + * Color space transformation matrix coefficients. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 3. + */ + const YCBCR_COEFFICIENTS = 0x0211; + + /** + * Subsampling ratio of Y to C. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 2. + */ + const YCBCR_SUB_SAMPLING = 0x0212; + + /** + * Y and C positioning. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const YCBCR_POSITIONING = 0x0213; + + /** + * Pair of black and white reference values. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 6. + */ + const REFERENCE_BLACK_WHITE = 0x0214; + + /** + * Related Image File Format + * + * Format: Unknown. + * + * Components: Unknown. + */ + const RELATED_IMAGE_FILE_FORMAT = 0x1000; + + /** + * Related Image Width + * + * Format: Unknown, probably {@link PelFormat::SHORT}? + * + * Components: Unknown, probably 1. + */ + const RELATED_IMAGE_WIDTH = 0x1001; + + /** Related Image Length + * + * Format: Unknown, probably {@link PelFormat::SHORT}? + * + * Components: Unknown, probably 1. + */ + const RELATED_IMAGE_LENGTH = 0x1002; + + /** + * CFA Repeat Pattern Dim. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 2. + */ + const CFA_REPEAT_PATTERN_DIM = 0x828D; + + /** + * Battery level. + * + * Format: Unknown. + * + * Components: Unknown. + */ + const BATTERY_LEVEL = 0x828F; + + /** + * Copyright holder. + * + * Format: {@link PelFormat::ASCII}, modelled by the {@link + * PelEntryCopyright} class. + * + * Components: any number. + */ + const COPYRIGHT = 0x8298; + + /** + * Exposure Time + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const EXPOSURE_TIME = 0x829A; + + /** + * FNumber + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const FNUMBER = 0x829D; + + /** + * IPTC/NAA + * + * Format: {@link PelFormat::LONG}. + * + * Components: any number. + */ + const IPTC_NAA = 0x83BB; + + /** + * Exif IFD Pointer + * + * Format: {@link PelFormat::LONG}. + * + * Components: 1. + */ + const EXIF_IFD_POINTER = 0x8769; + + /** + * Inter Color Profile + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: any number. + */ + const INTER_COLOR_PROFILE = 0x8773; + + /** + * Exposure Program + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const EXPOSURE_PROGRAM = 0x8822; + + /** + * Spectral Sensitivity + * + * Format: {@link PelFormat::ASCII}. + * + * Components: any number. + */ + const SPECTRAL_SENSITIVITY = 0x8824; + + /** + * GPS Info IFD Pointer + * + * Format: {@link PelFormat::LONG}. + * + * Components: 1. + */ + const GPS_INFO_IFD_POINTER = 0x8825; + + /** + * ISO Speed Ratings + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 2. + */ + const ISO_SPEED_RATINGS = 0x8827; + + /** + * OECF + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: any number. + */ + const OECF = 0x8828; + + /** + * Exif version. + * + * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link + * PelEntryVersion} class. + * + * Components: 4. + */ + const EXIF_VERSION = 0x9000; + + /** + * Date and time of original data generation. + * + * Format: {@link PelFormat::ASCII}, modelled by the {@link + * PelEntryTime} class. + * + * Components: 20. + */ + const DATE_TIME_ORIGINAL = 0x9003; + + /** + * Date and time of digital data generation. + * + * Format: {@link PelFormat::ASCII}, modelled by the {@link + * PelEntryTime} class. + * + * Components: 20. + */ + const DATE_TIME_DIGITIZED = 0x9004; + + /** + * Meaning of each component. + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: 4. + */ + const COMPONENTS_CONFIGURATION = 0x9101; + + /** + * Image compression mode. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const COMPRESSED_BITS_PER_PIXEL = 0x9102; + + /** + * Shutter speed + * + * Format: {@link PelFormat::SRATIONAL}. + * + * Components: 1. + */ + const SHUTTER_SPEED_VALUE = 0x9201; + + /** + * Aperture + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const APERTURE_VALUE = 0x9202; + + /** + * Brightness + * + * Format: {@link PelFormat::SRATIONAL}. + * + * Components: 1. + */ + const BRIGHTNESS_VALUE = 0x9203; + + /** + * Exposure Bias + * + * Format: {@link PelFormat::SRATIONAL}. + * + * Components: 1. + */ + const EXPOSURE_BIAS_VALUE = 0x9204; + + /** + * Max Aperture Value + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const MAX_APERTURE_VALUE = 0x9205; + + /** + * Subject Distance + * + * Format: {@link PelFormat::SRATIONAL}. + * + * Components: 1. + */ + const SUBJECT_DISTANCE = 0x9206; + + /** + * Metering Mode + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const METERING_MODE = 0x9207; + + /** + * Light Source + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const LIGHT_SOURCE = 0x9208; + + /** + * Flash + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const FLASH = 0x9209; + + /** + * Focal Length + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const FOCAL_LENGTH = 0x920A; + + /** + * Subject Area + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 4. + */ + const SUBJECT_AREA = 0x9214; + + /** + * Maker Note + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: any number. + */ + const MAKER_NOTE = 0x927C; + + /** + * User Comment + * + * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link + * PelEntryUserComment} class. + * + * Components: any number. + */ + const USER_COMMENT = 0x9286; + + /** + * SubSec Time + * + * Format: {@link PelFormat::ASCII}. + * + * Components: any number. + */ + const SUB_SEC_TIME = 0x9290; + + /** + * SubSec Time Original + * + * Format: {@link PelFormat::ASCII}. + * + * Components: any number. + */ + const SUB_SEC_TIME_ORIGINAL = 0x9291; + + /** + * SubSec Time Digitized + * + * Format: {@link PelFormat::ASCII}. + * + * Components: any number. + */ + const SUB_SEC_TIME_DIGITIZED = 0x9292; + + /** + * Windows XP Title + * + * Format: {@link PelFormat::BYTE}. + * + * Components: any number. + */ + const XP_TITLE = 0x9C9B; + + + /** + * Windows XP Comment + * + * Format: {@link PelFormat::BYTE}. + * + * Components: any number. + */ + const XP_COMMENT = 0x9C9C; + + + /** + * Windows XP Author + * + * Format: {@link PelFormat::BYTE}. + * + * Components: any number. + */ + const XP_AUTHOR = 0x9C9D; + + + /** + * Windows XP Keywords + * + * Format: {@link PelFormat::BYTE}. + * + * Components: any number. + */ + const XP_KEYWORDS = 0x9C9E; + + + /** + * Windows XP Subject + * + * Format: {@link PelFormat::BYTE}. + * + * Components: any number. + */ + const XP_SUBJECT = 0x9C9F; + + + /** + * Supported Flashpix version + * + * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link + * PelEntryVersion} class. + * + * Components: 4. + */ + const FLASH_PIX_VERSION = 0xA000; + + /** + * Color space information. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const COLOR_SPACE = 0xA001; + + /** + * Valid image width. + * + * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. + * + * Components: 1. + */ + const PIXEL_X_DIMENSION = 0xA002; + + /** + * Valid image height. + * + * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}. + * + * Components: 1. + */ + const PIXEL_Y_DIMENSION = 0xA003; + + /** + * Related audio file. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: any number. + */ + const RELATED_SOUND_FILE = 0xA004; + + /** + * Interoperability IFD Pointer + * + * Format: {@link PelFormat::LONG}. + * + * Components: 1. + */ + const INTEROPERABILITY_IFD_POINTER = 0xA005; + + /** + * Flash energy. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const FLASH_ENERGY = 0xA20B; + + /** + * Spatial frequency response. + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: any number. + */ + const SPATIAL_FREQUENCY_RESPONSE = 0xA20C; + + /** + * Focal plane X resolution. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const FOCAL_PLANE_X_RESOLUTION = 0xA20E; + + /** + * Focal plane Y resolution. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const FOCAL_PLANE_Y_RESOLUTION = 0xA20F; + + /** + * Focal plane resolution unit. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const FOCAL_PLANE_RESOLUTION_UNIT = 0xA210; + + /** + * Subject location. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const SUBJECT_LOCATION = 0xA214; + + /** + * Exposure index. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const EXPOSURE_INDEX = 0xA215; + + /** + * Sensing method. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const SENSING_METHOD = 0xA217; + + /** + * File source. + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: 1. + */ + const FILE_SOURCE = 0xA300; + + /** + * Scene type. + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: 1. + */ + const SCENE_TYPE = 0xA301; + + /** + * CFA pattern. + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: any number. + */ + const CFA_PATTERN = 0xA302; + + /** + * Custom image processing. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const CUSTOM_RENDERED = 0xA401; + + /** + * Exposure mode. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const EXPOSURE_MODE = 0xA402; + + /** + * White balance. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const WHITE_BALANCE = 0xA403; + + /** + * Digital zoom ratio. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const DIGITAL_ZOOM_RATIO = 0xA404; + + /** + * Focal length in 35mm film. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const FOCAL_LENGTH_IN_35MM_FILM = 0xA405; + + /** + * Scene capture type. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const SCENE_CAPTURE_TYPE = 0xA406; + + /** + * Gain control. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const GAIN_CONTROL = 0xA407; + + /** + * Contrast. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const CONTRAST = 0xA408; + + /** + * Saturation. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const SATURATION = 0xA409; + + /** + * Sharpness. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const SHARPNESS = 0xA40A; + + /** + * Device settings description. + * + * This tag indicates information on the picture-taking conditions + * of a particular camera model. The tag is used only to indicate + * the picture-taking conditions in the reader. + */ + const DEVICE_SETTING_DESCRIPTION = 0xA40B; + + /** + * Subject distance range. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const SUBJECT_DISTANCE_RANGE = 0xA40C; + + /** + * Image unique ID. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 32. + */ + const IMAGE_UNIQUE_ID = 0xA420; + + /** + * Gamma. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const GAMMA = 0xA500; + + /** + * PrintIM + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: unknown. + */ + const PRINT_IM = 0xC4A5; + + /** + * GPS tag version. + * + * Format: {@link PelFormat::BYTE}. + * + * Components: 4. + */ + const GPS_VERSION_ID = 0x0000; + + /** + * North or South Latitude. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_LATITUDE_REF = 0x0001; + + /** + * Latitude. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 3. + */ + const GPS_LATITUDE = 0x0002; + + /** + * East or West Longitude. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_LONGITUDE_REF = 0x0003; + + /** + * Longitude. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 3. + */ + const GPS_LONGITUDE = 0x0004; + + /** + * Altitude reference. + * + * Format: {@link PelFormat::BYTE}. + * + * Components: 1. + */ + const GPS_ALTITUDE_REF = 0x0005; + + /** + * Altitude. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const GPS_ALTITUDE = 0x0006; + + /** + * GPS time (atomic clock). + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 3. + */ + const GPS_TIME_STAMP = 0x0007; + + /** + * GPS satellites used for measurement. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: Any. + */ + const GPS_SATELLITES = 0x0008; + + /** + * GPS receiver status. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_STATUS = 0x0009; + + /** + * GPS measurement mode. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_MEASURE_MODE = 0x000A; + + /** + * Measurement precision. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const GPS_DOP = 0x000B; + + /** + * Speed unit. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_SPEED_REF = 0x000C; + + /** + * Speed of GPS receiver. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const GPS_SPEED = 0x000D; + + /** + * Reference for direction of movement. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_TRACK_REF = 0x000E; + + /** + * Direction of movement. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const GPS_TRACK = 0x000F; + + /** + * Reference for direction of image. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_IMG_DIRECTION_REF = 0x0010; + + /** + * Direction of image. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const GPS_IMG_DIRECTION = 0x0011; + + /** + * Geodetic survey data used. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: Any. + */ + const GPS_MAP_DATUM = 0x0012; + + /** + * Reference for latitude of destination. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_DEST_LATITUDE_REF = 0x0013; + + /** + * Latitude of destination. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 3. + */ + const GPS_DEST_LATITUDE = 0x0014; + + /** + * Reference for longitude of destination. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_DEST_LONGITUDE_REF = 0x0015; + + /** + * Longitude of destination. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 3. + */ + const GPS_DEST_LONGITUDE = 0x0016; + + /** + * Reference for bearing of destination. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_DEST_BEARING_REF = 0x0017; + + /** + * Bearing of destination. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const GPS_DEST_BEARING = 0x0018; + + /** + * Reference for distance to destination. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 2. + */ + const GPS_DEST_DISTANCE_REF = 0x0019; + + /** + * Distance to destination. + * + * Format: {@link PelFormat::RATIONAL}. + * + * Components: 1. + */ + const GPS_DEST_DISTANCE = 0x001A; + + /** + * Name of GPS processing method. + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: Any. + */ + const GPS_PROCESSING_METHOD = 0x001B; + + /** + * Name of GPS area. + * + * Format: {@link PelFormat::UNDEFINED}. + * + * Components: Any. + */ + const GPS_AREA_INFORMATION = 0x001C; + + /** + * GPS date. + * + * Format: {@link PelFormat::ASCII}. + * + * Components: 11. + */ + const GPS_DATE_STAMP = 0x001D; + + /** + * GPS differential correction. + * + * Format: {@link PelFormat::SHORT}. + * + * Components: 1. + */ + const GPS_DIFFERENTIAL = 0x001E; + + + /** + * Returns a short name for an Exif tag. + * + * @param int the IFD type of the tag, one of {@link PelIfd::IFD0}, + * {@link PelIfd::IFD1}, {@link PelIfd::EXIF}, {@link PelIfd::GPS}, + * or {@link PelIfd::INTEROPERABILITY}. + * + * @param PelTag the tag. + * + * @return string the short name of the tag, e.g., 'ImageWidth' for + * the {@link IMAGE_WIDTH} tag. If the tag is not known, the string + * 'Unknown:0xTTTT' will be returned where 'TTTT' is the hexadecimal + * representation of the tag. + */ + static function getName($type, $tag) { + + switch ($type) { + case PelIfd::IFD0: + case PelIfd::IFD1: + case PelIfd::EXIF: + case PelIfd::INTEROPERABILITY: + + switch ($tag) { + case self::INTEROPERABILITY_INDEX: + return 'InteroperabilityIndex'; + case self::INTEROPERABILITY_VERSION: + return 'InteroperabilityVersion'; + case self::IMAGE_WIDTH: + return 'ImageWidth'; + case self::IMAGE_LENGTH: + return 'ImageLength'; + case self::BITS_PER_SAMPLE: + return 'BitsPerSample'; + case self::COMPRESSION: + return 'Compression'; + case self::PHOTOMETRIC_INTERPRETATION: + return 'PhotometricInterpretation'; + case self::FILL_ORDER: + return 'FillOrder'; + case self::DOCUMENT_NAME: + return 'DocumentName'; + case self::IMAGE_DESCRIPTION: + return 'ImageDescription'; + case self::MAKE: + return 'Make'; + case self::MODEL: + return 'Model'; + case self::STRIP_OFFSETS: + return 'StripOffsets'; + case self::ORIENTATION: + return 'Orientation'; + case self::SAMPLES_PER_PIXEL: + return 'SamplesPerPixel'; + case self::ROWS_PER_STRIP: + return 'RowsPerStrip'; + case self::STRIP_BYTE_COUNTS: + return 'StripByteCounts'; + case self::X_RESOLUTION: + return 'XResolution'; + case self::Y_RESOLUTION: + return 'YResolution'; + case self::PLANAR_CONFIGURATION: + return 'PlanarConfiguration'; + case self::RESOLUTION_UNIT: + return 'ResolutionUnit'; + case self::TRANSFER_FUNCTION: + return 'TransferFunction'; + case self::SOFTWARE: + return 'Software'; + case self::DATE_TIME: + return 'DateTime'; + case self::ARTIST: + return 'Artist'; + case self::WHITE_POINT: + return 'WhitePoint'; + case self::PRIMARY_CHROMATICITIES: + return 'PrimaryChromaticities'; + case self::TRANSFER_RANGE: + return 'TransferRange'; + case self::JPEG_PROC: + return 'JPEGProc'; + case self::JPEG_INTERCHANGE_FORMAT: + return 'JPEGInterchangeFormat'; + case self::JPEG_INTERCHANGE_FORMAT_LENGTH: + return 'JPEGInterchangeFormatLength'; + case self::YCBCR_COEFFICIENTS: + return 'YCbCrCoefficients'; + case self::YCBCR_SUB_SAMPLING: + return 'YCbCrSubSampling'; + case self::YCBCR_POSITIONING: + return 'YCbCrPositioning'; + case self::REFERENCE_BLACK_WHITE: + return 'ReferenceBlackWhite'; + case self::RELATED_IMAGE_FILE_FORMAT: + return 'RelatedImageFileFormat'; + case self::RELATED_IMAGE_WIDTH: + return 'RelatedImageWidth'; + case self::RELATED_IMAGE_LENGTH: + return 'RelatedImageLength'; + case self::CFA_REPEAT_PATTERN_DIM: + return 'CFARepeatPatternDim'; + case self::CFA_PATTERN: + return 'CFAPattern'; + case self::BATTERY_LEVEL: + return 'BatteryLevel'; + case self::COPYRIGHT: + return 'Copyright'; + case self::EXPOSURE_TIME: + return 'ExposureTime'; + case self::FNUMBER: + return 'FNumber'; + case self::IPTC_NAA: + return 'IPTC/NAA'; + case self::EXIF_IFD_POINTER: + return 'ExifIFDPointer'; + case self::INTER_COLOR_PROFILE: + return 'InterColorProfile'; + case self::EXPOSURE_PROGRAM: + return 'ExposureProgram'; + case self::SPECTRAL_SENSITIVITY: + return 'SpectralSensitivity'; + case self::GPS_INFO_IFD_POINTER: + return 'GPSInfoIFDPointer'; + case self::ISO_SPEED_RATINGS: + return 'ISOSpeedRatings'; + case self::OECF: + return 'OECF'; + case self::EXIF_VERSION: + return 'ExifVersion'; + case self::DATE_TIME_ORIGINAL: + return 'DateTimeOriginal'; + case self::DATE_TIME_DIGITIZED: + return 'DateTimeDigitized'; + case self::COMPONENTS_CONFIGURATION: + return 'ComponentsConfiguration'; + case self::COMPRESSED_BITS_PER_PIXEL: + return 'CompressedBitsPerPixel'; + case self::SHUTTER_SPEED_VALUE: + return 'ShutterSpeedValue'; + case self::APERTURE_VALUE: + return 'ApertureValue'; + case self::BRIGHTNESS_VALUE: + return 'BrightnessValue'; + case self::EXPOSURE_BIAS_VALUE: + return 'ExposureBiasValue'; + case self::MAX_APERTURE_VALUE: + return 'MaxApertureValue'; + case self::SUBJECT_DISTANCE: + return 'SubjectDistance'; + case self::METERING_MODE: + return 'MeteringMode'; + case self::LIGHT_SOURCE: + return 'LightSource'; + case self::FLASH: + return 'Flash'; + case self::FOCAL_LENGTH: + return 'FocalLength'; + case self::MAKER_NOTE: + return 'MakerNote'; + case self::USER_COMMENT: + return 'UserComment'; + case self::SUB_SEC_TIME: + return 'SubSecTime'; + case self::SUB_SEC_TIME_ORIGINAL: + return 'SubSecTimeOriginal'; + case self::SUB_SEC_TIME_DIGITIZED: + return 'SubSecTimeDigitized'; + case self::XP_TITLE: + return 'WindowsXPTitle'; + case self::XP_COMMENT: + return 'WindowsXPComment'; + case self::XP_AUTHOR: + return 'WindowsXPAuthor'; + case self::XP_KEYWORDS: + return 'WindowsXPKeywords'; + case self::XP_SUBJECT: + return 'WindowsXPSubject'; + case self::FLASH_PIX_VERSION: + return 'FlashPixVersion'; + case self::COLOR_SPACE: + return 'ColorSpace'; + case self::PIXEL_X_DIMENSION: + return 'PixelXDimension'; + case self::PIXEL_Y_DIMENSION: + return 'PixelYDimension'; + case self::RELATED_SOUND_FILE: + return 'RelatedSoundFile'; + case self::INTEROPERABILITY_IFD_POINTER: + return 'InteroperabilityIFDPointer'; + case self::FLASH_ENERGY: + return 'FlashEnergy'; + case self::SPATIAL_FREQUENCY_RESPONSE: + return 'SpatialFrequencyResponse'; + case self::FOCAL_PLANE_X_RESOLUTION: + return 'FocalPlaneXResolution'; + case self::FOCAL_PLANE_Y_RESOLUTION: + return 'FocalPlaneYResolution'; + case self::FOCAL_PLANE_RESOLUTION_UNIT: + return 'FocalPlaneResolutionUnit'; + case self::SUBJECT_LOCATION: + return 'SubjectLocation'; + case self::EXPOSURE_INDEX: + return 'ExposureIndex'; + case self::SENSING_METHOD: + return 'SensingMethod'; + case self::FILE_SOURCE: + return 'FileSource'; + case self::SCENE_TYPE: + return 'SceneType'; + case self::SUBJECT_AREA: + return 'SubjectArea'; + case self::CUSTOM_RENDERED: + return 'CustomRendered'; + case self::EXPOSURE_MODE: + return 'ExposureMode'; + case self::WHITE_BALANCE: + return 'WhiteBalance'; + case self::DIGITAL_ZOOM_RATIO: + return 'DigitalZoomRatio'; + case self::FOCAL_LENGTH_IN_35MM_FILM: + return 'FocalLengthIn35mmFilm'; + case self::SCENE_CAPTURE_TYPE: + return 'SceneCaptureType'; + case self::GAIN_CONTROL: + return 'GainControl'; + case self::CONTRAST: + return 'Contrast'; + case self::SATURATION: + return 'Saturation'; + case self::SHARPNESS: + return 'Sharpness'; + case self::DEVICE_SETTING_DESCRIPTION: + return 'DeviceSettingDescription'; + case self::SUBJECT_DISTANCE_RANGE: + return 'SubjectDistanceRange'; + case self::IMAGE_UNIQUE_ID: + return 'ImageUniqueID'; + case self::GAMMA: + return 'Gamma'; + case self::PRINT_IM: + return 'PrintIM'; + } + + case PelIfd::GPS: + switch ($tag) { + case self::GPS_VERSION_ID: + return 'GPSVersionID'; + case self::GPS_LATITUDE_REF: + return 'GPSLatitudeRef'; + case self::GPS_LATITUDE: + return 'GPSLatitude'; + case self::GPS_LONGITUDE_REF: + return 'GPSLongitudeRef'; + case self::GPS_LONGITUDE: + return 'GPSLongitude'; + case self::GPS_ALTITUDE_REF: + return 'GPSAltitudeRef'; + case self::GPS_ALTITUDE: + return 'GPSAltitude'; + case self::GPS_TIME_STAMP: + return 'GPSTimeStamp'; + case self::GPS_SATELLITES: + return 'GPSSatellites'; + case self::GPS_STATUS: + return 'GPSStatus'; + case self::GPS_MEASURE_MODE: + return 'GPSMeasureMode'; + case self::GPS_DOP: + return 'GPSDOP'; + case self::GPS_SPEED_REF: + return 'GPSSpeedRef'; + case self::GPS_SPEED: + return 'GPSSpeed'; + case self::GPS_TRACK_REF: + return 'GPSTrackRef'; + case self::GPS_TRACK: + return 'GPSTrack'; + case self::GPS_IMG_DIRECTION_REF: + return 'GPSImgDirectionRef'; + case self::GPS_IMG_DIRECTION: + return 'GPSImgDirection'; + case self::GPS_MAP_DATUM: + return 'GPSMapDatum'; + case self::GPS_DEST_LATITUDE_REF: + return 'GPSDestLatitudeRef'; + case self::GPS_DEST_LATITUDE: + return 'GPSDestLatitude'; + case self::GPS_DEST_LONGITUDE_REF: + return 'GPSDestLongitudeRef'; + case self::GPS_DEST_LONGITUDE: + return 'GPSDestLongitude'; + case self::GPS_DEST_BEARING_REF: + return 'GPSDestBearingRef'; + case self::GPS_DEST_BEARING: + return 'GPSDestBearing'; + case self::GPS_DEST_DISTANCE_REF: + return 'GPSDestDistanceRef'; + case self::GPS_DEST_DISTANCE: + return 'GPSDestDistance'; + case self::GPS_PROCESSING_METHOD: + return 'GPSProcessingMethod'; + case self::GPS_AREA_INFORMATION: + return 'GPSAreaInformation'; + case self::GPS_DATE_STAMP: + return 'GPSDateStamp'; + case self::GPS_DIFFERENTIAL: + return 'GPSDifferential'; + } + + default: + return Pel::fmt('Unknown: 0x%04X', $tag); + } + } + + + /** + * Returns a title for an Exif tag. + * + * @param int the IFD type of the tag, one of {@link PelIfd::IFD0}, + * {@link PelIfd::IFD1}, {@link PelIfd::EXIF}, {@link PelIfd::GPS}, + * or {@link PelIfd::INTEROPERABILITY}. + * + * @param PelTag the tag. + * + * @return string the title of the tag, e.g., 'Image Width' for the + * {@link IMAGE_WIDTH} tag. If the tag isn't known, the string + * 'Unknown Tag: 0xTT' will be returned where 'TT' is the + * hexadecimal representation of the tag. + */ + function getTitle($type, $tag) { + + switch ($type) { + case PelIfd::IFD0: + case PelIfd::IFD1: + case PelIfd::EXIF: + case PelIfd::INTEROPERABILITY: + + switch ($tag) { + case self::INTEROPERABILITY_INDEX: + return Pel::tra('Interoperability Index'); + case self::INTEROPERABILITY_VERSION: + return Pel::tra('Interoperability Version'); + case self::IMAGE_WIDTH: + return Pel::tra('Image Width'); + case self::IMAGE_LENGTH: + return Pel::tra('Image Length'); + case self::BITS_PER_SAMPLE: + return Pel::tra('Bits per Sample'); + case self::COMPRESSION: + return Pel::tra('Compression'); + case self::PHOTOMETRIC_INTERPRETATION: + return Pel::tra('Photometric Interpretation'); + case self::FILL_ORDER: + return Pel::tra('Fill Order'); + case self::DOCUMENT_NAME: + return Pel::tra('Document Name'); + case self::IMAGE_DESCRIPTION: + return Pel::tra('Image Description'); + case self::MAKE: + return Pel::tra('Manufacturer'); + case self::MODEL: + return Pel::tra('Model'); + case self::STRIP_OFFSETS: + return Pel::tra('Strip Offsets'); + case self::ORIENTATION: + return Pel::tra('Orientation'); + case self::SAMPLES_PER_PIXEL: + return Pel::tra('Samples per Pixel'); + case self::ROWS_PER_STRIP: + return Pel::tra('Rows per Strip'); + case self::STRIP_BYTE_COUNTS: + return Pel::tra('Strip Byte Count'); + case self::X_RESOLUTION: + return Pel::tra('x-Resolution'); + case self::Y_RESOLUTION: + return Pel::tra('y-Resolution'); + case self::PLANAR_CONFIGURATION: + return Pel::tra('Planar Configuration'); + case self::RESOLUTION_UNIT: + return Pel::tra('Resolution Unit'); + case self::TRANSFER_FUNCTION: + return Pel::tra('Transfer Function'); + case self::SOFTWARE: + return Pel::tra('Software'); + case self::DATE_TIME: + return Pel::tra('Date and Time'); + case self::ARTIST: + return Pel::tra('Artist'); + case self::WHITE_POINT: + return Pel::tra('White Point'); + case self::PRIMARY_CHROMATICITIES: + return Pel::tra('Primary Chromaticities'); + case self::TRANSFER_RANGE: + return Pel::tra('Transfer Range'); + case self::JPEG_PROC: + return Pel::tra('JPEG Process'); + case self::JPEG_INTERCHANGE_FORMAT: + return Pel::tra('JPEG Interchange Format'); + case self::JPEG_INTERCHANGE_FORMAT_LENGTH: + return Pel::tra('JPEG Interchange Format Length'); + case self::YCBCR_COEFFICIENTS: + return Pel::tra('YCbCr Coefficients'); + case self::YCBCR_SUB_SAMPLING: + return Pel::tra('YCbCr Sub-Sampling'); + case self::YCBCR_POSITIONING: + return Pel::tra('YCbCr Positioning'); + case self::REFERENCE_BLACK_WHITE: + return Pel::tra('Reference Black/White'); + case self::RELATED_IMAGE_FILE_FORMAT: + return Pel::tra('Related Image File Format'); + case self::RELATED_IMAGE_WIDTH: + return Pel::tra('Related Image Width'); + case self::RELATED_IMAGE_LENGTH: + return Pel::tra('Related Image Length'); + case self::CFA_REPEAT_PATTERN_DIM: + return Pel::tra('CFA Repeat Pattern Dim'); + case self::CFA_PATTERN: + return Pel::tra('CFA Pattern'); + case self::BATTERY_LEVEL: + return Pel::tra('Battery Level'); + case self::COPYRIGHT: + return Pel::tra('Copyright'); + case self::EXPOSURE_TIME: + return Pel::tra('Exposure Time'); + case self::FNUMBER: + return Pel::tra('FNumber'); + case self::IPTC_NAA: + return Pel::tra('IPTC/NAA'); + case self::EXIF_IFD_POINTER: + return Pel::tra('Exif IFD Pointer'); + case self::INTER_COLOR_PROFILE: + return Pel::tra('Inter Color Profile'); + case self::EXPOSURE_PROGRAM: + return Pel::tra('Exposure Program'); + case self::SPECTRAL_SENSITIVITY: + return Pel::tra('Spectral Sensitivity'); + case self::GPS_INFO_IFD_POINTER: + return Pel::tra('GPS Info IFD Pointer'); + case self::ISO_SPEED_RATINGS: + return Pel::tra('ISO Speed Ratings'); + case self::OECF: + return Pel::tra('OECF'); + case self::EXIF_VERSION: + return Pel::tra('Exif Version'); + case self::DATE_TIME_ORIGINAL: + return Pel::tra('Date and Time (original)'); + case self::DATE_TIME_DIGITIZED: + return Pel::tra('Date and Time (digitized)'); + case self::COMPONENTS_CONFIGURATION: + return Pel::tra('Components Configuration'); + case self::COMPRESSED_BITS_PER_PIXEL: + return Pel::tra('Compressed Bits per Pixel'); + case self::SHUTTER_SPEED_VALUE: + return Pel::tra('Shutter speed'); + case self::APERTURE_VALUE: + return Pel::tra('Aperture'); + case self::BRIGHTNESS_VALUE: + return Pel::tra('Brightness'); + case self::EXPOSURE_BIAS_VALUE: + return Pel::tra('Exposure Bias'); + case self::MAX_APERTURE_VALUE: + return Pel::tra('Max Aperture Value'); + case self::SUBJECT_DISTANCE: + return Pel::tra('Subject Distance'); + case self::METERING_MODE: + return Pel::tra('Metering Mode'); + case self::LIGHT_SOURCE: + return Pel::tra('Light Source'); + case self::FLASH: + return Pel::tra('Flash'); + case self::FOCAL_LENGTH: + return Pel::tra('Focal Length'); + case self::MAKER_NOTE: + return Pel::tra('Maker Note'); + case self::USER_COMMENT: + return Pel::tra('User Comment'); + case self::SUB_SEC_TIME: + return Pel::tra('SubSec Time'); + case self::SUB_SEC_TIME_ORIGINAL: + return Pel::tra('SubSec Time Original'); + case self::SUB_SEC_TIME_DIGITIZED: + return Pel::tra('SubSec Time Digitized'); + case self::XP_TITLE: + return 'Windows XP Title'; + case self::XP_COMMENT: + return 'Windows XP Comment'; + case self::XP_AUTHOR: + return 'Windows XP Author'; + case self::XP_KEYWORDS: + return 'Windows XP Keywords'; + case self::XP_SUBJECT: + return 'Windows XP Subject'; + case self::FLASH_PIX_VERSION: + return Pel::tra('FlashPix Version'); + case self::COLOR_SPACE: + return Pel::tra('Color Space'); + case self::PIXEL_X_DIMENSION: + return Pel::tra('Pixel x-Dimension'); + case self::PIXEL_Y_DIMENSION: + return Pel::tra('Pixel y-Dimension'); + case self::RELATED_SOUND_FILE: + return Pel::tra('Related Sound File'); + case self::INTEROPERABILITY_IFD_POINTER: + return Pel::tra('Interoperability IFD Pointer'); + case self::FLASH_ENERGY: + return Pel::tra('Flash Energy'); + case self::SPATIAL_FREQUENCY_RESPONSE: + return Pel::tra('Spatial Frequency Response'); + case self::FOCAL_PLANE_X_RESOLUTION: + return Pel::tra('Focal Plane x-Resolution'); + case self::FOCAL_PLANE_Y_RESOLUTION: + return Pel::tra('Focal Plane y-Resolution'); + case self::FOCAL_PLANE_RESOLUTION_UNIT: + return Pel::tra('Focal Plane Resolution Unit'); + case self::SUBJECT_LOCATION: + return Pel::tra('Subject Location'); + case self::EXPOSURE_INDEX: + return Pel::tra('Exposure index'); + case self::SENSING_METHOD: + return Pel::tra('Sensing Method'); + case self::FILE_SOURCE: + return Pel::tra('File Source'); + case self::SCENE_TYPE: + return Pel::tra('Scene Type'); + case self::SUBJECT_AREA: + return Pel::tra('Subject Area'); + case self::CUSTOM_RENDERED: + return Pel::tra('Custom Rendered'); + case self::EXPOSURE_MODE: + return Pel::tra('Exposure Mode'); + case self::WHITE_BALANCE: + return Pel::tra('White Balance'); + case self::DIGITAL_ZOOM_RATIO: + return Pel::tra('Digital Zoom Ratio'); + case self::FOCAL_LENGTH_IN_35MM_FILM: + return Pel::tra('Focal Length In 35mm Film'); + case self::SCENE_CAPTURE_TYPE: + return Pel::tra('Scene Capture Type'); + case self::GAIN_CONTROL: + return Pel::tra('Gain Control'); + case self::CONTRAST: + return Pel::tra('Contrast'); + case self::SATURATION: + return Pel::tra('Saturation'); + case self::SHARPNESS: + return Pel::tra('Sharpness'); + case self::DEVICE_SETTING_DESCRIPTION: + return Pel::tra('Device Setting Description'); + case self::SUBJECT_DISTANCE_RANGE: + return Pel::tra('Subject Distance Range'); + case self::IMAGE_UNIQUE_ID: + return Pel::tra('Image Unique ID'); + case self::GAMMA: + return Pel::tra('Gamma'); + case self::PRINT_IM: + return Pel::tra('Print IM'); + } + + case PelIfd::GPS: + switch ($tag) { + case self::GPS_VERSION_ID: + return 'GPSVersionID'; + case self::GPS_LATITUDE_REF: + return 'GPSLatitudeRef'; + case self::GPS_LATITUDE: + return 'GPSLatitude'; + case self::GPS_LONGITUDE_REF: + return 'GPSLongitudeRef'; + case self::GPS_LONGITUDE: + return 'GPSLongitude'; + case self::GPS_ALTITUDE_REF: + return 'GPSAltitudeRef'; + case self::GPS_ALTITUDE: + return 'GPSAltitude'; + case self::GPS_TIME_STAMP: + return 'GPSTimeStamp'; + case self::GPS_SATELLITES: + return 'GPSSatellites'; + case self::GPS_STATUS: + return 'GPSStatus'; + case self::GPS_MEASURE_MODE: + return 'GPSMeasureMode'; + case self::GPS_DOP: + return 'GPSDOP'; + case self::GPS_SPEED_REF: + return 'GPSSpeedRef'; + case self::GPS_SPEED: + return 'GPSSpeed'; + case self::GPS_TRACK_REF: + return 'GPSTrackRef'; + case self::GPS_TRACK: + return 'GPSTrack'; + case self::GPS_IMG_DIRECTION_REF: + return 'GPSImgDirectionRef'; + case self::GPS_IMG_DIRECTION: + return 'GPSImgDirection'; + case self::GPS_MAP_DATUM: + return 'GPSMapDatum'; + case self::GPS_DEST_LATITUDE_REF: + return 'GPSDestLatitudeRef'; + case self::GPS_DEST_LATITUDE: + return 'GPSDestLatitude'; + case self::GPS_DEST_LONGITUDE_REF: + return 'GPSDestLongitudeRef'; + case self::GPS_DEST_LONGITUDE: + return 'GPSDestLongitude'; + case self::GPS_DEST_BEARING_REF: + return 'GPSDestBearingRef'; + case self::GPS_DEST_BEARING: + return 'GPSDestBearing'; + case self::GPS_DEST_DISTANCE_REF: + return 'GPSDestDistanceRef'; + case self::GPS_DEST_DISTANCE: + return 'GPSDestDistance'; + case self::GPS_PROCESSING_METHOD: + return 'GPSProcessingMethod'; + case self::GPS_AREA_INFORMATION: + return 'GPSAreaInformation'; + case self::GPS_DATE_STAMP: + return 'GPSDateStamp'; + case self::GPS_DIFFERENTIAL: + return 'GPSDifferential'; + } + + default: + return Pel::fmt('Unknown Tag: 0x%04X', $tag); + } + } + +} +?> \ No newline at end of file diff --git a/modules/autorotate/lib/pel/PelTiff.php b/modules/autorotate/lib/pel/PelTiff.php new file mode 100644 index 00000000..0146c9e2 --- /dev/null +++ b/modules/autorotate/lib/pel/PelTiff.php @@ -0,0 +1,296 @@ + + * @version $Revision: 458 $ + * @date $Date: 2006-11-18 22:22:58 +0100 (Sat, 18 Nov 2006) $ + * @license http://www.gnu.org/licenses/gpl.html GNU General Public + * License (GPL) + * @package PEL + */ + +/**#@+ Required class definitions. */ +require_once('PelDataWindow.php'); +require_once('PelIfd.php'); +require_once('Pel.php'); +/**#@-*/ + + +/** + * Class for handling TIFF data. + * + * Exif data is actually an extension of the TIFF file format. TIFF + * images consist of a number of {@link PelIfd Image File Directories} + * (IFDs), each containing a number of {@link PelEntry entries}. The + * IFDs are linked to each other --- one can get hold of the first one + * with the {@link getIfd()} method. + * + * To parse a TIFF image for Exif data one would do: + * + * + * $tiff = new PelTiff($data); + * $ifd0 = $tiff->getIfd(); + * $exif = $ifd0->getSubIfd(PelIfd::EXIF); + * $ifd1 = $ifd0->getNextIfd(); + * + * + * Should one have some image data of an unknown type, then the {@link + * PelTiff::isValid()} function is handy: it will quickly test if the + * data could be valid TIFF data. The {@link PelJpeg::isValid()} + * function does the same for JPEG images. + * + * @author Martin Geisler + * @package PEL + */ +class PelTiff { + + /** + * TIFF header. + * + * This must follow after the two bytes indicating the byte order. + */ + const TIFF_HEADER = 0x002A; + + /** + * The first Image File Directory, if any. + * + * If set, then the type of the IFD must be {@link PelIfd::IFD0}. + * + * @var PelIfd + */ + private $ifd = null; + + + /** + * Construct a new object for holding TIFF data. + * + * The new object will be empty (with no {@link PelIfd}) unless an + * argument is given from which it can initialize itself. This can + * either be the filename of a TIFF image or a {@link PelDataWindow} + * object. + * + * Use {@link setIfd()} to explicitly set the IFD. + */ + function __construct($data = false) { + if ($data === false) + return; + + if (is_string($data)) { + Pel::debug('Initializing PelTiff object from %s', $data); + $this->loadFile($data); + } elseif ($data instanceof PelDataWindow) { + Pel::debug('Initializing PelTiff object from PelDataWindow.'); + $this->load($data); + } else { + throw new PelInvalidArgumentException('Bad type for $data: %s', + gettype($data)); + } + } + + + /** + * Load TIFF data. + * + * The data given will be parsed and an internal tree representation + * will be built. If the data cannot be parsed correctly, a {@link + * PelInvalidDataException} is thrown, explaining the problem. + * + * @param PelDataWindow the data from which the object will be + * constructed. This should be valid TIFF data, coming either + * directly from a TIFF image or from the Exif data in a JPEG image. + */ + function load(PelDataWindow $d) { + Pel::debug('Parsing %d bytes of TIFF data...', $d->getSize()); + + /* There must be at least 8 bytes available: 2 bytes for the byte + * order, 2 bytes for the TIFF header, and 4 bytes for the offset + * to the first IFD. */ + if ($d->getSize() < 8) + throw new PelInvalidDataException('Expected at least 8 bytes of TIFF ' . + 'data, found just %d bytes.', + $d->getSize()); + + /* Byte order */ + if ($d->strcmp(0, 'II')) { + Pel::debug('Found Intel byte order'); + $d->setByteOrder(PelConvert::LITTLE_ENDIAN); + } elseif ($d->strcmp(0, 'MM')) { + Pel::debug('Found Motorola byte order'); + $d->setByteOrder(PelConvert::BIG_ENDIAN); + } else { + throw new PelInvalidDataException('Unknown byte order found in TIFF ' . + 'data: 0x%2X%2X', + $d->getByte(0), $d->getByte(1)); + } + + /* Verify the TIFF header */ + if ($d->getShort(2) != self::TIFF_HEADER) + throw new PelInvalidDataException('Missing TIFF magic value.'); + + /* IFD 0 offset */ + $offset = $d->getLong(4); + Pel::debug('First IFD at offset %d.', $offset); + + if ($offset > 0) { + /* Parse the first IFD, this will automatically parse the + * following IFDs and any sub IFDs. */ + $this->ifd = new PelIfd(PelIfd::IFD0); + $this->ifd->load($d, $offset); + } + } + + + /** + * Load data from a file into a TIFF object. + * + * @param string the filename. This must be a readable file. + */ + function loadFile($filename) { + $this->load(new PelDataWindow(file_get_contents($filename))); + } + + + /** + * Set the first IFD. + * + * @param PelIfd the new first IFD, which must be of type {@link + * PelIfd::IFD0}. + */ + function setIfd(PelIfd $ifd) { + if ($ifd->getType() != PelIfd::IFD0) + throw new PelInvalidDataException('Invalid type of IFD: %d, expected %d.', + $ifd->getType(), PelIfd::IFD0); + + $this->ifd = $ifd; + } + + + /** + * Return the first IFD. + * + * @return PelIfd the first IFD contained in the TIFF data, if any. + * If there is no IFD null will be returned. + */ + function getIfd() { + return $this->ifd; + } + + + /** + * Turn this object into bytes. + * + * TIFF images can have {@link PelConvert::LITTLE_ENDIAN + * little-endian} or {@link PelConvert::BIG_ENDIAN big-endian} byte + * order, and so this method takes an argument specifying that. + * + * @param PelByteOrder the desired byte order of the TIFF data. + * This should be one of {@link PelConvert::LITTLE_ENDIAN} or {@link + * PelConvert::BIG_ENDIAN}. + * + * @return string the bytes representing this object. + */ + function getBytes($order = PelConvert::LITTLE_ENDIAN) { + if ($order == PelConvert::LITTLE_ENDIAN) + $bytes = 'II'; + else + $bytes = 'MM'; + + /* TIFF magic number --- fixed value. */ + $bytes .= PelConvert::shortToBytes(self::TIFF_HEADER, $order); + + if ($this->ifd != null) { + /* IFD 0 offset. We will always start IDF 0 at an offset of 8 + * bytes (2 bytes for byte order, another 2 bytes for the TIFF + * header, and 4 bytes for the IFD 0 offset make 8 bytes + * together). + */ + $bytes .= PelConvert::longToBytes(8, $order); + + /* The argument specifies the offset of this IFD. The IFD will + * use this to calculate offsets from the entries to their data, + * all those offsets are absolute offsets counted from the + * beginning of the data. */ + $bytes .= $this->ifd->getBytes(8, $order); + } else { + $bytes .= PelConvert::longToBytes(0, $order); + } + + return $bytes; + } + + + /** + * Return a string representation of this object. + * + * @return string a string describing this object. This is mostly useful + * for debugging. + */ + function __toString() { + $str = Pel::fmt("Dumping TIFF data...\n"); + if ($this->ifd != null) + $str .= $this->ifd->__toString(); + + return $str; + } + + + /** + * Check if data is valid TIFF data. + * + * This will read just enough data from the data window to determine + * if the data could be a valid TIFF data. This means that the + * check is more like a heuristic than a rigorous check. + * + * @param PelDataWindow the bytes that will be examined. + * + * @return boolean true if the data looks like valid TIFF data, + * false otherwise. + * + * @see PelJpeg::isValid() + */ + static function isValid(PelDataWindow $d) { + /* First check that we have enough data. */ + if ($d->getSize() < 8) + return false; + + /* Byte order */ + if ($d->strcmp(0, 'II')) { + $d->setByteOrder(PelConvert::LITTLE_ENDIAN); + } elseif ($d->strcmp(0, 'MM')) { + Pel::debug('Found Motorola byte order'); + $d->setByteOrder(PelConvert::BIG_ENDIAN); + } else { + return false; + } + + /* Verify the TIFF header */ + return $d->getShort(2) == self::TIFF_HEADER; + } + +} \ No newline at end of file From e843a28b001fb53e1e2779fcd6bcd570486cb337 Mon Sep 17 00:00:00 2001 From: John Bowles Date: Thu, 2 Sep 2010 04:43:54 +0800 Subject: [PATCH 38/55] Embed_videos: Add Vimeo support. --- .../controllers/embedded_videos.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/embed_videos/controllers/embedded_videos.php b/modules/embed_videos/controllers/embedded_videos.php index 205377fe..e125cde5 100644 --- a/modules/embed_videos/controllers/embedded_videos.php +++ b/modules/embed_videos/controllers/embedded_videos.php @@ -29,6 +29,7 @@ class Embedded_videos_Controller extends Controller { // Yes, this is a mess. $youtubeUrlPattern="youtube"; $youtubeThumbnailUrl="http://img.youtube.com/vi/"; + $vimeoUrlPattern="vimeo.com"; // End mess batch::start(); @@ -71,6 +72,27 @@ class Embedded_videos_Controller extends Controller { } } } + } else if(preg_match("/$vimeoUrlPattern/",$url)) { + if(preg_match("/$vimeoUrlPattern\/(.*)/",$url,$matches)) { + $video_id = $matches[1]; + if ($video_id) { + $sxml = simplexml_load_file("http://vimeo.com/api/v2/video/$video_id.xml"); + if ($sxml) { + $valid_url = true; + if ($title == '') { + $title = (string)$sxml->video->title; + } + if ($description == '') { + $description = strip_tags((string)$sxml->video->description); + } + $embedded_video->source = "Vimeo"; + $content = file_get_contents((string)$sxml->video->thumbnail_large); + $itemname = "vimeo_" . $video_id . ".jpg"; + $temp_filename = VARPATH . "tmp/$itemname"; + $embedded_video->embed_code = ''; + } + } + } } //$item->validate(); //$content = file_get_contents("http://img.youtube.com/vi/" . $form->add_embedded_video->inputs['name']->value . "/0.jpg"); From 2ae81ee0e55fd371f18c85024df71f12712b36a9 Mon Sep 17 00:00:00 2001 From: John Bowles Date: Thu, 2 Sep 2010 04:47:05 +0800 Subject: [PATCH 39/55] Embed_video: Fix code formatting --- .../controllers/embedded_videos.php | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/embed_videos/controllers/embedded_videos.php b/modules/embed_videos/controllers/embedded_videos.php index e125cde5..28646d8c 100644 --- a/modules/embed_videos/controllers/embedded_videos.php +++ b/modules/embed_videos/controllers/embedded_videos.php @@ -31,7 +31,7 @@ class Embedded_videos_Controller extends Controller { $youtubeThumbnailUrl="http://img.youtube.com/vi/"; $vimeoUrlPattern="vimeo.com"; // End mess - + batch::start(); try { $valid = $form->validate(); @@ -74,24 +74,24 @@ class Embedded_videos_Controller extends Controller { } } else if(preg_match("/$vimeoUrlPattern/",$url)) { if(preg_match("/$vimeoUrlPattern\/(.*)/",$url,$matches)) { - $video_id = $matches[1]; - if ($video_id) { - $sxml = simplexml_load_file("http://vimeo.com/api/v2/video/$video_id.xml"); - if ($sxml) { - $valid_url = true; - if ($title == '') { - $title = (string)$sxml->video->title; - } - if ($description == '') { - $description = strip_tags((string)$sxml->video->description); - } - $embedded_video->source = "Vimeo"; - $content = file_get_contents((string)$sxml->video->thumbnail_large); - $itemname = "vimeo_" . $video_id . ".jpg"; - $temp_filename = VARPATH . "tmp/$itemname"; - $embedded_video->embed_code = ''; - } - } + $video_id = $matches[1]; + if ($video_id) { + $sxml = simplexml_load_file("http://vimeo.com/api/v2/video/$video_id.xml"); + if ($sxml) { + $valid_url = true; + if ($title == '') { + $title = (string)$sxml->video->title; + } + if ($description == '') { + $description = strip_tags((string)$sxml->video->description); + } + $embedded_video->source = "Vimeo"; + $content = file_get_contents((string)$sxml->video->thumbnail_large); + $itemname = "vimeo_" . $video_id . ".jpg"; + $temp_filename = VARPATH . "tmp/$itemname"; + $embedded_video->embed_code = ''; + } + } } } //$item->validate(); From 50975a2b83dcaefc8a4df46155639a7b047d3a6b Mon Sep 17 00:00:00 2001 From: John Bowles Date: Thu, 2 Sep 2010 05:05:02 +0800 Subject: [PATCH 40/55] Embed_videos: (Slightly) Smarter handling of video size --- modules/embed_videos/controllers/embedded_videos.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/embed_videos/controllers/embedded_videos.php b/modules/embed_videos/controllers/embedded_videos.php index 28646d8c..6c86e3a0 100644 --- a/modules/embed_videos/controllers/embedded_videos.php +++ b/modules/embed_videos/controllers/embedded_videos.php @@ -25,6 +25,10 @@ class Embedded_videos_Controller extends Controller { access::verify_csrf(); $form = embed_videos::get_add_form($album); $temp_filename = ""; + + // TODO: Add admin page options for these. + $maxwidth = 650; + $maxheight = 480; // Yes, this is a mess. $youtubeUrlPattern="youtube"; @@ -54,7 +58,7 @@ class Embedded_videos_Controller extends Controller { } if ($video_id) { $video_id = $matches[1]; - $embedded_video->embed_code = ''; + $embedded_video->embed_code = ''; $embedded_video->source = "YouTube"; $content = file_get_contents("http://img.youtube.com/vi/" . $video_id . "/0.jpg"); $itemname = "youtube_" . $video_id . ".jpg"; @@ -78,7 +82,6 @@ class Embedded_videos_Controller extends Controller { if ($video_id) { $sxml = simplexml_load_file("http://vimeo.com/api/v2/video/$video_id.xml"); if ($sxml) { - $valid_url = true; if ($title == '') { $title = (string)$sxml->video->title; } @@ -89,7 +92,10 @@ class Embedded_videos_Controller extends Controller { $content = file_get_contents((string)$sxml->video->thumbnail_large); $itemname = "vimeo_" . $video_id . ".jpg"; $temp_filename = VARPATH . "tmp/$itemname"; - $embedded_video->embed_code = ''; + $width = min((int)$sxml->video->width, $maxwidth); + $height = min((int)$sxml->video->height, $maxheight); + $embedded_video->embed_code = ''; + $valid_url = true; } } } From b29606f84007a84ed9dc583d733b9480ab2de9e3 Mon Sep 17 00:00:00 2001 From: hukoeth Date: Mon, 30 Aug 2010 18:39:06 +0800 Subject: [PATCH 41/55] - Fixed incorrect redirect when installed not in webroot and mod_rewrite is enabled - Hopefully fixed video page bug - Fixed re-activation bug --- .../controllers/photoannotation.php | 9 ++++--- .../helpers/photoannotation_event.php | 2 -- .../helpers/photoannotation_installer.php | 18 +------------ .../helpers/photoannotation_theme.php | 14 +++++----- modules/photoannotation/js/jquery.annotate.js | 27 +++++++++---------- .../photoannotation_highlight_block.html.php | 3 +-- 6 files changed, 29 insertions(+), 44 deletions(-) diff --git a/modules/photoannotation/controllers/photoannotation.php b/modules/photoannotation/controllers/photoannotation.php index ea697be4..e76e6884 100644 --- a/modules/photoannotation/controllers/photoannotation.php +++ b/modules/photoannotation/controllers/photoannotation.php @@ -23,6 +23,7 @@ class photoannotation_Controller extends Controller { access::verify_csrf(); //Get form data + $item = ORM::factory("item", $item_data); $noteid = $_POST["noteid"]; $notetype = $_POST["notetype"]; $str_y1 = $_POST["top"]; @@ -32,7 +33,8 @@ class photoannotation_Controller extends Controller { $str_face_title = $_POST["text"]; $tag_data = $_POST["tagsList"]; $str_face_description = $_POST["desc"]; - $redir_uri = $_POST["currenturl"]; + $redir_uri = url::abs_site("{$item->type}s/{$item->id}"); + // Decide if we are saving a face or a note. if ($noteid == "new") { @@ -133,14 +135,15 @@ class photoannotation_Controller extends Controller { return; } - public function delete() { + public function delete($item_data) { // Prevent Cross Site Request Forgery access::verify_csrf(); //Get form data + $item = ORM::factory("item", $item_data); $noteid = $_POST["noteid"]; $notetype = $_POST["notetype"]; - $redir_uri = $_POST["currenturl"]; + $redir_uri = url::abs_site("{$item->type}s/{$item->id}"); if ($noteid == "" || $notetype == "") { message::error(t("Please select a tag or note to delete.")); diff --git a/modules/photoannotation/helpers/photoannotation_event.php b/modules/photoannotation/helpers/photoannotation_event.php index 2a40e8ae..4a973eb1 100644 --- a/modules/photoannotation/helpers/photoannotation_event.php +++ b/modules/photoannotation/helpers/photoannotation_event.php @@ -46,9 +46,7 @@ class photoannotation_event_Core { if (!$theme->item()) { return; } - $item = $theme->item(); - if ($item->is_photo()) { if ((access::can("view", $item)) && (access::can("edit", $item))) { $menu->get("options_menu") diff --git a/modules/photoannotation/helpers/photoannotation_installer.php b/modules/photoannotation/helpers/photoannotation_installer.php index 0f84aad8..625c15f9 100644 --- a/modules/photoannotation/helpers/photoannotation_installer.php +++ b/modules/photoannotation/helpers/photoannotation_installer.php @@ -51,23 +51,7 @@ class photoannotation_installer { static function upgrade($version) { $db = Database::instance(); - if ($version == 1) { - $db->query("ALTER TABLE {items_faces} ADD `description` varchar(2048) default NULL"); - - $db->query("CREATE TABLE IF NOT EXISTS {items_notes} ( - `id` int(9) NOT NULL auto_increment, - `item_id` int(9) NOT NULL, - `x1` int(9) NOT NULL, - `y1` int(9) NOT NULL, - `x2` int(9) NOT NULL, - `y2` int(9) NOT NULL, - `title` varchar(64) NOT NULL, - `description` varchar(2048) default NULL, - PRIMARY KEY (`id`)) - DEFAULT CHARSET=utf8;"); - - module::set_version("photoannotation", $version = 1); - } + module::set_version("photoannotation", $version); } static function deactivate() { diff --git a/modules/photoannotation/helpers/photoannotation_theme.php b/modules/photoannotation/helpers/photoannotation_theme.php index e1374aa9..375298cf 100644 --- a/modules/photoannotation/helpers/photoannotation_theme.php +++ b/modules/photoannotation/helpers/photoannotation_theme.php @@ -19,14 +19,16 @@ */ class photoannotation_theme_Core { static function head($theme) { - // If it does, add an image map to the page to display them. - $theme->css("photoannotation.css"); - $theme->script("jquery.annotate.js"); - //Return ""; + if ($theme->page_subtype == "photo") { + $theme->css("photoannotation.css"); + $theme->script("jquery.annotate.js"); + //Return ""; + } } static function photo_bottom($theme) { - // If it does, add an image map to the page to display them. - return new View("photoannotation_highlight_block.html"); + if ($theme->page_subtype == "photo") { + return new View("photoannotation_highlight_block.html"); + } } } diff --git a/modules/photoannotation/js/jquery.annotate.js b/modules/photoannotation/js/jquery.annotate.js index 30e8f8ae..7a7482b4 100644 --- a/modules/photoannotation/js/jquery.annotate.js +++ b/modules/photoannotation/js/jquery.annotate.js @@ -16,7 +16,6 @@ this.getUrl = opts.getUrl; this.saveUrl = opts.saveUrl; this.deleteUrl = opts.deleteUrl; - this.currentUrl = opts.currentUrl; this.deleteUrl = opts.deleteUrl; this.editable = opts.editable; this.useAjax = opts.useAjax; @@ -60,14 +59,14 @@ if (this.useAjax) { $.fn.annotateImage.ajaxLoad(this); } else { - $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.currentUrl, this.tags, this.saveUrl, this.cssaclass); + $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.tags, this.saveUrl, this.cssaclass); } // Add the "Add a note" button if ($('#g-photoannotation-link').length != 0) { this.button = $('#g-photoannotation-link'); this.button.click(function() { - $.fn.annotateImage.add(image, opts.tags, opts.labels, opts.saveUrl, opts.currentUrl, opts.csrf); + $.fn.annotateImage.add(image, opts.tags, opts.labels, opts.saveUrl, opts.csrf); }); //this.canvas.after(this.button); } @@ -112,13 +111,13 @@ }); }; - $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, currentUrl, tags, saveUrl, cssaclass) { + $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, tags, saveUrl, cssaclass) { /// /// Loads the annotations from the notes property passed in on the /// options object. /// for (var i = 0; i < image.notes.length; i++) { - image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], tags, labels, editable, csrf, deleteUrl, currentUrl, saveUrl, cssaclass); + image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], tags, labels, editable, csrf, deleteUrl, saveUrl, cssaclass); } }; @@ -131,7 +130,7 @@ return now.getTime(); }; - $.fn.annotateImage.add = function(image, tags, labels, saveUrl, currentUrl, csrf) { + $.fn.annotateImage.add = function(image, tags, labels, saveUrl, csrf) { /// /// Adds a note to the image. /// @@ -139,7 +138,7 @@ image.mode = 'edit'; // Create/prepare the editable note elements - var editable = new $.fn.annotateEdit(image, null, tags, labels, saveUrl, currentUrl, csrf); + var editable = new $.fn.annotateEdit(image, null, tags, labels, saveUrl, csrf); $.fn.annotateImage.createSaveButton(editable, image); $.fn.annotateImage.createCancelButton(editable, image); @@ -195,7 +194,7 @@ return '<input type="hidden" name="' + name + '" value="' + value + '" />
    '; }; - $.fn.annotateEdit = function(image, note, tags, labels, saveUrl, currentUrl, csrf) { + $.fn.annotateEdit = function(image, note, tags, labels, saveUrl, csrf) { /// /// Defines an editable annotation area. /// @@ -252,7 +251,7 @@ if (this.note.notetype == "note") { notetitle = this.note.text; } - var form = $('
    ' + tagdropdown + labels[1] + '' + labels[2] + '
    '); + var form = $('
    ' + tagdropdown + labels[1] + '' + labels[2] + '
    '); this.form = form; $('body').append(this.form); @@ -297,7 +296,7 @@ this.form.remove(); } - $.fn.annotateView = function(image, note, tags, labels, editable, csrf, deleteUrl, currentUrl, saveUrl, cssaclass) { + $.fn.annotateView = function(image, note, tags, labels, editable, csrf, deleteUrl, saveUrl, cssaclass) { /// /// Defines a annotation area. /// @@ -310,7 +309,7 @@ image.canvas.children('.image-annotate-view').prepend(this.area); if (editable) { - this.delarea = $('
    '); + this.delarea = $('
    '); this.editarea = $('
    '); image.canvas.children('.image-annotate-view').prepend(this.delarea); image.canvas.children('.image-annotate-view').prepend(this.editarea); @@ -330,7 +329,7 @@ alink.unbind(); alink.attr ('href', '#'); alink.removeAttr ('rel'); - form.edit(tags, labels, saveUrl, currentUrl, csrf); + form.edit(tags, labels, saveUrl, csrf); }) this.delarea.hide(); this.editarea.hide(); @@ -445,7 +444,7 @@ this.form.remove(); } - $.fn.annotateView.prototype.edit = function(tags, labels, saveUrl, currentUrl, csrf) { + $.fn.annotateView.prototype.edit = function(tags, labels, saveUrl, csrf) { /// /// Edits the annotation. /// @@ -454,7 +453,7 @@ var annotation = this; // Create/prepare the editable note elements - var editable = new $.fn.annotateEdit(this.image, this.note, tags, labels, saveUrl, currentUrl, csrf); + var editable = new $.fn.annotateEdit(this.image, this.note, tags, labels, saveUrl, csrf); $.fn.annotateImage.createSaveButton(editable, this.image, annotation); $.fn.annotateImage.createCancelButton(editable, this.image); } diff --git a/modules/photoannotation/views/photoannotation_highlight_block.html.php b/modules/photoannotation/views/photoannotation_highlight_block.html.php index efde70c9..b9ca6ada 100644 --- a/modules/photoannotation/views/photoannotation_highlight_block.html.php +++ b/modules/photoannotation/views/photoannotation_highlight_block.html.php @@ -94,8 +94,7 @@ editable: false, saveUrl: 'id) ?>', - deleteUrl: '', - currentUrl: '', + deleteUrl: 'id) ?>', From 53872ea129dd830e65c2e5e300670ccf1058ada5 Mon Sep 17 00:00:00 2001 From: hukoeth Date: Tue, 31 Aug 2010 23:12:25 +0800 Subject: [PATCH 42/55] - Version 2 - Implemented tag handling (tags can now be added while creating the face) - When entering a tag the notes field is cleared and vice versa to avoid confusion - Cancel confirmation dialog now uses jquery dialog - Added helpers/photoannotation.php by tkott for XMP compatibility - Fixed RTL positioning - Fixed bug deleting annotations with the same tag - Fixed annotation form positioning --- .../controllers/photoannotation.php | 18 ++- .../photoannotation/css/photoannotation.css | 11 +- .../helpers/photoannotation.php | 91 ++++++++++++ .../helpers/photoannotation_installer.php | 7 +- .../helpers/photoannotation_theme.php | 1 - modules/photoannotation/js/jquery.annotate.js | 136 +++++++++++------- modules/photoannotation/module.info | 2 +- .../photoannotation_highlight_block.html.php | 25 ++-- 8 files changed, 214 insertions(+), 77 deletions(-) create mode 100644 modules/photoannotation/helpers/photoannotation.php diff --git a/modules/photoannotation/controllers/photoannotation.php b/modules/photoannotation/controllers/photoannotation.php index e76e6884..be4b97ea 100644 --- a/modules/photoannotation/controllers/photoannotation.php +++ b/modules/photoannotation/controllers/photoannotation.php @@ -35,6 +35,23 @@ class photoannotation_Controller extends Controller { $str_face_description = $_POST["desc"]; $redir_uri = url::abs_site("{$item->type}s/{$item->id}"); + //Add tag to item, create tag if not exists + if ($tag_data != "") { + $tag = ORM::factory("tag")->where("name", "=", $tag_data)->find(); + if (!$tag->loaded()) { + $tag->name = $tag_data; + $tag->count = 0; + } + + $tag->add($item); + $tag->count++; + $tag->save(); + $tag_data = $tag->id; + } else { + $tag_data = -1; + } + + // Decide if we are saving a face or a note. if ($noteid == "new") { @@ -150,7 +167,6 @@ class photoannotation_Controller extends Controller { url::redirect($redir_uri); return; } - if ($notetype == "face") { db::build()->delete("items_faces")->where("id", "=", $noteid)->execute(); message::success(t("Annotation deleted.")); diff --git a/modules/photoannotation/css/photoannotation.css b/modules/photoannotation/css/photoannotation.css index e578e0d9..adc14bef 100644 --- a/modules/photoannotation/css/photoannotation.css +++ b/modules/photoannotation/css/photoannotation.css @@ -40,15 +40,19 @@ } .image-annotate-edit { display: none; + direction: ltr !important; } #image-annotate-edit-form { background: #FFFFFF none repeat scroll 0 0; border: 1px solid #000000; - height: 220px; + height: 230px; padding: 7px; position: absolute; width: 250px; } +.image-annotate-rtl form { + text-align: right !important; +} #image-annotate-edit-form form { clear: right; margin: 0 !important; @@ -68,6 +72,7 @@ font-family: Verdana, Sans-Serif; font-size: 12px; width: 248px; + resize: none; } #image-annotate-edit-form fieldset { background: transparent none repeat scroll 0 0; @@ -84,6 +89,10 @@ float: left; margin: 3px 6px 3px 0; } +.image-annotate-rtl a { + float: right !important; + margin: 3px 0 3px 6px !important; +} .image-annotate-edit-area { border: 1px solid black; cursor: move; diff --git a/modules/photoannotation/helpers/photoannotation.php b/modules/photoannotation/helpers/photoannotation.php new file mode 100644 index 00000000..24b26404 --- /dev/null +++ b/modules/photoannotation/helpers/photoannotation.php @@ -0,0 +1,91 @@ +item_id = $item->id; + $newnote->x1 = $x1; + $newnote->y1 = $y1; + $newnote->x2 = $x2; + $newnote->y2 = $y2; + $newnote->title = $tag_title; + $newnote->description = $description; + $newnote->save(); + } catch (Exception $e) { + Kohana_Log::add("error", "Error adding note annotation.\n" . + $e->getMessage() . "\n" . $e->getTraceAsString()); + } + } elseif ( $bTag && !empty($tag_title) ) { + try { + //we are adding a tag + //first find the tag + $tag = ORM::factory("tag")->where("name", "=", $tag_title)->find(); + //tag was not found + if (!$tag->loaded()) { + $tag->name = $tag_title; + $tag->count = 0; + } + + $tag->add($item); + $tag->count++; + $tag->save(); + //check if the tag is attached to the item + // if the tag isn't attached, attach it + //check if the face is already tagged + $existingFace = ORM::factory("items_face") + ->where("tag_id", "=", $tag->id) + ->where("item_id", "=", $item->id) + ->find_all(); + + if (count($existingFace) == 0) { + // Save the new face to the database. + $newface = ORM::factory("items_face"); + $newface->tag_id = $tag->id; + $newface->item_id = $item->id; + $newface->x1 = $x1; + $newface->y1 = $y1; + $newface->x2 = $x2; + $newface->y2 = $y2; + $newface->description = $description; + $newface->save(); + } else { + // Update the coordinates of an existing face. + $updatedFace = ORM::factory("items_face", $existingFace[0]->id); + $updatedFace->x1 = $x1; + $updatedFace->y1 = $y1; + $updatedFace->x2 = $x2; + $updatedFace->y2 = $y2; + $updatedFace->description = $description; + $updatedFace->save(); + } + } catch (Exception $e) { + Kohana_Log::add("error", "Error adding note annotation.\n" . + $e->getMessage() . "\n" . $e->getTraceAsString()); + } + } else { + throw new exception("@todo MISSING_TAG_OR_DESCRIPTION"); + } + } +} +?> + diff --git a/modules/photoannotation/helpers/photoannotation_installer.php b/modules/photoannotation/helpers/photoannotation_installer.php index 625c15f9..a00a74db 100644 --- a/modules/photoannotation/helpers/photoannotation_installer.php +++ b/modules/photoannotation/helpers/photoannotation_installer.php @@ -46,12 +46,13 @@ class photoannotation_installer { DEFAULT CHARSET=utf8;"); // Set the module's version number. - module::set_version("photoannotation", 1); + module::set_version("photoannotation", 2); } static function upgrade($version) { - $db = Database::instance(); - module::set_version("photoannotation", $version); + if ($version == 1) { + module::set_version("photoannotation", $version = 2); + } } static function deactivate() { diff --git a/modules/photoannotation/helpers/photoannotation_theme.php b/modules/photoannotation/helpers/photoannotation_theme.php index 375298cf..a2fbacd5 100644 --- a/modules/photoannotation/helpers/photoannotation_theme.php +++ b/modules/photoannotation/helpers/photoannotation_theme.php @@ -22,7 +22,6 @@ class photoannotation_theme_Core { if ($theme->page_subtype == "photo") { $theme->css("photoannotation.css"); $theme->script("jquery.annotate.js"); - //Return ""; } } diff --git a/modules/photoannotation/js/jquery.annotate.js b/modules/photoannotation/js/jquery.annotate.js index 7a7482b4..eb8d8fd3 100644 --- a/modules/photoannotation/js/jquery.annotate.js +++ b/modules/photoannotation/js/jquery.annotate.js @@ -24,6 +24,7 @@ this.labels = opts.labels; this.csrf = opts.csrf; this.cssaclass = opts.cssaclass; + this.rtlsupport = opts.rtlsupport; // Add the canvas this.canvas = $('
    '); @@ -59,14 +60,14 @@ if (this.useAjax) { $.fn.annotateImage.ajaxLoad(this); } else { - $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.tags, this.saveUrl, this.cssaclass); + $.fn.annotateImage.load(this, this.labels, this.editable, this.csrf, this.deleteUrl, this.tags, this.saveUrl, this.cssaclass, this.rtlsupport); } // Add the "Add a note" button if ($('#g-photoannotation-link').length != 0) { this.button = $('#g-photoannotation-link'); this.button.click(function() { - $.fn.annotateImage.add(image, opts.tags, opts.labels, opts.saveUrl, opts.csrf); + $.fn.annotateImage.add(image, opts.tags, opts.labels, opts.saveUrl, opts.csrf, opts.rtlsupport); }); //this.canvas.after(this.button); } @@ -111,13 +112,13 @@ }); }; - $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, tags, saveUrl, cssaclass) { + $.fn.annotateImage.load = function(image, labels, editable, csrf, deleteUrl, tags, saveUrl, cssaclass, rtlsupport) { /// /// Loads the annotations from the notes property passed in on the /// options object. /// for (var i = 0; i < image.notes.length; i++) { - image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], tags, labels, editable, csrf, deleteUrl, saveUrl, cssaclass); + image.notes[image.notes[i]] = new $.fn.annotateView(image, image.notes[i], tags, labels, editable, csrf, deleteUrl, saveUrl, cssaclass, rtlsupport); } }; @@ -130,7 +131,7 @@ return now.getTime(); }; - $.fn.annotateImage.add = function(image, tags, labels, saveUrl, csrf) { + $.fn.annotateImage.add = function(image, tags, labels, saveUrl, csrf, rtlsupport) { /// /// Adds a note to the image. /// @@ -138,18 +139,18 @@ image.mode = 'edit'; // Create/prepare the editable note elements - var editable = new $.fn.annotateEdit(image, null, tags, labels, saveUrl, csrf); + var editable = new $.fn.annotateEdit(image, null, tags, labels, saveUrl, csrf, rtlsupport); - $.fn.annotateImage.createSaveButton(editable, image); - $.fn.annotateImage.createCancelButton(editable, image); + $.fn.annotateImage.createSaveButton(editable, image, null, rtlsupport); + $.fn.annotateImage.createCancelButton(editable, image, rtlsupport); } }; - $.fn.annotateImage.createSaveButton = function(editable, image, note) { + $.fn.annotateImage.createSaveButton = function(editable, image, note, rtlsupport) { /// /// Creates a Save button on the editable note. /// - var ok = $('OK'); + var ok = $('OK'); ok.click(function() { var form = $('#image-annotate-edit-form form'); @@ -164,11 +165,11 @@ editable.form.append(ok); }; - $.fn.annotateImage.createCancelButton = function(editable, image) { + $.fn.annotateImage.createCancelButton = function(editable, image, rtlsupport) { /// /// Creates a Cancel button on the editable note. /// - var cancel = $('Cancel'); + var cancel = $('Cancel'); cancel.click(function() { editable.destroy(); image.mode = 'view'; @@ -194,7 +195,7 @@ return '<input type="hidden" name="' + name + '" value="' + value + '" />
    '; }; - $.fn.annotateEdit = function(image, note, tags, labels, saveUrl, csrf) { + $.fn.annotateEdit = function(image, note, tags, labels, saveUrl, csrf, rtlsupport) { /// /// Defines an editable annotation area. /// @@ -229,32 +230,44 @@ // Add the note (which we'll load with the form afterwards) var selectedtag = ""; - if (this.note.text == "" || this.note.notetype == "note") - { - selectedtag = " selected=\"selected\""; - } - var tagdropdown = labels[0] + ''; var notetitle = ""; - if (this.note.notetype == "note") { + if (this.note.notetype == "face") { + selectedtag = this.note.text; + } else { notetitle = this.note.text; } - var form = $('
    ' + tagdropdown + labels[1] + '' + labels[2] + '
    '); + var form = $('
    ' + labels[0] + '' + '' + labels[4] + '
    ' + labels[1] + '' + labels[2] + '
    '); this.form = form; $('body').append(this.form); + + $("#photoannotation-form").ready(function() { + var url = tags; + $("input#image-annotate-tag-text").autocomplete( + url, { + max: 30, + multiple: false, + cacheLength: 1 + } + ); + }); + + $("input#image-annotate-tag-text").keyup(function() { + if ($("input#image-annotate-tag-text").val() != "") { + $("textarea#image-annotate-text").html(""); + $("textarea#image-annotate-text").val(""); + $("textarea#image-annotate-text").text(""); + } + }); + + $("textarea#image-annotate-text").keyup(function() { + if ($("textarea#image-annotate-text").val() != "") { + $("input#image-annotate-tag-text").html(""); + $("input#image-annotate-tag-text").val(""); + $("input#image-annotate-tag-text").text(""); + } + }); + this.form.css('left', this.area.offset().left + 'px'); this.form.css('top', (parseInt(this.area.offset().top) + parseInt(this.area.height()) + 7) + 'px'); @@ -265,18 +278,18 @@ stop: function(e, ui) { form.css('left', area.offset().left + 'px'); - form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 7) + 'px'); } }) .draggable({ containment: image.canvas, drag: function(e, ui) { form.css('left', area.offset().left + 'px'); - form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 7) + 'px'); }, stop: function(e, ui) { form.css('left', area.offset().left + 'px'); - form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 2) + 'px'); + form.css('top', (parseInt(area.offset().top) + parseInt(area.height()) + 7) + 'px'); } }); return this; @@ -296,7 +309,7 @@ this.form.remove(); } - $.fn.annotateView = function(image, note, tags, labels, editable, csrf, deleteUrl, saveUrl, cssaclass) { + $.fn.annotateView = function(image, note, tags, labels, editable, csrf, deleteUrl, saveUrl, cssaclass, rtlsupport) { /// /// Defines a annotation area. /// @@ -309,19 +322,27 @@ image.canvas.children('.image-annotate-view').prepend(this.area); if (editable) { - this.delarea = $('
    '); + this.delarea = $('
    '); this.editarea = $('
    '); image.canvas.children('.image-annotate-view').prepend(this.delarea); image.canvas.children('.image-annotate-view').prepend(this.editarea); this.delarea.bind('click',function () { - if (confirm(labels[3])) { - var alink = $(cssaclass); - alink.unbind(); - alink.attr ('href', '#'); - alink.removeAttr ('rel'); - var delform = $(this).children('div').children('form'); - delform.submit(); - } + var alink = $(cssaclass); + alink.unbind(); + alink.attr ('href', '#'); + alink.removeAttr ('rel'); + var confdialog = '
    ' + labels[3] + '
    '; + $('body').append(confdialog); + var btns = {}; + btns[labels[6]] = function(){ location.reload(); }; + btns[labels[5]] = function(){ var delform = $(this).attr("rel"); $("form#" + delform).submit(); }; + $('#image-annotate-conf-dialog').dialog({ + modal: true, + resizable: false, + title: labels[7], + close: function(event, ui) { location.reload(); }, + buttons: btns + }); }) var form = this; this.editarea.bind('click',function () { @@ -329,7 +350,7 @@ alink.unbind(); alink.attr ('href', '#'); alink.removeAttr ('rel'); - form.edit(tags, labels, saveUrl, csrf); + form.edit(tags, labels, saveUrl, csrf, rtlsupport); }) this.delarea.hide(); this.editarea.hide(); @@ -346,7 +367,7 @@ this.form.children('span.actions').hide(); // Set the position and size of the note - this.setPosition(); + this.setPosition(rtlsupport); // Add the behavior: hide/display the note when hovering the area var annotation = this; @@ -392,7 +413,7 @@ } }; - $.fn.annotateView.prototype.setPosition = function() { + $.fn.annotateView.prototype.setPosition = function(rtlsupport) { /// /// Sets the position of an annotation. /// @@ -406,11 +427,16 @@ if (this.delarea != undefined) { this.delarea.children('div').height('14px'); this.delarea.children('div').width('14px'); - this.delarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); this.delarea.css('top', (this.note.top) + 'px'); this.editarea.children('div').height('14px'); this.editarea.children('div').width('14px'); - this.editarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); + if (rtlsupport == '') { + this.delarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); + this.editarea.css('left', (this.note.left + parseInt(this.note.width)) + 'px'); + } else { + this.delarea.css('left', (this.note.left - 16) + 'px'); + this.editarea.css('left', (this.note.left - 16) + 'px'); + } this.editarea.css('top', (this.note.top + 16) + 'px'); } }; @@ -444,7 +470,7 @@ this.form.remove(); } - $.fn.annotateView.prototype.edit = function(tags, labels, saveUrl, csrf) { + $.fn.annotateView.prototype.edit = function(tags, labels, saveUrl, csrf, rtlsupport) { /// /// Edits the annotation. /// @@ -453,9 +479,9 @@ var annotation = this; // Create/prepare the editable note elements - var editable = new $.fn.annotateEdit(this.image, this.note, tags, labels, saveUrl, csrf); - $.fn.annotateImage.createSaveButton(editable, this.image, annotation); - $.fn.annotateImage.createCancelButton(editable, this.image); + var editable = new $.fn.annotateEdit(this.image, this.note, tags, labels, saveUrl, csrf, rtlsupport); + $.fn.annotateImage.createSaveButton(editable, this.image, annotation, rtlsupport); + $.fn.annotateImage.createCancelButton(editable, this.image, rtlsupport); } }; diff --git a/modules/photoannotation/module.info b/modules/photoannotation/module.info index 8130b157..c0cd9421 100644 --- a/modules/photoannotation/module.info +++ b/modules/photoannotation/module.info @@ -1,3 +1,3 @@ name = "Photo Annotation" description = "Allows you to assign tags and notes to areas on your photos. Fully compatible with TagFaces module by rWatcher but you cannot run both modules at the same time." -version = 1 +version = 2 diff --git a/modules/photoannotation/views/photoannotation_highlight_block.html.php b/modules/photoannotation/views/photoannotation_highlight_block.html.php index b9ca6ada..618153d0 100644 --- a/modules/photoannotation/views/photoannotation_highlight_block.html.php +++ b/modules/photoannotation/views/photoannotation_highlight_block.html.php @@ -7,6 +7,11 @@ $existingNotes = ORM::factory("items_note") ->where("item_id", "=", $item->id) ->find_all(); + if (locales::is_rtl()) { + $rtl_support = "image-annotate-rtl"; + } else { + $rtl_support = ""; + } $tags_arraystring = ""; $jscode = ""; $legend_faces = ""; @@ -72,21 +77,10 @@ $legend_display = $legend_display ."
    ". $legend_notes; } } - $item_tags = ORM::factory("tag") - ->join("items_tags", "tags.id", "items_tags.tag_id") - ->where("items_tags.item_id", "=", $item->id) - ->find_all(); - $tags_arraystring = "tags: [ "; - foreach ($item_tags as $current_tag) { - $tags_arraystring .= "{'name':'". html::clean($current_tag->name) ."','id':'". $current_tag->id ."'},"; - } - $tags_arraystring = trim($tags_arraystring, ","); - $tags_arraystring .= " ],"; - $labels_arraystring = "labels: [ '". t("Tag:") ."','". t("Note Title:") ."','". t("Description (optional):") ."','". t("Are you sure you want to delete this annotation?") ."' ],"; + $labels_arraystring = "labels: [ '". t("Tag:") ."','". t("Note Title:") ."','". t("Description (optional):") ."','". t("Are you sure you want to delete this annotation?") ."','". t("or") ."','". t("Yes") ."','". t("No") ."','". t("Confirm deletion") ."' ],"; ?> - - +
    + +

    + " + alt="display_name()) ?>" + class="g-avatar g-left" width="40" height="40" /> + $user->display_name())) ?> +

    + +
    +

    title) ?>

    +
    + view ?> +
    +
    + +
    diff --git a/modules/photoannotation/views/user_profile_info.html.php b/modules/photoannotation/views/user_profile_info.html.php new file mode 100644 index 00000000..e559abda --- /dev/null +++ b/modules/photoannotation/views/user_profile_info.html.php @@ -0,0 +1,9 @@ + + + $value): ?> + + + + + +
    From de7433a3bbb378e090fe7f8f370a07ad57621d02 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Sat, 4 Sep 2010 07:45:00 +1200 Subject: [PATCH 46/55] fixed a problem with delete products and postage bands --- modules/basket/controllers/admin_postage_bands.php | 4 ---- modules/basket/controllers/admin_product_lines.php | 4 ---- 2 files changed, 8 deletions(-) diff --git a/modules/basket/controllers/admin_postage_bands.php b/modules/basket/controllers/admin_postage_bands.php index 535ad4ed..914d7537 100644 --- a/modules/basket/controllers/admin_postage_bands.php +++ b/modules/basket/controllers/admin_postage_bands.php @@ -76,10 +76,6 @@ class Admin_Postage_Bands_Controller extends Controller public function delete_postage_band($id) { access::verify_csrf(); - if ($id == user::active()->id || $id == user::guest()->id) { - access::forbidden(); - } - $postage = ORM::factory("postage_band", $id); if (!$postage->loaded()) { kohana::show_404(); diff --git a/modules/basket/controllers/admin_product_lines.php b/modules/basket/controllers/admin_product_lines.php index 6fd7054a..752f4e63 100644 --- a/modules/basket/controllers/admin_product_lines.php +++ b/modules/basket/controllers/admin_product_lines.php @@ -77,10 +77,6 @@ class Admin_Product_Lines_Controller extends Controller public function delete_product($id) { access::verify_csrf(); - if ($id == user::active()->id || $id == user::guest()->id) { - access::forbidden(); - } - $product = ORM::factory("product", $id); if (!$product->loaded()) { kohana::show_404(); From bfba13f19d0055491c2898ce6df53c1c86d6401a Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Fri, 3 Sep 2010 14:37:31 +0800 Subject: [PATCH 47/55] merge with latest Wind theme updates --- themes/browny_admin_wind/views/admin.html.php | 8 ++++--- themes/browny_wind/views/album.html.php | 2 ++ themes/browny_wind/views/page.html.php | 21 ++++++++++++------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/themes/browny_admin_wind/views/admin.html.php b/themes/browny_admin_wind/views/admin.html.php index f9ef18c7..c4b51f41 100644 --- a/themes/browny_admin_wind/views/admin.html.php +++ b/themes/browny_admin_wind/views/admin.html.php @@ -11,7 +11,7 @@ - " type="image/x-icon" /> + " type="image/x-icon" /> css("yui/reset-fonts-grids.css") ?> css("themeroller/ui.base.css") ?> @@ -77,9 +77,11 @@
    admin_page_bottom() ?> diff --git a/themes/browny_wind/views/album.html.php b/themes/browny_wind/views/album.html.php index de196be0..1a56af67 100644 --- a/themes/browny_wind/views/album.html.php +++ b/themes/browny_wind/views/album.html.php @@ -16,7 +16,9 @@
  • thumb_top($child) ?> + has_thumb()): ?> thumb_img(array("class" => "g-thumbnail")) ?> + thumb_bottom($child) ?> context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?> diff --git a/themes/browny_wind/views/page.html.php b/themes/browny_wind/views/page.html.php index 72df044a..45ad51a7 100644 --- a/themes/browny_wind/views/page.html.php +++ b/themes/browny_wind/views/page.html.php @@ -23,7 +23,7 @@ - " type="image/x-icon" /> + " type="image/x-icon" /> css("yui/reset-fonts-grids.css") ?> css("superfish/css/superfish.css") ?> css("themeroller/ui.base.css") ?> @@ -101,18 +101,23 @@ > - - url($parent->id == $theme->item()->parent_id ? "show={$theme->item()->id}" : null) ?>"> - title) ?> + + title, + module::get_var("gallery", "visible_title_length"))) ?>
  • -
  • ">item()->title) ?>
  • +
  • "> + item()->title, + module::get_var("gallery", "visible_title_length"))) ?> +
  • From d216ae83b7f97f9b47f1f816f125d10051ef3800 Mon Sep 17 00:00:00 2001 From: dmolavi Date: Sat, 4 Sep 2010 08:11:52 +0800 Subject: [PATCH 48/55] Updated module version to reflect added Exif update capability. Also update copyright year on one of my ecard files. --- modules/autorotate/module.info | 2 +- modules/ecard/helpers/ecard_block.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/autorotate/module.info b/modules/autorotate/module.info index 17c62229..42a108fb 100644 --- a/modules/autorotate/module.info +++ b/modules/autorotate/module.info @@ -1,3 +1,3 @@ name = "Autorotate" description = "Rotate an image automatically on upload based on EXIF data" -version = 1 \ No newline at end of file +version = 2 \ No newline at end of file diff --git a/modules/ecard/helpers/ecard_block.php b/modules/ecard/helpers/ecard_block.php index 23136d55..051c55c6 100644 --- a/modules/ecard/helpers/ecard_block.php +++ b/modules/ecard/helpers/ecard_block.php @@ -1,7 +1,7 @@ Date: Mon, 6 Sep 2010 18:22:40 -0700 Subject: [PATCH 49/55] Update identity API to match change in http://bit.ly/bVursD --- modules/ldap/libraries/drivers/IdentityProvider/Ldap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ldap/libraries/drivers/IdentityProvider/Ldap.php b/modules/ldap/libraries/drivers/IdentityProvider/Ldap.php index 8fc45758..9045b4dc 100644 --- a/modules/ldap/libraries/drivers/IdentityProvider/Ldap.php +++ b/modules/ldap/libraries/drivers/IdentityProvider/Ldap.php @@ -212,14 +212,14 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver { /** * @see IdentityProvider_Driver::add_user_to_group. */ - static function add_user_to_group($user, $group_id) { + static function add_user_to_group($user, $group) { throw new Exception("@todo INVALID OPERATION"); } /** * @see IdentityProvider_Driver::remove_user_to_group. */ - static function remove_user_from_group($user, $group_id) { + static function remove_user_from_group($user, $group) { throw new Exception("@todo INVALID OPERATION"); } } // End Identity Gallery Driver From 1019f6c86f09bb674ffd7024730fe58731ff48b5 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 6 Sep 2010 18:24:25 -0700 Subject: [PATCH 50/55] New User Albums module that creates a personal, editable album any time a new user is created. --- .../user_albums/helpers/user_albums_event.php | 53 +++++++++++++++++++ modules/user_albums/module.info | 3 ++ 2 files changed, 56 insertions(+) create mode 100644 modules/user_albums/helpers/user_albums_event.php create mode 100644 modules/user_albums/module.info diff --git a/modules/user_albums/helpers/user_albums_event.php b/modules/user_albums/helpers/user_albums_event.php new file mode 100644 index 00000000..d11e5ac5 --- /dev/null +++ b/modules/user_albums/helpers/user_albums_event.php @@ -0,0 +1,53 @@ +name}"; + $group = identity::lookup_group_by_name($group_name); + if (!$group) { + $group = identity::create_group($group_name); + identity::add_user_to_group($user, $group); + } + + // Create an album for the user, if it doesn't exist + $album = ORM::factory("item") + ->where("parent_id", "=", item::root()->id) + ->where("name", "=", $user->name) + ->find(); + if (!$album->loaded()) { + $album->type = "album"; + $album->name = $user->name; + $album->title = "{$user->name}'s album"; + $album->parent_id = item::root()->id; + $album->sort_column = "weight"; + $album->sort_order = "asc"; + $album->save(); + + access::allow($group, "view", item::root()); + access::allow($group, "view_full", $album); + access::allow($group, "edit", $album); + access::allow($group, "add", $album); + } + } +} diff --git a/modules/user_albums/module.info b/modules/user_albums/module.info new file mode 100644 index 00000000..8e685e8c --- /dev/null +++ b/modules/user_albums/module.info @@ -0,0 +1,3 @@ +name = "User Albums" +description = "Create a personal album for new users" +version = 1 From 44533159e5d10cc192c45eda1685d7ebf7b999e2 Mon Sep 17 00:00:00 2001 From: hukoeth Date: Sat, 4 Sep 2010 20:24:54 +0200 Subject: [PATCH 51/55] Version 3 beta 2: Added new options how to display the annotation areas, UI improvements, user profile now displays images of user, bugfixes --- .../controllers/admin_photoannotation.php | 40 +- .../controllers/photoannotation.php | 22 +- .../controllers/user_profile.php | 93 ---- modules/photoannotation/css/colorpicker.css | 161 ++++++ .../photoannotation/css/photoannotation.css | 6 - .../helpers/photoannotation_event.php | 45 ++ .../helpers/photoannotation_theme.php | 44 +- modules/photoannotation/images/blank.gif | Bin 0 -> 49 bytes .../images/colorpicker_background.png | Bin 0 -> 1897 bytes .../images/colorpicker_hex.png | Bin 0 -> 532 bytes .../images/colorpicker_hsb_b.png | Bin 0 -> 970 bytes .../images/colorpicker_hsb_h.png | Bin 0 -> 1012 bytes .../images/colorpicker_hsb_s.png | Bin 0 -> 1171 bytes .../images/colorpicker_indic.gif | Bin 0 -> 86 bytes .../images/colorpicker_overlay.png | Bin 0 -> 10355 bytes .../images/colorpicker_rgb_b.png | Bin 0 -> 970 bytes .../images/colorpicker_rgb_g.png | Bin 0 -> 1069 bytes .../images/colorpicker_rgb_r.png | Bin 0 -> 1066 bytes .../images/colorpicker_select.gif | Bin 0 -> 78 bytes .../images/colorpicker_submit.png | Bin 0 -> 1016 bytes .../images/custom_background.png | Bin 0 -> 1916 bytes modules/photoannotation/images/custom_hex.png | Bin 0 -> 562 bytes .../photoannotation/images/custom_hsb_b.png | Bin 0 -> 1097 bytes .../photoannotation/images/custom_hsb_h.png | Bin 0 -> 970 bytes .../photoannotation/images/custom_hsb_s.png | Bin 0 -> 1168 bytes .../photoannotation/images/custom_indic.gif | Bin 0 -> 86 bytes .../photoannotation/images/custom_rgb_b.png | Bin 0 -> 1008 bytes .../photoannotation/images/custom_rgb_g.png | Bin 0 -> 1069 bytes .../photoannotation/images/custom_rgb_r.png | Bin 0 -> 1018 bytes .../photoannotation/images/custom_submit.png | Bin 0 -> 997 bytes modules/photoannotation/images/select.png | Bin 0 -> 506 bytes modules/photoannotation/images/select2.png | Bin 0 -> 518 bytes modules/photoannotation/images/slider.png | Bin 0 -> 315 bytes modules/photoannotation/js/colorpicker.js | 484 ++++++++++++++++++ modules/photoannotation/js/jquery.annotate.js | 20 +- .../photoannotation/js/jquery.annotate.min.js | 2 - .../views/admin_photoannotation.html.php | 14 + .../photoannotation_highlight_block.html.php | 2 +- .../photoannotation_user_profile.html.php | 47 -- .../views/user_profile_info.html.php | 9 - 40 files changed, 813 insertions(+), 176 deletions(-) delete mode 100644 modules/photoannotation/controllers/user_profile.php create mode 100644 modules/photoannotation/css/colorpicker.css create mode 100644 modules/photoannotation/images/blank.gif create mode 100644 modules/photoannotation/images/colorpicker_background.png create mode 100644 modules/photoannotation/images/colorpicker_hex.png create mode 100644 modules/photoannotation/images/colorpicker_hsb_b.png create mode 100644 modules/photoannotation/images/colorpicker_hsb_h.png create mode 100644 modules/photoannotation/images/colorpicker_hsb_s.png create mode 100644 modules/photoannotation/images/colorpicker_indic.gif create mode 100644 modules/photoannotation/images/colorpicker_overlay.png create mode 100644 modules/photoannotation/images/colorpicker_rgb_b.png create mode 100644 modules/photoannotation/images/colorpicker_rgb_g.png create mode 100644 modules/photoannotation/images/colorpicker_rgb_r.png create mode 100644 modules/photoannotation/images/colorpicker_select.gif create mode 100644 modules/photoannotation/images/colorpicker_submit.png create mode 100644 modules/photoannotation/images/custom_background.png create mode 100644 modules/photoannotation/images/custom_hex.png create mode 100644 modules/photoannotation/images/custom_hsb_b.png create mode 100644 modules/photoannotation/images/custom_hsb_h.png create mode 100644 modules/photoannotation/images/custom_hsb_s.png create mode 100644 modules/photoannotation/images/custom_indic.gif create mode 100644 modules/photoannotation/images/custom_rgb_b.png create mode 100644 modules/photoannotation/images/custom_rgb_g.png create mode 100644 modules/photoannotation/images/custom_rgb_r.png create mode 100644 modules/photoannotation/images/custom_submit.png create mode 100644 modules/photoannotation/images/select.png create mode 100644 modules/photoannotation/images/select2.png create mode 100644 modules/photoannotation/images/slider.png create mode 100644 modules/photoannotation/js/colorpicker.js delete mode 100644 modules/photoannotation/js/jquery.annotate.min.js delete mode 100644 modules/photoannotation/views/photoannotation_user_profile.html.php delete mode 100644 modules/photoannotation/views/user_profile_info.html.php diff --git a/modules/photoannotation/controllers/admin_photoannotation.php b/modules/photoannotation/controllers/admin_photoannotation.php index e239e6b7..347c90de 100644 --- a/modules/photoannotation/controllers/admin_photoannotation.php +++ b/modules/photoannotation/controllers/admin_photoannotation.php @@ -28,13 +28,25 @@ class Admin_Photoannotation_Controller extends Admin_Controller { $form = $this->_get_form(); if ($form->validate()) { module::set_var( - "photoannotation", "showusers", $form->photoannotation->showusers->value, true); + "photoannotation", "noborder", $form->hoverphoto->noborder->value, true); module::set_var( - "photoannotation", "showfaces", $form->photoannotation->showfaces->value, true); + "photoannotation", "bordercolor", $form->hoverphoto->bordercolor->value); module::set_var( - "photoannotation", "shownotes", $form->photoannotation->shownotes->value, true); + "photoannotation", "noclickablehover", $form->hoverclickable->noclickablehover->value, true); module::set_var( - "photoannotation", "fullname", $form->photoannotation->fullname->value, true); + "photoannotation", "clickablehovercolor", $form->hoverclickable->clickablehovercolor->value); + module::set_var( + "photoannotation", "nohover", $form->hovernoclickable->nohover->value, true); + module::set_var( + "photoannotation", "hovercolor", $form->hovernoclickable->hovercolor->value); + module::set_var( + "photoannotation", "showusers", $form->legendsettings->showusers->value, true); + module::set_var( + "photoannotation", "showfaces", $form->legendsettings->showfaces->value, true); + module::set_var( + "photoannotation", "shownotes", $form->legendsettings->shownotes->value, true); + module::set_var( + "photoannotation", "fullname", $form->legendsettings->fullname->value, true); message::success(t("Your settings have been saved.")); url::redirect("admin/photoannotation"); } @@ -50,7 +62,25 @@ class Admin_Photoannotation_Controller extends Admin_Controller { private function _get_form() { $form = new Forge("admin/photoannotation/handler", "", "post", array("id" => "g-admin-form")); - $group = $form->group("photoannotation")->label(t("Photo annotation settings")); + $group = $form->group("hoverphoto")->label(t("Hovering over the photo")); + $group->checkbox("noborder")->label(t("Don't show borders.")) + ->checked(module::get_var("photoannotation", "noborder", false)); + $group->input("bordercolor")->label(t('Border color')) + ->value(module::get_var("photoannotation", "bordercolor", "000000")) + ->rules("valid_alpha_numeric|length[6]"); + $group = $form->group("hoverclickable")->label(t("Hovering over a clickable annotation")); + $group->checkbox("noclickablehover")->label(t("Don't show borders.")) + ->checked(module::get_var("photoannotation", "noclickablehover", false)); + $group->input("clickablehovercolor")->label(t('Border color')) + ->value(module::get_var("photoannotation", "clickablehovercolor", "00AD00")) + ->rules("valid_alpha_numeric|length[6]"); + $group = $form->group("hovernoclickable")->label(t("Hovering over a non-clickable annotation")); + $group->checkbox("nohover")->label(t("Don't show borders.")) + ->checked(module::get_var("photoannotation", "nohover", false)); + $group->input("hovercolor")->label(t('Border color')) + ->value(module::get_var("photoannotation", "hovercolor", "990000")) + ->rules("valid_alpha_numeric|length[6]"); + $group = $form->group("legendsettings")->label(t("Legend settings")); $group->checkbox("showusers")->label(t("Show face annotation below photo.")) ->checked(module::get_var("photoannotation", "showusers", false)); $group->checkbox("showfaces")->label(t("Show face annotation below photo.")) diff --git a/modules/photoannotation/controllers/photoannotation.php b/modules/photoannotation/controllers/photoannotation.php index 30f6ef65..3718d7bb 100644 --- a/modules/photoannotation/controllers/photoannotation.php +++ b/modules/photoannotation/controllers/photoannotation.php @@ -68,7 +68,7 @@ class photoannotation_Controller extends Controller { ->where("id", "=", $annotate_id) ->find(); if ($user_id > -1) { //Conversion user -> user - $this->_saveuser($user_id, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description, $annotate_id); + $this->_saveuser($user_id, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description); } elseif ($tag_data > -1) { //Conversion user -> face $this->_saveface($tag_data, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description); $updateduser->delete(); //delete old user @@ -162,13 +162,21 @@ class photoannotation_Controller extends Controller { url::redirect($redir_uri); } - private function _saveuser($user_id, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description, $annotate_id = "") { - if ($annotate_id == "") { + private function _saveuser($user_id, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description) { + //Since we are associating a user we will remove any old annotation of this user on this photo + $item_old_users = ORM::factory("items_user") + ->where("user_id", "=", $user_id) + ->where("item_id", "=", $item_id) + ->find_all(); + if (count($item_old_users) > 1) { + foreach ($item_old_users as $item_old_user) { + $item_old_user->delete(); + } $item_user = ORM::factory("items_user"); + } elseif (count($item_old_users) > 0) { + $item_user = ORM::factory("items_user", $item_old_users[0]->id); } else { - $item_user = ORM::factory("items_user") - ->where("id", "=", $annotate_id) - ->find(); + $item_user = ORM::factory("items_user"); } $item_user->user_id = $user_id; $item_user->item_id = $item_id; @@ -215,4 +223,4 @@ class photoannotation_Controller extends Controller { $item_note->description = $description; $item_note->save(); } -} \ No newline at end of file +} diff --git a/modules/photoannotation/controllers/user_profile.php b/modules/photoannotation/controllers/user_profile.php deleted file mode 100644 index 20561c8e..00000000 --- a/modules/photoannotation/controllers/user_profile.php +++ /dev/null @@ -1,93 +0,0 @@ -where("user_id", "=", $id)->find_all(); - $children_count = count($item_users); - foreach ($item_users as $item_user) { - $item_thumb = ORM::factory("item") - ->viewable() - ->where("type", "!=", "album") - ->where("id", ">=", $item_user->item_id) - ->find(); - $item_thumbs[] = $item_thumb; - } - $page_size = module::get_var("gallery", "page_size", 9); - $page = (int) Input::instance()->get("page", "1"); - $offset = ($page-1) * $page_size; - $max_pages = max(ceil($children_count / $page_size), 1); - - // Make sure that the page references a valid offset - if ($page < 1) { - url::redirect($album->abs_url()); - } else if ($page > $max_pages) { - url::redirect($album->abs_url("page=$max_pages")); - } - - $v->set_global("page", $page); - $v->set_global("max_pages", $max_pages); - $v->set_global("page_size", $page_size); - $v->set_global("userid", $id); - $v->set_global("children", array_slice($item_thumbs, $offset, $page_size)); - $v->set_global("children_count", $children_count); - $v->content = new View("photoannotation_user_profile.html"); - $v->content->user = $user; - $v->content->contactable = - !$user->guest && $user->id != identity::active_user()->id && $user->email; - $v->content->editable = - identity::is_writable() && !$user->guest && $user->id == identity::active_user()->id; - $event_data = (object)array("user" => $user, "content" => array()); - module::event("show_user_profile", $event_data); - $v->content->info_parts = $event_data->content; - $v->content = new View("dynamic.html"); - print $v; - } - - public function contact($id) { - $user = identity::lookup_user($id); - print user_profile::get_contact_form($user); - } - - public function send($id) { - access::verify_csrf(); - $user = identity::lookup_user($id); - $form = user_profile::get_contact_form($user); - if ($form->validate()) { - Sendmail::factory() - ->to($user->email) - ->subject(html::clean($form->message->subject->value)) - ->header("Mime-Version", "1.0") - ->header("Content-type", "text/html; charset=UTF-8") - ->reply_to($form->message->reply_to->value) - ->message(html::purify($form->message->message->value)) - ->send(); - message::success(t("Sent message to %user_name", array("user_name" => $user->display_name()))); - json::reply(array("result" => "success")); - } else { - json::reply(array("result" => "error", "html" => (string)$form)); - } - } -} diff --git a/modules/photoannotation/css/colorpicker.css b/modules/photoannotation/css/colorpicker.css new file mode 100644 index 00000000..05b02b48 --- /dev/null +++ b/modules/photoannotation/css/colorpicker.css @@ -0,0 +1,161 @@ +.colorpicker { + width: 356px; + height: 176px; + overflow: hidden; + position: absolute; + background: url(../images/colorpicker_background.png); + font-family: Arial, Helvetica, sans-serif; + display: none; +} +.colorpicker_color { + width: 150px; + height: 150px; + left: 14px; + top: 13px; + position: absolute; + background: #f00; + overflow: hidden; + cursor: crosshair; +} +.colorpicker_color div { + position: absolute; + top: 0; + left: 0; + width: 150px; + height: 150px; + background: url(../images/colorpicker_overlay.png); +} +.colorpicker_color div div { + position: absolute; + top: 0; + left: 0; + width: 11px; + height: 11px; + overflow: hidden; + background: url(../images/colorpicker_select.gif); + margin: -5px 0 0 -5px; +} +.colorpicker_hue { + position: absolute; + top: 13px; + left: 171px; + width: 35px; + height: 150px; + cursor: n-resize; +} +.colorpicker_hue div { + position: absolute; + width: 35px; + height: 9px; + overflow: hidden; + background: url(../images/colorpicker_indic.gif) left top; + margin: -4px 0 0 0; + left: 0px; +} +.colorpicker_new_color { + position: absolute; + width: 60px; + height: 30px; + left: 213px; + top: 13px; + background: #f00; +} +.colorpicker_current_color { + position: absolute; + width: 60px; + height: 30px; + left: 283px; + top: 13px; + background: #f00; +} +.colorpicker input { + background-color: transparent; + border: 1px solid transparent; + position: absolute; + font-size: 10px; + font-family: Arial, Helvetica, sans-serif; + color: #898989; + top: 4px; + right: 11px; + text-align: right; + margin: 0; + padding: 0; + height: 11px; +} +.colorpicker_hex { + position: absolute; + width: 72px; + height: 22px; + background: url(../images/colorpicker_hex.png) top; + left: 212px; + top: 142px; +} +.colorpicker_hex input { + right: 6px; +} +.colorpicker_field { + height: 22px; + width: 62px; + background-position: top; + position: absolute; +} +.colorpicker_field span { + position: absolute; + width: 12px; + height: 22px; + overflow: hidden; + top: 0; + right: 0; + cursor: n-resize; +} +.colorpicker_rgb_r { + background-image: url(../images/colorpicker_rgb_r.png); + top: 52px; + left: 212px; +} +.colorpicker_rgb_g { + background-image: url(../images/colorpicker_rgb_g.png); + top: 82px; + left: 212px; +} +.colorpicker_rgb_b { + background-image: url(../images/colorpicker_rgb_b.png); + top: 112px; + left: 212px; +} +.colorpicker_hsb_h { + background-image: url(../images/colorpicker_hsb_h.png); + top: 52px; + left: 282px; +} +.colorpicker_hsb_s { + background-image: url(../images/colorpicker_hsb_s.png); + top: 82px; + left: 282px; +} +.colorpicker_hsb_b { + background-image: url(../images/colorpicker_hsb_b.png); + top: 112px; + left: 282px; +} +.colorpicker_submit { + position: absolute; + width: 22px; + height: 22px; + background: url(../images/colorpicker_submit.png) top; + left: 322px; + top: 142px; + overflow: hidden; +} +.colorpicker_focus { + background-position: center; +} +.colorpicker_hex.colorpicker_focus { + background-position: bottom; +} +.colorpicker_submit.colorpicker_focus { + background-position: bottom; +} +.colorpicker_slider { + background-position: bottom; +} diff --git a/modules/photoannotation/css/photoannotation.css b/modules/photoannotation/css/photoannotation.css index 9ec14368..de3e6f87 100644 --- a/modules/photoannotation/css/photoannotation.css +++ b/modules/photoannotation/css/photoannotation.css @@ -10,20 +10,15 @@ position: relative; } .image-annotate-area { - border: 1px solid #000000; position: absolute; cursor: default; } .image-annotate-area div { - border: 1px solid #FFFFFF; display: block; } .image-annotate-area-editable { cursor: pointer; } -.image-annotate-area-editable-hover div { - border-color: #00AD00 !important; -} .image-annotate-note { background: #000000 none repeat scroll 0 0; color: #FFFFFF; @@ -45,7 +40,6 @@ #image-annotate-edit-form { background: #FFFFFF none repeat scroll 0 0; border: 1px solid #000000; - height: 300px; padding: 7px; position: absolute; width: 250px; diff --git a/modules/photoannotation/helpers/photoannotation_event.php b/modules/photoannotation/helpers/photoannotation_event.php index b7e1e15c..ca5c5daf 100644 --- a/modules/photoannotation/helpers/photoannotation_event.php +++ b/modules/photoannotation/helpers/photoannotation_event.php @@ -74,6 +74,13 @@ class photoannotation_event_Core { if (count($existingNotes) > 0) { db::build()->delete("items_notes")->where("item_id", "=", $item->id)->execute(); } + + $existingUsers = ORM::factory("items_user") + ->where("item_id", "=", $item->id) + ->find_all(); + if (count($existingUsers) > 0) { + db::build()->delete("items_users")->where("item_id", "=", $item->id)->execute(); + } } static function user_deleted($old) { @@ -93,4 +100,42 @@ class photoannotation_event_Core { ->label(t("Photo Annotation")) ->url(url::site("admin/photoannotation"))); } + + static function show_user_profile($data) { + $view = new View("dynamic.html"); + //load thumbs + $item_users = ORM::factory("items_user")->where("user_id", "=", $data->user->id)->find_all(); + $children_count = count($item_users); + foreach ($item_users as $item_user) { + $item_thumb = ORM::factory("item") + ->viewable() + ->where("type", "!=", "album") + ->where("id", ">=", $item_user->item_id) + ->find(); + $item_thumbs[] = $item_thumb; + } + $page_size = module::get_var("gallery", "page_size", 9); + $page = (int) Input::instance()->get("page", "1"); + $offset = ($page-1) * $page_size; + $max_pages = max(ceil($children_count / $page_size), 1); + + // Make sure that the page references a valid offset + if ($page < 1) { + url::redirect($album->abs_url()); + } else if ($page > $max_pages) { + url::redirect($album->abs_url("page=$max_pages")); + } + $view->set_global("page", $page); + $view->set_global("max_pages", $max_pages); + $view->set_global("page_size", $page_size); + $view->set_global("children", array_slice($item_thumbs, $offset, $page_size));; + $view->set_global("children_count", $children_count); + $view->set_global("total", $max_pages); + $view->set_global("position", t("Page") ." ". $page); + if ($children_count > 0) { + $data->content[] = (object)array("title" => t("Photos"), "view" => $view); + } + } + + } diff --git a/modules/photoannotation/helpers/photoannotation_theme.php b/modules/photoannotation/helpers/photoannotation_theme.php index cbea80d1..844fab8d 100644 --- a/modules/photoannotation/helpers/photoannotation_theme.php +++ b/modules/photoannotation/helpers/photoannotation_theme.php @@ -22,6 +22,41 @@ class photoannotation_theme_Core { if ($theme->page_subtype == "photo") { $theme->css("photoannotation.css"); $theme->script("jquery.annotate.js"); + $noborder = module::get_var("photoannotation", "noborder", false); + $noclickablehover = module::get_var("photoannotation", "noclickablehover", false); + $nohover = module::get_var("photoannotation", "nohover", false); + $bordercolor = "#". module::get_var("photoannotation", "bordercolor", "000000"); + $v = "\n"; + return $v; } } @@ -31,10 +66,11 @@ class photoannotation_theme_Core { } } - static function dynamic_top($theme) { - return new View("photoannotation_user_profile.html"); - if ($theme->page_type == "photoannotationuserprofile") { - return new View("photoannotation_user_profile.html"); + static function admin_head($theme) { + if (strpos($theme->content->kohana_filename, "admin_photoannotation.html.php")) { + $theme->css("colorpicker.css"); + $theme->script("colorpicker.js"); } } + } diff --git a/modules/photoannotation/images/blank.gif b/modules/photoannotation/images/blank.gif new file mode 100644 index 0000000000000000000000000000000000000000..75b945d2553848b8b6f41fe5e24599c0687b8472 GIT binary patch literal 49 zcmZ?wbhEHbWMp7unE0RJ|Ns9C3=9Vj8~~DvKUo+V7?>DzfNY>Fh|Ltj$Y2csQN9XW literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_background.png b/modules/photoannotation/images/colorpicker_background.png new file mode 100644 index 0000000000000000000000000000000000000000..8401572f1939a1a24c1963513573b0194ad36ee0 GIT binary patch literal 1897 zcmY*a3pATo9RCoHhLk=v9+hya?P*IB^(tbYgf7-$bhEY|(I?UtUPi9vs#R ziy#P&{yr@fLG&2ly2iu^RFBrRRp1Ms>i=nK7%MiF8HO#xOG2 z_n6)YVr)vMq5IN*f2sWccT3)gRvu2oXh6my%^v}*O;ra5-< zrfBywZT3aSz8bWP1#@=ep&&&2r%2Xx zddEiY1@l}|b6YxdaO6Q`RJq3)wtKZi&2z5yNzot36|pnd_gApH!?MH9gq?hIkpDQ? zoi#k4#OM3Qvsl*nW+NM0+h-~TfAN~J`Np!FYfHA<4F{vc3Gd`y^@%F1#Ljo6xgBMf z>q*?e(2(gjbtEPC06P3(T2t>_N`opfT&(A|#nr9ubq;Roe8EGc50&a+@Ca&D8N&V5 zfWzVZ*wTW^c5k?}vCRiBX+63NTRRx9IULPb=kLtbG7G2PR9LSNtF=j!&s8JxkH+I- zofPjPqCAy{x*V^kY%4z8I+~=}5Ut2+RB9hQnF-=Yy8f)_*S6oz?C#RkmvpMq7QP(o zbZ!bUKi!a-F8i&JTjM>>TAUAmd?)cz-HnW2PWdWk#$QRa^0SMsE*Ei8-<`C&zPP^R zdHWR`(Q|r$)T?{(gtteqpleg1llyjZ0ZVLw8leHw(a;G~vcN1Y>6s-e44f7NN&vzO zSzky!K z<_U2aPpuI;9PaSb&;Ej+#b@gJvw)$&8ZCQ!O0HDG-5Ryk0-~ziB-tPWKJK=>?ocx|gRt#KYNSCK| zmrMW=4om~tMIU%ONCY$t9RcY(kaUNR#1=v%^?pW-QzJnZCkAr|iCQDD687K8FZ`q_ zi57h%KMX!lwtAe@@x)l}04zNB(A4Qum^BC!^1cdZ=xa=ei3OvQ+5@W08>NszykE}f zv?z;H%6*$BjvuB;iP6rpc{~#`#C$juv62eaJ-(#wzbS@&`|x8xR0#<2lFZ9l84oq~ z)RtYb1_uH_On@$HmKKWl$={|vFVC?D2S?ere)+Ii3ZCYJc1u{wg0CgRowk%p6z-vm z25al~YDe{K&MKf#`#$i4g$_`C3_gpv%r}IrbhdU7n7ws`iL~u?7mnTC+5f*Z3oqn> z!F~y5)zR3`!AmrFCO)o-qINJDjGjk AumAu6 literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_hex.png b/modules/photoannotation/images/colorpicker_hex.png new file mode 100644 index 0000000000000000000000000000000000000000..4e532d7c65393fe56d7463e1da3faa591f03de84 GIT binary patch literal 532 zcmV+v0_**WP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA2nn^@KRCwC#n6YcZKorKmBnM{5VnN~}9ReD%Nhj%)e@2UckI?wn+*F*3;85I( zxENdy>|*I~AlHjh(Li4w_e~$k1>TSMlH7e>k|a?SftQq0B8sB@e$Nc7)9DBRzVCyb z1b`q2c!CKbZg`U5o2itl0Sv%)yQM?b>-9{KyTHhep8?|QckHZYvzcW~5d<@9^YvHp ztN^T5E7MqasmZKO0Qfo_tQD_Cp^cRCbkSPY3PWmOrwUtP=mYq!XfhrH$n!kUb8V{2 z2zJb@O#p!BU0T}j_bo$O28aMq#VY1=a}K4HFOx|FxU3(vcdlc4{G^oH07wS|@(ugl zu}h2#{EpG-rzyuU{=%QDL_0lRX0#t`gyJhJT=_461{Fr^gFFz2D& z?#3}Quw7Y-ZXCZam(0MPhC`Q9H4*H#%p;?>f&5sn>j`t-77IF5&!dq`sa#4$MD?Up z1Z7s}QYx2H{U_Ho#}=1TQ65E?QgHyga(l)Q>~phW+cE0rF`i(%vV0^K=++YE{0sm& WpVhv@?^YTB0000h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4P)S5VRCwC#nn6n&K^TU=-E6Jmny{kAgHdYMnDn-IF?jG$4BqP9gMtMis0Dw8 zAV{dW=nt@ez?%dVDIU_2gRqI_5Em~-k8ZNXWV1btZa3MO4c19#+Wqh_Zf2N=;hoLQ zLzrMN$n!kVR;sFUJkQ_V-BE`=I5@}w0L!vKVQ~Q9@px!O=Q!>KBXRE#RaJ4J1Hkq5 zH74#rAmB*#N9cI-&+9?5X8Zj7{P_5|^XQH{u=yKC6vb33b$ff;+uIw9#SFtZ zJw0vcV;BZjbSqURlaVB;VRjAxerlS1&~!NI`5fVIQh?ryB; zCRH|X*Y~znJyFxHP3oeqGU3e&1O9;`*C3*9*=)dr#lP& zn<{s4fg0h-$-2z|0F15BXa1p~(a}*s5CEWXbyYJAdmo&O{#YpD48vSpURq~=HZW^z zYn4ic=lPM5k&}~?zi?i#P(>mU00>*Q=~G~A=!rx^QIxK(E{0+5@9$+<_W68FXS3cg z9in$e&*$@{Qpx;xe0;nc^Q+Ji{h4jrtW!Iut3V(?BD!Pgx=!e-({Wy>6NMqMNDj~M~n z)!GO=qQA@t;I7t2;1S(50Ji7R-H^E z;Fxt5y+yKp{*YWFP<>kUy}douSY2JE!wBfrD*F4hvVtJ@ z_xH_*L>mEXHkOx{0bprq$rczQjer>#REvv?4Nu550(w0tO-7)tlOusf;N935Ms)0f sary=%7ro}V>f{=MmOlY4Yuc{?08g~^-7;vm)Bpeg07*qoM6N<$g2&OnRsaA1 literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_hsb_h.png b/modules/photoannotation/images/colorpicker_hsb_h.png new file mode 100644 index 0000000000000000000000000000000000000000..3977ed9f21e3186eefd37b198a7cc3f8de6c69cb GIT binary patch literal 1012 zcmVh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4dPzh1Z?xtc9W|d^8%pySrl!Jsywq01yZSfWhDafa5q;(RrSK!_25Mnz_o6R-Q8VL6wU6+%F4pRf-Q$MI@dS4=mAHh)9FT|@$~eByOWcX z!Cq-b_?cFRh?(5s;V}d2mk4K?&4-6bIBX^iheAZrO{%IS z0YIfv$z`+F(Rl#Sb=`U9^73-C*$nbL0E`QQVHk#CxMmUxbFA4+=9etvc4lVg#bpW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)h4ST%+u)Mq+iA1Vh>;hK~hoekI)rdfi2>c2WDBo(VtgHlsL7oWA z&(HHjpvo(k$QAFtqAp4OL_n^=BM3sifqK^6t;x3f;LDd95%>>@z}MsBc8bzsTdm2i z6abo=n^j5#I^FK)FJH<8eAw7fFA-2=n(8G26ji+};bGxL%+uSO z+~1duRQyKZk=2THHElK;WdhRY=jtT_oYMBcdWk?qZ;mP?0uS5U5n4xHFiI<+dadUb l@49-4fb1urmzm6u0RTq3k6f>52*3aU002ovPDHLkV1hB)7U=*0 literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_indic.gif b/modules/photoannotation/images/colorpicker_indic.gif new file mode 100644 index 0000000000000000000000000000000000000000..f9fa95e2825eadd2d779ad270a71eddb94f94748 GIT binary patch literal 86 zcmZ?wbhEHbRA%60n8?6jX=xc99sU3Re+C8y#h)yU3=B*RIzTo9NS=X7-KS;c>A7MD o3b%A+G;E1+{h2#gG;NlJnPP?C%HXh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaAe`AI}URCwC#eanvINRp%)C+D=l9`;ZBJNpmnIHzu)uwC7iS()Jv(>)Z8B@~LP zskuk>0)q)45bjPo-NPtU5fxQ4Hh2FoGyC6W_AoQwfBXI$J?{4V&pZ36_xa*}$2NB_ z?N>dXcGqbk;n!C5)IX`whhWfkj zZ|>f95RKQ5eRkk%JDA36{(L^|`Fz^r@vz6^;rIL9ZnvA=Za4q_{k#48>#z3DfBw_{ z_P4+JPe1)+-@bjbFYphQerW$@W^I41;efT)R*v)1=Z=959-jt1_`&@upMCjUJi)=X zZ3jN@=LPT>91D+m>_@LR0MSMOasXBvK!V70fXLnL`FvXMy^X(*$D=(SkL`ZH`|Wn~ zkB^V`U4-G2W0=k|C!+Lzw@%8BKH^%dX*CvOT6`fP)f zassgc-|0lP){Yay7eeq^3=*3Gi}%Ch;Wl_|YMZ-TYi;YjTWhWFe_QW81Qtc5BU0_Z z2hjF&ege^mQag}*k5GO8+nyWj7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ITHWv9)mH{ug#2>Z zK&9)+K9#}q#er=r|KDVMK0T561VDQ6b7#P6U)~Mxt5@GENx_@c^yydbzcHKqvw^g1 zGZjC#ed)b_`TzOP{2K~q RdwKu>002ovPDHLkV1myV#+d*B literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_rgb_b.png b/modules/photoannotation/images/colorpicker_rgb_b.png new file mode 100644 index 0000000000000000000000000000000000000000..dfac595d017e279ff670df2c816e02d922660d9f GIT binary patch literal 970 zcmV;*12z1KP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4P)S5VRCwC#nn6n&K^TU=-E6Jmny{kAgHdYMnDn-IF?jG$4BqP9gMtMis0Dw8 zAV{dW=nt@ez?%dVDIU_2gRqI_5Em~-k8ZNXWV1btZa3MO4c19#+Wqh_Zf2N=;hoLQ zLzrMN$n!kVR;sFUJkQ_V-BE`=I5@}w0L!vKVQ~Q9@px!O=Q!>KBXRE#RaJ4J1Hkq5 zH74#rAmB*#N9cI-&+9?5X8Zj7{P_5|^XQH{u=yKC6vb33b$ff;+uIw9#SFtZ zJw0vcV;BZjbSqURlaVB;VRjAxerlS1&~!NI`5fVIQh?ryB; zCRH|X*Y~znJyFxHP3oeqGU3e&1O9;`*C3*9*=)dr#lP& zn<{s4fg0h-$-2z|0F15BXa1p~(a}*s5CEWXbyYJAdmo&O{#YpD48vSpURq~=HZW^z zYn4ic=lPM5k&}~?zi?i#P(>mU00>*Q=~G~A=!rx^QIxK(E{0+5@9$+<_W68FXS3cg z9in$e&*$@{Qpx;xe0;nc^Q+Ji{h4jrtW!Iut3V(?BD!Pgx=!e-({Wy>6NMqMNDj~M~n z)!GO=qQA@t;I7t2;1S(50Ji7R-H^E z;Fxt5y+yKp{*YWFP<>kUy}douSY2JE!wBfrD*F4hvVtJ@ z_xH_*L>mEXHkOx{0bprq$rczQjer>#REvv?4Nu550(w0tO-7)tlOusf;N935Ms)0f sary=%7ro}V>f{=MmOlY4Yuc{?08g~^-7;vm)Bpeg07*qoM6N<$g2&OnRsaA1 literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_rgb_g.png b/modules/photoannotation/images/colorpicker_rgb_g.png new file mode 100644 index 0000000000000000000000000000000000000000..72b32760a5c40b7ab834d176ac588750a06f13f2 GIT binary patch literal 1069 zcmV+|1k(G7P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4vq?ljRCwC#na@w+KorMcp|EVXQK$+YM6*gzHqnN7BF59kyLV$Gkwjyn8-M%_ zE{RbNUKIZauO4)ds|T|oT-ef(s1a0_$f>a^t?r@HEtF8AJM1*eOAln2$@}v7PN(lv zVqjo^rfD!+2!cS;G+ihZOeejotBV8xi^T#a3=#mWR;yX1lO*|ym8f@!APA_W1Hk3w zB_iEkuh&r3o1~-lLnG2_dVP3!cw}V6=kpbd#Y`r1aB$FM>4rPdqTFGsf@RrABvLAs z_V)IUj*iC1$ET;KtLC7VuFaK9CiU4#0Js;$s%4Xtll%Mo+uPgi?d>#8=kxjb`T6VX zYnRih&Uxo>AeFAF`pIzskVqr~Lqpo^765pv442ErFwDvEaR>5>mzrVKEiOMUN%>sbW=d;^vxor09`ug(nG5}<=S@G^porYX_`AU~VE3z!TGDK12 zc|IHtTS-zB#k2Esx7%GV#GgQ4^p{X9P7p+z=e5~u7zO}#c6JsQ7vu3b&+`;T_4M>` z9GA&t7={6YXue?rfdBvuX|^c<5G>0+K0fLf%ChWqI(vJ2Z8lpnnM|cp%5P9_w|2W7 z>1kS1l^S-tomBpdnunPn2&bo~4-XFj(BI$hKzujU8^&M)%d(Orp*X1D81+?=O8VFB zIa!wfZPi~d9gF96vq~2P!K`gH<8pO-Jf@R=lh2dg9?y?N!gSI{gTWRNFc%T{RQW{l z*CWMo2;1uKCntz>kA*@lBG4iNxDWx@ z)`lq&7!3wLPfXOA@a^yrUm{@0H1Q<@4N1q72$V`Cvl4;&Z#A$c0u5CiPaZTH69Gx%^@W86{U8at z_Fg3dSGk-*1b!6?u~UR@?manP6sovBm$~8BD1qf>UcbEU>Hn@ zfYuw~a2Nn)W@dDT!IB76y{(>_nyMPXmk7v4umABS0u4PmVn_r&_Vpo@j@&Rtryjo2 npA4&xFA;ctuJh%cDE=M*G)vtq^hrv*00000NkvXXu0mjffA{0B literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_rgb_r.png b/modules/photoannotation/images/colorpicker_rgb_r.png new file mode 100644 index 0000000000000000000000000000000000000000..4855fe03f8ea8d88b4f8ae625c7958eea65208ac GIT binary patch literal 1066 zcmV+_1l9YAP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4ut`KgRCwC#nL$e%K@`W|#$^*@2)1ijA*P`i*Vs!8o}|Yj_z@}|6buN87D4dl zS;)b(p0whp5G)M=FI7^gQ8aB#6dSZ+h!%w1Y;?1+hmFg+nRFn+=R+9LJG1n=PBo8cw>y;UEFPWHNyPjRb(ErY56GCrR=VBT=6aj^j{C z2Y}PlQ$)I5E>~4mPm+!{9%_-UkM*gkDWxt5LNprP-`}sZ^r|P&B!6Kv=J9woH#gVT z*4Ee8bGcj~5O6x38Xwfs)pPCb?dfMH0U$33`jPQ?{QUg<*V)k*x3{;YrDbbti|2U@V!3Kl zRCTj#GL@3+Y**KVSOqeE%ahy@p z>gUg%wKI(2q+et*WIMxri^U8lz0dD&5CLNmfmf=FKMMPvNFYqBzie+K(*3%>zd-~V zL;x2efZ8e(fs*tF5oi#B1`)uT2$WAXLZQ&n(GgA41VQBU`NhRWQ51QeZ*Fd`W2iq+ zC9AKVB^iPU{58STq)rq?Q52=WX&5rCK1rt=MBqOp0vDN#+vPH1T5ZUz6aegYJElaS z&+mUTFi^oE5)R`_1gbJke2G9!((xn$q9_`b2vmO6z?uluwCZ>gfvT~NFA}u zJ+zYaydY?bOazXPk7GMK??WM;=NX3ieRZYrsgLwvFbDv_U{E6+Um_sgKZCuSp8l}3 zB-f`^k&G`9D5zq6Vq!wyh%XUP9v_#Nm*vX%__#5MfK({RB``K7i(FY*Q5vx(0tHD@ z%IN4Q0E~=`C@okM0nKam@bIvv1z#c{ReS!&mk88!bHtDcymY$}N=F_r<$jdLkY231 k>i80YySoaVIYIa{0Hu_2rW%yutN;K207*qoM6N<$f_Z=6i~s-t literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_select.gif b/modules/photoannotation/images/colorpicker_select.gif new file mode 100644 index 0000000000000000000000000000000000000000..599f7f13a6854d198f501588948ffcf97bf9f365 GIT binary patch literal 78 zcmZ?wbhEHbij|08)1sO8@`> literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/colorpicker_submit.png b/modules/photoannotation/images/colorpicker_submit.png new file mode 100644 index 0000000000000000000000000000000000000000..566fe2ddfebeb6e4a580e8298ec5e4c2c0ec7ac5 GIT binary patch literal 1016 zcmVcT+_YyPXL7I4=bO5@=0&HETIxu~xG2E)8|Df%)pM5jqw3rq(bXp!STw3&J&6am{ z;kcjA_jSloIoLFkQ`~Z@_LK@NvPD8@t-GFiOS%^L9^T|{^t!nzudI0E(UPQZ-}IVn z;f)US&e9bdc9Eo#f8qv4WBs@=ava8o%9sdS7A4T+vgjD%*vp&V;NH;_)BeJob?En8 zBx3Q+lrO78j(Pdb%C$Szd7^!oP(lEJeBDZn2fZAQk9XVaU9PNm@P5bkBE4kz_{Aq{ z@Q45Gq?eFSCHTwJtEdv$X0E?)0Y#)fvaGMmzdCjnX)Sf9da(*Oy!}wrMDyo$&cEjr zAP_Y=OxqeA=AC!P8XV>g1xt(fKU!2q!?!O@0tDn3v|!XbMw;Q%yK^!G4m->pl4Q7$ zXL$JBp-%Jh{q4`{r(zQ5SXITV^sBEMz@7P_^fHW$4+@R=@Mn9^#WMH%Bnn=o5TCDD^jLfN> zzD12)mZuGdf}_=&-^LF^pCF~ms4Cxwk`)!EpRTrFCRNRSs?^NaBQBcC35ViHBxRv# z;=sM&vs$FGS|pJ~X-!5#i9*#BxNd%hlnBu7$^+%)t1C-_%5_Sm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9F;P`G4YRr=s>-+YTXl_mIXfq}th88$(g^@ySk@z3C}ZNr)PjP-%&eTY zmgaYDo!&9Hr3=R@+?M4%IsyP~c$jy~!-q;UQj(TvddBXgC@T5b!SRV{VZi+S0#@m~ zs$4@F02JpNzV=hX(GdU;gpVz$sriF0BHT9P{M^}IRaF_O(@sp;*3vM%s@?%p_LdZ` z+&5@m;dP(MObv!>BN&ERn4g`tIi{xV>$qfvidRTyeHr&mMR}efjdr_VG`(-QU%#{H z0gK#RKO4mo}(8QE&)H;df{DkJDHkqTf0Y)ao#h_8^v`Gf7>PjXu6#^Hp!H*ShzQ7%2q5m++oRS(8F!Q%h>wkS zy5`zinpG;*zLLThzNv;K!^y0h`|3O0<9mr z@g2V~5`pxTB>w@cgc%_sAW!KDaWN*#s1hHm2~cLT*_|>a0v%nwZ(G{^M3(K{BVQsw zl1QmUfDps6@+AUlwMMB#K&=T=DiP4AgYvo@hyY27Y~1qwj{qV`KG$44DZE4^DQhCY zzwo(o{saJAzfgYp#$#m=0p2iIYoA=IKF*b|-F~V7BA^y5)0+C{-j(tt0_cxn&YeEW z6>i>psSF~35Xt2`4X?QQJ$vd1Uny%MfCLAD`iHLp;O?U)VWoVDfO_REso~ihj~e+B z0nuBMe2D-G9yXH>eR2;lBp})JU<4<5KtT P00000NkvXXu0mjfA`AaT literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/custom_hsb_h.png b/modules/photoannotation/images/custom_hsb_h.png new file mode 100644 index 0000000000000000000000000000000000000000..a217e9218e6a512b507a35e8a6141f0e56193439 GIT binary patch literal 970 zcmV;*12z1KP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4P)S5VRCwC#m|aK|K^(yUyEA+4?d5?fXd;=M7I&7CAQ1#X&_j>CL_YN-gn@+F zgHSIeAw>3IK|;|7L=oge5IzJ#A^0E&>G?(8=|!HGo*#L7AKu<>4|8pMd)HkZt+#{w zXC7weW^aBB|Jj-SF*9F$o1tx>E$qcMycycAC@-ZBJ@9=M1Art+Kw)425XHpaLf3nT z*o$qs(c_|+-@n%!JfIWz{MV(NRK`u1oK!3sq$xeUk30*0rTO&r;Lz}xX3Q?2XDLZ^ zNtQLm=b0`ovGcrzGy{tZJ8^M;iCsNLZ*=us&BvV@!eqi&`J(hE1%Vf=JRxLR*23X^ zHtTjcstkxmW4fX%R1Gc%0Gw!YjZb;hvts~YStk9-f%l(m0w0fy0I;#P!Y~ZOFd0Yc z6v|xg8E^fO8d9H}oln`OnfJJ7mbVJzw2DT;EXx*f%c_Y}(B({td#$~-(d7^m2>@v8 zyhBz%)<4CSQ06-3bdbu#v?m=s^TUgQAW80>SVT-DWO+Bqe^ZT5c^X^}GWW!^H|6DM z{2&`t&HcxOX}{XxtgBuQu9KfyE}VDPRTnB@)bzR0U55`X2iGIf82PEXs$7=k;M$J@ zqW{A-4Q++h&2S`|@upE=bVXp?Ee;`O5dSyi! z_6LF|n~ze5J~HYyjR0NfpC{*ZC2Op&)zJu?In|^S_t5Z|X#`9oU=$;ucVssLNp#Z) zm`1=f0;Ul#jllmj0z<=NR2qTWnkv%>>_H8 zN}^l&B27_@0BI^lKr=??RZm8DS1SN?ceNr_7}^MstN?&p_nzJCxJ2r=d!JKa1US_; z?df}&-f3JTfPWoH*RQmY%H4;rv~L($))vJGczsJ=-;&x0XvXM>ju9#M``?gN>ukHI zbY@GK!e7T#7lFRVZvo)JlL2+7ag6|%dL;F~c&F(xt`Sh)F!UJ#{5Lm80~&$3`EU8J sdf~SzMzo^mJOqtv1hQW_1cCoK0IhW09jn*o82|tP07*qoM6N<$g4YtalK=n! literal 0 HcmV?d00001 diff --git a/modules/photoannotation/images/custom_hsb_s.png b/modules/photoannotation/images/custom_hsb_s.png new file mode 100644 index 0000000000000000000000000000000000000000..7826b415077be23ed1b1bf05b2da62d4aa5b1c67 GIT binary patch literal 1168 zcmV;B1aJF^P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA57D+@wRCwC#nQcf@Q5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x~C^mwm^(jyaOnSpYacdWMYS+t084 z^2+w%(=O@I5mKuuYq`}Q?t~JPpM7%pt#fC0-?w*!dH2B<}EheYuo*06&0P2R(PVkSzLgcj` zVW8J0_-tX~r?D$-1b;*o|4o8p{{*)!{wMeoM(~F$ngoCMosr`UvD=f=@$qZFb7M_{ zzZwY*efmZ_!FT>n%gGzf>BeHwSS#&(ny T=Ar9_QX-DN@01`G*?mYE;P(j>ieaLJ zp1@KmP7DbnxHd5epSMZF>_Ios1X7kEzM%)`8u}mxVv)EwgAVwi+aL%gVHgVE_pQ>@ zbuG%W6jfCb)Fr3i6gRMr(1H#Un@BbTwH6Q2xnfI1$74|x z`a$b3REt~>BR!+Rjm(B~!)%yB$32-1&(IZ{4HWmQa;H~;maQBTMsJ;5 wu=L25Ib=s<$1=nh_wOs&FkN?ph+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA2j7da6RCwC#n88ZJKomvKOQ$N-q%EcB2MDDFapS&Ut2tcoJKO0Z5XR@gxT5=E@BPRC5JM(-{EmRs+wi z*>P|@#ScQvT9QAwUwvX=#Ku^(QHKpv2~+}=KqXKKR03@~kh1h#z3lU2-9S7%K9wHY zZlHd@zd1k|%qmdMx=&^ql(G#p7!3Z$L#9{gzl=qFW|hX6M^<+t`|yc1Y?-gyyEotInm#MOm!f^^y*-dYoVJ8o0wy4TmX zR?7dfn;bc9{iI8VpES5yofZaYh;TjCpK_UhilywQPp{V&o!)zNr-EuAP#7%xRC{Am z6GR!1|0e8}W%vqnuQi`zyC%VuOt~~QLec?j5=hH8t&PuqF6Zm0mDYFhgqkAab@NoR n(3#>M@3IhYo&TccjBE_r(UXjnZhw#mdW^x-)z4*}Q$iB}AxU+4 literal 0 HcmV?d00001 diff --git a/modules/photoannotation/js/colorpicker.js b/modules/photoannotation/js/colorpicker.js new file mode 100644 index 00000000..0c51991c --- /dev/null +++ b/modules/photoannotation/js/colorpicker.js @@ -0,0 +1,484 @@ +/** + * + * Color picker + * Author: Stefan Petre www.eyecon.ro + * + * Dual licensed under the MIT and GPL licenses + * + */ +(function ($) { + var ColorPicker = function () { + var + ids = {}, + inAction, + charMin = 65, + visible, + tpl = '
    ', + defaults = { + eventName: 'click', + onShow: function () {}, + onBeforeShow: function(){}, + onHide: function () {}, + onChange: function () {}, + onSubmit: function () {}, + color: 'ff0000', + livePreview: true, + flat: false + }, + fillRGBFields = function (hsb, cal) { + var rgb = HSBToRGB(hsb); + $(cal).data('colorpicker').fields + .eq(1).val(rgb.r).end() + .eq(2).val(rgb.g).end() + .eq(3).val(rgb.b).end(); + }, + fillHSBFields = function (hsb, cal) { + $(cal).data('colorpicker').fields + .eq(4).val(hsb.h).end() + .eq(5).val(hsb.s).end() + .eq(6).val(hsb.b).end(); + }, + fillHexFields = function (hsb, cal) { + $(cal).data('colorpicker').fields + .eq(0).val(HSBToHex(hsb)).end(); + }, + setSelector = function (hsb, cal) { + $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); + $(cal).data('colorpicker').selectorIndic.css({ + left: parseInt(150 * hsb.s/100, 10), + top: parseInt(150 * (100-hsb.b)/100, 10) + }); + }, + setHue = function (hsb, cal) { + $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); + }, + setCurrentColor = function (hsb, cal) { + $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); + }, + setNewColor = function (hsb, cal) { + $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); + }, + keyDown = function (ev) { + var pressedKey = ev.charCode || ev.keyCode || -1; + if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { + return false; + } + var cal = $(this).parent().parent(); + if (cal.data('colorpicker').livePreview === true) { + change.apply(this); + } + }, + change = function (ev) { + var cal = $(this).parent().parent(), col; + if (this.parentNode.className.indexOf('_hex') > 0) { + cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); + } else if (this.parentNode.className.indexOf('_hsb') > 0) { + cal.data('colorpicker').color = col = fixHSB({ + h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), + s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) + }); + } else { + cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ + r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), + g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) + })); + } + if (ev) { + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + } + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); + }, + blur = function (ev) { + var cal = $(this).parent().parent(); + cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + }, + focus = function () { + charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; + $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + $(this).parent().addClass('colorpicker_focus'); + }, + downIncrement = function (ev) { + var field = $(this).parent().find('input').focus(); + var current = { + el: $(this).parent().addClass('colorpicker_slider'), + max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), + y: ev.pageY, + field: field, + val: parseInt(field.val(), 10), + preview: $(this).parent().parent().data('colorpicker').livePreview + }; + $(document).bind('mouseup', current, upIncrement); + $(document).bind('mousemove', current, moveIncrement); + }, + moveIncrement = function (ev) { + ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); + if (ev.data.preview) { + change.apply(ev.data.field.get(0), [true]); + } + return false; + }, + upIncrement = function (ev) { + change.apply(ev.data.field.get(0), [true]); + ev.data.el.removeClass('colorpicker_slider').find('input').focus(); + $(document).unbind('mouseup', upIncrement); + $(document).unbind('mousemove', moveIncrement); + return false; + }, + downHue = function (ev) { + var current = { + cal: $(this).parent(), + y: $(this).offset().top + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upHue); + $(document).bind('mousemove', current, moveHue); + }, + moveHue = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(4) + .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upHue = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upHue); + $(document).unbind('mousemove', moveHue); + return false; + }, + downSelector = function (ev) { + var current = { + cal: $(this).parent(), + pos: $(this).offset() + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upSelector); + $(document).bind('mousemove', current, moveSelector); + }, + moveSelector = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(6) + .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) + .end() + .eq(5) + .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upSelector = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upSelector); + $(document).unbind('mousemove', moveSelector); + return false; + }, + enterSubmit = function (ev) { + $(this).addClass('colorpicker_focus'); + }, + leaveSubmit = function (ev) { + $(this).removeClass('colorpicker_focus'); + }, + clickSubmit = function (ev) { + var cal = $(this).parent(); + var col = cal.data('colorpicker').color; + cal.data('colorpicker').origColor = col; + setCurrentColor(col, cal.get(0)); + cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); + }, + show = function (ev) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); + var pos = $(this).offset(); + var viewPort = getViewport(); + var top = pos.top + this.offsetHeight; + var left = pos.left; + if (top + 176 > viewPort.t + viewPort.h) { + top -= this.offsetHeight + 176; + } + if (left + 356 > viewPort.l + viewPort.w) { + left -= 356; + } + cal.css({left: left + 'px', top: top + 'px'}); + if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { + cal.show(); + } + $(document).bind('mousedown', {cal: cal}, hide); + return false; + }, + hide = function (ev) { + if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { + if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { + ev.data.cal.hide(); + } + $(document).unbind('mousedown', hide); + } + }, + isChildOf = function(parentEl, el, container) { + if (parentEl == el) { + return true; + } + if (parentEl.contains) { + return parentEl.contains(el); + } + if ( parentEl.compareDocumentPosition ) { + return !!(parentEl.compareDocumentPosition(el) & 16); + } + var prEl = el.parentNode; + while(prEl && prEl != container) { + if (prEl == parentEl) + return true; + prEl = prEl.parentNode; + } + return false; + }, + getViewport = function () { + var m = document.compatMode == 'CSS1Compat'; + return { + l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), + t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), + w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), + h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) + }; + }, + fixHSB = function (hsb) { + return { + h: Math.min(360, Math.max(0, hsb.h)), + s: Math.min(100, Math.max(0, hsb.s)), + b: Math.min(100, Math.max(0, hsb.b)) + }; + }, + fixRGB = function (rgb) { + return { + r: Math.min(255, Math.max(0, rgb.r)), + g: Math.min(255, Math.max(0, rgb.g)), + b: Math.min(255, Math.max(0, rgb.b)) + }; + }, + fixHex = function (hex) { + var len = 6 - hex.length; + if (len > 0) { + var o = []; + for (var i=0; i -1) ? hex.substring(1) : hex), 16); + return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; + }, + HexToHSB = function (hex) { + return RGBToHSB(HexToRGB(hex)); + }, + RGBToHSB = function (rgb) { + var hsb = { + h: 0, + s: 0, + b: 0 + }; + var min = Math.min(rgb.r, rgb.g, rgb.b); + var max = Math.max(rgb.r, rgb.g, rgb.b); + var delta = max - min; + hsb.b = max; + if (max != 0) { + + } + hsb.s = max != 0 ? 255 * delta / max : 0; + if (hsb.s != 0) { + if (rgb.r == max) { + hsb.h = (rgb.g - rgb.b) / delta; + } else if (rgb.g == max) { + hsb.h = 2 + (rgb.b - rgb.r) / delta; + } else { + hsb.h = 4 + (rgb.r - rgb.g) / delta; + } + } else { + hsb.h = -1; + } + hsb.h *= 60; + if (hsb.h < 0) { + hsb.h += 360; + } + hsb.s *= 100/255; + hsb.b *= 100/255; + return hsb; + }, + HSBToRGB = function (hsb) { + var rgb = {}; + var h = Math.round(hsb.h); + var s = Math.round(hsb.s*255/100); + var v = Math.round(hsb.b*255/100); + if(s == 0) { + rgb.r = rgb.g = rgb.b = v; + } else { + var t1 = v; + var t2 = (255-s)*v/255; + var t3 = (t1-t2)*(h%60)/60; + if(h==360) h = 0; + if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} + else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} + else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} + else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} + else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} + else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} + else {rgb.r=0; rgb.g=0; rgb.b=0} + } + return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; + }, + RGBToHex = function (rgb) { + var hex = [ + rgb.r.toString(16), + rgb.g.toString(16), + rgb.b.toString(16) + ]; + $.each(hex, function (nr, val) { + if (val.length == 1) { + hex[nr] = '0' + val; + } + }); + return hex.join(''); + }, + HSBToHex = function (hsb) { + return RGBToHex(HSBToRGB(hsb)); + }, + restoreOriginal = function () { + var cal = $(this).parent(); + var col = cal.data('colorpicker').origColor; + cal.data('colorpicker').color = col; + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + }; + return { + init: function (opt) { + opt = $.extend({}, defaults, opt||{}); + if (typeof opt.color == 'string') { + opt.color = HexToHSB(opt.color); + } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { + opt.color = RGBToHSB(opt.color); + } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { + opt.color = fixHSB(opt.color); + } else { + return this; + } + return this.each(function () { + if (!$(this).data('colorpickerId')) { + var options = $.extend({}, opt); + options.origColor = opt.color; + var id = 'collorpicker_' + parseInt(Math.random() * 1000); + $(this).data('colorpickerId', id); + var cal = $(tpl).attr('id', id); + if (options.flat) { + cal.appendTo(this).show(); + } else { + cal.appendTo(document.body); + } + options.fields = cal + .find('input') + .bind('keyup', keyDown) + .bind('change', change) + .bind('blur', blur) + .bind('focus', focus); + cal + .find('span').bind('mousedown', downIncrement).end() + .find('>div.colorpicker_current_color').bind('click', restoreOriginal); + options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); + options.selectorIndic = options.selector.find('div div'); + options.el = this; + options.hue = cal.find('div.colorpicker_hue div'); + cal.find('div.colorpicker_hue').bind('mousedown', downHue); + options.newColor = cal.find('div.colorpicker_new_color'); + options.currentColor = cal.find('div.colorpicker_current_color'); + cal.data('colorpicker', options); + cal.find('div.colorpicker_submit') + .bind('mouseenter', enterSubmit) + .bind('mouseleave', leaveSubmit) + .bind('click', clickSubmit); + fillRGBFields(options.color, cal.get(0)); + fillHSBFields(options.color, cal.get(0)); + fillHexFields(options.color, cal.get(0)); + setHue(options.color, cal.get(0)); + setSelector(options.color, cal.get(0)); + setCurrentColor(options.color, cal.get(0)); + setNewColor(options.color, cal.get(0)); + if (options.flat) { + cal.css({ + position: 'relative', + display: 'block' + }); + } else { + $(this).bind(options.eventName, show); + } + } + }); + }, + showPicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + show.apply(this); + } + }); + }, + hidePicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + $('#' + $(this).data('colorpickerId')).hide(); + } + }); + }, + setColor: function(col) { + if (typeof col == 'string') { + col = HexToHSB(col); + } else if (col.r != undefined && col.g != undefined && col.b != undefined) { + col = RGBToHSB(col); + } else if (col.h != undefined && col.s != undefined && col.b != undefined) { + col = fixHSB(col); + } else { + return this; + } + return this.each(function(){ + if ($(this).data('colorpickerId')) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').color = col; + cal.data('colorpicker').origColor = col; + fillRGBFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + setHue(col, cal.get(0)); + setSelector(col, cal.get(0)); + setCurrentColor(col, cal.get(0)); + setNewColor(col, cal.get(0)); + } + }); + } + }; + }(); + $.fn.extend({ + ColorPicker: ColorPicker.init, + ColorPickerHide: ColorPicker.hidePicker, + ColorPickerShow: ColorPicker.showPicker, + ColorPickerSetColor: ColorPicker.setColor + }); +})(jQuery); diff --git a/modules/photoannotation/js/jquery.annotate.js b/modules/photoannotation/js/jquery.annotate.js index 49f3e580..ba98339e 100644 --- a/modules/photoannotation/js/jquery.annotate.js +++ b/modules/photoannotation/js/jquery.annotate.js @@ -243,7 +243,7 @@ notetitle = this.note.text; selecteduser = " selected=\"selected\""; } - var userdropdown = ''; for (var user in users) { var userval = users[user]; @@ -254,7 +254,23 @@ userdropdown += ''; } userdropdown += ''; - var form = $('
    ' + labels[10] + userdropdown + '
    ' + labels[4] + '
    ' + labels[0] + '' + '
    ' + labels[4] + '
    ' + labels[1] + '
    ' + labels[2] + '
    '); + var form = $('
    \ +
    \ + \ + \ +
    ' + labels[12] + '\ + ' + userdropdown + + '
    ' + labels[4] + '
    \ + \ + ' + + '
    ' + labels[4] + '
    \ + \ +
    \ +
    ' + labels[2] + '\ +
    '); + + + this.form = form; $('body').append(this.form); $("#photoannotation-form").ready(function() { diff --git a/modules/photoannotation/js/jquery.annotate.min.js b/modules/photoannotation/js/jquery.annotate.min.js deleted file mode 100644 index db7667f2..00000000 --- a/modules/photoannotation/js/jquery.annotate.min.js +++ /dev/null @@ -1,2 +0,0 @@ - -(function($){$.fn.annotateImage=function(options){var opts=$.extend({},$.fn.annotateImage.defaults,options);var image=this;this.image=this;this.mode='view';this.getUrl=opts.getUrl;this.saveUrl=opts.saveUrl;this.deleteUrl=opts.deleteUrl;this.currentUrl=opts.currentUrl;this.deleteUrl=opts.deleteUrl;this.editable=opts.editable;this.useAjax=opts.useAjax;this.tags=opts.tags;this.notes=opts.notes;this.labels=opts.labels;this.csrf=opts.csrf;this.canvas=$('
    ');this.canvas.children('.image-annotate-edit').hide();this.canvas.children('.image-annotate-view').hide();this.image.after(this.canvas);this.canvas.height(this.height());this.canvas.width(this.width());this.canvas.css('background-image','url("'+this.attr('src')+'")');this.canvas.children('.image-annotate-view, .image-annotate-edit').height(this.height());this.canvas.children('.image-annotate-view, .image-annotate-edit').width(this.width());this.canvas.hover(function(){if($(this).children('.image-annotate-edit').css('display')=='none'){$(this).children('.image-annotate-view').show()}},function(){$(this).children('.image-annotate-view').hide();$(this).children('.image-annotate-note').hide()});this.canvas.children('.image-annotate-view').hover(function(){$(this).show()},function(){$(this).hide();$(this).children('.image-annotate-note').hide()});if(this.useAjax){$.fn.annotateImage.ajaxLoad(this)}else{$.fn.annotateImage.load(this,this.labels,this.editable,this.csrf,this.deleteUrl,this.currentUrl)}if($('#g-photoannotation-link').length!=0){this.button=$('#g-photoannotation-link');this.button.click(function(){$.fn.annotateImage.add(image,opts.tags,opts.labels,opts.saveUrl,opts.currentUrl,opts.csrf)})}this.hide();return this};$.fn.annotateImage.defaults={getUrl:'your-get.rails',saveUrl:'your-save.rails',deleteUrl:'your-delete.rails',editable:true,useAjax:true,tags:new Array(),notes:new Array()};$.fn.annotateImage.clear=function(image){for(var i=0;iOK');ok.click(function(){var form=$('#image-annotate-edit-form form');var text=$('#image-annotate-text').val();$.fn.annotateImage.appendPosition(form,editable)image.mode='view';form.submit();editable.destroy()});editable.form.append(ok)};$.fn.annotateImage.createCancelButton=function(editable,image){var cancel=$('Cancel');cancel.click(function(){editable.destroy();image.mode='view'});editable.form.append(cancel)};$.fn.annotateImage.saveAsHtml=function(image,target){var element=$(target);var html="";for(var i=0;i'};$.fn.annotateEdit=function(image,note,tags,labels,saveUrl,currentUrl,csrf){this.image=image;if(note){this.note=note}else{var newNote=new Object();newNote.id="new";newNote.top=30;newNote.left=30;newNote.width=30;newNote.height=30;newNote.text="";this.note=newNote}var area=image.canvas.children('.image-annotate-edit').children('.image-annotate-edit-area');this.area=area;this.area.css('height',this.note.height+'px');this.area.css('width',this.note.width+'px');this.area.css('left',this.note.left+'px');this.area.css('top',this.note.top+'px');image.canvas.children('.image-annotate-view').hide();image.canvas.children('.image-annotate-edit').show();var tagdropdown=labels[0]+'';var form=$('
    '+tagdropdown+labels[1]+''+labels[2]+'
    ');this.form=form;$('body').append(this.form);this.form.css('left',this.area.offset().left+'px');this.form.css('top',(parseInt(this.area.offset().top)+parseInt(this.area.height())+7)+'px');area.resizable({handles:'all',stop:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')}}).draggable({containment:image.canvas,drag:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')},stop:function(e,ui){form.css('left',area.offset().left+'px');form.css('top',(parseInt(area.offset().top)+parseInt(area.height())+2)+'px')}});return this};$.fn.annotateEdit.prototype.destroy=function(){this.image.canvas.children('.image-annotate-edit').hide();this.area.resizable('destroy');this.area.draggable('destroy');this.area.css('height','');this.area.css('width','');this.area.css('left','');this.area.css('top','');this.form.remove()}$.fn.annotateView=function(image,note,labels,editable,csrf,deleteUrl,currentUrl){this.image=image;this.note=note;this.area=$('
    ');image.canvas.children('.image-annotate-view').prepend(this.area);if(editable){this.delarea=$('
    ');image.canvas.children('.image-annotate-view').prepend(this.delarea);this.delarea.bind('click',function(){if(confirm(labels[3])){var alink=$(".g-fullsize-link");alink.unbind();alink.attr('href','#');alink.removeAttr('rel');var delform=$(this).children('div').children('form');delform.submit()}})this.delarea.hide()}this.form=$('
    '+note.text+'
    ');this.form.hide();image.canvas.children('.image-annotate-view').append(this.form);this.form.children('span.actions').hide();this.setPosition();var annotation=this;this.area.hover(function(){annotation.show();if(annotation.delarea!=undefined){annotation.delarea.show()}},function(){annotation.hide();if(annotation.delarea!=undefined){annotation.delarea.hide()}});if(editable){this.delarea.hover(function(){annotation.delarea.show()},function(){annotation.delarea.hide()})}if(note.url!=""&¬e.url!=null){this.area.bind('click',function(){var alink=$(".g-fullsize-link");alink.unbind();alink.attr('href','#');alink.removeAttr('rel');window.location=note.url})}};$.fn.annotateView.prototype.setPosition=function(){this.area.children('div').height((parseInt(this.note.height)-2)+'px');this.area.children('div').width((parseInt(this.note.width)-2)+'px');this.area.css('left',(this.note.left)+'px');this.area.css('top',(this.note.top)+'px');this.form.css('left',(this.note.left)+'px');this.form.css('top',(parseInt(this.note.top)+parseInt(this.note.height)+7)+'px');if(this.delarea!=undefined){this.delarea.children('div').height('14px');this.delarea.children('div').width('14px');this.delarea.css('left',(this.note.left+parseInt(this.note.width))+'px');this.delarea.css('top',(this.note.top)+'px')}};$.fn.annotateView.prototype.show=function(){this.form.fadeIn(250);if(!this.note.editable){this.area.addClass('image-annotate-area-hover')}else{this.area.addClass('image-annotate-area-editable-hover')}};$.fn.annotateView.prototype.hide=function(){this.form.fadeOut(250);this.area.removeClass('image-annotate-area-hover');this.area.removeClass('image-annotate-area-editable-hover')};$.fn.annotateView.prototype.destroy=function(){this.area.remove();this.form.remove()}$.fn.annotateView.prototype.edit=function(){if(this.image.mode=='view'){this.image.mode='edit';var annotation=this;var editable=new $.fn.annotateEdit(this.image,this.note);$.fn.annotateImage.createSaveButton(editable,this.image,annotation);var del=$('Delete');del.click(function(){var form=$('#image-annotate-edit-form form');$.fn.annotateImage.appendPosition(form,editable)if(annotation.image.useAjax){$.ajax({url:annotation.image.deleteUrl,data:form.serialize(),error:function(e){alert("An error occured deleting that note.")}})}annotation.image.mode='view';editable.destroy();annotation.destroy()});editable.form.append(del);$.fn.annotateImage.createCancelButton(editable,this.image)}};$.fn.annotateImage.appendPosition=function(form,editable){var areaFields=$(''+''+''+''+'');form.append(areaFields)}$.fn.annotateView.prototype.resetPosition=function(editable,text){this.form.html(text);this.form.hide();this.area.children('div').height(editable.area.height()+'px');this.area.children('div').width((editable.area.width()-2)+'px');this.area.css('left',(editable.area.position().left)+'px');this.area.css('top',(editable.area.position().top)+'px');this.form.css('left',(editable.area.position().left)+'px');this.form.css('top',(parseInt(editable.area.position().top)+parseInt(editable.area.height())+7)+'px');this.note.top=editable.area.position().top;this.note.left=editable.area.position().left;this.note.height=editable.area.height();this.note.width=editable.area.width();this.note.text=text;this.note.id=editable.note.id;this.editable=true}})(jQuery); diff --git a/modules/photoannotation/views/admin_photoannotation.html.php b/modules/photoannotation/views/admin_photoannotation.html.php index 0c963a85..9822ebfb 100644 --- a/modules/photoannotation/views/admin_photoannotation.html.php +++ b/modules/photoannotation/views/admin_photoannotation.html.php @@ -9,3 +9,17 @@ please download and install the Module order module.") ?>

    + diff --git a/modules/photoannotation/views/photoannotation_highlight_block.html.php b/modules/photoannotation/views/photoannotation_highlight_block.html.php index e688d5d9..ec0670ca 100644 --- a/modules/photoannotation/views/photoannotation_highlight_block.html.php +++ b/modules/photoannotation/views/photoannotation_highlight_block.html.php @@ -117,7 +117,7 @@ } $users_arraystring = trim($users_arraystring, ","); $users_arraystring .= " ],"; - $labels_arraystring = "labels: [ '". t("Tag:") ."','". t("Note Title:") ."','". t("Description (optional):") ."','". t("Are you sure you want to delete this annotation?") ."','". t("or") ."','". t("Yes") ."','". t("No") ."','". t("Confirm deletion") ."','". t("Save") ."','". t("Cancel") ."','". t("User") ."','". t("No user selected") ."' ],"; + $labels_arraystring = "labels: [ '". t("Tag:") ."','". t("Note Title:") ."','". t("Description (optional)") ."','". t("Are you sure you want to delete this annotation?") ."','". t("or") ."','". t("Yes") ."','". t("No") ."','". t("Confirm deletion") ."','". t("Save") ."','". t("Cancel") ."','". t("User:") ."','". t("No user selected") ."','". t("Select one of the following") ."' ],"; ?> -
    - -

    - " - alt="display_name()) ?>" - class="g-avatar g-left" width="40" height="40" /> - $user->display_name())) ?> -

    - -
    -

    title) ?>

    -
    - view ?> -
    -
    - -
    diff --git a/modules/photoannotation/views/user_profile_info.html.php b/modules/photoannotation/views/user_profile_info.html.php deleted file mode 100644 index e559abda..00000000 --- a/modules/photoannotation/views/user_profile_info.html.php +++ /dev/null @@ -1,9 +0,0 @@ - - - $value): ?> - - - - - -
    From 55d9bc4986cd685331ff7b283bfcc7a14d91750b Mon Sep 17 00:00:00 2001 From: hukoeth Date: Sun, 5 Sep 2010 22:27:38 +0200 Subject: [PATCH 52/55] Version 4 beta 1: - Implemented user notification (I need testers for this since for some reason my server is not sending mails with PHPs mail-function so I couldn't test) - Users can decide if they want to receive notifications by editing their profile - Admin can decide if notifications is switched on by default for new users and users who have not saved this setting - Guest user is now hidden when adding an annotation - Added admin option allowing to convert a user annotation to a tag or note annotation when deleting a user - Added admin option to remove orphaned annotations - Fixed borders not showing when hovering over an annotation area when having borders switched off on photo hover - Fixed issue on user page where sometime only one photo would be shown x-times - Fixed pagination on user profile pages --- .../controllers/admin_photoannotation.php | 188 ++++++++++++++++++ .../controllers/photoannotation.php | 42 +++- .../helpers/photoannotation.php | 91 --------- .../helpers/photoannotation_event.php | 187 ++++++++++++++++- .../helpers/photoannotation_installer.php | 19 ++ .../helpers/photoannotation_theme.php | 9 +- .../models/photoannotation_notification.php | 21 ++ modules/photoannotation/module.info | 2 +- .../views/admin_photoannotation.html.php | 10 +- .../admin_photoannotation_converter.html.php | 10 + ...n_photoannotation_tagsmaintanance.html.php | 27 +++ .../photoannotation_highlight_block.html.php | 66 +++--- 12 files changed, 537 insertions(+), 135 deletions(-) delete mode 100644 modules/photoannotation/helpers/photoannotation.php create mode 100644 modules/photoannotation/models/photoannotation_notification.php create mode 100644 modules/photoannotation/views/admin_photoannotation_converter.html.php create mode 100644 modules/photoannotation/views/admin_photoannotation_tagsmaintanance.html.php diff --git a/modules/photoannotation/controllers/admin_photoannotation.php b/modules/photoannotation/controllers/admin_photoannotation.php index 347c90de..80afecdf 100644 --- a/modules/photoannotation/controllers/admin_photoannotation.php +++ b/modules/photoannotation/controllers/admin_photoannotation.php @@ -21,6 +21,70 @@ class Admin_Photoannotation_Controller extends Admin_Controller { public function index() { print $this->_get_view(); } + + public function converter() { + print $this->_get_converter_view(); + } + + public function tagsmaintanance($delete) { + print $this->_get_tagsmaintanance_view($delete); + } + + public function converthandler() { + access::verify_csrf(); + $form = $this->_get_converter_form(); + if ($form->validate()) { + //Load the source tag + $sourcetag = ORM::factory("tag", $form->sourcetag->value); + if (!$sourcetag->loaded()) { + message::error(t("The specified tag could not be found")); + url::redirect("admin/photoannotation/converter"); + } + //Load the target user + $targetuser = ORM::factory("user", $form->targetuser->value); + if (!$targetuser->loaded()) { + message::error(t("The specified user could not be found")); + url::redirect("admin/photoannotation/converter"); + } + //Load all existing tag annotations + $tag_annotations = ORM::factory("items_face")->where("tag_id", "=", $sourcetag->id)->find_all(); + + foreach ($tag_annotations as $tag_annotation) { + //Check if there are already user annotations of the target user on photo + $user_annotations = ORM::factory("items_user") + ->where("item_id", "=", $tag_annotation->item_id) + ->where("user_id", "=", $targetuser->id) + ->find_all(); + if (count($user_annotations) > 1) { + //If there are more than one existing annotations, delete all and create a new one + foreach ($user_annotations as $user_annotation) { + $user_annotation->delete(); + } + $target_annotation = ORM::factory("items_user"); + } elseif (count($user_annotations) == 1) { + //If there is only one existing annotation, load it and update it + $target_annotation = ORM::factory("items_user", $user_annotations[0]->id); + } else { + //If there are no existing annotations create one + $target_annotation = ORM::factory("items_user"); + } + //Save values from tag annotation to user annotation and save it + $target_annotation->user_id = $targetuser->id; + $target_annotation->item_id = $tag_annotation->item_id; + $target_annotation->x1 = $tag_annotation->x1; + $target_annotation->y1 = $tag_annotation->y1; + $target_annotation->x2 = $tag_annotation->x2; + $target_annotation->y2 = $tag_annotation->y2; + $target_annotation->description = $tag_annotation->description; + $target_annotation->save(); + //Delete the old annotation + $tag_annotation->delete(); + } + message::success(t("%count tag annotations (%tagname) have been converted to user annotations (%username)", array("count" => count($tag_annotations), "tagname" => $sourcetag->name, "username" => $targetuser->display_name()))); + url::redirect("admin/photoannotation/converter"); + } + print $this->_get_converter_view($form); + } public function handler() { access::verify_csrf(); @@ -47,6 +111,12 @@ class Admin_Photoannotation_Controller extends Admin_Controller { "photoannotation", "shownotes", $form->legendsettings->shownotes->value, true); module::set_var( "photoannotation", "fullname", $form->legendsettings->fullname->value, true); + module::set_var( + "photoannotation", "nonotifications", $form->notifications->nonotifications->value, true); + module::set_var( + "photoannotation", "notificationoptout", $form->notifications->notificationoptout->value, true); + module::set_var( + "photoannotation", "onuserdelete", $form->onuserdelete->onuserdelete->value); message::success(t("Your settings have been saved.")); url::redirect("admin/photoannotation"); } @@ -55,11 +125,120 @@ class Admin_Photoannotation_Controller extends Admin_Controller { private function _get_view($form=null) { $v = new Admin_View("admin.html"); + $v->page_title = t("Photo annotation"); $v->content = new View("admin_photoannotation.html"); $v->content->form = empty($form) ? $this->_get_form() : $form; return $v; } + private function _get_converter_view($form=null) { + $v = new Admin_View("admin.html"); + $v->page_title = t("Photo annotation converter"); + $v->content = new View("admin_photoannotation_converter.html"); + $v->content->form = empty($form) ? $this->_get_converter_form() : $form; + return $v; + } + + private function _get_tagsmaintanance_view($delete = false) { + $tag_orpanes_count = 0; + $user_orphanes_count = 0; + $item_orphanes_count = 0; + $tag_orpanes_deleted = 0; + $user_orphanes_deleted = 0; + $item_orphanes_deleted = 0; + //check all tag annotations + $tag_annotations = ORM::factory("items_face")->find_all(); + foreach ($tag_annotations as $tag_annotation) { + $check_tag = ORM::factory("tag")->where("id", "=", $tag_annotation->tag_id)->find(); + if (!$check_tag->loaded()) { + if ($delete) { + $tag_annotation->delete(); + $tag_orpanes_deleted++; + } else { + $tag_orpanes_count++; + } + } else { + $check_item = ORM::factory("item")->where("id", "=", $tag_annotation->item_id)->find(); + if (!$check_item->loaded()) { + if ($delete) { + $tag_annotation->delete(); + $item_orpanes_deleted++; + } else { + $item_orpanes_count++; + } + } + } + } + //check all user annotations + $user_annotations = ORM::factory("items_user")->find_all(); + foreach ($user_annotations as $user_annotation) { + $check_user = ORM::factory("user")->where("id", "=", $user_annotation->user_id)->find(); + if (!$check_user->loaded()) { + if ($delete) { + $user_annotation->delete(); + $user_orpanes_deleted++; + } else { + $user_orphanes_count++; + } + } else { + $check_item = ORM::factory("item")->where("id", "=", $user_annotation->item_id)->find(); + if (!$check_item->loaded()) { + if ($delete) { + $user_annotation->delete(); + $item_orpanes_deleted++; + } else { + $item_orpanes_count++; + } + } + } + } + + //check all user annotations + $note_annotations = ORM::factory("items_note")->find_all(); + foreach ($note_annotations as $note_annotation) { + $check_item = ORM::factory("item")->where("id", "=", $note_annotation->item_id)->find(); + if (!$check_item->loaded()) { + if ($delete) { + $note_annotation->delete(); + $item_orpanes_deleted++; + } else { + $item_orpanes_count++; + } + } + } + $v = new Admin_View("admin.html"); + $v->page_title = t("Photo annotation tags maintanance"); + $v->content = new View("admin_photoannotation_tagsmaintanance.html"); + $v->content->tag_orpanes_count = $tag_orpanes_count; + $v->content->user_orphanes_count = $user_orphanes_count; + $v->content->item_orphanes_count = $item_orphanes_count; + $v->content->tag_orpanes_deleted = $tag_orpanes_deleted; + $v->content->user_orphanes_deleted = $user_orphanes_deleted; + $v->content->item_orphanes_deleted = $item_orphanes_deleted; + $v->content->dodeletion = $delete; + return $v; + } + + private function _get_converter_form() { + //get all tags + $tags = ORM::factory("tag")->order_by("name", "ASC")->find_all(); + foreach ($tags as $tag) { + $tag_array[$tag->id] = $tag->name; + } + //get all users + $users = ORM::factory("user")->order_by("name", "ASC")->find_all(); + foreach ($users as $user) { + $user_array[$user->id] = $user->display_name(); + } + $form = new Forge("admin/photoannotation/converthandler", "", "post", array("id" => "g-admin-form")); + $form->dropdown("sourcetag")->label(t("Select tag")) + ->options($tag_array); + $form->dropdown("targetuser")->label(t("Select user")) + ->options($user_array); + $form->submit("submit")->value(t("Convert")); + return $form; + } + private function _get_form() { $form = new Forge("admin/photoannotation/handler", "", "post", array("id" => "g-admin-form")); $group = $form->group("hoverphoto")->label(t("Hovering over the photo")); @@ -89,6 +268,15 @@ class Admin_Photoannotation_Controller extends Admin_Controller { ->checked(module::get_var("photoannotation", "shownotes", false)); $group->checkbox("fullname")->label(t("Show full name of a user instead of the username on annotations (username will be dispayed for users without a full name).")) ->checked(module::get_var("photoannotation", "fullname", false)); + $group = $form->group("notifications")->label(t("Notification settings")); + $group->checkbox("nonotifications")->label(t("Disable user notifications.")) + ->checked(module::get_var("photoannotation", "nonotifications", false)); + $group->checkbox("notificationoptout")->label(t("Notify users by default (only applies to new users and user who have not saved their profile after installing this module).")) + ->checked(module::get_var("photoannotation", "notificationoptout", false)); + $group = $form->group("onuserdelete")->label(t("Auto conversion settings")); + $group->dropdown("onuserdelete")->label(t("When deleting a user do the following with all annotations associated with this user")) + ->options(array("0" => t("Delete annotation"), "1" => t("Convert to tag annotation"), "2" => t("Convert to note annotation"))) + ->selected(module::get_var("photoannotation", "onuserdelete", "0")); $form->submit("submit")->value(t("Save")); return $form; } diff --git a/modules/photoannotation/controllers/photoannotation.php b/modules/photoannotation/controllers/photoannotation.php index 3718d7bb..ab8fbf20 100644 --- a/modules/photoannotation/controllers/photoannotation.php +++ b/modules/photoannotation/controllers/photoannotation.php @@ -173,10 +173,37 @@ class photoannotation_Controller extends Controller { $item_old_user->delete(); } $item_user = ORM::factory("items_user"); - } elseif (count($item_old_users) > 0) { + } elseif (count($item_old_users) == 1) { $item_user = ORM::factory("items_user", $item_old_users[0]->id); } else { $item_user = ORM::factory("items_user"); + if (!module::get_var("photoannotation", "nonotifications", false)) { + $notification_settings = ORM::factory("photoannotation_notification")->where("user_id", "=", $user_id)->find(); + if (!$notification_settings->loaded()) { + $notify = module::get_var("photoannotation", "notificationoptout", false); + $notification_settings = ORM::factory("photoannotation_notification"); + $notification_settings->user_id = $user_id; + $notification_settings->newtag = $notify; + $notification_settings->comment = $notify; + $notification_settings->save(); + } + if ($notification_settings->newtag) { + $user_recipient = ORM::factory("user")->where("id", "=", $user_id)->find(); + if ($user_recipient->email != "") { + $recipient = $user_recipient->email; + $subject = t("Somebody has tagged a photo of you"); + $item_notify = ORM::factory("item")->where("id", "=", $item_id)->find(); + $body = t("Please visit the gallery to view the photo.", array("url" => $item_notify->resize_url(true))); + Sendmail::factory() + ->to($recipient) + ->subject($subject) + ->header("Mime-Version", "1.0") + ->header("Content-type", "text/html; charset=utf-8") + ->message($body) + ->send(); + } + } + } } $item_user->user_id = $user_id; $item_user->item_id = $item_id; @@ -223,4 +250,17 @@ class photoannotation_Controller extends Controller { $item_note->description = $description; $item_note->save(); } + + private function _send_tag_created($user_id, $item_id) { + $recipient = ORM::factory("user", $user_id); + if ($recipient->email) { + Sendmail::factory() + ->to($recipient->email) + ->subject($t("Someone has tagged a photo with you on it")) + ->header("Mime-Version", "1.0") + ->header("Content-Type", "text/html; charset=UTF-8") + ->message($text) + ->send(); + } + } } diff --git a/modules/photoannotation/helpers/photoannotation.php b/modules/photoannotation/helpers/photoannotation.php deleted file mode 100644 index 24b26404..00000000 --- a/modules/photoannotation/helpers/photoannotation.php +++ /dev/null @@ -1,91 +0,0 @@ -item_id = $item->id; - $newnote->x1 = $x1; - $newnote->y1 = $y1; - $newnote->x2 = $x2; - $newnote->y2 = $y2; - $newnote->title = $tag_title; - $newnote->description = $description; - $newnote->save(); - } catch (Exception $e) { - Kohana_Log::add("error", "Error adding note annotation.\n" . - $e->getMessage() . "\n" . $e->getTraceAsString()); - } - } elseif ( $bTag && !empty($tag_title) ) { - try { - //we are adding a tag - //first find the tag - $tag = ORM::factory("tag")->where("name", "=", $tag_title)->find(); - //tag was not found - if (!$tag->loaded()) { - $tag->name = $tag_title; - $tag->count = 0; - } - - $tag->add($item); - $tag->count++; - $tag->save(); - //check if the tag is attached to the item - // if the tag isn't attached, attach it - //check if the face is already tagged - $existingFace = ORM::factory("items_face") - ->where("tag_id", "=", $tag->id) - ->where("item_id", "=", $item->id) - ->find_all(); - - if (count($existingFace) == 0) { - // Save the new face to the database. - $newface = ORM::factory("items_face"); - $newface->tag_id = $tag->id; - $newface->item_id = $item->id; - $newface->x1 = $x1; - $newface->y1 = $y1; - $newface->x2 = $x2; - $newface->y2 = $y2; - $newface->description = $description; - $newface->save(); - } else { - // Update the coordinates of an existing face. - $updatedFace = ORM::factory("items_face", $existingFace[0]->id); - $updatedFace->x1 = $x1; - $updatedFace->y1 = $y1; - $updatedFace->x2 = $x2; - $updatedFace->y2 = $y2; - $updatedFace->description = $description; - $updatedFace->save(); - } - } catch (Exception $e) { - Kohana_Log::add("error", "Error adding note annotation.\n" . - $e->getMessage() . "\n" . $e->getTraceAsString()); - } - } else { - throw new exception("@todo MISSING_TAG_OR_DESCRIPTION"); - } - } -} -?> - diff --git a/modules/photoannotation/helpers/photoannotation_event.php b/modules/photoannotation/helpers/photoannotation_event.php index ca5c5daf..a88a9ba9 100644 --- a/modules/photoannotation/helpers/photoannotation_event.php +++ b/modules/photoannotation/helpers/photoannotation_event.php @@ -89,8 +89,70 @@ class photoannotation_event_Core { ->where("user_id", "=", $old->id) ->find_all(); if (count($existingFaces) > 0) { + $onuserdelete = module::get_var("photoannotation", "onuserdelete", "0"); + if (module::get_var("photoannotation", "fullname", false)) { + $new_tag_name = $old->display_name(); + } else { + $new_tag_name = $old->name; + } + switch ($onuserdelete) { + case "1": + //convert to tag + $tag = ORM::factory("tag")->where("name", "=", $new_tag_name)->find(); + if (!$tag->loaded()) { + $tag->name = $new_tag_name; + $tag->count = 0; + } + foreach ($existingFaces as $existingFace) { + $item = ORM::factory("item")->where("id", "=", $existingFace->item_id)->find(); + $tag->add($item); + $tag->count++; + $tag->save(); + $new_items_tag = ORM::factory("items_face"); + $new_items_tag->item_id = $existingFace->item_id; + $new_items_tag->tag_id = $tag->id; + $new_items_tag->x1 = $existingFace->x1; + $new_items_tag->y1 = $existingFace->y1; + $new_items_tag->x2 = $existingFace->x2; + $new_items_tag->y2 = $existingFace->y2; + $new_items_tag->description = $existingFace->description; + $new_items_tag->save(); + } + break; + case "2": + //convert to note + foreach ($existingFaces as $existingFace) { + $item = ORM::factory("item")->where("id", "=", $existingFace->item_id)->find(); + $new_items_tag = ORM::factory("items_note"); + $new_items_tag->item_id = $existingFace->item_id; + $new_items_tag->title = $new_tag_name; + $new_items_tag->x1 = $existingFace->x1; + $new_items_tag->y1 = $existingFace->y1; + $new_items_tag->x2 = $existingFace->x2; + $new_items_tag->y2 = $existingFace->y2; + $new_items_tag->description = $existingFace->description; + $new_items_tag->save(); + } + } db::build()->delete("items_users")->where("user_id", "=", $old->id)->execute(); } + // Delete notification settings + $notification_settings = ORM::factory("photoannotation_notification") + ->where("user_id", "=", $old->id) + ->find(); + if ($notification_settings->loaded()) { + $notification_settings->delete(); + } + } + + static function user_created($user) { + // Write notification settings + $notify = module::get_var("photoannotation", "notificationoptout", false); + $notification_settings = ORM::factory("photoannotation_notification"); + $notification_settings->user_id = $user->id; + $notification_settings->newtag = $notify; + $notification_settings->comment = $notify; + $notification_settings->save(); } static function admin_menu($menu, $theme) { @@ -102,7 +164,7 @@ class photoannotation_event_Core { } static function show_user_profile($data) { - $view = new View("dynamic.html"); + $view = new Theme_View("dynamic.html", "collection", "userprofiles"); //load thumbs $item_users = ORM::factory("items_user")->where("user_id", "=", $data->user->id)->find_all(); $children_count = count($item_users); @@ -110,7 +172,7 @@ class photoannotation_event_Core { $item_thumb = ORM::factory("item") ->viewable() ->where("type", "!=", "album") - ->where("id", ">=", $item_user->item_id) + ->where("id", "=", $item_user->item_id) ->find(); $item_thumbs[] = $item_thumb; } @@ -118,13 +180,23 @@ class photoannotation_event_Core { $page = (int) Input::instance()->get("page", "1"); $offset = ($page-1) * $page_size; $max_pages = max(ceil($children_count / $page_size), 1); - + // Make sure that the page references a valid offset if ($page < 1) { url::redirect($album->abs_url()); } else if ($page > $max_pages) { url::redirect($album->abs_url("page=$max_pages")); } + if ($page < $max_pages) { + $next_page_url = url::site("user_profile/show/". $data->user->id ."?page=". ($page + 1)); + $view->set_global("next_page_url", $next_page_url); + $view->set_global("first_page_url", url::site("user_profile/show/". $data->user->id ."?page=". $max_pages)); + } + + if ($page > 1) { + $view->set_global("previous_page_url", url::site("user_profile/show/". $data->user->id ."?page=". ($page - 1))); + $view->set_global("first_page_url", url::site("user_profile/show/". $data->user->id ."?page=1")); + } $view->set_global("page", $page); $view->set_global("max_pages", $max_pages); $view->set_global("page_size", $page_size); @@ -136,6 +208,111 @@ class photoannotation_event_Core { $data->content[] = (object)array("title" => t("Photos"), "view" => $view); } } - - + + static function user_edit_form($user, $form) { + // Allow users to modify notification settings. + if (!module::get_var("photoannotation", "nonotifications", false)) { + $notification_settings = ORM::factory("photoannotation_notification")->where("user_id", "=", $user->id)->find(); + if (!$notification_settings->loaded()) { + $notify = module::get_var("photoannotation", "notificationoptout", false); + $notification_settings = ORM::factory("photoannotation_notification"); + $notification_settings->user_id = $user->id; + $notification_settings->newtag = $notify; + $notification_settings->comment = $notify; + $notification_settings->save(); + } + $user_notification = $form->edit_user->group("edit_notification")->label("Tag notifications"); + $user_notification->checkbox("photoannotation_newtag")->label(t("Notify me when a tag is added to a photo with me")) + ->checked($notification_settings->newtag); + $user_notification->checkbox("photoannotation_comment")->label(t("Notify me if someone comments on a photo with me on it")) + ->checked($notification_settings->comment); + } + } + + static function user_edit_form_completed($user, $form) { + // Save notification settings. + if (!module::get_var("photoannotation", "nonotifications", false)) { + $notification_settings = ORM::factory("photoannotation_notification")->where("user_id", "=", $user->id)->find(); + if (!$notification_settings->loaded()) { + $notification_settings->user_id = $user->id; + } + $notification_settings->newtag = $form->edit_user->edit_notification->photoannotation_newtag->value; + $notification_settings->comment = $form->edit_user->edit_notification->photoannotation_comment->value; + $notification_settings->save(); + } + } + + static function comment_created($comment) { + //@todo: clean this up + $comment = ORM::factory("comment")->where("id", "=", "52")->find(); + if (!module::get_var("photoannotation", "nonotifications", false)) { + $item_users = ORM::factory("items_user")->where("item_id", "=", $comment->item_id)->find_all(); + if (count($item_users) > 0) { + foreach ($item_users as $item_user) { + $notification_settings = ORM::factory("photoannotation_notification")->where("user_id", "=", $item_user-user_id)->find(); + if (!$notification_settings->loaded()) { + $notify = module::get_var("photoannotation", "notificationoptout", false); + $notification_settings = ORM::factory("photoannotation_notification"); + $notification_settings->user_id = $item_user-user_id; + $notification_settings->newtag = $notify; + $notification_settings->comment = $notify; + $notification_settings->save(); + } + if ($notification_settings->newtag) { + $user_recipient = ORM::factory("user")->where("id", "=", $item_user-user_id)->find(); + if ($user_recipient->email != "") { + $recipient = $user_recipient->email; + $subject = t("Somebody has commented on a photo of you"); + $item_notify = ORM::factory("item")->where("id", "=", $comment->item_id)->find(); + $body = t("Please visit the gallery to view the photo.", array("url" => $item_notify->resize_url(true))); + Sendmail::factory() + ->to($recipient) + ->subject($subject) + ->header("Mime-Version", "1.0") + ->header("Content-type", "text/html; charset=utf-8") + ->message($body) + ->send(); + } + } + } + } + } + } + + static function comment_updated($comment) { + //@todo: clean this up + $comment = ORM::factory("comment")->where("id", "=", "52")->find(); + if (!module::get_var("photoannotation", "nonotifications", false)) { + $item_users = ORM::factory("items_user")->where("item_id", "=", $comment->item_id)->find_all(); + if (count($item_users) > 0) { + foreach ($item_users as $item_user) { + $notification_settings = ORM::factory("photoannotation_notification")->where("user_id", "=", $item_user-user_id)->find(); + if (!$notification_settings->loaded()) { + $notify = module::get_var("photoannotation", "notificationoptout", false); + $notification_settings = ORM::factory("photoannotation_notification"); + $notification_settings->user_id = $item_user-user_id; + $notification_settings->newtag = $notify; + $notification_settings->comment = $notify; + $notification_settings->save(); + } + if ($notification_settings->newtag) { + $user_recipient = ORM::factory("user")->where("id", "=", $item_user-user_id)->find(); + if ($user_recipient->email != "") { + $recipient = $user_recipient->email; + $subject = t("Somebody has updated a commented on a photo of you"); + $item_notify = ORM::factory("item")->where("id", "=", $comment->item_id)->find(); + $body = t("Please visit the gallery to view the photo.", array("url" => $item_notify->resize_url(true))); + Sendmail::factory() + ->to($recipient) + ->subject($subject) + ->header("Mime-Version", "1.0") + ->header("Content-type", "text/html; charset=utf-8") + ->message($body) + ->send(); + } + } + } + } + } + } } diff --git a/modules/photoannotation/helpers/photoannotation_installer.php b/modules/photoannotation/helpers/photoannotation_installer.php index dd7a73c9..799e1341 100644 --- a/modules/photoannotation/helpers/photoannotation_installer.php +++ b/modules/photoannotation/helpers/photoannotation_installer.php @@ -56,6 +56,14 @@ class photoannotation_installer { `description` varchar(2048) default NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8;"); + + $db->query("CREATE TABLE IF NOT EXISTS {photoannotation_notifications} ( + `id` int(9) NOT NULL auto_increment, + `user_id` int(9) NOT NULL unique, + `newtag` int(2) default NULL, + `comment` int(2) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); // Set the module's version number. module::set_version("photoannotation", 3); @@ -80,6 +88,16 @@ class photoannotation_installer { DEFAULT CHARSET=utf8;"); module::set_version("photoannotation", $version = 3); } + if ($version == 3) { + $db->query("CREATE TABLE IF NOT EXISTS {photoannotation_notifications} ( + `id` int(9) NOT NULL auto_increment, + `user_id` int(9) NOT NULL unique, + `newtag` int(2) default NULL, + `comment` int(2) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + module::set_version("photoannotation", $version = 4); + } } static function deactivate() { @@ -94,6 +112,7 @@ class photoannotation_installer { $db->query("DROP TABLE IF EXISTS {items_faces};"); $db->query("DROP TABLE IF EXISTS {items_notes};"); $db->query("DROP TABLE IF EXISTS {items_users};"); + $db->query("DROP TABLE IF EXISTS {photoannotation_notifications};"); module::delete("photoannotation"); } } diff --git a/modules/photoannotation/helpers/photoannotation_theme.php b/modules/photoannotation/helpers/photoannotation_theme.php index 844fab8d..dcc5daa3 100644 --- a/modules/photoannotation/helpers/photoannotation_theme.php +++ b/modules/photoannotation/helpers/photoannotation_theme.php @@ -33,6 +33,11 @@ class photoannotation_theme_Core { $v .= ".photoannotation-edit-button {\n border:1px solid ". $bordercolor ." !important;\n }"; + if ($noborder) { + $border_thickness = "2px"; + } else { + $border_thickness = "1px"; + } if (!$noborder || !$noeditablehover || !$nohover) { if (!$noborder) { $v .= ".image-annotate-area {\n @@ -45,13 +50,13 @@ class photoannotation_theme_Core { if (!$noclickablehover) { $clickablehovercolor = "#". module::get_var("photoannotation", "clickablehovercolor", "00AD00"); $v .= ".image-annotate-area-editable-hover div {\n - border-color: ". $clickablehovercolor ." !important;\n + border: ". $border_thickness ." solid ". $clickablehovercolor ." !important;\n }\n"; } if (!$nohover) { $hovercolor = "#". module::get_var("photoannotation", "hovercolor", "990000"); $v .= ".image-annotate-area-hover div {\n - border-color: ". $hovercolor ." !important;\n + border: ". $border_thickness ." solid ". $hovercolor ." !important;\n }\n"; } } diff --git a/modules/photoannotation/models/photoannotation_notification.php b/modules/photoannotation/models/photoannotation_notification.php new file mode 100644 index 00000000..6cb6912a --- /dev/null +++ b/modules/photoannotation/models/photoannotation_notification.php @@ -0,0 +1,21 @@ +
    -

    +

    -

    TagFaces module by rWatcher.
    +

    TagFaces module by rWatcher.
    This means that notes and faces that you create in either one will be shown and are editable by the other module as well. If you added users to an annotation area though they will only be displayed with the Photo Annotation module.
    - You cannot have both active at the same time.

    - If you decide to show annotations below the photo but they are displayed below the comments section (or any other data), - please download and install the Module order module.") ?>

    + You cannot have both active at the same time.", array("tagfaces" => "http://codex.gallery2.org/Gallery3:Modules:tagfaces")) ?> +

    Convert existing tag annotations to user annotations", array("url" => url::site("admin/photoannotation/converter/"))) ?> +
    Check for orphaned annotations", array("url" => url::site("admin/photoannotation/tagsmaintanance/"))) ?>

    From 862729855f7c80da1883affa295cb0358f0ee9e7 Mon Sep 17 00:00:00 2001 From: hukoeth Date: Mon, 6 Sep 2010 22:35:52 +0200 Subject: [PATCH 54/55] Fix installer bug --- .../helpers/photoannotation_installer.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/photoannotation/helpers/photoannotation_installer.php b/modules/photoannotation/helpers/photoannotation_installer.php index 799e1341..8ea36ecf 100644 --- a/modules/photoannotation/helpers/photoannotation_installer.php +++ b/modules/photoannotation/helpers/photoannotation_installer.php @@ -89,13 +89,14 @@ class photoannotation_installer { module::set_version("photoannotation", $version = 3); } if ($version == 3) { - $db->query("CREATE TABLE IF NOT EXISTS {photoannotation_notifications} ( - `id` int(9) NOT NULL auto_increment, - `user_id` int(9) NOT NULL unique, - `newtag` int(2) default NULL, - `comment` int(2) default NULL, - PRIMARY KEY (`id`)) - DEFAULT CHARSET=utf8;"); + $db = Database::instance(); + $db->query("CREATE TABLE IF NOT EXISTS {photoannotation_notifications} ( + `id` int(9) NOT NULL auto_increment, + `user_id` int(9) NOT NULL unique, + `newtag` int(2) default NULL, + `comment` int(2) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); module::set_version("photoannotation", $version = 4); } } From 321b1638445a85c9e32156364b1a63f6b01a0f6c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 6 Sep 2010 23:02:57 -0700 Subject: [PATCH 55/55] Update identity API to match change in http://bit.ly/bVursD --- .../libraries/drivers/IdentityProvider/Wordpressdb.php | 6 +++--- .../libraries/drivers/IdentityProvider/Wordpressfile.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/wordpress_auth/libraries/drivers/IdentityProvider/Wordpressdb.php b/modules/wordpress_auth/libraries/drivers/IdentityProvider/Wordpressdb.php index 642eaf61..e71110e6 100644 --- a/modules/wordpress_auth/libraries/drivers/IdentityProvider/Wordpressdb.php +++ b/modules/wordpress_auth/libraries/drivers/IdentityProvider/Wordpressdb.php @@ -205,14 +205,14 @@ class IdentityProvider_Wordpressdb_Driver implements IdentityProvider_Driver { /** * @see IdentityProvider_Driver::add_user_to_group. */ - static function add_user_to_group($user, $group_id) { + function add_user_to_group($user, $group) { throw new Exception("@todo INVALID OPERATION"); } /** * @see IdentityProvider_Driver::remove_user_to_group. */ - static function remove_user_from_group($user, $group_id) { + function remove_user_from_group($user, $group) { throw new Exception("@todo INVALID OPERATION"); } } // End Identity Gallery Driver @@ -267,7 +267,7 @@ class Wordpress_User implements User_Definition { } $this->admin = false; return $this->admin; - + case "email": return $this->user_info['user_email']; diff --git a/modules/wordpress_auth/libraries/drivers/IdentityProvider/Wordpressfile.php b/modules/wordpress_auth/libraries/drivers/IdentityProvider/Wordpressfile.php index 2cccb1ed..4e2b84d7 100644 --- a/modules/wordpress_auth/libraries/drivers/IdentityProvider/Wordpressfile.php +++ b/modules/wordpress_auth/libraries/drivers/IdentityProvider/Wordpressfile.php @@ -179,14 +179,14 @@ class IdentityProvider_Wordpressfile_Driver implements IdentityProvider_Driver { /** * @see IdentityProvider_Driver::add_user_to_group. */ - static function add_user_to_group($user, $group_id) { + function add_user_to_group($user, $group) { throw new Exception("@todo INVALID OPERATION"); } /** * @see IdentityProvider_Driver::remove_user_to_group. */ - static function remove_user_from_group($user, $group_id) { + function remove_user_from_group($user, $group) { throw new Exception("@todo INVALID OPERATION"); } } // End Identity Gallery Driver