Compare commits
825 Commits
Sprint-Juno-A
...
4.7.2
| Author | SHA1 | Date | |
|---|---|---|---|
| f1bdde9067 | |||
| 163be2aad2 | |||
| c6891dd971 | |||
| 82a8383df3 | |||
| dbaa4912b7 | |||
| a016a661d7 | |||
| 562f533172 | |||
| 57985cd0b2 | |||
| 2eebc84f2f | |||
| 2b9e798c35 | |||
| 3e38b57496 | |||
| 7ddecca574 | |||
| 90338093ba | |||
| fc887b95f1 | |||
| 01d8198579 | |||
| 7b6c711239 | |||
| 980c2d4a7f | |||
| 686e0116d8 | |||
| b96a5a3bd9 | |||
| 6a3e1819aa | |||
| 72da68c08c | |||
| 2e916e252c | |||
| 6f5f7a7be5 | |||
| e09c531404 | |||
| 7b157c5083 | |||
| e6f0c2a17c | |||
| 6eae64eaf3 | |||
| 9f15137832 | |||
| 7e714b1a40 | |||
| 140cf8ec2f | |||
| ad4e5e841d | |||
| 39f3c377be | |||
| c9160dfdda | |||
| eb19283673 | |||
| ea0ffc8ea5 | |||
| b0f0777952 | |||
| 6ecedd51bb | |||
| deb8e46df8 | |||
| fde12a532c | |||
| d6fd2304f1 | |||
| 5aa76b1859 | |||
| e731fb5b03 | |||
| b34b395d9f | |||
| 3b0f2804fd | |||
| aec48c7df9 | |||
| d6341e73b6 | |||
| 82d1a980f7 | |||
| 6fafe1ede1 | |||
| 46e44fd5d1 | |||
| d0e1a23274 | |||
| de378a7bcb | |||
| 2ee63d5790 | |||
| a2b3f62aba | |||
| 0af3ae40db | |||
| 5ee80bc9cc | |||
| 1452b869a8 | |||
| 19eebba8cc | |||
| 95e985b96d | |||
| 62cf50ba8d | |||
| 9da185f330 | |||
| ad0c67365f | |||
| 79f4925faf | |||
| a0a2037813 | |||
| 3baaa9173e | |||
| 49877c4874 | |||
| c7e1350abd | |||
| 0851c04646 | |||
| 407f78c84b | |||
| 293007b8f0 | |||
| 5d0a9e63e2 | |||
| 07a384d4f8 | |||
| 7b1bb810d3 | |||
| 300a31d6b0 | |||
| ac8e9828e9 | |||
| 12c6124714 | |||
| b18612390a | |||
| b7caa18309 | |||
| 10529d9a9a | |||
| 84628a991e | |||
| a7d8d3c6c2 | |||
| 4221d8a53f | |||
| 0eba71171b | |||
| 0c9edb5fbc | |||
| 5aa8868248 | |||
| feeba931bc | |||
| 82c0ac805c | |||
| 1ffbbb257d | |||
| d1d96c6d58 | |||
| bf59d1fca8 | |||
| 2d10702238 | |||
| 132f6405ed | |||
| 2f784920a9 | |||
| 017075d4f6 | |||
| 8dcc8251f5 | |||
| 62249b989b | |||
| 238885746c | |||
| 40495005ac | |||
| 1eb0d3581b | |||
| 8a43220657 | |||
| eb3cb32965 | |||
| 910af5ea99 | |||
| 3522d68755 | |||
| c32e813210 | |||
| cffed78df3 | |||
| 6da379d36d | |||
| f15903a846 | |||
| c315cfbbcd | |||
| ee63128ac2 | |||
| e4cf319f46 | |||
| 4c2ffb00f9 | |||
| c1fa3bfb23 | |||
| b083cb8837 | |||
| 6bd344834c | |||
| 9760ad29c8 | |||
| b5dddc5e7c | |||
| 7cdb0b48de | |||
| caad0e25d1 | |||
| e87205c1fa | |||
| 95d53d66f3 | |||
| ac7f7d97c4 | |||
| 88316b05c4 | |||
| 8b87f0fd46 | |||
| 39706538f9 | |||
| cd3c44ae7c | |||
| 3cc136a15c | |||
| e2a60d55ff | |||
| c097b0f250 | |||
| 1c8579123d | |||
| 9ad129baad | |||
| cc73179b2b | |||
| 4ad18c1d7b | |||
| 51c76dfcd4 | |||
| 265fc0b3ca | |||
| 2e4117d691 | |||
| 124da8781b | |||
| 7edac5756d | |||
| b73a579a94 | |||
| fdbe788d9b | |||
| 9a7d75e1f3 | |||
| c095148dbe | |||
| 5f8da87c23 | |||
| 2db1dfe7fb | |||
| 97180ded7d | |||
| f2243c9d22 | |||
| e7271ad79b | |||
| 273ebf49df | |||
| 656095caee | |||
| 9925c95d2c | |||
| 4d3c145be9 | |||
| 2ba2c0fd61 | |||
| 96cbe17ea9 | |||
| 0efabf6fe4 | |||
| 0ff6775e55 | |||
| c657236f7c | |||
| b023455068 | |||
| f361e20482 | |||
| fc770dd50f | |||
| b6629c9f65 | |||
| 918d5bc720 | |||
| 46253212da | |||
| 5fb5019529 | |||
| 647882af15 | |||
| 96a8b190a4 | |||
| 860a33d9b3 | |||
| 3cfe526d9d | |||
| 0d65c29ffd | |||
| 47e4239bbc | |||
| ba96212505 | |||
| 5363a328a0 | |||
| 5843b5deaf | |||
| e2e0186174 | |||
| 7d3cfa4151 | |||
| adc3a36ac2 | |||
| 9d996aaf43 | |||
| 13e5e5a8df | |||
| 2ea3c4b624 | |||
| d022b4a52a | |||
| 3a7609cba0 | |||
| 4cbd06dad9 | |||
| e72bd130e3 | |||
| c354acb388 | |||
| d0fc01751c | |||
| 30cc6148e7 | |||
| 082d680a36 | |||
| 23ab698665 | |||
| f9f67d4e2e | |||
| 98a1189353 | |||
| d8eb584d7a | |||
| 738380e32a | |||
| 57edbcae25 | |||
| 0f84165b2b | |||
| ff02f5a336 | |||
| b7446be08a | |||
| 5c57c192c9 | |||
| a03b9932ff | |||
| ae3357de0d | |||
| 821188a254 | |||
| 31169380f8 | |||
| 3737a8cf28 | |||
| ba965a95e9 | |||
| 80e6187436 | |||
| 6dcf1fcd8e | |||
| 1a0c9c3e9f | |||
| f6ab67ea78 | |||
| e8a941fc1f | |||
| c1ff80c52d | |||
| f6eb9c77a9 | |||
| f20931cfa4 | |||
| ff5bf40905 | |||
| a66847587c | |||
| d9dc90090b | |||
| 892a382eca | |||
| 17f6ee1c91 | |||
| 48c11f6b45 | |||
| da3364c065 | |||
| e196b4ec13 | |||
| 0dff9c5dfa | |||
| 93be92442c | |||
| e57c49a3f1 | |||
| 89b89655e4 | |||
| 1c26ddd87f | |||
| 304e7976bc | |||
| d5e3ceecec | |||
| d81aed3dc5 | |||
| cfcae904ba | |||
| 8ab1c11bd1 | |||
| 41d3c9f3d9 | |||
| 1164ea3ab1 | |||
| 75d15cdc31 | |||
| 49a0c8a11a | |||
| 8435067e98 | |||
| eff692249d | |||
| 0589d34abd | |||
| 9b4a08950c | |||
| c7c496cadf | |||
| 5988ff5da8 | |||
| cce3cdc18b | |||
| 0475b48a8c | |||
| 56e9cdb045 | |||
| ba8d8f8787 | |||
| a747e4dddc | |||
| 0b47da8d41 | |||
| dc32f500ae | |||
| f1ee827ece | |||
| b59b5052ba | |||
| c63b58612d | |||
| 7209d68028 | |||
| d0d48f18ff | |||
| c5906c0c79 | |||
| 754210456c | |||
| 00141ba801 | |||
| 315003c16f | |||
| 28652815ae | |||
| 3480a5d957 | |||
| 82547abe40 | |||
| 6a1aa9a8e6 | |||
| cdc4c86325 | |||
| 940239f1f2 | |||
| d4ed1efcf5 | |||
| 27aebac7e0 | |||
| 86c9e8bde0 | |||
| 9a1cfafb74 | |||
| 97a9d11cba | |||
| ee57f4c449 | |||
| 2c22bea92f | |||
| 8112f240be | |||
| 0a04252780 | |||
| 74617e4368 | |||
| 4eca6e7fbf | |||
| 288bbe7b91 | |||
| d2ddd9a284 | |||
| fbe150c1ce | |||
| 918cdcdffb | |||
| b79586b4d7 | |||
| 8279e4d471 | |||
| 60892f9909 | |||
| 0cc7799797 | |||
| 019141c042 | |||
| 942a3c3d72 | |||
| f3bedcd707 | |||
| 11b64ccd0d | |||
| 1a6db0ad8e | |||
| 90e1d97ad7 | |||
| 1f6cc18ba4 | |||
| 23145b9981 | |||
| ce4763a956 | |||
| e2bbccdf6f | |||
| 0ea4e2f891 | |||
| b367f63c1d | |||
| c6dd41c36a | |||
| f2d8363556 | |||
| 9c2a9f81f4 | |||
| d63ae05693 | |||
| d727d67ad5 | |||
| 40099d9d22 | |||
| cd13f8de55 | |||
| 6a0dfc2c11 | |||
| e99669d3ae | |||
| ad3d064acb | |||
| bef5f59c26 | |||
| b6c6022272 | |||
| 157e96c935 | |||
| 0661842dea | |||
| 96715d8ef3 | |||
| 2fa56aaca9 | |||
| 013367c8b7 | |||
| 46683c78a9 | |||
| 7540e696cb | |||
| 6c5941196f | |||
| badad9a1c3 | |||
| 8f8b00fee9 | |||
| f1196aa088 | |||
| 7b66d80f5c | |||
| 8348d551f7 | |||
| ff56d5ed22 | |||
| 8d0a227629 | |||
| f8c6e59121 | |||
| 84c6913162 | |||
| 35099746be | |||
| 6c83107f24 | |||
| ae18fcda1a | |||
| 47bd9180dc | |||
| 1d86530879 | |||
| c2eea73b98 | |||
| 734f029679 | |||
| 2fad45f972 | |||
| 5c6e8526da | |||
| 3c52ac851f | |||
| 5bcf591a72 | |||
| 10672f02a1 | |||
| ddf97c30d1 | |||
| 9a56886f1d | |||
| b198edeeaa | |||
| 76f83ddda0 | |||
| 23aa9e60fe | |||
| 3d396d2b63 | |||
| 93d65ced40 | |||
| a079136665 | |||
| 77e8c6dfe2 | |||
| d2b266824b | |||
| 5a6313182e | |||
| 252a3061eb | |||
| 24cabcdad3 | |||
| 0ba61139f2 | |||
| e3d1e3b48c | |||
| 8833034a35 | |||
| 58294a6be9 | |||
| fc2eaecb33 | |||
| cd38cb1412 | |||
| 1b060dfdbf | |||
| 1a2bba4b2b | |||
| 44bfcaf373 | |||
| 073053aa33 | |||
| b624d7479a | |||
| 5b353d7b4c | |||
| 3f3c4a78d7 | |||
| a5e2d1e107 | |||
| b189b70214 | |||
| 1716b94449 | |||
| f5a7001859 | |||
| 111dee7187 | |||
| df04d6ce22 | |||
| 5fdfc0d1f8 | |||
| ddcf34b80c | |||
| a02aca0f62 | |||
| d7e83cb1ee | |||
| fa5b85557f | |||
| 042e373b6a | |||
| 150d4648c1 | |||
| 017ed3635a | |||
| 9949420c6d | |||
| 9b74eee10c | |||
| bc8f21f92d | |||
| 1bf6604da9 | |||
| 5c8eec28c2 | |||
| c7e1c439ff | |||
| 8d19cf6925 | |||
| b52e347396 | |||
| c12e2e8e77 | |||
| 18ec3850da | |||
| 5ca7822262 | |||
| 634aaf757f | |||
| 1e8bf4ff83 | |||
| dec48c7442 | |||
| b566324e7a | |||
| bd09b21bb8 | |||
| 45ee50ed0f | |||
| ea30785baf | |||
| 7edd9e92e5 | |||
| cd170a18ab | |||
| 90539868f3 | |||
| 1121c7ca79 | |||
| 3d8144c617 | |||
| 914ccf873a | |||
| 8666742004 | |||
| f91013618f | |||
| 3239ae8adb | |||
| e8093526d0 | |||
| 905a55a5ee | |||
| 931aef0265 | |||
| 23605b5a4b | |||
| 7422b2a712 | |||
| 9ac64f2668 | |||
| 5a5aafd610 | |||
| c4272eecf3 | |||
| e86d5f79c1 | |||
| 3904f7799e | |||
| fcf92188e9 | |||
| 25dfb4a2da | |||
| 31eb415b72 | |||
| bf3edcf36a | |||
| ff802ebef4 | |||
| ff678dd856 | |||
| 8271892411 | |||
| d6befbd83c | |||
| 4b70a5f56e | |||
| df9a18fb45 | |||
| 4f496ef5da | |||
| aaa90bea14 | |||
| 41d344d481 | |||
| 6be3b5d93b | |||
| bcb399f768 | |||
| 59e41e3912 | |||
| 468f688f20 | |||
| 3f74ee4ab5 | |||
| 60c18bdff9 | |||
| 300da7f04a | |||
| d324ee90a7 | |||
| 5fd694cca9 | |||
| 5491569b8c | |||
| f1b904ecc4 | |||
| 50f9170935 | |||
| dbc8a07628 | |||
| 6519055d21 | |||
| 38bbe32f16 | |||
| 4edc96af7d | |||
| e3f42ef388 | |||
| bba0fcfd5f | |||
| 7ca429cb61 | |||
| 9707a61303 | |||
| 6b2858d552 | |||
| c03ee2cecd | |||
| 38c60c69bf | |||
| 6bc277b4f2 | |||
| 1dae998eaf | |||
| 78a3d02b89 | |||
| 9729ad4d31 | |||
| 11da35ae5f | |||
| cbe94ae6aa | |||
| f58c453334 | |||
| 0202526acc | |||
| cfb21237c0 | |||
| 1f05d43047 | |||
| 6bc71000af | |||
| a32e8894cd | |||
| 6d615e6762 | |||
| b1ff0db8fe | |||
| 3961787463 | |||
| 9b45a81f22 | |||
| 0e9fc4a84b | |||
| 78aaa85765 | |||
| 71c5e35443 | |||
| 603a12c5a0 | |||
| 78ae4132eb | |||
| 9a4f44e73d | |||
| 11d09a6796 | |||
| 8d064c89f7 | |||
| 6936a1db5a | |||
| 007bab36cc | |||
| ccf832fec5 | |||
| 4fcc62f04a | |||
| c09b5102af | |||
| 49c4ce45cb | |||
| 126c62dee5 | |||
| 20bff9acd4 | |||
| c2ff9019cf | |||
| ff3a776617 | |||
| 76bb93fa23 | |||
| 4225ac9d8a | |||
| 6e58c622cd | |||
| ceb8c9d896 | |||
| 5eb20a1101 | |||
| 9196c039d1 | |||
| d54b2416f0 | |||
| 7be3314a11 | |||
| c2acb33933 | |||
| 5ca12fb99f | |||
| b2db75bcb2 | |||
| e2cee9e99d | |||
| 526bc454a5 | |||
| fef629181f | |||
| 33741210b3 | |||
| 970903eb2a | |||
| 9d5c127c14 | |||
| 0071bfbb13 | |||
| 69ccf5a138 | |||
| 4866bcafb8 | |||
| 64914da779 | |||
| 16f78d0f4c | |||
| fa008b3679 | |||
| 03441fab21 | |||
| 3e56fe947a | |||
| 9410d34485 | |||
| 6b431eb000 | |||
| 84d7999f32 | |||
| db89bbc676 | |||
| 344c36a84a | |||
| 868e1bdb42 | |||
| fa5e5de818 | |||
| 0c5acf544e | |||
| 627fbcdd15 | |||
| f64e902bf8 | |||
| b5c78d397d | |||
| fe514e15ea | |||
| 32887c23e5 | |||
| 7df518155d | |||
| 90f5c4ce9a | |||
| cc23fdbd8e | |||
| 3a30c285fe | |||
| d9f420d45a | |||
| 300c975284 | |||
| f8b5e5e89d | |||
| d57bc67121 | |||
| 71aa8a20af | |||
| ef50f7d38c | |||
| 2e6341b945 | |||
| e277e4cadb | |||
| 35cfee3f85 | |||
| 3a76e9caae | |||
| 2def8a520a | |||
| 45fefda660 | |||
| 8dac6662a5 | |||
| 68ce71685d | |||
| ce83c8a1b9 | |||
| 3d5ed109af | |||
| fa4483f08c | |||
| 8a1c8475b8 | |||
| 7f57fde279 | |||
| b20d1bfd4c | |||
| 070a03e827 | |||
| 313d67ed94 | |||
| e7ebcb29bc | |||
| e5c3c8869a | |||
| 878f6fc812 | |||
| 6d0be45acf | |||
| 649a98daf4 | |||
| bcf735f4f8 | |||
| ba3c7fd680 | |||
| 043f0e03b2 | |||
| 03f8aac4e5 | |||
| eba7c9d550 | |||
| 5a5ccfea98 | |||
| 799d718881 | |||
| 0b5ce63c3a | |||
| 39a34954ce | |||
| 83d88e70a5 | |||
| d165b75456 | |||
| e07dfd49a1 | |||
| 2b11cab075 | |||
| a5527769f3 | |||
| 4b8cc30c3f | |||
| 5cc819407c | |||
| 26bf18766b | |||
| 28d5a81403 | |||
| c692b296d7 | |||
| a0dd8aa2ab | |||
| 6382241e4c | |||
| 3ab4944e5e | |||
| 28b48b187a | |||
| fce7ea48b0 | |||
| fbf13d8cf7 | |||
| 00dc8e0356 | |||
| dca21f9ce1 | |||
| 48c635e452 | |||
| 69a1e7000c | |||
| 1c02059509 | |||
| 7631522a9e | |||
| c1f96000b4 | |||
| 873871b6c2 | |||
| 6650394bf9 | |||
| 9259dd897f | |||
| 934c48cac6 | |||
| 5b99b1e803 | |||
| 4a144ea6da | |||
| 991fb6236d | |||
| 05459b12c9 | |||
| 966c792c8b | |||
| 320382a143 | |||
| 2d856cf664 | |||
| 1cf475e120 | |||
| afe872c28e | |||
| cd50056154 | |||
| c2caf8ba91 | |||
| ec7619510a | |||
| 5859cc9867 | |||
| 6e157581ca | |||
| 10bf3511fc | |||
| 6922f1d0d3 | |||
| 8511c2b5c8 | |||
| 7beffb2305 | |||
| f51f5354f1 | |||
| b67f3a9c8e | |||
| 27ec2d16f1 | |||
| 17efba1242 | |||
| 17c3699612 | |||
| 0b4d7902b8 | |||
| 8ada4a4e1e | |||
| e837c3c841 | |||
| af79bb24e5 | |||
| 26e6305e9c | |||
| 5790ff26fd | |||
| 542b892dd5 | |||
| 4af6ea2b3c | |||
| b82a251bb8 | |||
| 582b5797dc | |||
| edc930241b | |||
| f08ca0f014 | |||
| 415f6f38b1 | |||
| 3b7c8d73de | |||
| bae04cd27e | |||
| 447582b018 | |||
| 2af1812b01 | |||
| d8c98ccfd8 | |||
| f4b4c03a9c | |||
| 580b670f33 | |||
| b450b04ee6 | |||
| 9ca7e02e69 | |||
| 7144ff46e7 | |||
| 3b07515730 | |||
| 6f00df4c85 | |||
| 791b31bc3a | |||
| 7c87b09e97 | |||
| 3ae4511532 | |||
| 2fd905edb9 | |||
| db10f1ed26 | |||
| a9dd0a7e65 | |||
| d031e1da91 | |||
| 74f80e2ba5 | |||
| bbfc881a9e | |||
| 018c5050b9 | |||
| 96f2ded0aa | |||
| f0883b0994 | |||
| 571f89bbe3 | |||
| 8e4deca486 | |||
| 5650c6427a | |||
| 7b2750f503 | |||
| 7c7004c73e | |||
| ed2d771d32 | |||
| 300de8c4ab | |||
| e777a97cb6 | |||
| c72f15d1ba | |||
| 7ce70cc09f | |||
| 35bc0cce0d | |||
| 449418c648 | |||
| e67a114a70 | |||
| 461234ad3f | |||
| 6a0e15e8f1 | |||
| 7f82a46f56 | |||
| 9449ab1ed0 | |||
| c1cd915f7d | |||
| 0dbd27f21c | |||
| fec91ebd75 | |||
| 335c7a4333 | |||
| 648ac811e8 | |||
| f6475b3812 | |||
| ef5cb3dd4c | |||
| 4c76081568 | |||
| 0889e9c033 | |||
| 700aa48a2e | |||
| 43ccf77d7e | |||
| 24d5eefe38 | |||
| 551bcdde2f | |||
| 6f1776fb69 | |||
| 33618f9c2a | |||
| ff39e069db | |||
| a2357bad85 | |||
| 3d02429285 | |||
| cef7401ff8 | |||
| 8fb62265b7 | |||
| 62db053500 | |||
| 0edf5a5e5e | |||
| dc1be04202 | |||
| 5c70ba1eb8 | |||
| 38b1385b66 | |||
| b9849a2ded | |||
| 792450328d | |||
| babf5dabe2 | |||
| 1e3eaf8094 | |||
| fec878227e | |||
| a1abd9dd18 | |||
| 44e01c09d6 | |||
| 6eb738e0d3 | |||
| c50d2e994e | |||
| 058b195a12 | |||
| bff788f048 | |||
| cc96e01b4c | |||
| b57b18c0b1 | |||
| 631eb1fecb | |||
| 564fa2659b | |||
| 2177686e43 | |||
| 36e0b28e70 | |||
| 4ac3a5537e | |||
| 51977637b7 | |||
| ee4477f6ab | |||
| 8baa2db7e7 | |||
| 5d3aeee02f | |||
| 6da0a00e06 | |||
| 7d69bed9c9 | |||
| d182a297b8 | |||
| aa3b8fb808 | |||
| 73e552d105 | |||
| 8f2f81b558 | |||
| 48ff65e597 | |||
| 58874238cc | |||
| 8062df53f8 | |||
| 9df031c6fd | |||
| b17e54976f | |||
| 28479e5257 | |||
| fb90e44dad | |||
| 76fc41f14e | |||
| 60a3d581ab | |||
| c4385335a1 | |||
| 2f90f76348 | |||
| 873ee6a7d1 | |||
| fa54d0a1e8 | |||
| 413fe775d1 | |||
| dd1119bcad | |||
| 9efc931b92 | |||
| 09a785537e | |||
| d851afd8e2 | |||
| e883a22093 | |||
| 7dea3b872f | |||
| 6795f700d5 | |||
| 682104a1f1 | |||
| d29eb77383 | |||
| 07804c149b | |||
| b89257b96c | |||
| 288ae8826c | |||
| d00e9c502a | |||
| f4c976e600 | |||
| 83322a1916 | |||
| 8a9a625964 | |||
| b0dcfec61e | |||
| 13d93de517 | |||
| 0a39ee90c2 | |||
| b8b39ae890 | |||
| feff4a5713 | |||
| d3df402d4a | |||
| 87d96f389d | |||
| fc23004a1b | |||
| 4ec0aaab24 | |||
| cbf9a2e7e0 | |||
| 6bf2b10231 | |||
| 792aff0f1a | |||
| 2bbf3c8af2 | |||
| c239578bd8 | |||
| 0c3f57f537 | |||
| 6b423f5082 | |||
| cbea0ad4e7 | |||
| f18fe684cd | |||
| 4795bb9f43 | |||
| 63d5615698 | |||
| 216ab8c966 | |||
| e5f734acf3 | |||
| 3646f8af4b | |||
| 8d16887ba9 | |||
| fb7f28e00d | |||
| 057ab8cd15 | |||
| 9203fb6fed | |||
| 389454868d | |||
| 25daf42363 | |||
| 7b91c3beab | |||
| a36cda81e3 | |||
| aa5f57432d | |||
| 386f008dd7 | |||
| 34e0b10633 | |||
| 4f5d4c05c1 | |||
| 0e6bb6fb10 | |||
| 93f934b0c1 | |||
| 8c7636558b | |||
| 7d4430855f | |||
| abacb50ee8 | |||
| 0b1c8e39e6 | |||
| b0a46e6a06 | |||
| f27c625439 | |||
| d027fdb3d0 | |||
| 4a40b1046e | |||
| 10c9c14037 | |||
| f29a93422e | |||
| 2c3c6ce391 | |||
| 5105a2c9ef | |||
| 6a92a2f321 | |||
| 4578054f1b | |||
| 1d26a0353b | |||
| b375ddf1f8 | |||
| df2cfec816 | |||
| 89182fc3a9 | |||
| bf73588b6e | |||
| e29fe682b7 | |||
| c9c7eed6d9 | |||
| 9b56b76ad4 | |||
| 94722e82dd | |||
| a03fe234e8 | |||
| 5e83d590f9 | |||
| ddbbf5e799 | |||
| 6e51d690ce | |||
| 6a69202f5e | |||
| 06f6111876 | |||
| 0d91a841ff | |||
| 47e9aa6088 | |||
| 7c7df808b4 | |||
| 34eea0742b | |||
| 78c97971aa | |||
| 4f37fb0c00 | |||
| 60ca487ea3 | |||
| 777a857b6b | |||
| 712571fc38 | |||
| 1c08fc0351 | |||
| e765df10fe | |||
| 84d88161fa | |||
| accb94c415 | |||
| 4c0852c0e8 | |||
| e21057e9c8 | |||
| 03de5ca711 | |||
| 99d0b8c37e |
@@ -0,0 +1,38 @@
|
||||
# use glob syntax
|
||||
syntax: glob
|
||||
|
||||
*.obj
|
||||
*.exe
|
||||
*.pdb
|
||||
*.user
|
||||
*.aps
|
||||
*.pch
|
||||
*.vspscc
|
||||
[Bb]in
|
||||
[Db]ebug*/
|
||||
obj/
|
||||
[Rr]elease*/
|
||||
_ReSharper*/
|
||||
[Tt]est[Rr]esult*
|
||||
[Bb]uild[Ll]og.*
|
||||
*.[Pp]ublish.xml
|
||||
*.suo
|
||||
[sS]ource
|
||||
[sS]andbox
|
||||
umbraco.config
|
||||
*.vs10x
|
||||
App_Data\TEMP\*
|
||||
umbraco\presentation\umbraco\plugins\*
|
||||
umbraco\presentation\usercontrols\*
|
||||
umbraco\presentation\scripts\*
|
||||
umbraco\presentation\fonts\*
|
||||
umbraco\presentation\css\*
|
||||
glob:*App_Code\*
|
||||
glob:*App_Data\*
|
||||
glob:*media\*
|
||||
glob:*masterpages\*
|
||||
glob:*macroScripts\*
|
||||
glob:*xslt\*
|
||||
|
||||
umbraco\presentation\umbraco\plugins\uComponents\uComponentsInstaller.ascx
|
||||
umbraco\presentation\packages\uComponents\MultiNodePicker\CustomTreeService.asmx
|
||||
@@ -0,0 +1,7 @@
|
||||
d0aba247db91d1b70c39c6397b965ca370a67497 Sprint-Juno-A
|
||||
0b8f67be2ca8faf008151d87f232c698de69e735 Release-4.5.0
|
||||
5960c073250926d202861a09472f5f334da6e283 Sprint-Juno-B
|
||||
f15d4ff81a8368e9d42788f7e0ae726f7a70a3b1 Release-4.0.3
|
||||
283065df4d3c27245267709dd2644a479c4f62a5 Release-4.0.4.2
|
||||
ffc34b23e1a03785e4098afa4290d8c03cf10115 Release-4.5.2
|
||||
d03fcffb8834a9583a56813bb44b6abbd9f042cc Release-4.6.0
|
||||
@@ -0,0 +1,24 @@
|
||||
Hi! Thanks for grabbing the Umbraco sourcecode.
|
||||
|
||||
===========================================
|
||||
NOTE - DEFAULT BRANCH EMPTY - December 2010
|
||||
===========================================
|
||||
|
||||
|
||||
- With the help of CodePlex we have migrated much of our previous changesets (as of Dec 13th 2010) from TFS to Mercurial.
|
||||
|
||||
- However, not everything could be migrated to our new branching workflow. So for each nominal group of 4.x changes, we've created named branches. For upcoming 5.x changesets, we'll adhere to our new workflow which we'll describe on the Wiki for contributors.
|
||||
|
||||
- FOR THE MOMENT, the 'default' branch is empty - pending the addition of the 5.0 changesets
|
||||
|
||||
- To switch to the codebase on which you want to work, 'hg update' to the named branch (e.g. "4.6.0") or tag (e.g. "Release-4.5.2") and browse or work from that point.
|
||||
|
||||
|
||||
Thanks to Matt Hawley at CodePlex for his help in our migration!
|
||||
|
||||
Cheers,
|
||||
The Umbraco Team
|
||||
|
||||
http://umbraco.org
|
||||
http://our.umbraco.org
|
||||
http://umbraco.codeplex.com
|
||||
@@ -1,221 +1,13 @@
|
||||
umbraco v3 is licensed under the open source license CPL - Common Public License (attached below). Please notice that it's only v3 that uses the CPL. The prior versions (v2.0, v2.1 and v2.1.x) uses GPL.
|
||||
Umbraco CMS version 4.5 is licensed under the OSI approved MIT License:
|
||||
|
||||
Important License Guidelines - How we see and adopt the CPL
|
||||
- You're free to choose whatever license (both open source and properary licenses) for any umbraco extensions you make as long as these are distributed alone and not bundled with umbraco.
|
||||
- umbraco may only be distributed as a whole. You may not use part of umbraco to create another stand-alone application, this could be using the UI parts to create another CMS.
|
||||
- You may not re-brand umbraco
|
||||
- If in doubt, please contact us (http://umbraco.org) before using our software for other than the original purpose. We have a commercial non-CPL license for those in doubt, wishes not to use CPL licensed software or wishes to build a new product based on parts of umbraco (see http://umbraco.org).
|
||||
Copyright (c) 2007-2010 umbraco I/S.
|
||||
|
||||
Common Public License Version 1.0
|
||||
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 ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
|
||||
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
|
||||
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
1. DEFINITIONS
|
||||
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.
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial code and
|
||||
documentation distributed under this Agreement, and
|
||||
|
||||
b) in the case of each subsequent Contributor:
|
||||
|
||||
i) changes to the Program, and
|
||||
|
||||
ii) additions to the Program;
|
||||
|
||||
where such changes and/or additions to the Program originate from and are
|
||||
distributed by that particular Contributor. A Contribution 'originates' from a
|
||||
Contributor if it was added to the Program by such Contributor itself or anyone
|
||||
acting on such Contributor's behalf. Contributions do not include additions to
|
||||
the Program which: (i) are separate modules of software distributed in
|
||||
conjunction with the Program under their own license agreement, and (ii) are not
|
||||
derivative works of the Program.
|
||||
|
||||
"Contributor" means any person or entity that distributes the Program.
|
||||
|
||||
"Licensed Patents " mean patent claims licensable by a Contributor which are
|
||||
necessarily infringed by the use or sale of its Contribution alone or when
|
||||
combined with the Program.
|
||||
|
||||
"Program" means the Contributions distributed in accordance with this Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement,
|
||||
including all Contributors.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
a) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide, royalty-free copyright license to
|
||||
reproduce, prepare derivative works of, publicly display, publicly perform,
|
||||
distribute and sublicense the Contribution of such Contributor, if any, and such
|
||||
derivative works, in source code and object code form.
|
||||
|
||||
b) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
|
||||
Patents to make, use, sell, offer to sell, import and otherwise transfer the
|
||||
Contribution of such Contributor, if any, in source code and object code form.
|
||||
This patent license shall apply to the combination of the Contribution and the
|
||||
Program if, at the time the Contribution is added by the Contributor, such
|
||||
addition of the Contribution causes such combination to be covered by the
|
||||
Licensed Patents. The patent license shall not apply to any other combinations
|
||||
which include the Contribution. No hardware per se is licensed hereunder.
|
||||
|
||||
c) Recipient understands that although each Contributor grants the licenses
|
||||
to its Contributions set forth herein, no assurances are provided by any
|
||||
Contributor that the Program does not infringe the patent or other intellectual
|
||||
property rights of any other entity. Each Contributor disclaims any liability to
|
||||
Recipient for claims brought by any other entity based on infringement of
|
||||
intellectual property rights or otherwise. As a condition to exercising the
|
||||
rights and licenses granted hereunder, each Recipient hereby assumes sole
|
||||
responsibility to secure any other intellectual property rights needed, if any.
|
||||
For example, if a third party patent license is required to allow Recipient to
|
||||
distribute the Program, it is Recipient's responsibility to acquire that license
|
||||
before distributing the Program.
|
||||
|
||||
d) Each Contributor represents that to its knowledge it has sufficient
|
||||
copyright rights in its Contribution, if any, to grant the copyright license set
|
||||
forth in this Agreement.
|
||||
|
||||
3. REQUIREMENTS
|
||||
|
||||
A Contributor may choose to distribute the Program in object code form under its
|
||||
own license agreement, provided that:
|
||||
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
|
||||
b) its license agreement:
|
||||
|
||||
i) effectively disclaims on behalf of all Contributors all warranties and
|
||||
conditions, express and implied, including warranties or conditions of title and
|
||||
non-infringement, and implied warranties or conditions of merchantability and
|
||||
fitness for a particular purpose;
|
||||
|
||||
ii) effectively excludes on behalf of all Contributors all liability for
|
||||
damages, including direct, indirect, special, incidental and consequential
|
||||
damages, such as lost profits;
|
||||
|
||||
iii) states that any provisions which differ from this Agreement are offered
|
||||
by that Contributor alone and not by any other party; and
|
||||
|
||||
iv) states that source code for the Program is available from such
|
||||
Contributor, and informs licensees how to obtain it in a reasonable manner on or
|
||||
through a medium customarily used for software exchange.
|
||||
|
||||
When the Program is made available in source code form:
|
||||
|
||||
a) it must be made available under this Agreement; and
|
||||
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
|
||||
Contributors may not remove or alter any copyright notices contained within the
|
||||
Program.
|
||||
|
||||
Each Contributor must identify itself as the originator of its Contribution, if
|
||||
any, in a manner that reasonably allows subsequent Recipients to identify the
|
||||
originator of the Contribution.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
Commercial distributors of software may accept certain responsibilities with
|
||||
respect to end users, business partners and the like. While this license is
|
||||
intended to facilitate the commercial use of the Program, the Contributor who
|
||||
includes the Program in a commercial product offering should do so in a manner
|
||||
which does not create potential liability for other Contributors. Therefore, if
|
||||
a Contributor includes the Program in a commercial product offering, such
|
||||
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
|
||||
every other Contributor ("Indemnified Contributor") against any losses, damages
|
||||
and costs (collectively "Losses") arising from claims, lawsuits and other legal
|
||||
actions brought by a third party against the Indemnified Contributor to the
|
||||
extent caused by the acts or omissions of such Commercial Contributor in
|
||||
connection with its distribution of the Program in a commercial product
|
||||
offering. The obligations in this section do not apply to any claims or Losses
|
||||
relating to any actual or alleged intellectual property infringement. In order
|
||||
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
|
||||
Contributor in writing of such claim, and b) allow the Commercial Contributor to
|
||||
control, and cooperate with the Commercial Contributor in, the defense and any
|
||||
related settlement negotiations. The Indemnified Contributor may participate in
|
||||
any such claim at its own expense.
|
||||
|
||||
For example, a Contributor might include the Program in a commercial product
|
||||
offering, Product X. That Contributor is then a Commercial Contributor. If that
|
||||
Commercial Contributor then makes performance claims, or offers warranties
|
||||
related to Product X, those performance claims and warranties are such
|
||||
Commercial Contributor's responsibility alone. Under this section, the
|
||||
Commercial Contributor would have to defend claims against the other
|
||||
Contributors related to those performance claims and warranties, and if a court
|
||||
requires any other Contributor to pay any damages as a result, the Commercial
|
||||
Contributor must pay those damages.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
||||
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
|
||||
Recipient is solely responsible for determining the appropriateness of using and
|
||||
distributing the Program and assumes all risks associated with its exercise of
|
||||
rights under this Agreement, including but not limited to the risks and costs of
|
||||
program errors, compliance with applicable laws, damage to or loss of data,
|
||||
programs or equipment, and unavailability or interruption of operations.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
||||
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
||||
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
|
||||
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
If any provision of this Agreement is invalid or unenforceable under applicable
|
||||
law, it shall not affect the validity or enforceability of the remainder of the
|
||||
terms of this Agreement, and without further action by the parties hereto, such
|
||||
provision shall be reformed to the minimum extent necessary to make such
|
||||
provision valid and enforceable.
|
||||
|
||||
If Recipient institutes patent litigation against a Contributor with respect to
|
||||
a patent applicable to software (including a cross-claim or counterclaim in a
|
||||
lawsuit), then any patent licenses granted by that Contributor to such Recipient
|
||||
under this Agreement shall terminate as of the date such litigation is filed. In
|
||||
addition, if Recipient institutes patent litigation against any entity
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
|
||||
itself (excluding combinations of the Program with other software or hardware)
|
||||
infringes such Recipient's patent(s), then such Recipient's rights granted under
|
||||
Section 2(b) shall terminate as of the date such litigation is filed.
|
||||
|
||||
All Recipient's rights under this Agreement shall terminate if it fails to
|
||||
comply with any of the material terms or conditions of this Agreement and does
|
||||
not cure such failure in a reasonable period of time after becoming aware of
|
||||
such noncompliance. If all Recipient's rights under this Agreement terminate,
|
||||
Recipient agrees to cease use and distribution of the Program as soon as
|
||||
reasonably practicable. However, Recipient's obligations under this Agreement
|
||||
and any licenses granted by Recipient relating to the Program shall continue and
|
||||
survive.
|
||||
|
||||
Everyone is permitted to copy and distribute copies of this Agreement, but in
|
||||
order to avoid inconsistency the Agreement is copyrighted and may only be
|
||||
modified in the following manner. The Agreement Steward reserves the right to
|
||||
publish new versions (including revisions) of this Agreement from time to time.
|
||||
No one other than the Agreement Steward has the right to modify this Agreement.
|
||||
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
|
||||
as the Agreement Steward to a suitable separate entity. Each new version of the
|
||||
Agreement will be given a distinguishing version number. The Program (including
|
||||
Contributions) may always be distributed subject to the version of the Agreement
|
||||
under which it was received. In addition, after a new version of the Agreement
|
||||
is published, Contributor may elect to distribute the Program (including its
|
||||
Contributions) under the new version. Except as expressly stated in Sections
|
||||
2(a) and 2(b) above, Recipient receives no rights or licenses to the
|
||||
intellectual property of any Contributor under this Agreement, whether
|
||||
expressly, by implication, estoppel or otherwise. All rights in the Program not
|
||||
expressly granted under this Agreement are reserved.
|
||||
|
||||
This Agreement is governed by the laws of the State of New York and the
|
||||
intellectual property laws of the United States of America. No party to this
|
||||
Agreement will bring a legal action under this Agreement more than one year
|
||||
after the cause of action arose. Each party waives its rights to a jury trial in
|
||||
any resulting litigation.
|
||||
Umbraco versions prior to 4.5 were licensed under a combination of MIT and a propriatary UI license. The license history can be found here:
|
||||
http://umbraco.codeplex.com/license
|
||||
@@ -352,18 +352,42 @@ namespace umbraco.Linq.Core.Node
|
||||
if (string.IsNullOrEmpty(data))
|
||||
{
|
||||
//non-mandatory structs which have no value will be null
|
||||
p.SetValue(node, null, null);
|
||||
try
|
||||
{
|
||||
p.SetValue(node, null, null);
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
throw new FormatException(
|
||||
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//non-mandatory structs which do have a value have to be cast based on the type of their Nullable<T>, found from the first (well, only) GenericArgument
|
||||
p.SetValue(node, Convert.ChangeType(data, p.PropertyType.GetGenericArguments()[0]), null);
|
||||
try
|
||||
{
|
||||
p.SetValue(node, Convert.ChangeType(data, p.PropertyType.GetGenericArguments()[0]), null);
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
throw new FormatException(
|
||||
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Address how Convert.ChangeType works in globalisation
|
||||
p.SetValue(node, Convert.ChangeType(data, p.PropertyType), null);
|
||||
try
|
||||
{
|
||||
p.SetValue(node, Convert.ChangeType(data, p.PropertyType), null);
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
throw new FormatException(
|
||||
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,16 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>umbraco.Linq.Core</RootNamespace>
|
||||
<AssemblyName>umbraco.Linq.Core</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<umbracoPresentationPath>..\..\..\..\..\umbraco\presentation\bin</umbracoPresentationPath>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -36,6 +40,7 @@
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -146,4 +151,4 @@
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>XCOPY "$(TargetPath)" "$(SolutionDir)\umbraco\presentation\bin" /Y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -0,0 +1,9 @@
|
||||
!! Umbraco - the simple, flexible and friendly ASP.NET CMS
|
||||
For the first time on the Microsoft platform a free user and developer friendly cms that makes it quick and easy to create websites - or a breeze to build complex web applications. umbraco got award-winning integration capabilities and supports your ASP.NET User and Custom Controls out of the box. It's a developers dream and your users will love it too. Used by more than 57.000 active websites including Heinz.com, Peugeot.com, NAIAS.com and Microsofts documentinteropinitiative.org website you can be sure that the technology is proven, stable and scales.
|
||||
[url:More info at http://umbraco.org|http://umbraco.org]
|
||||
|
||||
!! Forums
|
||||
We have a forum running on [url:http://our.umbraco.org]. The discussions area on CodePlex will be for discussions on developing the core, and not on Umbraco-implementations or extensions in general. For those topics, please use [url:http://our.umbraco.org].
|
||||
|
||||
!! Submitting Issues
|
||||
Another way you can contribute to Umbraco is by providing issue reports, for information on how to submit an issue report refer to our [url:online guide|http://our.umbraco.org/wiki/how-tos/submitting-bug-reports].
|
||||
@@ -4,8 +4,8 @@
|
||||
<Deployment enabled="false" />
|
||||
<Execution>
|
||||
<Hosts type="ASP.NET" skipUnhostableTests="false">
|
||||
<AspNet name="ASP.NET" executionType="WebDev" urlToTest="http://localhost:52453">
|
||||
<DevelopmentServer pathToWebSite="C:\Users\hartvig\Documents\Visual Studio 2008\Projects\Core\branches\4.1.0\umbraco\presentation" webApplicationRoot="/" />
|
||||
<AspNet name="ASP.NET" executionType="WebDev" urlToTest="http://localhost:6557">
|
||||
<DevelopmentServer pathToWebSite="C:\Users\hartvig\Documents\Visual Studio 2010\Projects\Core\umbraco\presentation" webApplicationRoot="/" />
|
||||
</AspNet>
|
||||
</Hosts>
|
||||
<TestTypeSpecific>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<actionScriptProperties analytics="false" mainApplicationPath="DesktopMediaUploader.mxml" projectUUID="9115d8c5-0cb4-4a34-8702-48456cca7762" version="6">
|
||||
<compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
|
||||
<compilerSourcePath/>
|
||||
<libraryPath defaultLinkType="0">
|
||||
<libraryPathEntry kind="4" path="">
|
||||
<excludedEntries>
|
||||
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
|
||||
</excludedEntries>
|
||||
</libraryPathEntry>
|
||||
<libraryPathEntry kind="1" linkType="1" path="libs"/>
|
||||
</libraryPath>
|
||||
<sourceAttachmentPath/>
|
||||
</compiler>
|
||||
<applications>
|
||||
<application path="DesktopMediaUploader.mxml">
|
||||
<airExcludes>
|
||||
<airExclude path="assets/dmu_orange.fla"/>
|
||||
<airExclude path="assets/logo.psd"/>
|
||||
<airExclude path="assets/icon-128-old.png"/>
|
||||
<airExclude path="assets/icon-128.psd"/>
|
||||
</airExcludes>
|
||||
</application>
|
||||
</applications>
|
||||
<modules/>
|
||||
<buildCSSFiles/>
|
||||
</actionScriptProperties>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>DesktopMediaUploader</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.adobe.flexbuilder.project.flexbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.adobe.flexbuilder.project.apollobuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.adobe.flexbuilder.project.apollonature</nature>
|
||||
<nature>com.adobe.flexbuilder.project.flexnature</nature>
|
||||
<nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,3 @@
|
||||
#Tue Jul 20 11:35:49 BST 2010
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=utf-8
|
||||
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<application xmlns="http://ns.adobe.com/air/application/2.0">
|
||||
|
||||
<!-- Adobe AIR Application Descriptor File Template.
|
||||
|
||||
Specifies parameters for identifying, installing, and launching AIR applications.
|
||||
|
||||
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0
|
||||
The last segment of the namespace specifies the version
|
||||
of the AIR runtime required for this application to run.
|
||||
|
||||
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
|
||||
the application. Optional.
|
||||
-->
|
||||
|
||||
<!-- A universally unique application identifier. Must be unique across all AIR applications.
|
||||
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
|
||||
<id>org.umbraco.DesktopMediaUploader</id>
|
||||
|
||||
<!-- Used as the filename for the application. Required. -->
|
||||
<filename>Desktop Media Uploader</filename>
|
||||
|
||||
<!-- The name that is displayed in the AIR application installer.
|
||||
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
||||
<name>Desktop Media Uploader</name>
|
||||
|
||||
<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
|
||||
<version>v2.1.0</version>
|
||||
|
||||
<!-- Description, displayed in the AIR application installer.
|
||||
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
||||
<description>
|
||||
This application allows you to upload media to an Umbraco website directly from your desktop.
|
||||
</description>
|
||||
|
||||
<!-- Copyright information. Optional -->
|
||||
<copyright>2010 Umbraco.org</copyright>
|
||||
|
||||
<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
|
||||
<!-- <publisherID></publisherID> -->
|
||||
|
||||
<!-- Settings for the application's initial window. Required. -->
|
||||
<initialWindow>
|
||||
<!-- The main SWF or HTML file of the application. Required. -->
|
||||
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
|
||||
<content>DesktopMediaUploader.swf</content>
|
||||
|
||||
<!-- The title of the main window. Optional. -->
|
||||
<!-- <title></title> -->
|
||||
|
||||
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
|
||||
<!-- <systemChrome></systemChrome> -->
|
||||
|
||||
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
|
||||
<!-- <transparent></transparent> -->
|
||||
|
||||
<!-- Whether the window is initially visible. Optional. Default false. -->
|
||||
<!-- <visible></visible> -->
|
||||
|
||||
<!-- Whether the user can minimize the window. Optional. Default true. -->
|
||||
<!-- <minimizable></minimizable> -->
|
||||
|
||||
<!-- Whether the user can maximize the window. Optional. Default true. -->
|
||||
<!-- <maximizable></maximizable> -->
|
||||
|
||||
<!-- Whether the user can resize the window. Optional. Default true. -->
|
||||
<!-- <resizable></resizable> -->
|
||||
|
||||
<!-- The window's initial width in pixels. Optional. -->
|
||||
<!-- <width></width> -->
|
||||
|
||||
<!-- The window's initial height in pixels. Optional. -->
|
||||
<!-- <height></height> -->
|
||||
|
||||
<!-- The window's initial x position. Optional. -->
|
||||
<!-- <x></x> -->
|
||||
|
||||
<!-- The window's initial y position. Optional. -->
|
||||
<!-- <y></y> -->
|
||||
|
||||
<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
|
||||
<!-- <minSize></minSize> -->
|
||||
|
||||
<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
|
||||
<!-- <maxSize></maxSize> -->
|
||||
</initialWindow>
|
||||
|
||||
<!-- We recommend omitting the supportedProfiles element, -->
|
||||
<!-- which in turn permits your application to be deployed to all -->
|
||||
<!-- devices supported by AIR. If you wish to restrict deployment -->
|
||||
<!-- (i.e., to only mobile devices) then add this element and list -->
|
||||
<!-- only the profiles which your application does support. -->
|
||||
<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
|
||||
|
||||
<!-- The subpath of the standard default installation location to use. Optional. -->
|
||||
<!-- <installFolder></installFolder> -->
|
||||
|
||||
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
|
||||
<!-- <programMenuFolder></programMenuFolder> -->
|
||||
|
||||
<!-- The icon the system uses for the application. For at least one resolution,
|
||||
|
||||
specify the path to a PNG file included in the AIR package. Optional. -->
|
||||
<icon>
|
||||
|
||||
<image16x16>assets/icon-16.png</image16x16>
|
||||
|
||||
<image32x32>assets/icon-32.png</image32x32>
|
||||
|
||||
<image48x48>assets/icon-48.png</image48x48>
|
||||
|
||||
<image128x128>assets/icon-128.png</image128x128>
|
||||
|
||||
</icon>
|
||||
|
||||
<!-- Whether the application handles the update when a user double-clicks an update version
|
||||
of the AIR file (true), or the default AIR application installer handles the update (false).
|
||||
Optional. Default false. -->
|
||||
<!-- <customUpdateUI></customUpdateUI> -->
|
||||
|
||||
<!-- Whether the application can be launched when the user clicks a link in a web browser.
|
||||
Optional. Default false. -->
|
||||
<allowBrowserInvocation>true</allowBrowserInvocation>
|
||||
|
||||
<!-- Listing of file types for which the application can register. Optional. -->
|
||||
<!-- <fileTypes> -->
|
||||
|
||||
<!-- Defines one file type. Optional. -->
|
||||
<!-- <fileType> -->
|
||||
|
||||
<!-- The name that the system displays for the registered file type. Required. -->
|
||||
<!-- <name></name> -->
|
||||
|
||||
<!-- The extension to register. Required. -->
|
||||
<!-- <extension></extension> -->
|
||||
|
||||
<!-- The description of the file type. Optional. -->
|
||||
<!-- <description></description> -->
|
||||
|
||||
<!-- The MIME content type. -->
|
||||
<!-- <contentType></contentType> -->
|
||||
|
||||
<!-- The icon to display for the file type. Optional. -->
|
||||
<!-- <icon>
|
||||
<image16x16></image16x16>
|
||||
<image32x32></image32x32>
|
||||
<image48x48></image48x48>
|
||||
<image128x128></image128x128>
|
||||
</icon> -->
|
||||
|
||||
<!-- </fileType> -->
|
||||
<!-- </fileTypes> -->
|
||||
|
||||
</application>
|
||||
@@ -0,0 +1,90 @@
|
||||
/* CSS file */
|
||||
@namespace s "library://ns.adobe.com/flex/spark";
|
||||
@namespace mx "library://ns.adobe.com/flex/mx";
|
||||
|
||||
|
||||
global
|
||||
{
|
||||
focus-color: #EEB470;
|
||||
selection-color: #EEB470;
|
||||
roll-over-color: #EEEEEE;
|
||||
}
|
||||
|
||||
mx|Tree
|
||||
{
|
||||
textSelectedColor: #ffffff;
|
||||
textRollOverColor: #000000;
|
||||
selection-color: #f36f21;
|
||||
roll-over-color: #cccccc;
|
||||
}
|
||||
|
||||
#grpSignInForm s|Label
|
||||
{
|
||||
paddingTop: 5px;
|
||||
}
|
||||
|
||||
#grpSignInForm s|CheckBox s|Label
|
||||
{
|
||||
paddingTop: 0;
|
||||
}
|
||||
|
||||
.header
|
||||
{
|
||||
borderColor: #7a7a7a;
|
||||
backgroundColor: #7a7a7a;
|
||||
paddingTop: 25px;
|
||||
paddingBottom: 25px;
|
||||
paddingLeft: 25px;
|
||||
paddingRight: 25px;
|
||||
}
|
||||
|
||||
.header mx|Label
|
||||
{
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.header s|DropDownList
|
||||
{
|
||||
skinClass: ClassReference('org.umbraco.desktopmediauploader.skins.HeaderDropDownListSkin');
|
||||
color: #ffffff;
|
||||
content-background-color: #7a7a7a;
|
||||
roll-over-color: #f36f22;
|
||||
}
|
||||
|
||||
.header s|DropDownList s|Label
|
||||
{
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#btnSignIn,
|
||||
#btnUpload
|
||||
{
|
||||
cornerRadius: 5px;
|
||||
borderThickness: 2px;
|
||||
downSkin: Embed(source="assets/dmu_orange.swf", symbol="Button_downSkin");
|
||||
overSkin: Embed(source="assets/dmu_orange.swf", symbol="Button_overSkin");
|
||||
upSkin: Embed(source="assets/dmu_orange.swf", symbol="Button_upSkin");
|
||||
paddingLeft: 20px;
|
||||
paddingRight: 20px;
|
||||
paddingTop: 7px;
|
||||
paddingBottom: 7px;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
text-roll-over-color: #ffffff;
|
||||
text-selected-color: #ffffff;
|
||||
text-disabled-color: #cccccc;
|
||||
}
|
||||
|
||||
.signOutButton
|
||||
{
|
||||
skinClass: ClassReference('org.umbraco.desktopmediauploader.skins.SignOutButtonSkin');
|
||||
}
|
||||
|
||||
.removeButton
|
||||
{
|
||||
skinClass: ClassReference('org.umbraco.desktopmediauploader.skins.RemoveButtonSkin');
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
|
||||
xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
skinClass="org.umbraco.desktopmediauploader.skins.ApplicationSkin"
|
||||
width="330" height="600" showStatusBar="false"
|
||||
xmlns:views="org.umbraco.desktopmediauploader.views.*"
|
||||
windowComplete="init();" >
|
||||
|
||||
<fx:Style source="DesktopMediaUploader.css"/>
|
||||
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
|
||||
import org.umbraco.desktopmediauploader.events.*;
|
||||
import org.umbraco.desktopmediauploader.util.*;
|
||||
|
||||
import mx.controls.Alert;
|
||||
|
||||
protected function init():void
|
||||
{
|
||||
StageHelper.stage = stage;
|
||||
|
||||
NativeApplication.nativeApplication.addEventListener(BrowserInvokeEvent.BROWSER_INVOKE, app_BrowserInvoke);
|
||||
|
||||
vwSignIn.addEventListener(SignedInEvent.SIGNED_IN, vwSignIn_SignedIn);
|
||||
vwUpload.addEventListener(SignedOutEvent.SIGNED_OUT, vwUpload_SignOut);
|
||||
|
||||
vwSignIn.init();
|
||||
}
|
||||
|
||||
protected function app_BrowserInvoke(e:BrowserInvokeEvent):void
|
||||
{
|
||||
vwSignIn.visible = true;
|
||||
vwUpload.visible = false;
|
||||
}
|
||||
|
||||
protected function vwSignIn_SignedIn(e:SignedInEvent):void
|
||||
{
|
||||
vwSignIn.visible = false;
|
||||
vwUpload.visible = true;
|
||||
}
|
||||
|
||||
protected function vwUpload_SignOut(e:SignedOutEvent):void
|
||||
{
|
||||
vwSignIn.visible = true;
|
||||
vwUpload.visible = false;
|
||||
}
|
||||
|
||||
]]>
|
||||
</fx:Script>
|
||||
|
||||
<fx:Declarations>
|
||||
<!-- Place non-visual elements (e.g., services, value objects) here -->
|
||||
</fx:Declarations>
|
||||
|
||||
|
||||
<views:SignInView id="vwSignIn" left="0" top="0" right="0" bottom="0">
|
||||
</views:SignInView>
|
||||
|
||||
<views:UploadView id="vwUpload" left="0" top="0" bottom="0" right="0"
|
||||
visible="false">
|
||||
</views:UploadView>
|
||||
|
||||
</s:WindowedApplication>
|
||||
@@ -0,0 +1,21 @@
|
||||
package
|
||||
{
|
||||
public class Model
|
||||
{
|
||||
[Bindable] public static var url:String;
|
||||
[Bindable] public static var username:String;
|
||||
[Bindable] public static var password:String;
|
||||
[Bindable] public static var ticket:String;
|
||||
|
||||
[Bindable] public static var displayName:String;
|
||||
[Bindable] public static var umbracoPath:String;
|
||||
[Bindable] public static var maxRequestLength:Number;
|
||||
|
||||
[Bindable] public static var currentFolder:XML;
|
||||
|
||||
[Bindable] public static var folderId:Number = 0;
|
||||
[Bindable] public static var folderName:String = "";
|
||||
[Bindable] public static var folderPath:String = "";
|
||||
[Bindable] public static var replaceExisting:Boolean = false;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 655 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 778 B |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
|
||||
xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
width="260" height="350" title="Select a folder..." creationComplete="folderPickerDialog_CreationComplete(event)"
|
||||
close="folderPickerDialog_Close(event)" borderVisible="true" chromeColor="#EEEEEE" borderColor="#666666">
|
||||
<s:layout>
|
||||
<s:VerticalLayout/>
|
||||
</s:layout>
|
||||
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
import org.umbraco.desktopmediauploader.events.*;
|
||||
import org.umbraco.desktopmediauploader.net.*;
|
||||
|
||||
import mx.controls.Alert;
|
||||
import mx.events.CloseEvent;
|
||||
import mx.events.FlexEvent;
|
||||
import mx.managers.*;
|
||||
|
||||
protected function folderPickerDialog_CreationComplete(event:FlexEvent):void
|
||||
{
|
||||
CursorManager.setBusyCursor();
|
||||
|
||||
DmuRequest.makeRequest(DmuRequestAction.FOLDER_LIST,
|
||||
folderListLoader_Complete,
|
||||
folderListLoader_Error);
|
||||
}
|
||||
|
||||
protected function folderListLoader_Complete(event:DmuRequestEvent):void
|
||||
{
|
||||
CursorManager.removeBusyCursor();
|
||||
|
||||
var xml:XML = event.result;
|
||||
|
||||
trFolders.dataProvider = xml.folder;
|
||||
trFolders.labelField = "@name";
|
||||
trFolders.validateNow();
|
||||
|
||||
// Reselect current folder
|
||||
if (Model.folderId)
|
||||
{
|
||||
var node:XMLList = xml..folder.(@id == Model.folderId.toString());
|
||||
if (node.length() > 0)
|
||||
{
|
||||
expandParents(node[0]);
|
||||
|
||||
trFolders.selectedItem = node[0];
|
||||
|
||||
var idx:int = trFolders.getItemIndex(node[0]);
|
||||
trFolders.scrollToIndex(idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.folderId = undefined;
|
||||
Model.folderName = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function folderListLoader_Error(event:Event):void
|
||||
{
|
||||
CursorManager.removeBusyCursor();
|
||||
|
||||
Alert.show("Unable to load folder list", "Ooops!");
|
||||
}
|
||||
|
||||
protected function folderPickerDialog_Close(event:CloseEvent):void
|
||||
{
|
||||
PopUpManager.removePopUp(this);
|
||||
}
|
||||
|
||||
|
||||
protected function trFolders_DoubleClick(event:MouseEvent):void
|
||||
{
|
||||
var item:XML = trFolders.selectedItem as XML;
|
||||
|
||||
Model.currentFolder = item;
|
||||
Model.folderId = item.@id;
|
||||
Model.folderName = item.@name;
|
||||
|
||||
var pathItem:XML = item;
|
||||
var path:String = pathItem.@name;
|
||||
while(pathItem.parent())
|
||||
{
|
||||
pathItem = pathItem.parent();
|
||||
|
||||
if(pathItem.@name != undefined)
|
||||
{
|
||||
path = pathItem.@name +"/"+ path;
|
||||
}
|
||||
}
|
||||
|
||||
Model.folderPath = path;
|
||||
|
||||
PopUpManager.removePopUp(this);
|
||||
}
|
||||
|
||||
private function expandParents(node:XML):void
|
||||
{
|
||||
if (node && !trFolders.isItemOpen(node))
|
||||
{
|
||||
trFolders.expandItem(node, true);
|
||||
expandParents(node.parent());
|
||||
}
|
||||
}
|
||||
|
||||
]]>
|
||||
</fx:Script>
|
||||
|
||||
<fx:Declarations>
|
||||
<!-- Place non-visual elements (e.g., services, value objects) here -->
|
||||
</fx:Declarations>
|
||||
|
||||
<mx:Tree width="100%" height="100%" id="trFolders"
|
||||
defaultLeafIcon="@Embed('assets/folder.png')"
|
||||
folderClosedIcon="@Embed('assets/folder.png')"
|
||||
folderOpenIcon="@Embed('assets/folder-open.png')"
|
||||
paddingLeft="5" paddingRight="5" paddingTop="2" paddingBottom="2"
|
||||
doubleClickEnabled="true" doubleClick="trFolders_DoubleClick(event)" borderVisible="false"></mx:Tree>
|
||||
|
||||
</s:TitleWindow>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
|
||||
xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
backgroundColor="#e7e7e7" borderColor="#CCCCCC"
|
||||
width="100%" height="30">
|
||||
|
||||
<fx:Declarations>
|
||||
<!-- Place non-visual elements (e.g., services, value objects) here -->
|
||||
</fx:Declarations>
|
||||
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
|
||||
[Bindable] public var totalItems:int;
|
||||
|
||||
protected function btnUploadRemove_Click(event:MouseEvent):void
|
||||
{
|
||||
dispatchEvent(new Event(Event.CANCEL));
|
||||
}
|
||||
|
||||
]]>
|
||||
</fx:Script>
|
||||
|
||||
<mx:Image left="7" source="@Embed('assets/information.png')" width="16" height="16" verticalCenter="0"/>
|
||||
<mx:Label id="lblUploadName" text="Total of {totalItems} File{(totalItems == 1)? '' : 's'}" fontWeight="bold" fontSize="12" color="#999999" left="27" truncateToFit="true" minWidth="0" right="35" verticalCenter="0"/>
|
||||
<s:Button id="btnUploadRemove" width="16" height="16" top="5" right="5" useHandCursor="true" buttonMode="true" styleName="removeButton" click="btnUploadRemove_Click(event)" />
|
||||
|
||||
</s:BorderContainer>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
|
||||
xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
backgroundColor="#F5F5F5" borderColor="#CCCCCC"
|
||||
borderColor.Error="#C50101" backgroundColor.Error="#F3DBDB"
|
||||
height.Ready="45" height="60" width="100%">
|
||||
|
||||
<s:layout>
|
||||
<s:BasicLayout/>
|
||||
</s:layout>
|
||||
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
|
||||
import org.umbraco.desktopmediauploader.events.*;
|
||||
import org.umbraco.desktopmediauploader.net.*;
|
||||
import org.umbraco.desktopmediauploader.util.*;
|
||||
|
||||
import flash.desktop.*;
|
||||
import flash.events.*;
|
||||
import flash.filesystem.*;
|
||||
import flash.net.*;
|
||||
|
||||
import org.osmf.utils.URL;
|
||||
|
||||
[Bindable] public var file:FileReference;
|
||||
[Bindable] public var path:String;
|
||||
|
||||
[Bindable] public var uploading:Boolean = false;;
|
||||
[Bindable] public var uploaded:Boolean = false;
|
||||
|
||||
public function get fullPath():String
|
||||
{
|
||||
return path + "/" + file.name;
|
||||
}
|
||||
|
||||
protected function btnUploadRemove_Click(event:MouseEvent):void
|
||||
{
|
||||
cancel();
|
||||
}
|
||||
|
||||
protected function file_Complete(event:DataEvent):void
|
||||
{
|
||||
uploading = false;
|
||||
|
||||
var result:String = StringHelper.cleanXmlString(event.data);
|
||||
var xml:XML = new XML(result);
|
||||
if (xml.@success == "true")
|
||||
{
|
||||
uploaded = true;
|
||||
|
||||
dispatchEvent(new Event(Event.COMPLETE));
|
||||
}
|
||||
else
|
||||
{
|
||||
file_SecurityError(new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
protected function file_Progress(event:ProgressEvent):void
|
||||
{
|
||||
dispatchEvent(event);
|
||||
}
|
||||
|
||||
protected function file_HttpError(event:HTTPStatusEvent):void
|
||||
{
|
||||
setCurrentState("Error");
|
||||
|
||||
dispatchEvent(event);
|
||||
}
|
||||
|
||||
protected function file_IOError(event:IOErrorEvent):void
|
||||
{
|
||||
setCurrentState("Error");
|
||||
|
||||
dispatchEvent(event);
|
||||
}
|
||||
|
||||
protected function file_SecurityError(event:SecurityErrorEvent):void
|
||||
{
|
||||
setCurrentState("Error");
|
||||
|
||||
dispatchEvent(event);
|
||||
}
|
||||
|
||||
public function upload():void
|
||||
{
|
||||
setCurrentState("Uploading");
|
||||
|
||||
uploading = true;
|
||||
|
||||
var vars:URLVariables = new URLVariables();
|
||||
vars.parentNodeId = Model.folderId;
|
||||
vars.replaceExisting = Model.replaceExisting ? "1" : "0";
|
||||
vars.path = path;
|
||||
|
||||
var req:URLRequest = DmuRequest.getRequest(DmuRequestAction.UPLOAD, vars);
|
||||
|
||||
file.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, file_Complete);
|
||||
file.addEventListener(ProgressEvent.PROGRESS, file_Progress);
|
||||
file.addEventListener(HTTPStatusEvent.HTTP_STATUS, file_HttpError);
|
||||
file.addEventListener(IOErrorEvent.IO_ERROR, file_IOError);
|
||||
file.addEventListener(SecurityErrorEvent.SECURITY_ERROR, file_SecurityError);
|
||||
file.upload(req);
|
||||
}
|
||||
|
||||
public function pause():void
|
||||
{
|
||||
if (uploading)
|
||||
file.cancel();
|
||||
|
||||
uploading = false;
|
||||
}
|
||||
|
||||
public function cancel():void
|
||||
{
|
||||
pause();
|
||||
|
||||
dispatchEvent(new Event(Event.CANCEL));
|
||||
}
|
||||
|
||||
private function trim( s:String ):String
|
||||
{
|
||||
return s.replace( /^([\s|\t|\n]+)?(.*)([\s|\t|\n]+)?$/gm, "$2" );
|
||||
}
|
||||
|
||||
]]>
|
||||
</fx:Script>
|
||||
|
||||
<s:states>
|
||||
<s:State name="Ready"/>
|
||||
<s:State name="Uploading"/>
|
||||
<s:State name="Error"/>
|
||||
</s:states>
|
||||
|
||||
<mx:Image top="6" left="5" source="@Embed('assets/page.png')"/>
|
||||
<mx:Label id="lblUploadName" text="{file.name}" fontWeight="bold" color="#000000" left="40" top="4" truncateToFit="true" minWidth="0" right="35" />
|
||||
<s:Button id="btnUploadRemove" width="16" height="16" top="5" right="5" useHandCursor="true" buttonMode="true" click="btnUploadRemove_Click(event)" styleName="removeButton" />
|
||||
<mx:ProgressBar id="pbUploadProgress" labelPlacement="top" label="" source="{file}" bottom="5" left="5" right="5" excludeFrom="Ready" />
|
||||
<mx:Label id="lblUploadPath" left="40" top="20" right="35" fontSize="11" color="#CCCCCC" truncateToFit="true" minWidth="0" fontAntiAliasType="advanced" fontGridFitType="pixel" fontThickness="200" fontSharpness="400"
|
||||
htmlText="<font color='#666666'>{Model.folderPath.replace(/\//g, ' › ')}</font>{path.replace(/\//g, ' › ')}"/>
|
||||
|
||||
</s:BorderContainer>
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.umbraco.desktopmediauploader.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class DmuRequestEvent extends Event
|
||||
{
|
||||
public static const SUCCESS:String = "success";
|
||||
public static const ERROR:String = "error";
|
||||
|
||||
public var result:XML;
|
||||
|
||||
public function DmuRequestEvent(type:String, result:XML = null, bubbles:Boolean=false, cancelable:Boolean=false)
|
||||
{
|
||||
super(type, bubbles, cancelable);
|
||||
|
||||
this.result = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.umbraco.desktopmediauploader.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class SignedInEvent extends Event
|
||||
{
|
||||
public static const SIGNED_IN:String = "signedIn";
|
||||
|
||||
public function SignedInEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
|
||||
{
|
||||
super(type, bubbles, cancelable);
|
||||
}
|
||||
|
||||
override public function clone():Event {
|
||||
return new SignedInEvent(type, bubbles, cancelable);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.umbraco.desktopmediauploader.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class SignedOutEvent extends Event
|
||||
{
|
||||
public static const SIGNED_OUT:String = "signedOut";
|
||||
|
||||
public function SignedOutEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
|
||||
{
|
||||
super(type, bubbles, cancelable);
|
||||
}
|
||||
|
||||
override public function clone():Event {
|
||||
return new SignedOutEvent(type, bubbles, cancelable);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package org.umbraco.desktopmediauploader.net
|
||||
{
|
||||
import org.umbraco.desktopmediauploader.events.*;
|
||||
import org.umbraco.desktopmediauploader.util.*;
|
||||
|
||||
import flash.events.*;
|
||||
import flash.net.*;
|
||||
|
||||
public class DmuRequest extends EventDispatcher
|
||||
{
|
||||
public function DmuRequest(action:String, vars:URLVariables = null, target:IEventDispatcher = null)
|
||||
{
|
||||
super(target);
|
||||
|
||||
var req:URLRequest = getRequest(action, vars);
|
||||
|
||||
var loader:URLLoader = new URLLoader();
|
||||
loader.addEventListener(Event.COMPLETE, loader_Success);
|
||||
loader.addEventListener(IOErrorEvent.IO_ERROR, loader_Error);
|
||||
loader.load(req);
|
||||
}
|
||||
|
||||
private function loader_Success(event:Event):void
|
||||
{
|
||||
var loader:URLLoader = event.target as URLLoader;
|
||||
if (loader != null)
|
||||
{
|
||||
var result:String = StringHelper.cleanXmlString(loader.data);
|
||||
var xml:XML = new XML(result);
|
||||
if (xml.@success == "true")
|
||||
{
|
||||
dispatchEvent(new DmuRequestEvent(DmuRequestEvent.SUCCESS, xml));
|
||||
}
|
||||
else
|
||||
{
|
||||
loader_Error();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
loader_Error();
|
||||
}
|
||||
}
|
||||
|
||||
private function loader_Error(event:IOErrorEvent = null):void
|
||||
{
|
||||
dispatchEvent(new DmuRequestEvent(DmuRequestEvent.ERROR));
|
||||
}
|
||||
|
||||
public static function getRequest(action:String, vars:URLVariables = null):URLRequest
|
||||
{
|
||||
var loaderUrl:String = Model.url +"/umbraco/webservices/mediauploader.ashx";
|
||||
|
||||
if (vars == null)
|
||||
vars = new URLVariables();
|
||||
|
||||
vars.action = action;
|
||||
vars.username = Model.username;
|
||||
vars.password = Model.password;
|
||||
vars.ticket = Model.ticket;
|
||||
|
||||
var req:URLRequest = new URLRequest(loaderUrl);
|
||||
req.data = vars;
|
||||
req.method = URLRequestMethod.POST;
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
public static function makeRequest(action:String, successCallback:Function, errorCallback:Function,
|
||||
vars:URLVariables = null):void
|
||||
{
|
||||
var req:DmuRequest = new DmuRequest(action, vars);
|
||||
req.addEventListener(DmuRequestEvent.SUCCESS, successCallback);
|
||||
req.addEventListener(DmuRequestEvent.ERROR, errorCallback);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.umbraco.desktopmediauploader.net
|
||||
{
|
||||
public class DmuRequestAction
|
||||
{
|
||||
public static var CONFIG:String = "config";
|
||||
public static var FOLDER_LIST:String = "folderList";
|
||||
public static var UPLOAD:String = "upload";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- http://blog.flexexamples.com/2009/03/13/setting-a-linear-gradient-background-on-an-fxapplication-container-in-flex-gumbo/ -->
|
||||
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
|
||||
xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
|
||||
alpha.disabled="0.5"
|
||||
alpha.disabledWithControlBar="0.5">
|
||||
|
||||
<s:states>
|
||||
<s:State name="normal" />
|
||||
<s:State name="disabled" />
|
||||
<s:State name="normalWithControlBar" />
|
||||
<s:State name="disabledWithControlBar" />
|
||||
<s:State name="normalAndInactive" />
|
||||
</s:states>
|
||||
|
||||
<fx:Metadata>
|
||||
<![CDATA[
|
||||
[HostComponent("spark.components.Application")]
|
||||
]]>
|
||||
</fx:Metadata>
|
||||
|
||||
<!-- fill -->
|
||||
<!---
|
||||
A rectangle with a solid color fill that forms the background of the application.
|
||||
The color of the fill is set to the Application's backgroundColor property.
|
||||
-->
|
||||
<s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0" >
|
||||
<s:fill>
|
||||
<s:LinearGradient rotation="90">
|
||||
<s:GradientEntry color="#cccccc" />
|
||||
<s:GradientEntry color="#eeeeee" ratio="0.2" />
|
||||
<s:GradientEntry color="#ffffff" ratio="0.8" />
|
||||
</s:LinearGradient>
|
||||
</s:fill>
|
||||
</s:Rect>
|
||||
|
||||
<s:Group left="0" right="0" top="0" bottom="0">
|
||||
<s:layout>
|
||||
<s:VerticalLayout gap="0" horizontalAlign="justify" />
|
||||
</s:layout>
|
||||
|
||||
<s:Group id="topGroup" minWidth="0" minHeight="0"
|
||||
includeIn="normalWithControlBar, disabledWithControlBar" >
|
||||
|
||||
<!-- layer 0: control bar highlight -->
|
||||
<s:Rect left="0" right="0" top="0" bottom="1" >
|
||||
<s:stroke>
|
||||
<s:LinearGradientStroke rotation="90" weight="1">
|
||||
<s:GradientEntry color="0xFFFFFF" />
|
||||
<s:GradientEntry color="0xD8D8D8" />
|
||||
</s:LinearGradientStroke>
|
||||
</s:stroke>
|
||||
</s:Rect>
|
||||
|
||||
<!-- layer 1: control bar fill -->
|
||||
<s:Rect left="1" right="1" top="1" bottom="2" >
|
||||
<s:fill>
|
||||
<s:LinearGradient rotation="90">
|
||||
<s:GradientEntry color="0xEDEDED" />
|
||||
<s:GradientEntry color="0xCDCDCD" />
|
||||
</s:LinearGradient>
|
||||
</s:fill>
|
||||
</s:Rect>
|
||||
|
||||
<!-- layer 2: control bar divider line -->
|
||||
<s:Rect left="0" right="0" bottom="0" height="1" alpha="0.55">
|
||||
<s:fill>
|
||||
<s:SolidColor color="0x000000" />
|
||||
</s:fill>
|
||||
</s:Rect>
|
||||
|
||||
<!-- layer 3: control bar -->
|
||||
<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
|
||||
<s:layout>
|
||||
<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
|
||||
</s:layout>
|
||||
</s:Group>
|
||||
</s:Group>
|
||||
|
||||
<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0" />
|
||||
|
||||
</s:Group>
|
||||
|
||||
</s:Skin>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
|
||||
ADOBE SYSTEMS INCORPORATED
|
||||
Copyright 2009 Adobe Systems Incorporated
|
||||
All Rights Reserved.
|
||||
|
||||
NOTICE: Adobe permits you to use, modify, and distribute this file
|
||||
in accordance with the terms of the license agreement accompanying it.
|
||||
|
||||
-->
|
||||
|
||||
<!--- The default skin class for a Spark DefaultItemRenderer class.
|
||||
|
||||
@langversion 3.0
|
||||
@playerversion Flash 10
|
||||
@playerversion AIR 1.5
|
||||
@productversion Flex 4
|
||||
-->
|
||||
<s:ItemRenderer focusEnabled="false" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" useHandCursor="true" buttonMode="true">
|
||||
|
||||
<s:states>
|
||||
<s:State name="normal" />
|
||||
<s:State name="hovered" />
|
||||
<s:State name="selected" />
|
||||
<s:State name="normalAndShowsCaret"/>
|
||||
<s:State name="hoveredAndShowsCaret"/>
|
||||
<s:State name="selectedAndShowsCaret"/>
|
||||
</s:states>
|
||||
|
||||
<s:Rect left="0" right="0" top="0" bottom="0">
|
||||
<s:stroke.normalAndShowsCaret>
|
||||
<s:SolidColorStroke
|
||||
color="{getStyle('selectionColor')}"
|
||||
weight="1"/>
|
||||
</s:stroke.normalAndShowsCaret>
|
||||
<s:stroke.hoveredAndShowsCaret>
|
||||
<s:SolidColorStroke
|
||||
color="{getStyle('selectionColor')}"
|
||||
weight="1"/>
|
||||
</s:stroke.hoveredAndShowsCaret>
|
||||
<s:stroke.selectedAndShowsCaret>
|
||||
<s:SolidColorStroke
|
||||
color="{getStyle('selectionColor')}"
|
||||
weight="1"/>
|
||||
</s:stroke.selectedAndShowsCaret>
|
||||
<s:fill>
|
||||
<s:SolidColor
|
||||
color.normal="0x9a9a9a"
|
||||
color.normalAndShowsCaret="0x9a9a9a"
|
||||
color.hovered="{getStyle('rollOverColor')}"
|
||||
color.hoveredAndShowsCaret="{getStyle('rollOverColor')}"
|
||||
color.selected="{getStyle('selectionColor')}"
|
||||
color.selectedAndShowsCaret="{getStyle('selectionColor')}"
|
||||
/>
|
||||
</s:fill>
|
||||
</s:Rect>
|
||||
<s:Label id="labelDisplay" verticalCenter="0" left="5" right="5" top="6" bottom="4"/>
|
||||
|
||||
</s:ItemRenderer>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
ADOBE SYSTEMS INCORPORATED
|
||||
Copyright 2009 Adobe Systems Incorporated
|
||||
All Rights Reserved.
|
||||
|
||||
NOTICE: Adobe permits you to use, modify, and distribute this file
|
||||
in accordance with the terms of the license agreement accompanying it.
|
||||
|
||||
-->
|
||||
<!--- The default skin class for the anchor button on a Spark DropDownList component.
|
||||
|
||||
@see spark.components.DropDownList
|
||||
@see spark.skins.spark.DropDownListSkin
|
||||
|
||||
@langversion 3.0
|
||||
@playerversion Flash 10
|
||||
@playerversion AIR 1.5
|
||||
@productversion Flex 4
|
||||
-->
|
||||
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="21" minHeight="21">
|
||||
|
||||
<fx:Metadata>
|
||||
<![CDATA[
|
||||
/**
|
||||
* @copy spark.skins.spark.ApplicationSkin#hostComponent
|
||||
*/
|
||||
[HostComponent("spark.components.Button")]
|
||||
]]>
|
||||
</fx:Metadata>
|
||||
|
||||
|
||||
<!-- states -->
|
||||
<s:states>
|
||||
<s:State name="up" />
|
||||
<s:State name="over" />
|
||||
<s:State name="down" />
|
||||
<s:State name="disabled" />
|
||||
</s:states>
|
||||
|
||||
<!-- Layer 2: innerFill -->
|
||||
<s:Rect id="innerFill" left="0" right="0" top="0" bottom="0" radiusX="0">
|
||||
<s:fill>
|
||||
<s:SolidColor color="0x9a9a9a" color.up="0x8a8a8a" />
|
||||
</s:fill>
|
||||
</s:Rect>
|
||||
|
||||
<!-- layer 8: arrow -->
|
||||
<!--- The arrow graphic displayed in the anchor button. -->
|
||||
<s:Path right="6" verticalCenter="0" id="arrow"
|
||||
data="M 7.03 0.5 C 7.43 0.9 7.43 1.55 7.03 1.95 L 4.64 4.34 C 4.24 4.74 3.59 4.74 3.19 4.34 L 0.8 1.95 C 0.4 1.55 0.4 0.9 0.8 0.5 L 7.03 0.5 Z">
|
||||
<s:fill>
|
||||
<s:SolidColor color="0xFFFFFF" />
|
||||
</s:fill>
|
||||
</s:Path>
|
||||
</s:Skin>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
ADOBE SYSTEMS INCORPORATED
|
||||
Copyright 2009 Adobe Systems Incorporated
|
||||
All Rights Reserved.
|
||||
|
||||
NOTICE: Adobe permits you to use, modify, and distribute this file
|
||||
in accordance with the terms of the license agreement accompanying it.
|
||||
|
||||
-->
|
||||
<!--- The default skin class for the Spark DropDownList component.
|
||||
The skin for the anchor button for a DropDownList component
|
||||
is defined by the DropDownListButtonSkin class.
|
||||
|
||||
@see spark.components.DropDownList
|
||||
@see spark.skins.spark.DropDownListButtonSkin
|
||||
|
||||
@langversion 3.0
|
||||
@playerversion Flash 10
|
||||
@playerversion AIR 1.5
|
||||
@productversion Flex 4
|
||||
-->
|
||||
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled=".5">
|
||||
|
||||
<!-- host component -->
|
||||
<fx:Metadata>
|
||||
<![CDATA[
|
||||
/**
|
||||
* @copy spark.skins.spark.ApplicationSkin#hostComponent
|
||||
*/
|
||||
[HostComponent("spark.components.DropDownList")]
|
||||
]]>
|
||||
</fx:Metadata>
|
||||
|
||||
<s:states>
|
||||
<s:State name="normal" />
|
||||
<s:State name="open" />
|
||||
<s:State name="disabled" />
|
||||
</s:states>
|
||||
|
||||
<!---
|
||||
The PopUpAnchor control that opens the drop-down list.
|
||||
-->
|
||||
<s:PopUpAnchor id="popUp" displayPopUp.normal="false" displayPopUp.open="true" includeIn="open"
|
||||
left="0" right="0" top="0" bottom="0" itemDestructionPolicy="auto"
|
||||
popUpPosition="below" popUpWidthMatchesAnchorWidth="true">
|
||||
|
||||
<!---
|
||||
The drop down area of the skin.
|
||||
This includes borders, background colors, scrollers, and filters.
|
||||
-->
|
||||
<s:Group id="dropDown" maxHeight="134" >
|
||||
|
||||
<!-- fill -->
|
||||
<!---
|
||||
Defines the appearance of drop-down list's background fill.
|
||||
-->
|
||||
<s:Rect id="background" left="0" right="0" top="0" bottom="0" >
|
||||
<s:fill>
|
||||
<!---
|
||||
The color of the drop down's background fill.
|
||||
The default color is 0xFFFFFF.
|
||||
-->
|
||||
<s:SolidColor id="bgFill" color="0x9a9a9a" />
|
||||
</s:fill>
|
||||
</s:Rect>
|
||||
|
||||
<s:Scroller id="scroller" left="0" top="0" right="0" bottom="0" hasFocusableChildren="false" minViewportInset="1">
|
||||
<!---
|
||||
The container for the data items in the drop-down list.
|
||||
-->
|
||||
<s:DataGroup id="dataGroup" itemRenderer="org.umbraco.desktopmediauploader.skins.DefaultItemRenderer">
|
||||
<s:layout>
|
||||
<s:VerticalLayout gap="0" horizontalAlign="contentJustify"/>
|
||||
</s:layout>
|
||||
</s:DataGroup>
|
||||
</s:Scroller>
|
||||
</s:Group>
|
||||
</s:PopUpAnchor>
|
||||
|
||||
<!--- The anchor button used by the DropDownList. The default skin is DropDownListButtonSkin. -->
|
||||
<s:Button id="openButton" left="0" right="0" top="0" bottom="0" focusEnabled="false"
|
||||
skinClass="org.umbraco.desktopmediauploader.skins.HeaderDropDownListButtonSkin" />
|
||||
|
||||
<!--- The prompt area of the DropDownList. -->
|
||||
<s:Label id="labelDisplay" verticalAlign="middle" maxDisplayedLines="1"
|
||||
mouseEnabled="false" mouseChildren="false"
|
||||
left="5" right="20" top="2" bottom="2" width="75" verticalCenter="1" />
|
||||
|
||||
</s:Skin>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
|
||||
xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
minWidth="21" minHeight="21" alpha.disabled="0.5">
|
||||
|
||||
<!-- host component -->
|
||||
<fx:Metadata>
|
||||
<![CDATA[
|
||||
[HostComponent("spark.components.Button")]
|
||||
]]>
|
||||
</fx:Metadata>
|
||||
|
||||
<!-- states -->
|
||||
<s:states>
|
||||
<s:State name="up" />
|
||||
<s:State name="over" />
|
||||
<s:State name="down" />
|
||||
<s:State name="disabled" />
|
||||
</s:states>
|
||||
|
||||
<mx:Image source="@Embed('assets/cross-grey.png')"
|
||||
source.over="@Embed('assets/cross.png')"
|
||||
/>
|
||||
|
||||
</s:SparkSkin>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
|
||||
xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
minWidth="21" minHeight="21" alpha.disabled="0.5">
|
||||
|
||||
<!-- host component -->
|
||||
<fx:Metadata>
|
||||
<![CDATA[
|
||||
[HostComponent("spark.components.Button")]
|
||||
]]>
|
||||
</fx:Metadata>
|
||||
|
||||
<!-- states -->
|
||||
<s:states>
|
||||
<s:State name="up" />
|
||||
<s:State name="over" />
|
||||
<s:State name="down" />
|
||||
<s:State name="disabled" />
|
||||
</s:states>
|
||||
|
||||
<mx:Image source="@Embed('assets/power.png')"
|
||||
source.over="@Embed('assets/power-over.png')"
|
||||
/>
|
||||
|
||||
</s:SparkSkin>
|
||||
@@ -0,0 +1,176 @@
|
||||
package org.umbraco.desktopmediauploader.util
|
||||
{
|
||||
import flash.utils.ByteArray;
|
||||
|
||||
public class Base64
|
||||
{
|
||||
private static const _encodeChars:Vector.<int> = InitEncoreChar();
|
||||
private static const _decodeChars:Vector.<int> = InitDecodeChar();
|
||||
|
||||
public static function encode(data:ByteArray):String
|
||||
{
|
||||
var out:ByteArray = new ByteArray();
|
||||
//Presetting the length keep the memory smaller and optimize speed since there is no "grow" needed
|
||||
out.length = (2 + data.length - ((data.length + 2) % 3)) * 4 / 3; //Preset length //1.6 to 1.5 ms
|
||||
var i:int = 0;
|
||||
var r:int = data.length % 3;
|
||||
var len:int = data.length - r;
|
||||
var c:int; //read (3) character AND write (4) characters
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
//Read 3 Characters (8bit * 3 = 24 bits)
|
||||
c = data[i++] << 16 | data[i++] << 8 | data[i++];
|
||||
|
||||
//Cannot optimize this to read int because of the positioning overhead. (as3 bytearray seek is slow)
|
||||
//Convert to 4 Characters (6 bit * 4 = 24 bits)
|
||||
c = (_encodeChars[c >>> 18] << 24) | (_encodeChars[c >>> 12 & 0x3f] << 16) | (_encodeChars[c >>> 6 & 0x3f] << 8 ) | _encodeChars[c & 0x3f];
|
||||
|
||||
//Optimization: On older and slower computer, do one write Int instead of 4 write byte: 1.5 to 0.71 ms
|
||||
out.writeInt(c);
|
||||
/*
|
||||
out.writeByte(_encodeChars[c >> 18] );
|
||||
out.writeByte(_encodeChars[c >> 12 & 0x3f]);
|
||||
out.writeByte(_encodeChars[c >> 6 & 0x3f]);
|
||||
out.writeByte(_encodeChars[c & 0x3f]);
|
||||
*/
|
||||
}
|
||||
|
||||
if (r == 1) //Need two "=" padding
|
||||
{
|
||||
//Read one char, write two chars, write padding
|
||||
c = data[i];
|
||||
c = (_encodeChars[c >>> 2] << 24) | (_encodeChars[(c & 0x03) << 4] << 16) | 61 << 8 | 61;
|
||||
out.writeInt(c);
|
||||
}
|
||||
else if (r == 2) //Need one "=" padding
|
||||
{
|
||||
c = data[i++] << 8 | data[i];
|
||||
c = (_encodeChars[c >>> 10] << 24) | (_encodeChars[c >>> 4 & 0x3f] << 16) | (_encodeChars[(c & 0x0f) << 2] << 8 ) | 61;
|
||||
out.writeInt(c);
|
||||
}
|
||||
|
||||
out.position = 0;
|
||||
return out.readUTFBytes(out.length);
|
||||
}
|
||||
|
||||
public static function decode(str:String):ByteArray
|
||||
{
|
||||
var c1:int;
|
||||
var c2:int;
|
||||
var c3:int;
|
||||
var c4:int;
|
||||
var i:int;
|
||||
var len:int;
|
||||
var out:ByteArray;
|
||||
len = str.length;
|
||||
i = 0;
|
||||
out = new ByteArray();
|
||||
var byteString:ByteArray = new ByteArray();
|
||||
byteString.writeUTFBytes(str);
|
||||
while (i < len)
|
||||
{
|
||||
//c1
|
||||
do
|
||||
{
|
||||
c1 = _decodeChars[byteString[i++]];
|
||||
} while (i < len && c1 == -1);
|
||||
if (c1 == -1) break;
|
||||
|
||||
//c2
|
||||
do
|
||||
{
|
||||
c2 = _decodeChars[byteString[i++]];
|
||||
} while (i < len && c2 == -1);
|
||||
if (c2 == -1) break;
|
||||
|
||||
out.writeByte((c1 << 2) | ((c2 & 0x30) >> 4));
|
||||
|
||||
//c3
|
||||
do
|
||||
{
|
||||
c3 = byteString[i++];
|
||||
if (c3 == 61) return out;
|
||||
|
||||
c3 = _decodeChars[c3];
|
||||
} while (i < len && c3 == -1);
|
||||
if (c3 == -1) break;
|
||||
|
||||
out.writeByte(((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2));
|
||||
|
||||
//c4
|
||||
do {
|
||||
c4 = byteString[i++];
|
||||
if (c4 == 61) return out;
|
||||
|
||||
c4 = _decodeChars[c4];
|
||||
} while (i < len && c4 == -1);
|
||||
if (c4 == -1) break;
|
||||
|
||||
out.writeByte(((c3 & 0x03) << 6) | c4);
|
||||
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
public static function encodeString(value : String) : String
|
||||
{
|
||||
const source : ByteArray = new ByteArray();
|
||||
source.writeUTFBytes(value);
|
||||
return encode(source);
|
||||
}
|
||||
|
||||
public static function decodeToString(str : String) : String
|
||||
{
|
||||
return decode(str).toString();
|
||||
}
|
||||
|
||||
public static function InitEncoreChar() : Vector.<int>
|
||||
{
|
||||
var encodeChars:Vector.<int> = new Vector.<int>();
|
||||
|
||||
// We could push the number directly, but i think it's nice to see the characters (with no overhead on encode/decode)
|
||||
var chars:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
for (var i:int = 0; i < 64; i++)
|
||||
{
|
||||
encodeChars.push(chars.charCodeAt(i));
|
||||
}
|
||||
/*
|
||||
encodeChars.push(
|
||||
65, 66, 67, 68, 69, 70, 71, 72,
|
||||
73, 74, 75, 76, 77, 78, 79, 80,
|
||||
81, 82, 83, 84, 85, 86, 87, 88,
|
||||
89, 90, 97, 98, 99, 100, 101, 102,
|
||||
103, 104, 105, 106, 107, 108, 109, 110,
|
||||
111, 112, 113, 114, 115, 116, 117, 118,
|
||||
119, 120, 121, 122, 48, 49, 50, 51,
|
||||
52, 53, 54, 55, 56, 57, 43, 47);
|
||||
*/
|
||||
return encodeChars;
|
||||
}
|
||||
|
||||
public static function InitDecodeChar() : Vector.<int>
|
||||
{
|
||||
var decodeChars:Vector.<int> = new Vector.<int>();
|
||||
|
||||
decodeChars.push(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
|
||||
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
|
||||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
|
||||
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
|
||||
return decodeChars;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.umbraco.desktopmediauploader.util
|
||||
{
|
||||
import flash.display.Stage;
|
||||
import flash.events.Event;
|
||||
|
||||
public class StageHelper
|
||||
{
|
||||
private static var _stage:Stage;
|
||||
private static var _resizeListenerSet:Boolean = false;
|
||||
|
||||
[Bindable]
|
||||
public static var stageWidth:int = 0;
|
||||
|
||||
[Bindable]
|
||||
public static var stageHeight:int = 0;
|
||||
|
||||
public function StageHelper()
|
||||
{ }
|
||||
|
||||
public static function set stage(value:Stage):void
|
||||
{
|
||||
_stage = value;
|
||||
|
||||
addResizeListener();
|
||||
|
||||
stage_resize();
|
||||
}
|
||||
|
||||
private static function addResizeListener():void
|
||||
{
|
||||
if (_resizeListenerSet)
|
||||
return;
|
||||
|
||||
if(!_stage)
|
||||
return;
|
||||
|
||||
_stage.addEventListener(Event.RESIZE, stage_resize);
|
||||
_resizeListenerSet = true;
|
||||
}
|
||||
|
||||
private static function stage_resize(e:Event = null):void
|
||||
{
|
||||
stageWidth = _stage.stageWidth;
|
||||
stageHeight = _stage.stageHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.umbraco.desktopmediauploader.util
|
||||
{
|
||||
import mx.utils.*;
|
||||
|
||||
public class StringHelper
|
||||
{
|
||||
public static function cleanXmlString(str:String):String
|
||||
{
|
||||
// Remove any Byte Order Markers
|
||||
str = str.replace(String.fromCharCode(65279), "");
|
||||
|
||||
// Trim whitespace
|
||||
return StringUtil.trim(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
|
||||
xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
width="100%" height="100%"
|
||||
show="vwSignIn_ShowHandler(event);">
|
||||
|
||||
<s:layout>
|
||||
<s:BasicLayout/>
|
||||
</s:layout>
|
||||
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
import org.umbraco.desktopmediauploader.events.*;
|
||||
import org.umbraco.desktopmediauploader.net.*;
|
||||
import org.umbraco.desktopmediauploader.util.*;
|
||||
|
||||
import mx.controls.Alert;
|
||||
import mx.managers.*;
|
||||
import mx.events.FlexEvent;
|
||||
|
||||
|
||||
public function init():void
|
||||
{
|
||||
NativeApplication.nativeApplication.addEventListener(BrowserInvokeEvent.BROWSER_INVOKE, app_BrowserInvoke);
|
||||
|
||||
reset();
|
||||
|
||||
if(chkAutoSignIn.selected)
|
||||
{
|
||||
doSignIn();
|
||||
}
|
||||
}
|
||||
|
||||
protected function vwSignIn_ShowHandler(event:FlexEvent):void
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
protected function app_BrowserInvoke(e:BrowserInvokeEvent):void
|
||||
{
|
||||
var encLaunchArg:String = unescape(e.arguments[0]);
|
||||
var launchArg:String = Base64.decodeToString(encLaunchArg);
|
||||
var launchArgs:Array = launchArg.split(";");
|
||||
|
||||
Model.url = parseUrl(launchArgs[0]);
|
||||
Model.username = launchArgs[1];
|
||||
Model.password = "";
|
||||
Model.ticket = launchArgs[2];
|
||||
|
||||
// Ok, time to hit the server
|
||||
CursorManager.setBusyCursor();
|
||||
this.enabled = false;
|
||||
|
||||
// Authenticate credentials
|
||||
// NB: As every request authenticates anyway, just load config
|
||||
// and if it fails, assume login was invalid
|
||||
DmuRequest.makeRequest(DmuRequestAction.CONFIG,
|
||||
configRequest_Success,
|
||||
configRequest_Error);
|
||||
}
|
||||
|
||||
protected function reset():void
|
||||
{
|
||||
chkRememberMe.selected = (getEncryptedValue("dmu_rememberme") == "true");
|
||||
chkRememberPassword.selected = (getEncryptedValue("dmu_rememberpassword") == "true");
|
||||
chkAutoSignIn.selected = (getEncryptedValue("dmu_autosignin") == "true");
|
||||
|
||||
if (chkRememberMe.selected)
|
||||
{
|
||||
txtUrl.text = getEncryptedValue("dmu_url");
|
||||
txtUsername.text = getEncryptedValue("dmu_username");
|
||||
if (chkRememberPassword.selected)
|
||||
{
|
||||
txtPassword.text = getEncryptedValue("dmu_password");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function txtPassword_Enter(event:Event):void
|
||||
{
|
||||
doSignIn();
|
||||
}
|
||||
|
||||
protected function btnSignIn_clickHandler(event:MouseEvent=null):void
|
||||
{
|
||||
doSignIn();
|
||||
}
|
||||
|
||||
protected function configRequest_Success(event:DmuRequestEvent):void
|
||||
{
|
||||
this.enabled = true;
|
||||
CursorManager.removeBusyCursor();
|
||||
|
||||
var xml:XML = event.result;
|
||||
|
||||
// Store config
|
||||
Model.displayName = xml.displayName;
|
||||
Model.umbracoPath = xml.umbracoPath;
|
||||
Model.maxRequestLength = Number(xml.maxRequestLength);
|
||||
|
||||
// Remember login
|
||||
if(!Model.ticket || Model.ticket == "")
|
||||
{
|
||||
setEncryptedValue("dmu_url", (chkRememberMe.selected)? Model.url : null);
|
||||
setEncryptedValue("dmu_username", (chkRememberMe.selected)? Model.username : null);
|
||||
setEncryptedValue("dmu_password", (chkRememberMe.selected && chkRememberPassword.selected) ? Model.password : null);
|
||||
setEncryptedValue("dmu_rememberme", chkRememberMe.selected.toString());
|
||||
setEncryptedValue("dmu_rememberpassword", chkRememberPassword.selected.toString());
|
||||
setEncryptedValue("dmu_autosignin", chkAutoSignIn.selected.toString());
|
||||
}
|
||||
|
||||
dispatchEvent(new SignedInEvent(SignedInEvent.SIGNED_IN));
|
||||
}
|
||||
|
||||
protected function configRequest_Error(event:Event):void
|
||||
{
|
||||
this.enabled = true;
|
||||
CursorManager.removeBusyCursor();
|
||||
|
||||
Alert.show("Invalid login", "Ooops!");
|
||||
}
|
||||
|
||||
private function doSignIn():void
|
||||
{
|
||||
Model.url = parseUrl(txtUrl.text);
|
||||
Model.username = txtUsername.text;
|
||||
Model.password = txtPassword.text;
|
||||
Model.ticket = "";
|
||||
|
||||
// Ok, time to hit the server
|
||||
CursorManager.setBusyCursor();
|
||||
this.enabled = false;
|
||||
|
||||
// Authenticate credentials
|
||||
// NB: As every request authenticates anyway, just load config
|
||||
// and if it fails, assume login was invalid
|
||||
DmuRequest.makeRequest(DmuRequestAction.CONFIG,
|
||||
configRequest_Success,
|
||||
configRequest_Error);
|
||||
}
|
||||
|
||||
private function parseUrl(url:String):String
|
||||
{
|
||||
var urlPattern:RegExp = /^((?P<scheme>https?):\/\/)(?P<hostname>[^:\/\s]+)(?P<port>:([^\/]*))?((?P<path>(\/\w+)*\/)(?P<filename>[-\w.]+[^#?\s]*)?(?P<query>\?([^#]*))?(?P<fragment>#(.*))?)?$/gi;
|
||||
var result:Array = urlPattern.exec(url.toLowerCase());
|
||||
if (result != null && result.length > 0)
|
||||
{
|
||||
var parsedUrl:String = result.scheme + "://" + result.hostname + result.port + result.path + result.filename;
|
||||
|
||||
while(parsedUrl.substr(parsedUrl.length - 1) == "/")
|
||||
{
|
||||
parsedUrl = parsedUrl.substr(0, parsedUrl.length - 1);
|
||||
}
|
||||
|
||||
return parsedUrl;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
private function setEncryptedValue(key:String, value:String):void
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
var data:ByteArray = new ByteArray();
|
||||
data.writeUTFBytes(value);
|
||||
EncryptedLocalStore.setItem(key, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
EncryptedLocalStore.removeItem(key);
|
||||
}
|
||||
}
|
||||
|
||||
private function getEncryptedValue(key:String):String
|
||||
{
|
||||
var data:ByteArray = EncryptedLocalStore.getItem(key);
|
||||
return (data != null) ? data.readUTFBytes(data.length) : null;
|
||||
}
|
||||
|
||||
]]>
|
||||
</fx:Script>
|
||||
|
||||
<fx:Metadata>
|
||||
[Event(name="signedIn", type="org.umbraco.desktopmediauploader.events.SignedInEvent")]
|
||||
</fx:Metadata>
|
||||
|
||||
<fx:Declarations>
|
||||
<!-- Place non-visual elements (e.g., services, value objects) here -->
|
||||
</fx:Declarations>
|
||||
|
||||
<mx:Image horizontalCenter="0" source="@Embed('assets/logo.png')" verticalCenter="-145"/>
|
||||
<s:VGroup id="grpSignInForm" height="200" bottom="105" left="25" right="25">
|
||||
<s:Label text="URL" fontWeight="bold"/>
|
||||
<s:TextInput width="100%" id="txtUrl" text="@{Model.url}"/>
|
||||
<s:Label text="Username" fontWeight="bold"/>
|
||||
<s:TextInput width="100%" id="txtUsername" text="@{Model.username}"/>
|
||||
<s:Label text="Password" fontWeight="bold"/>
|
||||
<s:TextInput width="100%" id="txtPassword" displayAsPassword="true" text="@{Model.password}" enter="txtPassword_Enter(event)" />
|
||||
<s:CheckBox label="Remember Me" id="chkRememberMe" change="(!chkRememberMe.selected) ? chkRememberPassword.selected = chkAutoSignIn.selected = false : null"/>
|
||||
<s:CheckBox label="Remember Password" id="chkRememberPassword" enabled="{chkRememberMe.selected}" change="(!chkRememberPassword.selected) ? chkAutoSignIn.selected = false : null"/>
|
||||
<s:CheckBox label="Sign In Automaticaly" id="chkAutoSignIn" enabled="{chkRememberPassword.selected}"/>
|
||||
</s:VGroup>
|
||||
<mx:Button label="Sign In" bottom="25" id="btnSignIn" click="btnSignIn_clickHandler(event)" left="25" right="25" height="35" useHandCursor="true" buttonMode="true" styleName=""/>
|
||||
|
||||
</s:Group>
|
||||
@@ -0,0 +1,331 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
|
||||
xmlns:s="library://ns.adobe.com/flex/spark"
|
||||
xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
xmlns:components="org.umbraco.desktopmediauploader.components.*"
|
||||
width="100%" height="100%"
|
||||
creationComplete="vwUpload_CreationCompleteHandler(event)"
|
||||
show="vwUpload_ShowHandler(event);">
|
||||
|
||||
<s:layout>
|
||||
<s:BasicLayout/>
|
||||
</s:layout>
|
||||
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
import org.umbraco.desktopmediauploader.components.*;
|
||||
import org.umbraco.desktopmediauploader.events.*;
|
||||
import org.umbraco.desktopmediauploader.net.*;
|
||||
import org.umbraco.desktopmediauploader.util.*;
|
||||
|
||||
import flash.desktop.*;
|
||||
import flash.events.*;
|
||||
import flash.filesystem.File;
|
||||
import flash.net.*;
|
||||
|
||||
import mx.collections.Sort;
|
||||
import mx.collections.SortField;
|
||||
import mx.controls.Alert;
|
||||
import mx.controls.Menu;
|
||||
import mx.core.ScrollPolicy;
|
||||
import mx.events.FlexEvent;
|
||||
import mx.managers.*;
|
||||
|
||||
import spark.events.IndexChangeEvent;
|
||||
|
||||
[Bindable] public var currentUploadItem:UploadItem;
|
||||
[Bindable] public var uploadItems:ArrayCollection;
|
||||
|
||||
[Bindable] private var uploading:Boolean = false;
|
||||
|
||||
protected function vwUpload_CreationCompleteHandler(event:FlexEvent):void
|
||||
{
|
||||
uploadItems = new ArrayCollection();
|
||||
|
||||
addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, vwUpload_DragEnter);
|
||||
addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, vwUpload_DragDrop);
|
||||
|
||||
dmuStatus.addEventListener(Event.CANCEL, dmuStatus_Cancel);
|
||||
}
|
||||
|
||||
protected function vwUpload_ShowHandler(event:FlexEvent):void
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
private function vwUpload_DragEnter(e:NativeDragEvent) :void
|
||||
{
|
||||
var valid:Boolean = false;
|
||||
if(e.clipboard.hasFormat(ClipboardFormats.FILE_LIST_FORMAT))
|
||||
{
|
||||
// Only allow drop if at least 1 file is valid
|
||||
var files:Array = e.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT) as Array;
|
||||
for each (var f:File in files)
|
||||
{
|
||||
if (isValidFile(f))
|
||||
{
|
||||
valid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (valid)
|
||||
NativeDragManager.acceptDragDrop(this);
|
||||
}
|
||||
}
|
||||
|
||||
private function vwUpload_DragDrop(e:NativeDragEvent) :void
|
||||
{
|
||||
var files:Array = e.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT) as Array;
|
||||
|
||||
addFilesToQueue(files);
|
||||
|
||||
// Sort alphabeticlly
|
||||
var sf:SortField = new SortField("fullPath", true);
|
||||
var s:Sort = new Sort();
|
||||
s.fields = [sf];
|
||||
|
||||
uploadItems.sort = s;
|
||||
uploadItems.refresh();
|
||||
|
||||
for(var i:int = 0; i < uploadItems.length; i++)
|
||||
{
|
||||
grpUploadItemContainer.addElement(uploadItems[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private function reset():void
|
||||
{
|
||||
Model.currentFolder = undefined;
|
||||
Model.folderId = undefined;
|
||||
Model.folderName = undefined;
|
||||
Model.folderPath = undefined;
|
||||
|
||||
uploading = false;
|
||||
currentUploadItem == null;
|
||||
|
||||
dmuStatus_Cancel();
|
||||
}
|
||||
|
||||
private function isValidFile(file:File, path:String = ""):Boolean
|
||||
{
|
||||
var queued:Boolean = false;
|
||||
|
||||
var i:int = uploadItems.length;
|
||||
while(i--)
|
||||
{
|
||||
var uploadItem:UploadItem = uploadItems[i] as UploadItem;
|
||||
if (uploadItem != null && uploadItem.file.name == file.name && uploadItem.path == path && uploadItem.file.size == file.size)
|
||||
{
|
||||
queued = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Handle .lnk files?
|
||||
// TODO: What to do with zip files?
|
||||
return (!file.isSymbolicLink &&
|
||||
!file.isPackage &&
|
||||
!file.isHidden &&
|
||||
!queued &&
|
||||
file.size <= (Model.maxRequestLength * 1024));
|
||||
}
|
||||
|
||||
private function addFilesToQueue(files:Array, path:String = ""):void
|
||||
{
|
||||
for each (var f:File in files)
|
||||
{
|
||||
if(f.isDirectory)
|
||||
{
|
||||
addFilesToQueue(f.getDirectoryListing(), path + "/" + f.name)
|
||||
}
|
||||
else if (isValidFile(f, path))
|
||||
{
|
||||
addFileToQueue(FileReference(f), path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function addFileToQueue(file:FileReference, path:String):void
|
||||
{
|
||||
var uploadItem:UploadItem = new UploadItem();
|
||||
uploadItem.file = file;
|
||||
uploadItem.path = path;
|
||||
uploadItem.addEventListener(Event.COMPLETE, uploadItem_Complete);
|
||||
uploadItem.addEventListener(Event.CANCEL, uploadItem_Cancel);
|
||||
uploadItem.addEventListener(HTTPStatusEvent.HTTP_STATUS, uploadItem_Error);
|
||||
uploadItem.addEventListener(IOErrorEvent.IO_ERROR, uploadItem_Error);
|
||||
uploadItem.addEventListener(SecurityErrorEvent.SECURITY_ERROR, uploadItem_Error);
|
||||
|
||||
grpUploadItemContainer.addElement(uploadItem);
|
||||
uploadItems.addItem(uploadItem);
|
||||
}
|
||||
|
||||
protected function ddlConnectedTo_Close(e:Event):void
|
||||
{
|
||||
var oldIndex:Number = ddlConnectedTo.selectedIndex;
|
||||
ddlConnectedTo.selectedIndex = -1;
|
||||
|
||||
if (oldIndex >= 0)
|
||||
{
|
||||
switch(ddlConnectedTo.dataProvider[oldIndex])
|
||||
{
|
||||
case "Launch Site":
|
||||
navigateToURL(new URLRequest(Model.url));
|
||||
break;
|
||||
case "Launch Admin":
|
||||
navigateToURL(new URLRequest(Model.url + Model.umbracoPath + "/"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function btnSignOut_Click(e:Event):void
|
||||
{
|
||||
if (uploading)
|
||||
Alert.show("Unable to sign out whilst uploading files.", "Ooops!");
|
||||
else
|
||||
dispatchEvent(new SignedOutEvent(SignedOutEvent.SIGNED_OUT));
|
||||
}
|
||||
|
||||
protected function uploadItem_Complete(e:Event):void
|
||||
{
|
||||
uploadItem_Cancel(e);
|
||||
|
||||
uploading = false;
|
||||
currentUploadItem == null;
|
||||
|
||||
if (uploadItems.length > 0)
|
||||
btnUpload_Click();
|
||||
else
|
||||
Alert.show("Upload complete.", "Woo hoo!");
|
||||
}
|
||||
|
||||
protected function uploadItem_Cancel(e:Event):void
|
||||
{
|
||||
var uploadItem:UploadItem = e.target as UploadItem;
|
||||
|
||||
var i:uint = uploadItems.length;
|
||||
while(i--)
|
||||
{
|
||||
var uploadItem2:UploadItem = uploadItems[i] as UploadItem;
|
||||
if(uploadItem2.file.name == uploadItem.file.name && uploadItem2.path == uploadItem.path)
|
||||
{
|
||||
grpUploadItemContainer.removeElement(uploadItem);
|
||||
uploadItems.removeItemAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function uploadItem_Error(e:Event):void
|
||||
{
|
||||
// TODO: Move item to bottom?
|
||||
}
|
||||
|
||||
protected function dmuStatus_Cancel(event:Event = null):void
|
||||
{
|
||||
var i:uint = uploadItems.length;
|
||||
while(i--)
|
||||
{
|
||||
uploadItems[i].cancel();
|
||||
}
|
||||
}
|
||||
|
||||
protected function btnUploadTo_Click(event:MouseEvent):void
|
||||
{
|
||||
var win:FolderPickerDialog = PopUpManager.createPopUp(this, FolderPickerDialog, true) as FolderPickerDialog;
|
||||
|
||||
PopUpManager.centerPopUp(win);
|
||||
}
|
||||
|
||||
|
||||
protected function btnUpload_Click(event:MouseEvent = null):void
|
||||
{
|
||||
var uploadItem:UploadItem;
|
||||
var i:int;
|
||||
|
||||
if (!uploading)
|
||||
{
|
||||
uploading = false;
|
||||
currentUploadItem = null;
|
||||
|
||||
for(i = 0; i < uploadItems.length; i++)
|
||||
{
|
||||
uploadItem = uploadItems[i] as UploadItem;
|
||||
if (!uploadItem.uploaded)
|
||||
{
|
||||
currentUploadItem = uploadItem;
|
||||
currentUploadItem.upload();
|
||||
uploading = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i = 0; i < uploadItems.length; i++)
|
||||
{
|
||||
uploadItem = uploadItems[i] as UploadItem;
|
||||
if (!uploadItem.uploaded)
|
||||
{
|
||||
uploadItem.pause();
|
||||
}
|
||||
}
|
||||
|
||||
uploading = false;
|
||||
currentUploadItem = null;
|
||||
}
|
||||
}
|
||||
|
||||
]]>
|
||||
</fx:Script>
|
||||
|
||||
<fx:Metadata>
|
||||
[Event(name="signedOut", type="org.umbraco.desktopmediauploader.events.SignedOutEvent")]
|
||||
</fx:Metadata>
|
||||
|
||||
<fx:Declarations>
|
||||
<fx:Array id="uploadMenuItems">
|
||||
<fx:Object label="Clear Queue" />
|
||||
<fx:Object type="separator" />
|
||||
<fx:Object label="Overwrite existing files" type="check" />
|
||||
<fx:Object label="Auto extract zip files" type="check" />
|
||||
</fx:Array>
|
||||
</fx:Declarations>
|
||||
|
||||
<s:BorderContainer top="0" left="0" right="0" height="70" styleName="header">
|
||||
<mx:Image source="@Embed('assets/icon-48.png')" x="10" y="10" />
|
||||
<mx:Label id="lblName" text="{Model.displayName}" left="64" y="10" right="50" truncateToFit="true" minWidth="0" />
|
||||
<s:DropDownList id="ddlConnectedTo" prompt="{Model.url}" close="ddlConnectedTo_Close(event)" x="65" y="33" typicalItem="{Model.url}" maxWidth="{StageHelper.stageWidth - 90}" open="ddlConnectedTo.scroller.setStyle('horizontalScrollPolicy', ScrollPolicy.OFF);" useHandCursor="true" buttonMode="true">
|
||||
<mx:ArrayCollection>
|
||||
<fx:String>Launch Site</fx:String>
|
||||
<fx:String>Launch Admin</fx:String>
|
||||
</mx:ArrayCollection>
|
||||
</s:DropDownList>
|
||||
<s:Button id="btnSignOut" width="13" height="15" top="11" right="25" useHandCursor="true" buttonMode="true" styleName="signOutButton" click="btnSignOut_Click(event)" />
|
||||
|
||||
</s:BorderContainer>
|
||||
|
||||
<s:VGroup top="90" left="25" right="25" gap="5">
|
||||
<s:Label text="Upload files to..."/>
|
||||
<s:Button id="btnUploadTo" label="{(Model.folderPath) ? Model.folderPath.replace(/\//g, ' › ') : 'Please select...'}" width="100%" click="btnUploadTo_Click(event)" creationComplete="btnUploadTo.labelDisplay.setStyle('textAlign','left')" height="25" useHandCursor="true" buttonMode="true" />
|
||||
</s:VGroup>
|
||||
|
||||
<s:BorderContainer top="150" left="25" right="25" bottom="100" borderColor="#CCCCCC" backgroundColor="#FFFFFF">
|
||||
<s:Scroller width="100%" height="100%">
|
||||
<s:Group id="grpUploadItemContainer">
|
||||
<s:layout>
|
||||
<s:VerticalLayout paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5" gap="5"/>
|
||||
</s:layout>
|
||||
<components:StatusItem id="dmuStatus" visible="{uploadItems.length > 0}" includeInLayout="{uploadItems.length > 0}" totalItems="{uploadItems.length}" />
|
||||
<s:Label text="Drag Files and Folders Here To Upload" verticalAlign="middle" textAlign="center"
|
||||
width="100%" height="100%" fontSize="20" color="#CCCCCC" id="lblInstructions"
|
||||
paddingLeft="20" paddingRight="20" paddingTop="20" paddingBottom="20"
|
||||
visible="{uploadItems.length == 0}" includeInLayout="{uploadItems.length == 0}"/>
|
||||
</s:Group>
|
||||
</s:Scroller>
|
||||
</s:BorderContainer>
|
||||
<s:CheckBox x="25" bottom="73" label="Overwrite existing files with the same filename?" id="chkReplace" selected="@{Model.replaceExisting}" color="#333333"/>
|
||||
<mx:Button id="btnUpload" label="{!uploading ? 'Upload' : 'Cancel'}" useHandCursor="{btnUpload.enabled}" buttonMode="{btnUpload.enabled}" bottom="25" enabled="{uploadItems.length > 0 && Model.folderId}" styleName="orange" height="35" left="25" right="25" click="btnUpload_Click(event)"/>
|
||||
</s:Group>
|
||||
@@ -12,10 +12,14 @@
|
||||
<AssemblyName>SQLCE4Umbraco</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -50,6 +54,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SqlCeApplicationBlock.cs" />
|
||||
<Compile Include="SqlCeContextGuardian.cs" />
|
||||
<Compile Include="SqlCEDataReader.cs" />
|
||||
<Compile Include="SqlCEHelper.cs" />
|
||||
<Compile Include="SqlCEInstaller.cs" />
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using SQLCE4Umbraco;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
@@ -29,10 +30,8 @@ namespace SqlCE4Umbraco
|
||||
|
||||
try
|
||||
{
|
||||
using (SqlCeConnection conn = new SqlCeConnection())
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
using (SqlCeCommand cmd = new SqlCeCommand(commandText, conn))
|
||||
{
|
||||
AttachParameters(cmd, commandParameters);
|
||||
@@ -68,7 +67,7 @@ namespace SqlCE4Umbraco
|
||||
try
|
||||
{
|
||||
int rowsAffected;
|
||||
using (SqlCeConnection conn = new SqlCeConnection())
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
// this is for multiple queries in the installer
|
||||
if (commandText.Trim().StartsWith("!!!"))
|
||||
@@ -76,8 +75,6 @@ namespace SqlCE4Umbraco
|
||||
commandText = commandText.Trim().Trim('!');
|
||||
string[] commands = commandText.Split('|');
|
||||
string currentCmd = String.Empty;
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
|
||||
foreach (string cmd in commands)
|
||||
{
|
||||
@@ -105,8 +102,6 @@ namespace SqlCE4Umbraco
|
||||
Debug.WriteLine("----------------------------------------------------------------------------");
|
||||
Debug.WriteLine(commandText);
|
||||
Debug.WriteLine("----------------------------------------------------------------------------");
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
SqlCeCommand cmd = new SqlCeCommand(commandText, conn);
|
||||
AttachParameters(cmd, commandParameters);
|
||||
rowsAffected = cmd.ExecuteNonQuery();
|
||||
@@ -142,9 +137,8 @@ namespace SqlCE4Umbraco
|
||||
Debug.WriteLine(commandText);
|
||||
Debug.WriteLine("----------------------------------------------------------------------------");
|
||||
SqlCeDataReader reader;
|
||||
SqlCeConnection conn = new SqlCeConnection();
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString);
|
||||
|
||||
try
|
||||
{
|
||||
SqlCeCommand cmd = new SqlCeCommand(commandText, conn);
|
||||
@@ -168,10 +162,8 @@ namespace SqlCE4Umbraco
|
||||
public static bool VerifyConnection(string connectionString)
|
||||
{
|
||||
bool isConnected = false;
|
||||
using (SqlCeConnection conn = new SqlCeConnection())
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
isConnected = conn.State == ConnectionState.Open;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace SQLCE4Umbraco
|
||||
{
|
||||
public static class SqlCeContextGuardian
|
||||
{
|
||||
private static SqlCeConnection _constantOpenConnection;
|
||||
private static object objLock = new object();
|
||||
|
||||
// Awesome SQL CE 4 speed improvement by Erik Ejskov Jensen - SQL CE 4 MVP
|
||||
// It's not an issue with SQL CE 4 that we never close the connection
|
||||
public static SqlCeConnection Open(string connectionString)
|
||||
{
|
||||
var connectionStringBuilder = new DbConnectionStringBuilder();
|
||||
try
|
||||
{
|
||||
connectionStringBuilder.ConnectionString = connectionString;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException("Bad connection string.", "connectionString", ex);
|
||||
}
|
||||
connectionStringBuilder.Remove("datalayer");
|
||||
|
||||
// SQL CE 4 performs better when there's always a connection open in the background
|
||||
ensureOpenBackgroundConnection(connectionStringBuilder.ConnectionString);
|
||||
|
||||
SqlCeConnection conn = new SqlCeConnection(connectionStringBuilder.ConnectionString);
|
||||
conn.Open();
|
||||
|
||||
return conn;
|
||||
|
||||
}
|
||||
|
||||
private static void ensureOpenBackgroundConnection(string connectionString)
|
||||
{
|
||||
lock (objLock)
|
||||
{
|
||||
if (_constantOpenConnection == null)
|
||||
{
|
||||
_constantOpenConnection = new SqlCeConnection(connectionString);
|
||||
_constantOpenConnection.Open();
|
||||
}
|
||||
else if (_constantOpenConnection.State != ConnectionState.Open)
|
||||
_constantOpenConnection.Open();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,11 @@ namespace umbraco.editorControls
|
||||
{
|
||||
StoreItemId(_data);
|
||||
|
||||
// zb-00024 #299260 : see the loooong comments in OnLoad
|
||||
// setting the value here seems OK but use this.Value to ensure
|
||||
// that the hidden control exists
|
||||
this.Value = StoredItemId != -1 ? StoredItemId.ToString() : "";
|
||||
|
||||
base.OnInit(e);
|
||||
}
|
||||
|
||||
@@ -53,6 +58,33 @@ namespace umbraco.editorControls
|
||||
{
|
||||
ItemIdValue.Value = StoredItemId != -1 ? StoredItemId.ToString() : "";
|
||||
}
|
||||
|
||||
// zb-00024 #299260 : support postback
|
||||
// on postback ItemIdValue.Value is restored by LoadPostData
|
||||
// on non-postback it is initialized by the code above
|
||||
// w/RCC when clicking on 'edit' it is not initialized
|
||||
|
||||
// StoredItemId is initialized in OnInit with whatever comes from the
|
||||
// database, or from what the RCC decides we need to display--but when
|
||||
// we changes something in the web page, it is handled by LoadPostData
|
||||
|
||||
// RCC 'edit':
|
||||
// ItemIdValue.Value has no value, or a wrong value, which we should ignore
|
||||
// StoredItemId is initialized with the right value in RCC code
|
||||
// so we'd need to set ItemIdValue.Value from it
|
||||
|
||||
// but if we do it in prerender then we copy over the /old/ StoredItemIt
|
||||
// value which was the one before we saved... because we don't refresh it
|
||||
// when we update
|
||||
|
||||
// and if we refresh it here we are in trouble because we overwrite what
|
||||
// comes from the form and we can't actually change the value anymore
|
||||
|
||||
// so we should change it /once/ the ItemIdValue.Value changes have been
|
||||
// akn
|
||||
|
||||
// the viewed image ID is set in mediaChoose onPreRender from
|
||||
// ItemIdValue.Value so we really want it to have a value!
|
||||
}
|
||||
|
||||
#region IDataField Members
|
||||
|
||||
@@ -2,13 +2,14 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
using ClientDependency.Core;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.DataLayer;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
|
||||
|
||||
[assembly: System.Web.UI.WebResource("umbraco.editorControls.KeyValuePrevalueEditor.js", "text/js")]
|
||||
[assembly: System.Web.UI.WebResource("umbraco.editorControls.KeyValuePrevalueEditor.css", "text/css")]
|
||||
namespace umbraco.editorControls
|
||||
@@ -16,6 +17,8 @@ namespace umbraco.editorControls
|
||||
/// <summary>
|
||||
/// Summary description for KeyValuePrevalueEditor.
|
||||
/// </summary>
|
||||
|
||||
[ClientDependency(ClientDependencyType.Javascript, "Jeditable/jquery.jeditable.js", "UmbracoClient")]
|
||||
public class KeyValuePrevalueEditor : System.Web.UI.WebControls.PlaceHolder, interfaces.IDataPrevalue
|
||||
{
|
||||
|
||||
@@ -191,7 +194,7 @@ namespace umbraco.editorControls
|
||||
|
||||
foreach (KeyValuePair<int, String> item in _prevalues)
|
||||
{
|
||||
writer.Write("<tr class=\"row\"><td class=\"text\">" + item.Value + "</td><td class=\"value\"> " + item.Key.ToString() + "</td><td><a href='?id=" + _datatype.DataTypeDefinitionId + "&delete=" + item.Key.ToString() + "'>" + ui.Text("delete") + "</a> <span class=\"handle\" style=\"cursor:move\">sort<span></td></tr>");
|
||||
writer.Write("<tr class=\"row\"><td class=\"text\">" + item.Value + "</td><td class=\"value\"> " + item.Key.ToString() + "</td><td><a onclick='javascript:return ConfirmPrevalueDelete();' href='?id=" + _datatype.DataTypeDefinitionId + "&delete=" + item.Key.ToString() + "'>" + ui.Text("delete") + "</a> <span class=\"handle\" style=\"cursor:move\">sort<span></td></tr>");
|
||||
}
|
||||
writer.Write("</table><br style='clear: both'/></div>");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
jQuery("#prevalues .text").valuesInlineEdit();
|
||||
jQuery("#prevalues .text").editable(function (value, settings) { $(this).html(value); ResetValues(); }, { onblur: 'submit', tooltip: 'Click to edit', cssclass: 'inlineEditor' });
|
||||
|
||||
jQuery("#prevalues tbody").sortable({
|
||||
items: "tr:not(.header)",
|
||||
@@ -35,83 +35,6 @@ function ResetValues() {
|
||||
jQuery(".valuesHiddenInput").val(val);
|
||||
}
|
||||
|
||||
//inline edit
|
||||
(function ($) {
|
||||
|
||||
$.fn.valuesInlineEdit = function (options) {
|
||||
|
||||
options = $.extend({
|
||||
hover: 'hover',
|
||||
value: '',
|
||||
save: '',
|
||||
placeholder: 'Click to edit'
|
||||
}, options);
|
||||
|
||||
return $.each(this, function () {
|
||||
$.valuesInlineEdit(this, options);
|
||||
});
|
||||
}
|
||||
|
||||
$.valuesInlineEdit = function (obj, options) {
|
||||
|
||||
var self = $(obj),
|
||||
placeholderHtml = '<span class="inlineEdit-placeholder">' + options.placeholder + '</span>';
|
||||
|
||||
self.value = function (newValue) {
|
||||
if (arguments.length) {
|
||||
self.data('value', $(newValue).hasClass('inlineEdit-placeholder') ? '' : newValue);
|
||||
}
|
||||
return self.data('value');
|
||||
}
|
||||
|
||||
self.value($.trim(self.text()) || options.value);
|
||||
|
||||
self.bind('click', function (event) {
|
||||
var $this = $(event.target);
|
||||
|
||||
if ($this.is(self[0].tagName) || $this.hasClass('inlineEdit-placeholder')) {
|
||||
self
|
||||
.html('<input type="text" value="' + self.value() + '">')
|
||||
.find('input')
|
||||
.bind('blur', function () {
|
||||
if ($this.children('input').val().length > 0) {
|
||||
|
||||
try {
|
||||
self.value($this.children('input').val());
|
||||
|
||||
|
||||
|
||||
} catch (err) { }
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
self.value('Click to edit');
|
||||
}
|
||||
if (self.timer) {
|
||||
window.clearTimeout(self.timer);
|
||||
}
|
||||
self.timer = window.setTimeout(function () {
|
||||
self.html(self.value() || placeholderHtml);
|
||||
self.removeClass(options.hover);
|
||||
ResetValues();
|
||||
}, 200);
|
||||
})
|
||||
.focus();
|
||||
}
|
||||
})
|
||||
.hover(
|
||||
function () {
|
||||
$(this).addClass(options.hover);
|
||||
},
|
||||
function () {
|
||||
$(this).removeClass(options.hover);
|
||||
}
|
||||
);
|
||||
|
||||
if (!self.value()) {
|
||||
self.html($(placeholderHtml));
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
function ConfirmPrevalueDelete() {
|
||||
return confirm("Are you sure you want to delete");
|
||||
}
|
||||
@@ -10,6 +10,8 @@ namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
private System.Web.UI.WebControls.CheckBox cb = new System.Web.UI.WebControls.CheckBox();
|
||||
|
||||
private string _val = string.Empty;
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
@@ -18,14 +20,20 @@ namespace umbraco.editorControls.SettingControls
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == true.ToString())
|
||||
cb.Checked = true;
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
cb.ID = sender.GetName();
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue) && DefaultValue == true.ToString())
|
||||
cb.Checked = true;
|
||||
else if(_val == true.ToString())
|
||||
cb.Checked = true;
|
||||
|
||||
return cb;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@ namespace umbraco.editorControls.SettingControls
|
||||
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
cbl.SelectedValue = DefaultValue;
|
||||
|
||||
|
||||
return cbl;
|
||||
|
||||
@@ -35,7 +35,10 @@ namespace umbraco.editorControls.SettingControls
|
||||
ddl.Items.Add(s);
|
||||
}
|
||||
|
||||
ddl.SelectedValue = _val;
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
ddl.SelectedValue = DefaultValue;
|
||||
else
|
||||
ddl.SelectedValue = _val;
|
||||
|
||||
return ddl;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,10 @@ namespace umbraco.editorControls.SettingControls
|
||||
lb.Items.Add(s);
|
||||
}
|
||||
|
||||
lb.SelectedValue = _val;
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
lb.SelectedValue = DefaultValue;
|
||||
else
|
||||
lb.SelectedValue = _val;
|
||||
|
||||
return lb;
|
||||
}
|
||||
|
||||
@@ -45,14 +45,13 @@ namespace umbraco.editorControls.SettingControls
|
||||
|
||||
if (_val.Contains(s + ";"))
|
||||
item.Selected = true;
|
||||
|
||||
|
||||
lb.Items.Add(item);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
lb.SelectedValue = DefaultValue;
|
||||
|
||||
return lb;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@ namespace umbraco.editorControls.SettingControls
|
||||
|
||||
tb.TextMode = TextBoxMode.Password;
|
||||
tb.CssClass = "guiInputText guiInputStandardSize";
|
||||
|
||||
if (string.IsNullOrEmpty(tb.Text) && !string.IsNullOrEmpty(DefaultValue))
|
||||
tb.Text = DefaultValue;
|
||||
|
||||
return tb;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,10 @@ namespace umbraco.editorControls.SettingControls.Pickers
|
||||
ddl.Items.Insert(0, li);
|
||||
|
||||
|
||||
|
||||
ddl.SelectedValue = _val;
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
ddl.SelectedValue = DefaultValue;
|
||||
else
|
||||
ddl.SelectedValue = _val;
|
||||
|
||||
return ddl;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace umbraco.editorControls.SettingControls.Pickers
|
||||
if (_showXPath && tb.Text != string.Empty)
|
||||
return tb.Text;
|
||||
else
|
||||
return cc.Text;
|
||||
return cc.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -170,7 +170,7 @@ namespace umbraco.editorControls.SettingControls.Pickers
|
||||
int nodeId;
|
||||
|
||||
if (int.TryParse(_val, out nodeId))
|
||||
cc.Text = _val;
|
||||
cc.Value = _val;
|
||||
else if (ShowXPath)
|
||||
tb.Text = _val;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,10 @@ namespace umbraco.editorControls.SettingControls.Pickers
|
||||
li.Selected = true;
|
||||
ddl.Items.Insert(0, li);
|
||||
|
||||
ddl.SelectedValue = _val;
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
ddl.SelectedValue = DefaultValue;
|
||||
else
|
||||
ddl.SelectedValue = _val;
|
||||
|
||||
return ddl;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,11 @@ namespace umbraco.editorControls.SettingControls.Pickers
|
||||
|
||||
pp.ID = sender.GetName().Replace(" ", "_");
|
||||
|
||||
pp.Value = _val;
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
pp.Value = DefaultValue;
|
||||
else
|
||||
pp.Value = _val;
|
||||
|
||||
return pp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,10 @@ namespace umbraco.editorControls.SettingControls
|
||||
rbl.Items.Add(s);
|
||||
}
|
||||
|
||||
rbl.SelectedValue = _val;
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
rbl.SelectedValue = DefaultValue;
|
||||
else
|
||||
rbl.SelectedValue = _val;
|
||||
|
||||
return rbl;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ namespace umbraco.editorControls.SettingControls
|
||||
|
||||
if (string.IsNullOrEmpty(tb.Text) && this.Prevalues.Count > 0)
|
||||
tb.Text = this.Prevalues[0];
|
||||
else if (string.IsNullOrEmpty(tb.Text) && !string.IsNullOrEmpty(DefaultValue))
|
||||
tb.Text = DefaultValue;
|
||||
|
||||
|
||||
return tb;
|
||||
}
|
||||
|
||||
@@ -124,8 +124,6 @@ namespace umbraco.editorControls.imagecropper
|
||||
int xml_x2 = Convert.ToInt32(xmlNode.Attributes["x2"].Value);
|
||||
int xml_y2 = Convert.ToInt32(xmlNode.Attributes["y2"].Value);
|
||||
|
||||
DateTime fileDate = Convert.ToDateTime(_xml.DocumentElement.Attributes["date"].Value);
|
||||
|
||||
// only use xml values if image is the same and different from defaults (document is stored inbetween image upload and cropping)
|
||||
//if (xml_x2 - xml_x != preset.TargetWidth || xml_y2 - xml_y != preset.TargetHeight)
|
||||
//fileDate == imageInfo.DateStamp && (
|
||||
|
||||
@@ -413,8 +413,8 @@ $.Jcrop = function(obj,opt)
|
||||
drawBorders: true,
|
||||
dragEdges: true,
|
||||
|
||||
boxWidth: 0,
|
||||
boxHeight: 0,
|
||||
boxWidth: (jQuery(window).width()*0.85),
|
||||
boxHeight: (jQuery(window).height()*0.85),
|
||||
|
||||
boundary: 8,
|
||||
animationDelay: 20,
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace umbraco.editorControls.imagecropper
|
||||
if (root == null) return null;
|
||||
|
||||
XmlNode dateStampNode = doc.CreateNode(XmlNodeType.Attribute, "date", null);
|
||||
dateStampNode.Value = imageInfo.DateStamp.ToString();
|
||||
dateStampNode.Value = imageInfo.DateStamp.ToString("s");
|
||||
root.Attributes.SetNamedItem(dateStampNode);
|
||||
|
||||
for (int i = 0; i < data.Count; i++)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace umbraco.editorControls.macrocontainer
|
||||
{
|
||||
|
||||
[ClientDependency(ClientDependencyType.Javascript, "ui/jqueryui.js", "UmbracoClient")]
|
||||
[ClientDependency(ClientDependencyType.Css, "/macroContainer/macroContainer.css", "UmbracoClient")]
|
||||
[ClientDependency(ClientDependencyType.Css, "macroContainer/macroContainer.css", "UmbracoClient")]
|
||||
public class Editor : UpdatePanel, IDataEditor
|
||||
{
|
||||
private IData _data;
|
||||
@@ -257,18 +257,24 @@ namespace umbraco.editorControls.macrocontainer
|
||||
{
|
||||
string number = temp.Substring(temp.LastIndexOf('=') + 1);
|
||||
|
||||
MacroEditor current = ((MacroEditor)this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + number));
|
||||
if (current.Visible)
|
||||
value += current.MacroTag;
|
||||
if (this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + number) != null)
|
||||
{
|
||||
MacroEditor current = ((MacroEditor)this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + number));
|
||||
if (current.Visible)
|
||||
value += current.MacroTag;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < _maxNumber; i++)
|
||||
{
|
||||
MacroEditor current = ((MacroEditor)this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + i.ToString()));
|
||||
if (current.Visible)
|
||||
value += current.MacroTag;
|
||||
if (this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + i.ToString()) != null)
|
||||
{
|
||||
MacroEditor current = ((MacroEditor)this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + i.ToString()));
|
||||
if (current.Visible)
|
||||
value += current.MacroTag;
|
||||
}
|
||||
}
|
||||
}
|
||||
_data.Value = value;
|
||||
|
||||
@@ -63,15 +63,11 @@ namespace umbraco.editorControls.macrocontainer
|
||||
// with _macroSelectDropdown.Items.Add(new ListItem(GetMacroNameFromAlias(item), item));
|
||||
private string GetMacroNameFromAlias(string alias)
|
||||
{
|
||||
umbraco.DataLayer.IRecordsReader dr = umbraco.BusinessLogic.Application.SqlHelper.ExecuteReader("select macroName from cmsMacro where macroAlias = @alias",
|
||||
umbraco.BusinessLogic.Application.SqlHelper.CreateParameter("@alias", alias));
|
||||
|
||||
if (dr.Read())
|
||||
return dr.GetString("macroName");
|
||||
else
|
||||
return string.Empty;
|
||||
var macro = umbraco.macro.GetMacro(alias);
|
||||
|
||||
return macro == null ? string.Empty : macro.Name;
|
||||
}
|
||||
|
||||
void _delete_Click(object sender, EventArgs e)
|
||||
{
|
||||
_macroSelectDropdown.SelectedIndex = 0;
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.presentation.nodeFactory;
|
||||
using umbraco.presentation;
|
||||
using ClientDependency.Core.Controls;
|
||||
using ClientDependency.Core;
|
||||
@@ -54,9 +53,12 @@ namespace umbraco.editorControls.tags
|
||||
|
||||
if (li.Value == "0")
|
||||
{
|
||||
tagId = umbraco.cms.businesslogic.Tags.Tag.AddTag(li.Text, _group);
|
||||
// NH 4.7.1 if a tag doesn't have an id associated we'll do a 2nd check in case the XHR request went wrong
|
||||
// from Codeplex 30151
|
||||
tagId = cms.businesslogic.Tags.Tag.GetTagId(li.Text, _group);
|
||||
if (tagId == 0)
|
||||
tagId = cms.businesslogic.Tags.Tag.AddTag(li.Text, _group);
|
||||
li.Value = tagId.ToString();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -152,7 +154,7 @@ namespace umbraco.editorControls.tags
|
||||
// we need an empty try/catch as Node.GetCurrent() will throw an exception if we're outside of Umbraco Context
|
||||
try
|
||||
{
|
||||
Node currentNode = Node.GetCurrent();
|
||||
NodeFactory.Node currentNode = NodeFactory.Node.GetCurrent();
|
||||
if (currentNode != null)
|
||||
{
|
||||
pageId = currentNode.Id.ToString();
|
||||
|
||||
@@ -6,41 +6,46 @@ using System.Collections;
|
||||
|
||||
namespace umbraco.editorControls.textfield
|
||||
{
|
||||
public class TextFieldEditor : TextBox, interfaces.IDataEditor
|
||||
{
|
||||
private interfaces.IData _data;
|
||||
public class TextFieldEditor : TextBox, interfaces.IDataEditor
|
||||
{
|
||||
private interfaces.IData _data;
|
||||
|
||||
|
||||
public TextFieldEditor(interfaces.IData Data) {
|
||||
_data = Data;
|
||||
}
|
||||
public TextFieldEditor(interfaces.IData Data)
|
||||
{
|
||||
_data = Data;
|
||||
}
|
||||
|
||||
public virtual bool TreatAsRichTextEditor
|
||||
{
|
||||
get {return false;}
|
||||
}
|
||||
public virtual bool TreatAsRichTextEditor
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public bool ShowLabel
|
||||
{
|
||||
get {return true;}
|
||||
}
|
||||
public bool ShowLabel
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public Control Editor {get{return this;}}
|
||||
public Control Editor { get { return this; } }
|
||||
|
||||
public void Save()
|
||||
{
|
||||
_data.Value = this.Text;
|
||||
}
|
||||
public void Save()
|
||||
{
|
||||
//GE 2012-01-18
|
||||
//allow the textboxmultiple datatype to contain CDATA tags
|
||||
_data.Value = this.Text.Replace("<![CDATA[", "<!--CDATAOPENTAG-->").Replace("]]>", "<!--CDATACLOSETAG-->");
|
||||
}
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
if (this.CssClass == "")
|
||||
this.CssClass = "umbEditorTextField";
|
||||
|
||||
if (_data != null && _data.Value != null)
|
||||
Text = _data.Value.ToString();
|
||||
|
||||
base.OnInit(e);
|
||||
}
|
||||
}
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
if (this.CssClass == "")
|
||||
this.CssClass = "umbEditorTextField";
|
||||
|
||||
//GE 2012-01-18
|
||||
//allow the textboxmultiple datatype to contain CDATA tags
|
||||
if (_data != null && _data.Value != null)
|
||||
Text = _data.Value.ToString().Replace("<!--CDATAOPENTAG-->", "<![CDATA[").Replace("<!--CDATACLOSETAG-->", "]]>");
|
||||
|
||||
base.OnInit(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
IDictionaryEnumerator pluginEnum = tinyMCEConfiguration.Plugins.GetEnumerator();
|
||||
while (pluginEnum.MoveNext())
|
||||
{
|
||||
var plugin = (tinyMCEPlugin) pluginEnum.Value;
|
||||
var plugin = (tinyMCEPlugin)pluginEnum.Value;
|
||||
if (plugin.UseOnFrontend || (!onFront && !plugin.UseOnFrontend))
|
||||
_plugins += "," + plugin.Name;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
config.Add("plugins", _plugins);
|
||||
|
||||
// Check advanced settings
|
||||
if (("," + _advancedUsers + ",").IndexOf("," + UmbracoEnsuredPage.CurrentUser.UserType.Id + ",") >
|
||||
if (UmbracoEnsuredPage.CurrentUser != null && ("," + _advancedUsers + ",").IndexOf("," + UmbracoEnsuredPage.CurrentUser.UserType.Id + ",") >
|
||||
-1)
|
||||
config.Add("umbraco_advancedMode", "true");
|
||||
else
|
||||
@@ -185,7 +185,11 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
}
|
||||
|
||||
// language
|
||||
config.Add("language", User.GetCurrent().Language);
|
||||
string userLang = (UmbracoEnsuredPage.CurrentUser != null) ?
|
||||
(User.GetCurrent().Language.Contains("-") ?
|
||||
User.GetCurrent().Language.Substring(0, User.GetCurrent().Language.IndexOf("-")) : User.GetCurrent().Language)
|
||||
: "en";
|
||||
config.Add("language", userLang);
|
||||
|
||||
config.Add("content_css", cssFiles);
|
||||
config.Add("theme_umbraco_styles", styles);
|
||||
@@ -194,7 +198,7 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
IDictionaryEnumerator ide = tinyMCEConfiguration.Commands.GetEnumerator();
|
||||
while (ide.MoveNext())
|
||||
{
|
||||
var cmd = (tinyMCECommand) ide.Value;
|
||||
var cmd = (tinyMCECommand)ide.Value;
|
||||
if (_editorButtons.IndexOf("," + cmd.Alias + ",") > -1)
|
||||
_activateButtons += cmd.Alias + ",";
|
||||
else
|
||||
@@ -215,12 +219,12 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
while (ide.MoveNext())
|
||||
{
|
||||
string mceCommand = ide.Value.ToString();
|
||||
var curPriority = (int) ide.Key;
|
||||
var curPriority = (int)ide.Key;
|
||||
|
||||
// Check priority
|
||||
if (separatorPriority > 0 &&
|
||||
Math.Floor(decimal.Parse(curPriority.ToString())/10) >
|
||||
Math.Floor(decimal.Parse(separatorPriority.ToString())/10))
|
||||
Math.Floor(decimal.Parse(curPriority.ToString()) / 10) >
|
||||
Math.Floor(decimal.Parse(separatorPriority.ToString()) / 10))
|
||||
_activateButtons += "separator,";
|
||||
|
||||
_activateButtons += mceCommand + ",";
|
||||
@@ -320,28 +324,26 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
{
|
||||
parsedString = replaceMacroTags(parsedString).Trim();
|
||||
|
||||
// clean macros and add paragraph element for tidy
|
||||
bool removeParagraphs = false;
|
||||
if (parsedString.Length > 16 && parsedString.ToLower().Substring(0, 17) == "|||?umbraco_macro")
|
||||
{
|
||||
removeParagraphs = true;
|
||||
parsedString = "<p>" + parsedString + "</p>";
|
||||
}
|
||||
|
||||
// tidy html
|
||||
|
||||
// tidy html - refactored, see #30534
|
||||
if (UmbracoSettings.TidyEditorContent)
|
||||
{
|
||||
// always wrap in a <div> - using <p> was a bad idea
|
||||
parsedString = "<div>" + parsedString + "</div>";
|
||||
|
||||
string tidyTxt = library.Tidy(parsedString, false);
|
||||
if (tidyTxt != "[error]")
|
||||
{
|
||||
// compensate for breaking macro tags by tidy
|
||||
parsedString = tidyTxt.Replace("/?>", "/>");
|
||||
if (removeParagraphs)
|
||||
{
|
||||
if (parsedString.Length - parsedString.Replace("<", "").Length == 2)
|
||||
parsedString = parsedString.Replace("<p>", "").Replace("</p>", "");
|
||||
}
|
||||
parsedString = tidyTxt;
|
||||
|
||||
// remove pesky \r\n, and other empty chars
|
||||
parsedString = parsedString.Trim(new char[] { '\r', '\n', '\t', ' ' });
|
||||
|
||||
// compensate for breaking macro tags by tidy (?)
|
||||
parsedString = parsedString.Replace("/?>", "/>");
|
||||
|
||||
// remove the wrapping <div> - safer to check that it is still here
|
||||
if (parsedString.StartsWith("<div>") && parsedString.EndsWith("</div>"))
|
||||
parsedString = parsedString.Substring("<div>".Length, parsedString.Length - "<div></div>".Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -365,6 +367,10 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
parsedString = parsedString.Replace(helper.GetBaseUrl(HttpContext.Current), "");
|
||||
}
|
||||
|
||||
//Allow CDATA nested into RTE without exceptions
|
||||
// GE 2012-01-18
|
||||
parsedString = parsedString.Replace("<![CDATA[", "<!--CDATAOPENTAG-->").Replace("]]>", "<!--CDATACLOSETAG-->");
|
||||
|
||||
// if text is an empty parargraph, make it all empty
|
||||
if (parsedString.ToLower() == "<p></p>")
|
||||
parsedString = "";
|
||||
@@ -432,7 +438,7 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
get
|
||||
{
|
||||
initButtons();
|
||||
return _buttons.Count*40 + 300;
|
||||
return _buttons.Count * 40 + 300;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,10 +449,10 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
try
|
||||
{
|
||||
// add current page info
|
||||
base.NodeId = ((cms.businesslogic.datatype.DefaultData) _data).NodeId;
|
||||
base.NodeId = ((cms.businesslogic.datatype.DefaultData)_data).NodeId;
|
||||
if (NodeId != 0)
|
||||
{
|
||||
base.VersionId = ((cms.businesslogic.datatype.DefaultData) _data).Version;
|
||||
base.VersionId = ((cms.businesslogic.datatype.DefaultData)_data).Version;
|
||||
config.Add("theme_umbraco_pageId", base.NodeId.ToString());
|
||||
config.Add("theme_umbraco_versionId", base.VersionId.ToString());
|
||||
|
||||
@@ -463,7 +469,7 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
{
|
||||
config.Add("umbraco_toolbar_id",
|
||||
ElementIdPreFix +
|
||||
((cms.businesslogic.datatype.DefaultData) _data).PropertyId);
|
||||
((cms.businesslogic.datatype.DefaultData)_data).PropertyId);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -484,8 +490,10 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
//Allow CDATA nested into RTE without exceptions
|
||||
// GE 2012-01-18
|
||||
if (_data != null && _data.Value != null)
|
||||
base.Text = _data.Value.ToString();
|
||||
base.Text = _data.Value.ToString().Replace("<!--CDATAOPENTAG-->", "<![CDATA[").Replace("<!--CDATACLOSETAG-->", "]]>");
|
||||
}
|
||||
|
||||
private string replaceMacroTags(string text)
|
||||
@@ -586,7 +594,7 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
{
|
||||
try
|
||||
{
|
||||
var cmd = (tinyMCECommand) tinyMCEConfiguration.Commands[button];
|
||||
var cmd = (tinyMCECommand)tinyMCEConfiguration.Commands[button];
|
||||
|
||||
string appendValue = "";
|
||||
if (cmd.Value != "")
|
||||
@@ -611,17 +619,17 @@ namespace umbraco.editorControls.tinyMCE3
|
||||
while (ide.MoveNext())
|
||||
{
|
||||
object buttonObj = ide.Value;
|
||||
var curPriority = (int) ide.Key;
|
||||
var curPriority = (int)ide.Key;
|
||||
|
||||
// Check priority
|
||||
if (separatorPriority > 0 &&
|
||||
Math.Floor(decimal.Parse(curPriority.ToString())/10) >
|
||||
Math.Floor(decimal.Parse(separatorPriority.ToString())/10))
|
||||
Math.Floor(decimal.Parse(curPriority.ToString()) / 10) >
|
||||
Math.Floor(decimal.Parse(separatorPriority.ToString()) / 10))
|
||||
_menuIcons.Add("|");
|
||||
|
||||
try
|
||||
{
|
||||
var e = (editorButton) buttonObj;
|
||||
var e = (editorButton)buttonObj;
|
||||
|
||||
MenuIconI menuItem = new MenuIconClass();
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
|
||||
base.Attributes.Add("style", "visibility: hidden");
|
||||
config.Add("mode", "exact");
|
||||
config.Add("theme", "umbraco");
|
||||
config.Add("umbraco_path", IOHelper.ResolveUrl( SystemDirectories.Umbraco ));
|
||||
config.Add("umbraco_path", IOHelper.ResolveUrl(SystemDirectories.Umbraco));
|
||||
CssClass = "tinymceContainer";
|
||||
plugin.ConfigSection configSection = (plugin.ConfigSection)System.Web.HttpContext.Current.GetSection("TinyMCE");
|
||||
|
||||
@@ -117,89 +117,89 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs args)
|
||||
{
|
||||
if (!IsInLiveEditingMode)
|
||||
this.config["elements"] = this.ClientID;
|
||||
{
|
||||
if (!IsInLiveEditingMode)
|
||||
this.config["elements"] = this.ClientID;
|
||||
|
||||
bool first = true;
|
||||
bool first = true;
|
||||
|
||||
// Render HTML for TinyMCE instance
|
||||
// in the liveediting mode we're always preloading tinymce script
|
||||
if (!IsInLiveEditingMode)
|
||||
{
|
||||
//TinyMCE uses it's own compressor so leave it up to ScriptManager to render
|
||||
ScriptManager.RegisterClientScriptInclude(this, this.GetType(), _versionId.ToString(), this.ScriptURI);
|
||||
}
|
||||
else
|
||||
{
|
||||
//We're in live edit mode so add the base js file to the dependency list
|
||||
ClientDependencyLoader.Instance.RegisterDependency("tinymce3/tiny_mce_src.js",
|
||||
"UmbracoClient", ClientDependencyType.Javascript);
|
||||
}
|
||||
// Render HTML for TinyMCE instance
|
||||
// in the liveediting mode we're always preloading tinymce script
|
||||
if (!IsInLiveEditingMode)
|
||||
{
|
||||
//TinyMCE uses it's own compressor so leave it up to ScriptManager to render
|
||||
ScriptManager.RegisterClientScriptInclude(this, this.GetType(), _versionId.ToString(), this.ScriptURI);
|
||||
}
|
||||
else
|
||||
{
|
||||
//We're in live edit mode so add the base js file to the dependency list
|
||||
ClientDependencyLoader.Instance.RegisterDependency("tinymce3/tiny_mce_src.js",
|
||||
"UmbracoClient", ClientDependencyType.Javascript);
|
||||
}
|
||||
|
||||
// Write script tag start
|
||||
m_scriptInitBlock.Append(HtmlTextWriter.TagLeftChar.ToString());
|
||||
m_scriptInitBlock.Append("script");
|
||||
m_scriptInitBlock.Append(" type=\"text/javascript\"");
|
||||
m_scriptInitBlock.Append(HtmlTextWriter.TagRightChar.ToString());
|
||||
m_scriptInitBlock.Append("\n");
|
||||
// Write script tag start
|
||||
m_scriptInitBlock.Append(HtmlTextWriter.TagLeftChar.ToString());
|
||||
m_scriptInitBlock.Append("script");
|
||||
m_scriptInitBlock.Append(" type=\"text/javascript\"");
|
||||
m_scriptInitBlock.Append(HtmlTextWriter.TagRightChar.ToString());
|
||||
m_scriptInitBlock.Append("\n");
|
||||
|
||||
m_scriptInitBlock.Append("tinyMCE.init({\n");
|
||||
m_scriptInitBlock.Append("tinyMCE.init({\n");
|
||||
|
||||
// Write options
|
||||
foreach (string key in this.config.Keys)
|
||||
{
|
||||
//TODO: This is a hack to test if we can prevent tinymce from automatically download languages
|
||||
if (!IsInLiveEditingMode || (key != "language"))
|
||||
{
|
||||
string val = this.config[key];
|
||||
// Write options
|
||||
foreach (string key in this.config.Keys)
|
||||
{
|
||||
//TODO: This is a hack to test if we can prevent tinymce from automatically download languages
|
||||
if (!IsInLiveEditingMode || (key != "language"))
|
||||
{
|
||||
string val = this.config[key];
|
||||
|
||||
if (!first)
|
||||
m_scriptInitBlock.Append(",\n");
|
||||
else
|
||||
first = false;
|
||||
if (!first)
|
||||
m_scriptInitBlock.Append(",\n");
|
||||
else
|
||||
first = false;
|
||||
|
||||
// Is boolean state or string
|
||||
if (val == "true" || val == "false")
|
||||
m_scriptInitBlock.Append(key + ":" + this.config[key]);
|
||||
else
|
||||
m_scriptInitBlock.Append(key + ":'" + this.config[key] + "'");
|
||||
}
|
||||
}
|
||||
// Is boolean state or string
|
||||
if (val == "true" || val == "false")
|
||||
m_scriptInitBlock.Append(key + ":" + this.config[key]);
|
||||
else
|
||||
m_scriptInitBlock.Append(key + ":'" + this.config[key] + "'");
|
||||
}
|
||||
}
|
||||
|
||||
m_scriptInitBlock.Append("\n});\n");
|
||||
// we're wrapping the tinymce init call in a load function when in live editing,
|
||||
// so we'll need to close that function declaration
|
||||
if (IsInLiveEditingMode)
|
||||
{
|
||||
m_scriptInitBlock.Append(@"(function() { var f =
|
||||
m_scriptInitBlock.Append("\n});\n");
|
||||
// we're wrapping the tinymce init call in a load function when in live editing,
|
||||
// so we'll need to close that function declaration
|
||||
if (IsInLiveEditingMode)
|
||||
{
|
||||
m_scriptInitBlock.Append(@"(function() { var f =
|
||||
function() {
|
||||
if(document.getElementById('__umbraco_tinyMCE'))
|
||||
tinyMCE.execCommand('mceAddControl',false,'").Append(ClientID).Append(@"');
|
||||
ItemEditing.remove_startEdit(f);
|
||||
}
|
||||
ItemEditing.add_startEdit(f);})();");
|
||||
m_scriptInitBlock.Append(@"(function() { var f =
|
||||
m_scriptInitBlock.Append(@"(function() { var f =
|
||||
function() {
|
||||
tinyMCE.execCommand('mceRemoveControl',false,'").Append(ClientID).Append(@"');
|
||||
ItemEditing.remove_stopEdit(f);
|
||||
}
|
||||
ItemEditing.add_stopEdit(f);})();");
|
||||
}
|
||||
}
|
||||
|
||||
// Write script tag end
|
||||
m_scriptInitBlock.Append(HtmlTextWriter.EndTagLeftChars);
|
||||
m_scriptInitBlock.Append("script");
|
||||
m_scriptInitBlock.Append(HtmlTextWriter.TagRightChar.ToString());
|
||||
// Write script tag end
|
||||
m_scriptInitBlock.Append(HtmlTextWriter.EndTagLeftChars);
|
||||
m_scriptInitBlock.Append("script");
|
||||
m_scriptInitBlock.Append(HtmlTextWriter.TagRightChar.ToString());
|
||||
|
||||
// add to script manager
|
||||
if (IsInLiveEditingMode)
|
||||
{
|
||||
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), new Guid().ToString(),
|
||||
m_scriptInitBlock.ToString(), false);
|
||||
}
|
||||
// add to script manager
|
||||
if (IsInLiveEditingMode)
|
||||
{
|
||||
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), new Guid().ToString(),
|
||||
m_scriptInitBlock.ToString(), false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string ScriptURI
|
||||
@@ -288,7 +288,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
|
||||
string localMediaPath = IOHelper.ResolveUrl(SystemDirectories.Media);
|
||||
|
||||
// Find all media images
|
||||
string pattern = String.Format("<img [^>]*src=\"(?<mediaString>{0}[^\"]*)\" [^>]*>", SystemDirectories.Media);
|
||||
string pattern = String.Format("<img [^>]*src=\"(?<mediaString>{0}[^\"]*)\" [^>]*>", localMediaPath);
|
||||
|
||||
MatchCollection tags =
|
||||
Regex.Matches(html, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
@@ -306,11 +306,17 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
|
||||
Regex.Matches(tag.Value.Replace(">", " >"),
|
||||
"(?<attributeName>\\S*)=\"(?<attributeValue>[^\"]*)\"|(?<attributeName>\\S*)=(?<attributeValue>[^\"|\\s]*)\\s",
|
||||
RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
//GE: Add ContainsKey check and expand the ifs for readability
|
||||
foreach (Match attributeSet in m)
|
||||
{
|
||||
if (attributeSet.Groups["attributeName"].Value.ToString().ToLower() != "src")
|
||||
ht.Add(attributeSet.Groups["attributeName"].Value.ToString(),
|
||||
attributeSet.Groups["attributeValue"].Value.ToString());
|
||||
{
|
||||
if (!ht.ContainsKey(attributeSet.Groups["attributeName"].Value.ToString()))
|
||||
{
|
||||
ht.Add(attributeSet.Groups["attributeName"].Value.ToString(), attributeSet.Groups["attributeValue"].Value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// build the element
|
||||
@@ -429,7 +435,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
|
||||
{
|
||||
string[] umbracoPathSplit = IOHelper.ResolveUrl(SystemDirectories.Umbraco).Split('/');
|
||||
string umbracoPath = "";
|
||||
|
||||
|
||||
for (int i = 0; i < umbracoPathSplit.Length - 1; i++)
|
||||
umbracoPath += umbracoPathSplit[i] + "/";
|
||||
|
||||
@@ -446,10 +452,12 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
|
||||
|
||||
string pattern = @"(<\?UMBRACO_MACRO\W*[^>]*/>)";
|
||||
MatchCollection tags =
|
||||
Regex.Matches(content, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
Regex.Matches(content, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
// Page for macro rendering
|
||||
page p = new page(nodeId, versionId);
|
||||
// page p = new page(nodeId, versionId);
|
||||
|
||||
|
||||
System.Web.HttpContext.Current.Items["macrosAdded"] = 0;
|
||||
System.Web.HttpContext.Current.Items["pageID"] = nodeId.ToString();
|
||||
|
||||
@@ -464,7 +472,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
|
||||
// Insert macro contents here...
|
||||
macro m;
|
||||
if (helper.FindAttribute(attributes, "macroID") != "")
|
||||
m = new macro(int.Parse(helper.FindAttribute(attributes, "macroID")));
|
||||
m = macro.GetMacro(int.Parse(helper.FindAttribute(attributes, "macroID")));
|
||||
else
|
||||
{
|
||||
// legacy: Check if the macroAlias is typed in lowercasing
|
||||
@@ -477,7 +485,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
|
||||
}
|
||||
|
||||
if (macroAlias != "")
|
||||
m = new macro(Macro.GetByAlias(macroAlias).Id);
|
||||
m = macro.GetMacro(macroAlias);
|
||||
else
|
||||
throw new ArgumentException("umbraco is unable to identify the macro. No id or macroalias was provided for the macro in the macro tag.", tag.Groups[1].Value);
|
||||
}
|
||||
|
||||
@@ -14,25 +14,27 @@ using umbraco.IO;
|
||||
namespace umbraco.editorControls.tinyMCE3.webcontrol.plugin
|
||||
{
|
||||
/// <summary>
|
||||
/// Description of HttpHandler.
|
||||
/// </summary>
|
||||
public class GzipModule : IModule {
|
||||
/// <summary></summary>
|
||||
/// <param name="context">Request context.</param>
|
||||
public void ProcessRequest(HttpContext context) {
|
||||
HttpRequest request = context.Request;
|
||||
HttpResponse response = context.Response;
|
||||
HttpServerUtility server = context.Server;
|
||||
GzipCompressor gzipCompressor = new GzipCompressor();
|
||||
ConfigSection configSection = (ConfigSection) System.Web.HttpContext.Current.GetSection("TinyMCE");
|
||||
string suffix = "", enc;
|
||||
string[] languages = request.QueryString["languages"].Split(',');
|
||||
bool supportsGzip;
|
||||
/// Description of HttpHandler.
|
||||
/// </summary>
|
||||
public class GzipModule : IModule
|
||||
{
|
||||
/// <summary></summary>
|
||||
/// <param name="context">Request context.</param>
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
HttpRequest request = context.Request;
|
||||
HttpResponse response = context.Response;
|
||||
HttpServerUtility server = context.Server;
|
||||
GzipCompressor gzipCompressor = new GzipCompressor();
|
||||
ConfigSection configSection = (ConfigSection)System.Web.HttpContext.Current.GetSection("TinyMCE");
|
||||
string suffix = "", enc;
|
||||
string[] languages = request.QueryString["languages"].Split(',');
|
||||
bool supportsGzip;
|
||||
|
||||
// Set response headers
|
||||
response.ContentType = "text/javascript";
|
||||
response.Charset = "UTF-8";
|
||||
response.Buffer = false;
|
||||
// Set response headers
|
||||
response.ContentType = "text/javascript";
|
||||
response.Charset = "UTF-8";
|
||||
response.Buffer = false;
|
||||
|
||||
// UMBRACO: Populate the configsection if it's empty
|
||||
if (configSection == null)
|
||||
@@ -43,72 +45,78 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol.plugin
|
||||
configSection.GzipExpiresOffset = TimeSpan.FromDays(10).Ticks;
|
||||
}
|
||||
|
||||
// Setup cache
|
||||
response.Cache.SetExpires(DateTime.Now.AddTicks(configSection.GzipExpiresOffset));
|
||||
response.Cache.SetCacheability(HttpCacheability.Public);
|
||||
response.Cache.SetValidUntilExpires(false);
|
||||
// Setup cache
|
||||
response.Cache.SetExpires(DateTime.Now.AddTicks(configSection.GzipExpiresOffset));
|
||||
response.Cache.SetCacheability(HttpCacheability.Public);
|
||||
response.Cache.SetValidUntilExpires(false);
|
||||
|
||||
// Check if it supports gzip
|
||||
enc = Regex.Replace("" + request.Headers["Accept-Encoding"], @"\s+", "").ToLower();
|
||||
supportsGzip = enc.IndexOf("gzip") != -1 || request.Headers["---------------"] != null;
|
||||
enc = enc.IndexOf("x-gzip") != -1 ? "x-gzip" : "gzip";
|
||||
// Check if it supports gzip
|
||||
enc = Regex.Replace("" + request.Headers["Accept-Encoding"], @"\s+", "").ToLower();
|
||||
supportsGzip = enc.IndexOf("gzip") != -1 || request.Headers["---------------"] != null;
|
||||
enc = enc.IndexOf("x-gzip") != -1 ? "x-gzip" : "gzip";
|
||||
|
||||
// Handle mode/suffix
|
||||
if (configSection.Mode != null)
|
||||
suffix = "_" + configSection.Mode;
|
||||
// Handle mode/suffix
|
||||
if (configSection.Mode != null)
|
||||
suffix = "_" + configSection.Mode;
|
||||
|
||||
gzipCompressor.AddData("var tinyMCEPreInit = {base : '" + new Uri(request.Url, configSection.InstallPath).ToString() + "', suffix : '" + suffix + "'};");
|
||||
gzipCompressor.AddData("var tinyMCEPreInit = {base : '" + configSection.InstallPath + "', suffix : '" + suffix + "'};");
|
||||
|
||||
// Add core
|
||||
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/tiny_mce" + suffix + ".js"));
|
||||
// Add core
|
||||
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/tiny_mce" + suffix + ".js"));
|
||||
|
||||
// Add core languages
|
||||
foreach (string lang in languages)
|
||||
// Add core languages
|
||||
foreach (string lang in languages)
|
||||
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/langs/" + lang + ".js"));
|
||||
|
||||
// Add themes
|
||||
if (request.QueryString["themes"] != null) {
|
||||
foreach (string theme in request.QueryString["themes"].Split(',')) {
|
||||
// Add themes
|
||||
if (request.QueryString["themes"] != null)
|
||||
{
|
||||
foreach (string theme in request.QueryString["themes"].Split(','))
|
||||
{
|
||||
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/themes/" + theme + "/editor_template" + suffix + ".js"));
|
||||
|
||||
// Add theme languages
|
||||
foreach (string lang in languages) {
|
||||
// Add theme languages
|
||||
foreach (string lang in languages)
|
||||
{
|
||||
string path = IOHelper.MapPath(configSection.InstallPath + "/themes/" + theme + "/langs/" + lang + ".js");
|
||||
|
||||
if (File.Exists(path))
|
||||
gzipCompressor.AddFile(path);
|
||||
}
|
||||
if (File.Exists(path))
|
||||
gzipCompressor.AddFile(path);
|
||||
}
|
||||
|
||||
gzipCompressor.AddData("tinymce.ThemeManager.urls['" + theme + "'] = tinymce.baseURL+'/themes/" + theme + "';");
|
||||
}
|
||||
}
|
||||
gzipCompressor.AddData("tinymce.ThemeManager.urls['" + theme + "'] = tinymce.baseURL+'/themes/" + theme + "';");
|
||||
}
|
||||
}
|
||||
|
||||
// Add plugins
|
||||
if (request.QueryString["plugins"] != null) {
|
||||
foreach (string plugin in request.QueryString["plugins"].Split(',')) {
|
||||
// Add plugins
|
||||
if (request.QueryString["plugins"] != null)
|
||||
{
|
||||
foreach (string plugin in request.QueryString["plugins"].Split(','))
|
||||
{
|
||||
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/plugins/" + plugin + "/editor_plugin" + suffix + ".js"));
|
||||
|
||||
// Add plugin languages
|
||||
foreach (string lang in languages) {
|
||||
// Add plugin languages
|
||||
foreach (string lang in languages)
|
||||
{
|
||||
string path = IOHelper.MapPath(configSection.InstallPath + "/plugins/" + plugin + "/langs/" + lang + ".js");
|
||||
|
||||
if (File.Exists(path))
|
||||
gzipCompressor.AddFile(path);
|
||||
}
|
||||
if (File.Exists(path))
|
||||
gzipCompressor.AddFile(path);
|
||||
}
|
||||
|
||||
gzipCompressor.AddData("tinymce.ThemeManager.urls['" + plugin + "'] = tinymce.baseURL+'/plugins/" + plugin + "';");
|
||||
}
|
||||
}
|
||||
gzipCompressor.AddData("tinymce.ThemeManager.urls['" + plugin + "'] = tinymce.baseURL+'/plugins/" + plugin + "';");
|
||||
}
|
||||
}
|
||||
|
||||
// Output compressed file
|
||||
gzipCompressor.NoCompression = !supportsGzip || configSection.GzipNoCompression;
|
||||
if (!gzipCompressor.NoCompression)
|
||||
response.AppendHeader("Content-Encoding", enc);
|
||||
// Output compressed file
|
||||
gzipCompressor.NoCompression = !supportsGzip || configSection.GzipNoCompression;
|
||||
if (!gzipCompressor.NoCompression)
|
||||
response.AppendHeader("Content-Encoding", enc);
|
||||
|
||||
gzipCompressor.DiskCache = configSection.GzipDiskCache;
|
||||
gzipCompressor.CachePath = configSection.GzipCachePath;
|
||||
gzipCompressor.DiskCache = configSection.GzipDiskCache;
|
||||
gzipCompressor.CachePath = configSection.GzipCachePath;
|
||||
|
||||
gzipCompressor.Compress(response.OutputStream);
|
||||
}
|
||||
}
|
||||
gzipCompressor.Compress(response.OutputStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@ namespace umbraco.editorControls.tinymce
|
||||
ht.Add(attributeSet.Groups["attributeName"].Value.ToString().ToLower(),
|
||||
attributeSet.Groups["attributeValue"].Value.ToString());
|
||||
if (attributeSet.Groups["attributeName"].Value.ToString().ToLower() == "width")
|
||||
orgWidth = int.Parse(attributeSet.Groups["attributeValue"].Value.ToString());
|
||||
int.TryParse(attributeSet.Groups["attributeValue"].Value.ToString(), out orgWidth);
|
||||
else if (attributeSet.Groups["attributeName"].Value.ToString().ToLower() == "height")
|
||||
orgHeight = int.Parse(attributeSet.Groups["attributeValue"].Value.ToString());
|
||||
int.TryParse(attributeSet.Groups["attributeValue"].Value.ToString(), out orgHeight);
|
||||
}
|
||||
|
||||
// If rel attribute exists and if it's different from current sizing we should resize the image!
|
||||
@@ -67,7 +67,8 @@ namespace umbraco.editorControls.tinymce
|
||||
Log.Add(LogTypes.Error, User.GetUser(0), -1,
|
||||
"Error resizing image in editor: " + err.ToString());
|
||||
}
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
cleanTag = StripSrc(cleanTag, ht);
|
||||
|
||||
@@ -76,7 +77,7 @@ namespace umbraco.editorControls.tinymce
|
||||
cleanTag += " width=\"" + helper.FindAttribute(ht, "width") + "\"";
|
||||
cleanTag += " height=\"" + helper.FindAttribute(ht, "height") + "\"";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -142,13 +143,13 @@ namespace umbraco.editorControls.tinymce
|
||||
if (orgHeight > 0 && orgWidth > 0 && resizeDim != "" && orgSrc != "")
|
||||
{
|
||||
// Check dimensions
|
||||
if (Math.Abs(orgWidth/newWidth) > Math.Abs(orgHeight/newHeight))
|
||||
if (Math.Abs(orgWidth / newWidth) > Math.Abs(orgHeight / newHeight))
|
||||
{
|
||||
newHeight = (int) Math.Round((float) newWidth*(orgHeight/orgWidth));
|
||||
newHeight = (int)Math.Round((float)newWidth * (orgHeight / orgWidth));
|
||||
}
|
||||
else
|
||||
{
|
||||
newWidth = (int) Math.Round((float) newHeight*(orgWidth/orgHeight));
|
||||
newWidth = (int)Math.Round((float)newHeight * (orgWidth / orgHeight));
|
||||
}
|
||||
|
||||
// update orgSrc to remove umbraco reference
|
||||
@@ -156,6 +157,7 @@ namespace umbraco.editorControls.tinymce
|
||||
if (IOHelper.ResolveUrl(orgSrc).IndexOf(resolvedMedia) > -1)
|
||||
{
|
||||
orgSrc = SystemDirectories.Media + orgSrc.Substring(orgSrc.IndexOf(resolvedMedia) + resolvedMedia.Length); //, orgSrc.Length - orgSrc.IndexOf(String.Format("/media/", SystemDirectories.Media)));
|
||||
|
||||
}
|
||||
string ext = orgSrc.Substring(orgSrc.LastIndexOf(".") + 1, orgSrc.Length - orgSrc.LastIndexOf(".") - 1);
|
||||
newSrc = orgSrc.Replace("." + ext, "_" + newWidth.ToString() + "x" + newHeight.ToString() + ".jpg");
|
||||
@@ -199,8 +201,13 @@ namespace umbraco.editorControls.tinymce
|
||||
finalWidth = newWidth;
|
||||
finalHeight = newHeight;
|
||||
|
||||
//GE: When the SystemDirectories.Media contains a ~, newSrc will also contain this and hasn't been resolved.
|
||||
//This causes the editor to save content which contains a virtual url, and thus the image doesn't serve
|
||||
//the admin editor successfully displays the image because the HTML is rewritten, but when you get the RTE content in the template
|
||||
//it hasn't been replaced
|
||||
//2011-08-12 added a IOHelper.ResolveUrl call around newSrc
|
||||
return
|
||||
" src=\"" + newSrc + "\" width=\"" + newWidth.ToString() + "\" height=\"" + newHeight.ToString() +
|
||||
" src=\"" + IOHelper.ResolveUrl(newSrc) + "\" width=\"" + newWidth.ToString() + "\" height=\"" + newHeight.ToString() +
|
||||
"\"";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,6 +260,10 @@ namespace umbraco.editorControls.tinymce
|
||||
SqlHelper.CreateParameter("@value",data),
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
|
||||
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid",SqlParams);
|
||||
// we need to populate the parameters again due to an issue with SQL CE
|
||||
SqlParams = new IParameter[] {
|
||||
SqlHelper.CreateParameter("@value",data),
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
|
||||
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')",SqlParams);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ namespace umbraco.editorControls.ultimatepicker
|
||||
break;
|
||||
case "dropdownlist":
|
||||
return dropdownlistNodes.SelectedValue;
|
||||
break;
|
||||
case "listbox":
|
||||
foreach (ListItem item in listboxNodes.Items)
|
||||
{
|
||||
|
||||
@@ -126,6 +126,10 @@ namespace umbraco.editorControls.ultimatepicker
|
||||
SqlHelper.CreateParameter("@value",data),
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
|
||||
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid", SqlParams);
|
||||
// need to unlock the parameters (for SQL CE compat)
|
||||
SqlParams = new IParameter[] {
|
||||
SqlHelper.CreateParameter("@value",data),
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
|
||||
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')", SqlParams);
|
||||
|
||||
|
||||
|
||||
@@ -27,13 +27,17 @@
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<IsWebBootstrapper>true</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>http://localhost/umbraco.editorControls/</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Web</InstallFrom>
|
||||
@@ -48,6 +52,7 @@
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>..\..\umbraco\presentation\bin\</OutputPath>
|
||||
@@ -74,7 +79,7 @@
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\umbraco\presentation\bin\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
@@ -344,6 +349,8 @@
|
||||
<Compile Include="tinymce\TinyMCELegacyControl.cs" />
|
||||
<Compile Include="tinymce\tinyMCEImageHelper.cs" />
|
||||
<Compile Include="tinymce\tinyMCEPreValueConfigurator.cs" />
|
||||
<Compile Include="userControlWrapper\SerializationHelper.cs" />
|
||||
<Compile Include="userControlWrapper\usercontrolData.cs" />
|
||||
<Compile Include="wysiwyg\editorButton.cs" />
|
||||
<Compile Include="tinyMCE3\TinyMCE.cs" />
|
||||
<Compile Include="tinyMCE3\tinyMCE3dataType.cs" />
|
||||
@@ -417,6 +424,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="KeyValuePrevalueEditor.js" />
|
||||
<EmbeddedResource Include="KeyValuePrevalueEditor.css" />
|
||||
<Content Include="mediapicker\MediaPicker.js" />
|
||||
<EmbeddedResource Include="SettingControls\css\Values.css" />
|
||||
<EmbeddedResource Include="SettingControls\js\Values.js" />
|
||||
|
||||
@@ -91,6 +91,27 @@ namespace umbraco.editorControls
|
||||
// set filename in db to nothing
|
||||
_text = "";
|
||||
_data.Value = _text;
|
||||
|
||||
//also clear umbracoWidth, umbracoHeight, umbracoExtension, umbracoBytes
|
||||
|
||||
cms.businesslogic.Content content = cms.businesslogic.Content.GetContentFromVersion(this._data.Version);
|
||||
|
||||
foreach (string prop in "umbracoExtension,umbracoBytes,umbracoWidth,umbracoHeight".Split(','))
|
||||
{
|
||||
try
|
||||
{
|
||||
content.getProperty(prop).Value = string.Empty;
|
||||
noEdit bytesControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_" + prop);
|
||||
if (bytesControl != null)
|
||||
{
|
||||
bytesControl.RefreshLabel(string.Empty);
|
||||
}
|
||||
}
|
||||
catch {
|
||||
//if first one fails we can assume that props don't exist
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.PostedFile != null)
|
||||
@@ -104,8 +125,9 @@ namespace umbraco.editorControls
|
||||
|
||||
//}
|
||||
|
||||
// Find filename
|
||||
_text = SafeUrl(this.PostedFile.FileName);
|
||||
// Find filename (removed the safe url here as it removes fullpath characters (such as c:\ becomes c:) - the safe url should only be used when saving the
|
||||
// local filename
|
||||
_text = this.PostedFile.FileName;
|
||||
string filename;
|
||||
string _fullFilePath;
|
||||
|
||||
@@ -113,7 +135,8 @@ namespace umbraco.editorControls
|
||||
|
||||
if (umbraco.UmbracoSettings.UploadAllowDirectories)
|
||||
{
|
||||
filename = _text.Substring(_text.LastIndexOf(IOHelper.DirSepChar) + 1, _text.Length - _text.LastIndexOf(IOHelper.DirSepChar) - 1).ToLower();
|
||||
// moved the safeUrl call to here as it's the local file name to be stored
|
||||
filename = SafeUrl(_text.Substring(_text.LastIndexOf(IOHelper.DirSepChar) + 1, _text.Length - _text.LastIndexOf(IOHelper.DirSepChar) - 1).ToLower());
|
||||
// Create a new folder in the /media folder with the name /media/propertyid
|
||||
|
||||
|
||||
@@ -156,7 +179,7 @@ namespace umbraco.editorControls
|
||||
{
|
||||
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoExtension").Value = ext;
|
||||
content.getProperty("umbracoExtension").Value = ext;
|
||||
noEdit extensionControl = uploadField.FindControlRecursive<noEdit>(this.Page, "umbracoExtension");
|
||||
noEdit extensionControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoExtension");
|
||||
if (extensionControl != null)
|
||||
{
|
||||
extensionControl.RefreshLabel(content.getProperty("umbracoExtension").Value.ToString());
|
||||
@@ -172,7 +195,7 @@ namespace umbraco.editorControls
|
||||
System.IO.FileInfo fi = new FileInfo(_fullFilePath);
|
||||
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoBytes").Value = fi.Length.ToString();
|
||||
content.getProperty("umbracoBytes").Value = fi.Length.ToString();
|
||||
noEdit bytesControl = uploadField.FindControlRecursive<noEdit>(this.Page, "umbracoBytes");
|
||||
noEdit bytesControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoBytes");
|
||||
if (bytesControl != null)
|
||||
{
|
||||
bytesControl.RefreshLabel(content.getProperty("umbracoBytes").Value.ToString());
|
||||
@@ -198,13 +221,13 @@ namespace umbraco.editorControls
|
||||
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoWidth").Value = fileWidth.ToString();
|
||||
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoHeight").Value = fileHeight.ToString();
|
||||
content.getProperty("umbracoWidth").Value = fileWidth.ToString();
|
||||
noEdit widthControl = uploadField.FindControlRecursive<noEdit>(this.Page, "umbracoWidth");
|
||||
noEdit widthControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoWidth");
|
||||
if (widthControl != null)
|
||||
{
|
||||
widthControl.RefreshLabel(content.getProperty("umbracoWidth").Value.ToString());
|
||||
}
|
||||
content.getProperty("umbracoHeight").Value = fileHeight.ToString();
|
||||
noEdit heightControl = uploadField.FindControlRecursive<noEdit>(this.Page, "umbracoHeight");
|
||||
noEdit heightControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoHeight");
|
||||
if (heightControl != null)
|
||||
{
|
||||
heightControl.RefreshLabel(content.getProperty("umbracoHeight").Value.ToString());
|
||||
|
||||
@@ -84,7 +84,11 @@ namespace umbraco.editorControls.uploadfield
|
||||
SqlHelper.CreateParameter("@value",data),
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
|
||||
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid",SqlParams);
|
||||
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')",SqlParams);
|
||||
// need to unlock the parameters (for SQL CE compat)
|
||||
SqlParams = new IParameter[] {
|
||||
SqlHelper.CreateParameter("@value",data),
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
|
||||
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')", SqlParams);
|
||||
}
|
||||
|
||||
protected override void Render(HtmlTextWriter writer)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
|
||||
namespace umbraco.editorControls.userControlGrapper
|
||||
{
|
||||
public class SerializationHelper
|
||||
{
|
||||
public static object ValueFromXmlString(object value, Type type)
|
||||
{
|
||||
XmlSerializer ser = new XmlSerializer(type);
|
||||
StringReader strRdr = new StringReader(value.ToString());
|
||||
XmlTextReader xmlRdr = new XmlTextReader(strRdr);
|
||||
object obj = ser.Deserialize(xmlRdr);
|
||||
xmlRdr.Close();
|
||||
strRdr.Close();
|
||||
return obj;
|
||||
}
|
||||
|
||||
public static string ValueToXmlString(object value)
|
||||
{
|
||||
MemoryStream str = new MemoryStream();
|
||||
XmlSerializer ser = new XmlSerializer(value.GetType());
|
||||
ser.Serialize(str, value);
|
||||
str.Seek(0, System.IO.SeekOrigin.Begin);
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load(str);
|
||||
str.Close();
|
||||
return doc.InnerXml;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
namespace umbraco.editorControls.userControlGrapper
|
||||
{
|
||||
public class usercontrolData : umbraco.cms.businesslogic.datatype.DefaultData
|
||||
{
|
||||
public usercontrolData(umbraco.cms.businesslogic.datatype.BaseDataType DataType) : base(DataType) { }
|
||||
|
||||
|
||||
public override System.Xml.XmlNode ToXMl(System.Xml.XmlDocument data)
|
||||
{
|
||||
|
||||
if (this.Value != null)
|
||||
{
|
||||
|
||||
XmlDocument xd = new XmlDocument();
|
||||
|
||||
try
|
||||
{
|
||||
xd.LoadXml(this.Value.ToString());
|
||||
return data.ImportNode(xd.DocumentElement, true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return base.ToXMl(data);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return base.ToXMl(data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,14 +10,25 @@ using System.Web.UI.HtmlControls;
|
||||
|
||||
using umbraco.interfaces;
|
||||
using umbraco.editorControls;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
using System.Collections.Generic;
|
||||
using umbraco.IO;
|
||||
|
||||
namespace umbraco.editorControls.userControlGrapper
|
||||
{
|
||||
[ValidationProperty("Value")]
|
||||
public class usercontrolDataEditor : System.Web.UI.WebControls.PlaceHolder, umbraco.interfaces.IDataEditor
|
||||
{
|
||||
private umbraco.interfaces.IData _data;
|
||||
private string _usercontrolPath;
|
||||
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((IUsercontrolDataEditor)Controls[0]).value;
|
||||
}
|
||||
}
|
||||
|
||||
public usercontrolDataEditor(umbraco.interfaces.IData Data, string UsercontrolPath)
|
||||
{
|
||||
@@ -49,13 +60,52 @@ namespace umbraco.editorControls.userControlGrapper
|
||||
{
|
||||
base.OnInit (e);
|
||||
|
||||
this.Controls.Add(
|
||||
new System.Web.UI.UserControl().LoadControl(_usercontrolPath));
|
||||
Control oControl = new System.Web.UI.UserControl().LoadControl(_usercontrolPath);
|
||||
|
||||
if (HasSettings(oControl.GetType()))
|
||||
{
|
||||
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
|
||||
List<Setting<string, string>> s = ss.GetSettings(((umbraco.cms.businesslogic.datatype.DefaultData)_data).DataTypeDefinitionId);
|
||||
ss.Dispose();
|
||||
|
||||
foreach (Setting<string, string> setting in s)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(!string.IsNullOrEmpty(setting.Key))
|
||||
{
|
||||
oControl.GetType().InvokeMember(setting.Key, System.Reflection.BindingFlags.SetProperty, null, oControl, new object[] { setting.Value });
|
||||
}
|
||||
|
||||
}
|
||||
catch (MissingMethodException) { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.Controls.Add(oControl);
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
((IUsercontrolDataEditor)Controls[0] as IUsercontrolDataEditor).value = _data.Value;
|
||||
|
||||
}
|
||||
|
||||
private bool HasSettings(Type t)
|
||||
{
|
||||
bool hasSettings = false;
|
||||
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
|
||||
{
|
||||
object[] o = p.GetCustomAttributes(typeof(DataEditorSetting), true);
|
||||
|
||||
if (o.Length > 0)
|
||||
{
|
||||
hasSettings = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return hasSettings;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ namespace umbraco.editorControls.userControlGrapper
|
||||
get
|
||||
{
|
||||
if (_baseData == null)
|
||||
_baseData = new umbraco.cms.businesslogic.datatype.DefaultData(this);
|
||||
_baseData = new usercontrolData(this);
|
||||
return _baseData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Drawing;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
@@ -13,26 +14,30 @@ using umbraco.BusinessLogic;
|
||||
|
||||
using umbraco.editorControls;
|
||||
using umbraco.IO;
|
||||
using System.Collections.Generic;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.userControlGrapper
|
||||
{
|
||||
public class usercontrolPrevalueEditor : System.Web.UI.WebControls.PlaceHolder, umbraco.interfaces.IDataPrevalue
|
||||
{
|
||||
public ISqlHelper SqlHelper
|
||||
{
|
||||
get { return Application.SqlHelper; }
|
||||
}
|
||||
public class usercontrolPrevalueEditor : System.Web.UI.WebControls.PlaceHolder, umbraco.interfaces.IDataPrevalue
|
||||
{
|
||||
public ISqlHelper SqlHelper
|
||||
{
|
||||
get { return Application.SqlHelper; }
|
||||
}
|
||||
|
||||
#region IDataPrevalue Members
|
||||
#region IDataPrevalue Members
|
||||
|
||||
// referenced datatype
|
||||
private umbraco.cms.businesslogic.datatype.BaseDataType _datatype;
|
||||
// referenced datatype
|
||||
private umbraco.cms.businesslogic.datatype.BaseDataType _datatype;
|
||||
|
||||
private DropDownList _dropdownlist;
|
||||
private DropDownList _dropdownlistUserControl;
|
||||
private DropDownList _dropdownlist;
|
||||
private DropDownList _dropdownlistUserControl;
|
||||
private PlaceHolder _phSettings;
|
||||
|
||||
private Dictionary<string, DataEditorSettingType> dtSettings = new Dictionary<string, DataEditorSettingType>();
|
||||
|
||||
public usercontrolPrevalueEditor(umbraco.cms.businesslogic.datatype.BaseDataType DataType)
|
||||
public usercontrolPrevalueEditor(umbraco.cms.businesslogic.datatype.BaseDataType DataType)
|
||||
{
|
||||
// state it knows its datatypedefinitionid
|
||||
_datatype = DataType;
|
||||
@@ -52,106 +57,283 @@ namespace umbraco.editorControls.userControlGrapper
|
||||
_dropdownlistUserControl = new DropDownList();
|
||||
_dropdownlistUserControl.ID = "usercontrol";
|
||||
|
||||
_phSettings = new PlaceHolder();
|
||||
_phSettings.ID = "settings";
|
||||
|
||||
// put the childcontrols in context - ensuring that
|
||||
// the viewstate is persisted etc.
|
||||
Controls.Add(_dropdownlist);
|
||||
Controls.Add(_dropdownlistUserControl);
|
||||
Controls.Add(_phSettings);
|
||||
|
||||
// populate the usercontrol dropdown
|
||||
_dropdownlistUserControl.Items.Add(new ListItem(ui.Text("choose"), ""));
|
||||
populateUserControls( IOHelper.MapPath( SystemDirectories.Usercontrols) );
|
||||
|
||||
// populate the usercontrol dropdown
|
||||
_dropdownlistUserControl.Items.Add(new ListItem(ui.Text("choose"), ""));
|
||||
populateUserControls( IOHelper.MapPath( SystemDirectories.Usercontrols) );
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void populateUserControls(string path)
|
||||
{
|
||||
DirectoryInfo di = new DirectoryInfo(path);
|
||||
foreach (FileInfo uc in di.GetFiles("*.ascx"))
|
||||
{
|
||||
string root = IOHelper.MapPath(SystemDirectories.Root);
|
||||
private void populateUserControls(string path)
|
||||
{
|
||||
DirectoryInfo di = new DirectoryInfo(path);
|
||||
foreach (FileInfo uc in di.GetFiles("*.ascx"))
|
||||
{
|
||||
string root = IOHelper.MapPath(SystemDirectories.Root);
|
||||
|
||||
_dropdownlistUserControl.Items.Add(
|
||||
|
||||
new ListItem(
|
||||
uc.FullName.Substring(root.Length).Replace(IOHelper.DirSepChar, '/'))
|
||||
_dropdownlistUserControl.Items.Add(
|
||||
|
||||
new ListItem(
|
||||
uc.FullName.Substring(root.Length).Replace(IOHelper.DirSepChar, '/'))
|
||||
|
||||
/*
|
||||
new ListItem(
|
||||
uc.FullName.Substring( uc.FullName.IndexOf(root), uc.FullName.Length - uc.FullName.IndexOf(root)).Replace(IOHelper.DirSepChar, '/'))
|
||||
*/
|
||||
);
|
||||
/*
|
||||
new ListItem(
|
||||
uc.FullName.Substring( uc.FullName.IndexOf(root), uc.FullName.Length - uc.FullName.IndexOf(root)).Replace(IOHelper.DirSepChar, '/'))
|
||||
*/
|
||||
);
|
||||
|
||||
}
|
||||
foreach (DirectoryInfo dir in di.GetDirectories())
|
||||
populateUserControls(dir.FullName);
|
||||
}
|
||||
}
|
||||
foreach (DirectoryInfo dir in di.GetDirectories())
|
||||
populateUserControls(dir.FullName);
|
||||
}
|
||||
|
||||
public Control Editor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
public Control Editor
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
string config = Configuration;
|
||||
if (config != "")
|
||||
{
|
||||
_dropdownlistUserControl.SelectedValue = config;
|
||||
}
|
||||
_dropdownlist.SelectedValue = _datatype.DBType.ToString();
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
string config = Configuration;
|
||||
if (config != "")
|
||||
{
|
||||
_dropdownlistUserControl.SelectedValue = config;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
_dropdownlist.SelectedValue = _datatype.DBType.ToString();
|
||||
|
||||
public void Save()
|
||||
{
|
||||
_datatype.DBType = (umbraco.cms.businesslogic.datatype.DBTypes)Enum.Parse(typeof(umbraco.cms.businesslogic.datatype.DBTypes), _dropdownlist.SelectedValue, true);
|
||||
|
||||
// Generate data-string
|
||||
string data = _dropdownlistUserControl.SelectedValue;
|
||||
|
||||
}
|
||||
|
||||
// If the add new prevalue textbox is filled out - add the value to the collection.
|
||||
IParameter[] SqlParams = new IParameter[] {
|
||||
SqlHelper.CreateParameter("@value",data),
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
|
||||
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid", SqlParams);
|
||||
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')", SqlParams);
|
||||
}
|
||||
//check for settings
|
||||
if (!string.IsNullOrEmpty(Configuration))
|
||||
LoadSetttings(Configuration);
|
||||
|
||||
|
||||
protected override void Render(HtmlTextWriter writer)
|
||||
{
|
||||
writer.WriteLine("<table>");
|
||||
writer.WriteLine("<tr><th>Database datatype</th><td>");
|
||||
_dropdownlist.RenderControl(writer);
|
||||
writer.Write("</td></tr>");
|
||||
writer.Write("<tr><th>Usercontrol:</th><td>");
|
||||
_dropdownlistUserControl.RenderControl(writer);
|
||||
writer.Write("</td></tr>");
|
||||
writer.Write("</table>");
|
||||
}
|
||||
}
|
||||
|
||||
public string Configuration
|
||||
{
|
||||
get
|
||||
{
|
||||
object conf =
|
||||
SqlHelper.ExecuteScalar<object>("select value from cmsDataTypePreValues where datatypenodeid = @datatypenodeid",
|
||||
SqlHelper.CreateParameter("@datatypenodeid", _datatype.DataTypeDefinitionId));
|
||||
if (conf != null)
|
||||
return conf.ToString();
|
||||
else
|
||||
return "";
|
||||
private Dictionary<string, DataEditorSetting> GetSettings(Type t)
|
||||
{
|
||||
Dictionary<string, DataEditorSetting> settings = new Dictionary<string, DataEditorSetting>();
|
||||
|
||||
}
|
||||
}
|
||||
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
|
||||
{
|
||||
|
||||
#endregion
|
||||
}
|
||||
object[] o = p.GetCustomAttributes(typeof(DataEditorSetting), true);
|
||||
|
||||
if (o.Length > 0)
|
||||
settings.Add(p.Name, (DataEditorSetting)o[0]);
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
||||
private bool HasSettings(Type t)
|
||||
{
|
||||
bool hasSettings = false;
|
||||
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
|
||||
{
|
||||
object[] o = p.GetCustomAttributes(typeof(DataEditorSetting), true);
|
||||
|
||||
if (o.Length > 0)
|
||||
{
|
||||
hasSettings = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return hasSettings;
|
||||
}
|
||||
|
||||
private void LoadSetttings(string fileName)
|
||||
{
|
||||
if (System.IO.File.Exists(IOHelper.MapPath("~/" + fileName)))
|
||||
{
|
||||
|
||||
UserControl oControl = (UserControl)this.Page.LoadControl(@"~/" + fileName);
|
||||
|
||||
Type type = oControl.GetType();
|
||||
|
||||
|
||||
Dictionary<string, DataEditorSetting> settings = GetSettings(type);
|
||||
|
||||
foreach (KeyValuePair<string, DataEditorSetting> kv in settings)
|
||||
{
|
||||
DataEditorSettingType dst = kv.Value.GetDataEditorSettingType();
|
||||
dtSettings.Add(kv.Key, dst);
|
||||
|
||||
DataEditorPropertyPanel panel = new DataEditorPropertyPanel();
|
||||
panel.Text = kv.Value.GetName();
|
||||
panel.Text += "<br/><small>" + kv.Value.description + "</small>";
|
||||
|
||||
|
||||
if (HasSettings(type))
|
||||
{
|
||||
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
|
||||
|
||||
List<Setting<string, string>> s = ss.GetSettings(_datatype.DataTypeDefinitionId);
|
||||
ss.Dispose();
|
||||
|
||||
if (s.Find(set => set.Key == kv.Key).Value != null)
|
||||
dst.Value = s.Find(set => set.Key == kv.Key).Value;
|
||||
|
||||
}
|
||||
|
||||
panel.Controls.Add(dst.RenderControl(kv.Value));
|
||||
|
||||
Label invalid = new Label();
|
||||
invalid.Attributes.Add("style", "color:#8A1F11");
|
||||
invalid.ID = "lbl" + kv.Key;
|
||||
panel.Controls.Add(invalid);
|
||||
|
||||
_phSettings.Controls.Add(panel);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
bool hasErrors = false;
|
||||
foreach (KeyValuePair<string, DataEditorSettingType> k in dtSettings)
|
||||
{
|
||||
var result = k.Value.Validate();
|
||||
Label lbl = FindControlRecursive<Label>(_phSettings, "lbl" + k.Key);
|
||||
if(result == null && lbl != null)
|
||||
{
|
||||
if(lbl != null)
|
||||
lbl.Text = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(hasErrors == false)
|
||||
hasErrors = true;
|
||||
|
||||
if (lbl != null)
|
||||
lbl.Text = " " + result.ErrorMessage;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasErrors)
|
||||
{
|
||||
_datatype.DBType =
|
||||
(umbraco.cms.businesslogic.datatype.DBTypes)
|
||||
Enum.Parse(typeof (umbraco.cms.businesslogic.datatype.DBTypes), _dropdownlist.SelectedValue, true);
|
||||
|
||||
// Generate data-string
|
||||
string data = _dropdownlistUserControl.SelectedValue;
|
||||
|
||||
// If the add new prevalue textbox is filled out - add the value to the collection.
|
||||
IParameter[] SqlParams = new IParameter[]
|
||||
{
|
||||
SqlHelper.CreateParameter("@value", data),
|
||||
SqlHelper.CreateParameter("@dtdefid", _datatype.DataTypeDefinitionId)
|
||||
};
|
||||
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid", SqlParams);
|
||||
// we need to populate the parameters again due to an issue with SQL CE
|
||||
SqlParams = new IParameter[]
|
||||
{
|
||||
SqlHelper.CreateParameter("@value", data),
|
||||
SqlHelper.CreateParameter("@dtdefid", _datatype.DataTypeDefinitionId)
|
||||
};
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
"insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')",
|
||||
SqlParams);
|
||||
|
||||
|
||||
//settings
|
||||
|
||||
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
|
||||
|
||||
//ss.ClearSettings(_datatype.DataTypeDefinitionId);
|
||||
|
||||
int i = 0;
|
||||
foreach (KeyValuePair<string, DataEditorSettingType> k in dtSettings)
|
||||
{
|
||||
ss.InsertSetting(_datatype.DataTypeDefinitionId, k.Key, k.Value.Value, i);
|
||||
i++;
|
||||
|
||||
}
|
||||
|
||||
ss.Dispose();
|
||||
|
||||
if (dtSettings.Count == 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Configuration))
|
||||
LoadSetttings(Configuration);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Render(HtmlTextWriter writer)
|
||||
{
|
||||
writer.WriteLine("<div class=\"propertyItem\">");
|
||||
writer.WriteLine("<div class=\"propertyItemheader\">Database datatype</div>");
|
||||
writer.WriteLine("<div class=\"propertyItemContent\">");
|
||||
_dropdownlist.RenderControl(writer);
|
||||
writer.Write("</div></div>");
|
||||
|
||||
writer.WriteLine("<div class=\"propertyItem\">");
|
||||
writer.WriteLine("<div class=\"propertyItemheader\">Usercontrol:</div>");
|
||||
writer.WriteLine("<div class=\"propertyItemContent\">");
|
||||
_dropdownlistUserControl.RenderControl(writer);
|
||||
writer.Write("</div></div>");
|
||||
|
||||
_phSettings.RenderControl(writer);
|
||||
}
|
||||
|
||||
public string Configuration
|
||||
{
|
||||
get
|
||||
{
|
||||
object conf =
|
||||
SqlHelper.ExecuteScalar<object>("select value from cmsDataTypePreValues where datatypenodeid = @datatypenodeid",
|
||||
SqlHelper.CreateParameter("@datatypenodeid", _datatype.DataTypeDefinitionId));
|
||||
if (conf != null)
|
||||
return conf.ToString();
|
||||
else
|
||||
return "";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static T FindControlRecursive<T>(Control parent, string id) where T : Control
|
||||
{
|
||||
if ((parent is T) && (parent.ID == id))
|
||||
{
|
||||
return (T)parent;
|
||||
}
|
||||
|
||||
foreach (Control control in parent.Controls)
|
||||
{
|
||||
T foundControl = FindControlRecursive<T>(control, id);
|
||||
if (foundControl != null)
|
||||
{
|
||||
return foundControl;
|
||||
}
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,8 @@ namespace umbraco.editorControls
|
||||
/// <param name="output"> The HTML writer to write out to </param>
|
||||
protected override void Render(HtmlTextWriter output)
|
||||
{
|
||||
if (!Page.IsPostBack && _data != null && _data.Value != null)
|
||||
// zb-00024 #299260 : always render, postback or not postback
|
||||
if (_data != null && _data.Value != null)
|
||||
{
|
||||
if (_data.Value.ToString() == "1")
|
||||
this.Checked = true;
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace umbraco.macroRenderings
|
||||
{
|
||||
string _value = "";
|
||||
bool _multiple = false;
|
||||
private static ISqlHelper _sqlHelper;
|
||||
|
||||
public bool ShowCaption
|
||||
{
|
||||
|
||||
@@ -27,10 +27,14 @@
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
|
||||
@@ -13,7 +13,8 @@ using System.Linq;
|
||||
using ClientDependency.Core.Controls;
|
||||
using umbraco.IO;
|
||||
|
||||
namespace umbraco.uicontrols {
|
||||
namespace umbraco.uicontrols
|
||||
{
|
||||
|
||||
[ClientDependency(ClientDependencyType.Javascript, "CodeArea/javascript.js", "UmbracoClient")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "CodeArea/UmbracoEditor.js", "UmbracoClient")]
|
||||
@@ -29,7 +30,7 @@ namespace umbraco.uicontrols {
|
||||
|
||||
protected TextBox CodeTextBox;
|
||||
|
||||
public bool AutoResize { get; set ; }
|
||||
public bool AutoResize { get; set; }
|
||||
public int OffSetX { get; set; }
|
||||
public int OffSetY { get; set; }
|
||||
public string Text
|
||||
@@ -68,7 +69,7 @@ namespace umbraco.uicontrols {
|
||||
{
|
||||
ClientDependencyLoader.Instance.RegisterDependency("CodeMirror/js/codemirror.js", "UmbracoClient", ClientDependencyType.Javascript);
|
||||
ClientDependencyLoader.Instance.RegisterDependency("CodeArea/styles.css", "UmbracoClient", ClientDependencyType.Css);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CreateChildControls()
|
||||
@@ -82,7 +83,7 @@ namespace umbraco.uicontrols {
|
||||
CodeTextBox.Attributes.Add("class", "codepress");
|
||||
CodeTextBox.Attributes.Add("wrap", "off");
|
||||
}
|
||||
|
||||
|
||||
CodeTextBox.TextMode = TextBoxMode.MultiLine;
|
||||
|
||||
this.CssClass = "codepress";
|
||||
@@ -105,7 +106,7 @@ namespace umbraco.uicontrols {
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Render(HtmlTextWriter writer)
|
||||
protected override void Render(HtmlTextWriter writer)
|
||||
{
|
||||
EnsureChildControls();
|
||||
|
||||
@@ -116,18 +117,18 @@ namespace umbraco.uicontrols {
|
||||
jsEventCode = RenderBasicEditor();
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
writer.WriteBeginTag("div");
|
||||
writer.WriteAttribute("id", this.ClientID);
|
||||
writer.WriteAttribute("class", this.CssClass);
|
||||
this.ControlStyle.AddAttributesToRender(writer);
|
||||
writer.Write(HtmlTextWriter.TagRightChar);
|
||||
writer.Write(HtmlTextWriter.TagRightChar);
|
||||
CodeTextBox.RenderControl(writer);
|
||||
writer.WriteEndTag("div");
|
||||
|
||||
jsEventCode = RenderCodeEditor();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (this.AutoResize)
|
||||
@@ -153,7 +154,7 @@ namespace umbraco.uicontrols {
|
||||
|
||||
if (!UmbracoSettings.ScriptDisableEditor && HttpContext.Current.Request.Browser.Browser == "IE")
|
||||
{
|
||||
jsEventCode += "jQuery('<p style=\"color:#999\">" + ui.Text("codemirroriewarning").Replace("'", "\\'") +"</p>').insertAfter('#" + this.ClientID + "');";
|
||||
jsEventCode += "jQuery('<p style=\"color:#999\">" + ui.Text("codemirroriewarning").Replace("'", "\\'") + "</p>').insertAfter('#" + this.ClientID + "');";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -199,7 +200,7 @@ namespace umbraco.uicontrols {
|
||||
break;
|
||||
case EditorType.HTML:
|
||||
parserFiles = new string[] { "parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js", "parsehtmlmixed.js" };
|
||||
cssFile = new string[] { "xmlcolors.css", "jscolors.css", "csscolors", "umbracoCustom.css" };
|
||||
cssFile = new string[] { "xmlcolors.css", "jscolors.css", "csscolors.css", "umbracoCustom.css" };
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -221,9 +222,9 @@ namespace umbraco.uicontrols {
|
||||
stylesheet: [" + string.Join(",",
|
||||
|
||||
cssFile
|
||||
.Select(x => string.Format(@"""{0}""", IOHelper.ResolveUrl( SystemDirectories.Umbraco_client ) + @"/CodeMirror/css/" + x))
|
||||
.Select(x => string.Format(@"""{0}""", IOHelper.ResolveUrl(SystemDirectories.Umbraco_client) + @"/CodeMirror/css/" + x))
|
||||
.ToArray()) + @"],
|
||||
path: """ + IOHelper.ResolveUrl( SystemDirectories.Umbraco_client) + @"/CodeMirror/js/"",
|
||||
path: """ + IOHelper.ResolveUrl(SystemDirectories.Umbraco_client) + @"/CodeMirror/js/"",
|
||||
content: textarea.value,
|
||||
autoMatchParens: false,"
|
||||
+ (string.IsNullOrEmpty(ClientSaveMethod) ? "" : @"saveFunction: " + ClientSaveMethod + ",") + @"
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace umbraco.uicontrols.DatePicker
|
||||
|
||||
[ClientDependency(ClientDependencyType.Css, "DateTimePicker/datetimepicker.css", "UmbracoClient")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "MaskedInput/jquery.maskedinput-1.3.min.js", "UmbracoClient")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "ui/jqueryui.js", "UmbracoClient")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "DateTimePicker/timepicker.js", "UmbracoClient")]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "DateTimePicker/umbDateTimePicker.js", "UmbracoClient")]
|
||||
@@ -112,7 +113,9 @@ jQuery(document).ready(function() {
|
||||
+ this.ShowTime.ToString().ToLower() + ",'"
|
||||
+ ui.Text("choose") + " " + ui.Text("date") + "','"
|
||||
+ ui.Text("noDate") + "','"
|
||||
+ ui.Text("removeDate") + "') });";
|
||||
+ ui.Text("removeDate") + "');"
|
||||
+ "jQuery('#" + m_DateTextBox.ClientID + "').mask('"+ (this.ShowTime ? "9999-99-99 99:99" : "9999-99-99") +"');"
|
||||
+ "});";
|
||||
|
||||
try
|
||||
{
|
||||
|
||||