Compare commits
661 Commits
| 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 |
@@ -21,4 +21,18 @@ _ReSharper*/
|
||||
[sS]andbox
|
||||
umbraco.config
|
||||
*.vs10x
|
||||
App_Data\TEMP\*
|
||||
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
|
||||
@@ -4,3 +4,4 @@ d0aba247db91d1b70c39c6397b965ca370a67497 Sprint-Juno-A
|
||||
f15d4ff81a8368e9d42788f7e0ae726f7a70a3b1 Release-4.0.3
|
||||
283065df4d3c27245267709dd2644a479c4f62a5 Release-4.0.4.2
|
||||
ffc34b23e1a03785e4098afa4290d8c03cf10115 Release-4.5.2
|
||||
d03fcffb8834a9583a56813bb44b6abbd9f042cc Release-4.6.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Umbraco CMS version 4.5 is licensed under the OSI approved MIT License:
|
||||
|
||||
Copyright (c) 2007-2010 umbraco I/S
|
||||
Copyright (c) 2007-2010 umbraco I/S.
|
||||
|
||||
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:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<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>
|
||||
</SccProjectName>
|
||||
@@ -40,6 +40,7 @@
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
||||
@@ -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>
|
||||
@@ -54,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++)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -53,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
|
||||
{
|
||||
|
||||
@@ -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() +
|
||||
"\"";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ namespace umbraco.editorControls.ultimatepicker
|
||||
break;
|
||||
case "dropdownlist":
|
||||
return dropdownlistNodes.SelectedValue;
|
||||
break;
|
||||
case "listbox":
|
||||
foreach (ListItem item in listboxNodes.Items)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</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>
|
||||
@@ -52,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>
|
||||
@@ -78,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>
|
||||
@@ -348,6 +349,7 @@
|
||||
<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" />
|
||||
@@ -422,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)
|
||||
@@ -158,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());
|
||||
@@ -174,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());
|
||||
@@ -200,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());
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ namespace umbraco.editorControls.userControlGrapper
|
||||
}
|
||||
|
||||
}
|
||||
catch (MissingMethodException ex) { }
|
||||
catch (MissingMethodException) { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Drawing;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
@@ -18,25 +19,25 @@ 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 PlaceHolder _phSettings;
|
||||
private DropDownList _dropdownlist;
|
||||
private DropDownList _dropdownlistUserControl;
|
||||
private PlaceHolder _phSettings;
|
||||
|
||||
private Dictionary<string, DataEditorSettingType> dtSettings = new Dictionary<string, DataEditorSettingType>();
|
||||
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;
|
||||
@@ -56,225 +57,283 @@ namespace umbraco.editorControls.userControlGrapper
|
||||
_dropdownlistUserControl = new DropDownList();
|
||||
_dropdownlistUserControl.ID = "usercontrol";
|
||||
|
||||
_phSettings = new PlaceHolder();
|
||||
_phSettings.ID = "settings";
|
||||
_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);
|
||||
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;
|
||||
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();
|
||||
|
||||
}
|
||||
_dropdownlist.SelectedValue = _datatype.DBType.ToString();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//check for settings
|
||||
if (!string.IsNullOrEmpty(Configuration))
|
||||
LoadSetttings(Configuration);
|
||||
|
||||
//check for settings
|
||||
if (!string.IsNullOrEmpty(Configuration))
|
||||
LoadSetttings(Configuration);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private Dictionary<string, DataEditorSetting> GetSettings(Type t)
|
||||
{
|
||||
Dictionary<string, DataEditorSetting> settings = new Dictionary<string, DataEditorSetting>();
|
||||
private Dictionary<string, DataEditorSetting> GetSettings(Type t)
|
||||
{
|
||||
Dictionary<string, DataEditorSetting> settings = new Dictionary<string, DataEditorSetting>();
|
||||
|
||||
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
|
||||
{
|
||||
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
|
||||
{
|
||||
|
||||
object[] o = p.GetCustomAttributes(typeof(DataEditorSetting), true);
|
||||
object[] o = p.GetCustomAttributes(typeof(DataEditorSetting), true);
|
||||
|
||||
if (o.Length > 0)
|
||||
settings.Add(p.Name, (DataEditorSetting)o[0]);
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
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);
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (o.Length > 0)
|
||||
{
|
||||
hasSettings = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return hasSettings;
|
||||
}
|
||||
return hasSettings;
|
||||
}
|
||||
|
||||
private void LoadSetttings(string fileName)
|
||||
{
|
||||
if (System.IO.File.Exists(IOHelper.MapPath("~/" + fileName)))
|
||||
{
|
||||
|
||||
UserControl oControl = (UserControl)this.Page.LoadControl(@"~/" + fileName);
|
||||
private void LoadSetttings(string fileName)
|
||||
{
|
||||
if (System.IO.File.Exists(IOHelper.MapPath("~/" + fileName)))
|
||||
{
|
||||
|
||||
UserControl oControl = (UserControl)this.Page.LoadControl(@"~/" + fileName);
|
||||
|
||||
Type type = oControl.GetType();
|
||||
Type type = oControl.GetType();
|
||||
|
||||
|
||||
Dictionary<string, DataEditorSetting> settings = GetSettings(type);
|
||||
Dictionary<string, DataEditorSetting> settings = GetSettings(type);
|
||||
|
||||
foreach (KeyValuePair<string, DataEditorSetting> kv in settings)
|
||||
{
|
||||
DataEditorSettingType dst = kv.Value.GetDataEditorSettingType();
|
||||
dtSettings.Add(kv.Key, dst);
|
||||
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>";
|
||||
DataEditorPropertyPanel panel = new DataEditorPropertyPanel();
|
||||
panel.Text = kv.Value.GetName();
|
||||
panel.Text += "<br/><small>" + kv.Value.description + "</small>";
|
||||
|
||||
|
||||
if (HasSettings(type))
|
||||
{
|
||||
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
|
||||
if (HasSettings(type))
|
||||
{
|
||||
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
|
||||
|
||||
List<Setting<string, string>> s = ss.GetSettings(_datatype.DataTypeDefinitionId);
|
||||
ss.Dispose();
|
||||
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;
|
||||
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));
|
||||
panel.Controls.Add(dst.RenderControl(kv.Value));
|
||||
|
||||
_phSettings.Controls.Add(panel);
|
||||
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()
|
||||
{
|
||||
_datatype.DBType = (umbraco.cms.businesslogic.datatype.DBTypes)Enum.Parse(typeof(umbraco.cms.businesslogic.datatype.DBTypes), _dropdownlist.SelectedValue, true);
|
||||
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;
|
||||
|
||||
// Generate data-string
|
||||
string data = _dropdownlistUserControl.SelectedValue;
|
||||
if (lbl != null)
|
||||
lbl.Text = " " + result.ErrorMessage;
|
||||
}
|
||||
}
|
||||
|
||||
// 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);
|
||||
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
|
||||
//settings
|
||||
|
||||
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
|
||||
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
|
||||
|
||||
//ss.ClearSettings(_datatype.DataTypeDefinitionId);
|
||||
//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++;
|
||||
int i = 0;
|
||||
foreach (KeyValuePair<string, DataEditorSettingType> k in dtSettings)
|
||||
{
|
||||
ss.InsertSetting(_datatype.DataTypeDefinitionId, k.Key, k.Value.Value, i);
|
||||
i++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ss.Dispose();
|
||||
ss.Dispose();
|
||||
|
||||
if (dtSettings.Count == 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Configuration))
|
||||
LoadSetttings(Configuration);
|
||||
}
|
||||
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>");
|
||||
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>");
|
||||
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);
|
||||
}
|
||||
_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 "";
|
||||
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 "";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -26,23 +26,26 @@ namespace umbraco.uicontrols
|
||||
|
||||
}
|
||||
|
||||
// do NOT append extension to cookie name, because it is used in umbraco/presentation/umbraco_client/Panel/javascript.js
|
||||
static umbraco.BusinessLogic.StateHelper.Cookies.Cookie panelCookie = new StateHelper.Cookies.Cookie("UMB_PANEL", false); // was umbPanel_pWidth _pHeight
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
// We can grab the cached window size from cookie values
|
||||
if (AutoResize)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(StateHelper.GetCookieValue("umbPanel_pWidth")))
|
||||
// zb-00004 #29956 : refactor cookies names & handling
|
||||
if (panelCookie.HasValue)
|
||||
{
|
||||
int pWidth = 0;
|
||||
int pHeight = 0;
|
||||
if (int.TryParse(StateHelper.GetCookieValue("umbPanel_pWidth"), out pWidth))
|
||||
{
|
||||
string[] wh = panelCookie.GetValue().Split('x');
|
||||
|
||||
if (wh.Length > 0 && int.TryParse(wh[0], out pWidth))
|
||||
Width = Unit.Pixel(pWidth);
|
||||
}
|
||||
if (int.TryParse(StateHelper.GetCookieValue("umbPanel_pHeight"), out pHeight))
|
||||
{
|
||||
|
||||
if (wh.Length > 1 && int.TryParse(wh[1], out pHeight))
|
||||
Height = Unit.Pixel(pHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace umbraco.uicontrols.TreePicker
|
||||
{
|
||||
return new CMSNode(int.Parse(ItemIdValue.Value)).Text;
|
||||
}
|
||||
catch (ArgumentException ex) { /*the node does not exist! we will ignore*/ }
|
||||
catch (ArgumentException) { /*the node does not exist! we will ignore*/ }
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>umbraco.webservices</RootNamespace>
|
||||
<AssemblyName>umbraco.webservices</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
@@ -39,6 +39,7 @@
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -68,6 +69,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/**********************************************************************/
|
||||
/* Install.SQL */
|
||||
/* Creates a login and makes the user a member of db roles */
|
||||
/* */
|
||||
/**********************************************************************/
|
||||
|
||||
-- Declare variables for database name, username and password
|
||||
DECLARE @dbName sysname,
|
||||
@dbUser sysname,
|
||||
@dbPwd nvarchar(max);
|
||||
|
||||
-- Set variables for database name, username and password
|
||||
SET @dbName = 'PlaceHolderForDb';
|
||||
SET @dbUser = 'PlaceHolderForUser';
|
||||
SET @dbPwd = 'PlaceHolderForPassword';
|
||||
|
||||
DECLARE @cmd nvarchar(max)
|
||||
|
||||
-- Create login
|
||||
IF( SUSER_SID(@dbUser) is null )
|
||||
BEGIN
|
||||
print '-- Creating login '
|
||||
SET @cmd = N'CREATE LOGIN ' + quotename(@dbUser) + N' WITH PASSWORD ='''+ replace(@dbPwd, '''', '''''') + N''''
|
||||
EXEC(@cmd)
|
||||
END
|
||||
|
||||
-- Create database user and map to login
|
||||
-- and add user to the datareader, datawriter, ddladmin and securityadmin roles
|
||||
--
|
||||
SET @cmd = N'USE ' + quotename(@DBName) + N';
|
||||
IF( NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = ''' + replace(@dbUser, '''', '''''') + N'''))
|
||||
BEGIN
|
||||
print ''-- Creating user'';
|
||||
CREATE USER ' + quotename(@dbUser) + N' FOR LOGIN ' + quotename(@dbUser) + N';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_ddladmin'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_securityadmin'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_datareader'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_datawriter'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
END'
|
||||
EXEC(@cmd)
|
||||
GO
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<msdeploy.iisApp>
|
||||
<iisApp path="umbraco" />
|
||||
<!-- managedRuntimeVersion="v4.0" /> -->
|
||||
<!--
|
||||
this Acl can be removed after successful installation
|
||||
** begin remove **
|
||||
-->
|
||||
<setAcl path="umbraco"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<!--
|
||||
** end remove **
|
||||
-->
|
||||
|
||||
<setAcl path="umbraco\app_code"
|
||||
setAclAccess="ReadandExecute" />
|
||||
<setAcl path="umbraco\app_browsers"
|
||||
setAclAccess="ReadandExecute" />
|
||||
<setAcl path="umbraco\app_data"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\bin"
|
||||
setAclAccess="Read" />
|
||||
<setAcl path="umbraco\config"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\css"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\data"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\masterpages"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\media"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\python"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\scripts"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\umbraco"
|
||||
setAclAccess="Read" />
|
||||
<setAcl path="umbraco\usercontrols"
|
||||
setAclAccess="Read" />
|
||||
<setAcl path="umbraco\xslt"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
<setAcl path="umbraco\web.config"
|
||||
setAclResourceType="File"
|
||||
setAclAccess="Read, Write, Modify" />
|
||||
|
||||
<!-- Runs SQL script to create login and assign permissions, requires transacted="false"
|
||||
This script runs as the database administrator provided in parameters.xml
|
||||
-->
|
||||
<dbfullsql path="installSQL.sql" transacted="false" />
|
||||
|
||||
</msdeploy.iisApp>
|
||||
@@ -0,0 +1,142 @@
|
||||
<parameters>
|
||||
|
||||
<!-- Prompts where to copy the content files and takes a web site path (such as "contoso.com/app"). -->
|
||||
<parameter name="Application Path" description="It is recommended that Umbraco be installed as a web site root. Leave this parameter empty." tags="iisapp">
|
||||
<parameterValidation type="AllowEmpty" />
|
||||
<parameterEntry type="ProviderPath" scope="iisapp" match="^umbraco$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the root site folder -->
|
||||
<parameter name="SetAclParameter1" description="Sets the ACL on the root site folder" defaultValue="{Application Path}" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the app_code folder -->
|
||||
<parameter name="SetAclParameter2" description="Sets the ACL on the app_code folder" defaultValue="{Application Path}/app_code" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\app_code$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the app_browsers folder -->
|
||||
<parameter name="SetAclParameter15" description="Sets the ACL on the app_code folder" defaultValue="{Application Path}/app_browsers" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\app_browsers$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the app_data folder -->
|
||||
<parameter name="SetAclParameter16" description="Sets the ACL on the app_code folder" defaultValue="{Application Path}/app_data" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\app_data$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs, on the bin folder -->
|
||||
<parameter name="SetAclParameter3" description="Sets the ACL on the bin folder" defaultValue="{Application Path}/bin" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\bin$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the config folder -->
|
||||
<parameter name="SetAclParameter4" description="Sets the ACL on the config folder" defaultValue="{Application Path}/config" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\config$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the css folder -->
|
||||
<parameter name="SetAclParameter5" description="Sets the ACL on the css folder" defaultValue="{Application Path}/css" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="umbraco\\css$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the data folder -->
|
||||
<parameter name="SetAclParameter6" description="Sets the ACL on the data folder" defaultValue="{Application Path}/data" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\data$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the masterpages folder -->
|
||||
<parameter name="SetAclParameter7" description="Sets the ACL on the masterpages folder" defaultValue="{Application Path}/masterpages" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\masterpages$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the media folder -->
|
||||
<parameter name="SetAclParameter8" description="Sets the ACL on the media folder" defaultValue="{Application Path}/media" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\media$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the python folder -->
|
||||
<parameter name="SetAclParameter9" description="Sets the ACL on the python folder" defaultValue="{Application Path}/python" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\python$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the scripts folder -->
|
||||
<parameter name="SetAclParameter10" description="Sets the ACL on the scripts folder" defaultValue="{Application Path}/scripts" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\scripts$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs on the umbraco folder -->
|
||||
<parameter name="SetAclParameter11" description="Sets the ACL on the umbraco folder" defaultValue="{Application Path}/umbraco" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\umbraco$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs, it's set to the application path filled in by the user -->
|
||||
<parameter name="SetAclParameter12" description="Sets the ACL on the usercontrols folder" defaultValue="{Application Path}/usercontrols" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\usercontrols$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs, it's set to the application path filled in by the user -->
|
||||
<parameter name="SetAclParameter13" description="Sets the ACL on the xslt folder" defaultValue="{Application Path}/xslt" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\xslt$" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the parameter that is used to set ACLs, it's set to the application path filled in by the user -->
|
||||
<parameter name="SetAclParameter14" description="Sets the ACL on the web.config file" defaultValue="{Application Path}/web.config" tags="Hidden">
|
||||
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco\\web.config$" />
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for database server name, this is used in the connection string parameter later -->
|
||||
<parameter name="Database Server" description="Location of your database server." defaultValue=".\sqlexpress" tags="DBServer, SQL">
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for the database name and fills it into the database scripts -->
|
||||
<parameter name="Database Name" description="Name of the database for your application." defaultValue="umbraco" tags="DBName, SQL">
|
||||
<parameterEntry type="TextFile" scope="installSQL.sql" match="PlaceHolderForDb" />
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for the database username and fills it into the database scripts.
|
||||
The SQL tag indicates it is a parameter required for SQL, the DbUsername tag indicates this is a Db username -->
|
||||
<parameter name="Database Username" description="User name to access you application database." defaultValue="umbracouser" tags="SQL, DbUsername">
|
||||
<parameterEntry type="TextFile" scope="installSQL.sql" match="PlaceHolderForUser" />
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for the database password and fills it into the database scripts.
|
||||
The SQL tag indicates it is a parameter required for SQL, the DbUserPassword tag indicates this is a Db password -->
|
||||
<parameter name="Database Password" description="Password for the Database Username." tags="New, Password, SQL, DbUserPassword">
|
||||
<parameterEntry type="TextFile" scope="installSQL.sql" match="PlaceHolderForPassword" />
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for the admin creds and uses it for the administrator connection string.
|
||||
This is used to create a login and assign permissions. The SQL tag indicates it is a parameter required for SQL.
|
||||
The DbAdminUsername tag indicates it should be used when the user is creating a new database.
|
||||
If they're not, it can be filled in with the DbUsername value. -->
|
||||
<parameter name="Database Administrator" description="Administrator username for your database." defaultValue="sa" tags="SQL, DbAdminUsername">
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for the admin password and uses it for the administrator connection string.
|
||||
This is used to create a login and assign permissions. The SQL tags indicates it is a parameter required for SQL.
|
||||
The DbAdminPassword tag indicates it should be used when the user is creating a new database.
|
||||
If they're not, it can be filled in with the DbUserPassword value. -->
|
||||
<parameter name="Database Administrator Password" description="Password that is associated with the database administrator account." tags="Password, SQL, DbAdminPassword">
|
||||
</parameter>
|
||||
|
||||
|
||||
<!-- This is the hidden admin connection string used to run the database scripts -->
|
||||
<parameter name="Connection String" description="Automatically sets the connection string for the connection request." defaultValue="Server={Database Server};Database={Database Name};uid={Database Administrator};Pwd={Database Administrator Password};" tags="Hidden,SQLConnectionString,Validate">
|
||||
<parameterEntry type="ProviderPath" scope="dbfullsql" match="installSQL.sql" />
|
||||
</parameter>
|
||||
|
||||
<!-- This is the hidden connection string with the newly created db account that is used in the web.config -->
|
||||
<parameter name="Connection String for Config" description="Connection string to enter into config" defaultValue="datalayer=SqlServer;server={Database Server};database={Database Name};user id={Database Username};password={Database Password}" tags="Hidden, SQL">
|
||||
<!-- scope=”web.config” will look for all web.config files under the root directory . Using scope=”\\web.config$” will select only the root web.config -->
|
||||
<parameterEntry type="XmlFile" scope="\\web.config$" match="//appSettings/add[@key='umbracoDbDSN']/@value" />
|
||||
</parameter>
|
||||
|
||||
<parameter name="SQLCE Database Location" defaultValue="datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;data source=|DataDirectory|\Umbraco.sdf"
|
||||
tags="SQLCE, Hidden">
|
||||
<parameterEntry type="XmlFile" scope="\\web.config$" match="//appSettings/add[@key='umbracoDbDSN']/@value" />
|
||||
</parameter>
|
||||
|
||||
</parameters>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
|
||||
<section alias="StartupMediaDashboardSection">
|
||||
<areas>
|
||||
<area>media</area>
|
||||
@@ -37,7 +37,7 @@
|
||||
/umbraco/dashboard/mediadashboardintro.ascx
|
||||
</control>
|
||||
<control showOnce="true" addPanel="true" panelCaption="">
|
||||
/umbraco/dashboard/zipupload.ascx
|
||||
/umbraco/dashboard/desktopmediauploader.ascx
|
||||
</control>
|
||||
<control showOnce="true" addPanel="true" panelCaption="">
|
||||
/umbraco/dashboard/mediadashboardvideos.ascx
|
||||
@@ -87,4 +87,14 @@
|
||||
</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
<section alias="uGoLiveDashboardSection">
|
||||
<areas>
|
||||
<area>developer</area>
|
||||
</areas>
|
||||
<tab caption="uGoLive Checklist">
|
||||
<control>/umbraco/plugins/uGoLive/Dashboard.ascx</control>
|
||||
</tab>
|
||||
</section>
|
||||
|
||||
</dashBoard>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<feedProxy>
|
||||
<!-- To enable the FeedProxy to access other domains, please add the hostname to an 'allow' element. -->
|
||||
<!-- <allow host="domain.com" /> -->
|
||||
|
||||
<!-- The following hostnames are used by on the dashboards, please do not delete these. -->
|
||||
<allow host="umbraco.com" />
|
||||
<allow host="umbraco.org" />
|
||||
</feedProxy>
|
||||
@@ -11,7 +11,7 @@
|
||||
</command>
|
||||
<command>
|
||||
<umbracoAlias>removeformat</umbracoAlias>
|
||||
<icon>images/editor/cleanup.gif</icon>
|
||||
<icon>images/editor/removeformat.gif</icon>
|
||||
<tinyMceCommand value="" userInterface="false" frontendCommand="removeformat">removeformat</tinyMceCommand>
|
||||
<priority>2</priority>
|
||||
</command>
|
||||
@@ -225,10 +225,10 @@ img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|al
|
||||
-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],
|
||||
thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],
|
||||
-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],
|
||||
-span[class|align],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align],-h2[id|dir|class|align],
|
||||
-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align],-h2[id|dir|class|align],
|
||||
-h3[id|dir|class|align],-h4[id|dir|class|align],-h5[id|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],
|
||||
dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[classid|width|height|codebase|*],
|
||||
param[name|value|_value],embed[type|width|height|src|*],map[name],area[shape|coords|href|alt|target],bdo,button]]>
|
||||
param[name|value|_value],embed[type|width|height|src|*],map[name],area[shape|coords|href|alt|target],bdo,button,iframe[*]]]>
|
||||
</validElements>
|
||||
<invalidElements>font</invalidElements>
|
||||
|
||||
|
||||
@@ -1,170 +1,214 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<settings>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codepress editor and use a simple textarea instead -->
|
||||
<!-- note! codepress editor always disabled in IE due to automatic hyperlinking "feature" in contenteditable areas -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codepress editor and use a simple textarea instead -->
|
||||
<!-- note! codepress editor always disabled in IE due to automatic hyperlinking "feature" in contenteditable areas -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
should be set to false if the aspnet account hasn't got readrights of the driveroot up to the /media directory -->
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!-- <errorPage culture="default">1</errorPage>-->
|
||||
<!-- <errorPage culture="en-US">200</errorPage>-->
|
||||
<error404>1</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>your@email.here</email>
|
||||
</notifications>
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!-- <errorPage culture="default">1</errorPage>-->
|
||||
<!-- <errorPage culture="en-US">200</errorPage>-->
|
||||
<error404>1</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>your@email.here</email>
|
||||
</notifications>
|
||||
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
|
||||
<!-- lowercase, either 'gif' or 'png' -->
|
||||
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
|
||||
<!-- lowercase, either 'gif' or 'png' -->
|
||||
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
|
||||
|
||||
<!-- clean editor content with use of tidy -->
|
||||
<TidyEditorContent>True</TidyEditorContent>
|
||||
<!-- clean editor content with use of tidy -->
|
||||
<TidyEditorContent>True</TidyEditorContent>
|
||||
|
||||
<!-- the encoding type for tidy. Default is UTF8, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
|
||||
<TidyCharEncoding>UTF8</TidyCharEncoding>
|
||||
<!-- the encoding type for tidy. Default is UTF8, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
|
||||
<TidyCharEncoding>UTF8</TidyCharEncoding>
|
||||
|
||||
<!-- to enable new content schema, this needs to be false -->
|
||||
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
|
||||
<!-- to enable new content schema, this needs to be false -->
|
||||
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
|
||||
|
||||
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
|
||||
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
|
||||
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
|
||||
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
|
||||
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
|
||||
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
|
||||
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
|
||||
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
|
||||
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
|
||||
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
|
||||
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
|
||||
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
|
||||
|
||||
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
|
||||
<!-- In seconds. 0 will disable cache -->
|
||||
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
|
||||
</content>
|
||||
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
|
||||
<!-- In seconds. 0 will disable cache -->
|
||||
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
|
||||
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>true</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="%"></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org=":"></char>
|
||||
<char org="#"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="å">aa</char>
|
||||
<char org="ä">ae</char>
|
||||
<char org="ö">oe</char>
|
||||
<char org="ü">ue</char>
|
||||
<char org="ß">ss</char>
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
</urlReplacing>
|
||||
</requestHandler>
|
||||
|
||||
<templates>
|
||||
<useAspNetMasterPages>true</useAspNetMasterPages>
|
||||
</templates>
|
||||
|
||||
<!-- This moves the asp.net viewstate data to the end of the html document instead of having it in the beginning-->
|
||||
<viewstateMoverModule enable="false" />
|
||||
<!-- Url Resolving ensures that all links works if you run Umbraco in virtual directories -->
|
||||
<!-- Setting this to true can increase render time for pages with a large number of links -->
|
||||
<!-- If running Umbraco in virtual directory this *must* be set to true! -->
|
||||
<ResolveUrlsFromTextString>true</ResolveUrlsFromTextString>
|
||||
</content>
|
||||
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
|
||||
<!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
|
||||
<!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
|
||||
</logging>
|
||||
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
<security>
|
||||
<!-- set to true to auto update login interval (and there by disabling the lock screen -->
|
||||
<keepUserLoggedIn>true</keepUserLoggedIn>
|
||||
</security>
|
||||
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>true</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="'"></char>
|
||||
<char org="%"></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org=":"></char>
|
||||
<char org="#"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="å">aa</char>
|
||||
<char org="ä">ae</char>
|
||||
<char org="ö">oe</char>
|
||||
<char org="ü">ue</char>
|
||||
<char org="ß">ss</char>
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
</urlReplacing>
|
||||
|
||||
<!-- distributed calls make umbraco use webservices to handle cache refreshing -->
|
||||
<distributedCall enable="false">
|
||||
<!-- the id of the user who's making the calls -->
|
||||
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
|
||||
<user>0</user>
|
||||
<servers>
|
||||
<!-- add ip number or hostname, make sure that it can be reached from all servers -->
|
||||
<!-- <server>127.0.0.1</server>-->
|
||||
</servers>
|
||||
</distributedCall>
|
||||
<removeUmbracoVersionHeader>false</removeUmbracoVersionHeader>
|
||||
</requestHandler>
|
||||
|
||||
<!-- configuration for webservices -->
|
||||
<!-- webservices are disabled by default. Set enable="True" to enable them -->
|
||||
<webservices enabled="False">
|
||||
<!-- You must set user-rights for each service. Enter the usernames seperated with comma (,) -->
|
||||
<documentServiceUsers>your-username</documentServiceUsers>
|
||||
<fileServiceUsers>your-username</fileServiceUsers>
|
||||
<stylesheetServiceUsers>your-username</stylesheetServiceUsers>
|
||||
<memberServiceUsers>your-username</memberServiceUsers>
|
||||
<templateServiceUsers>your-username</templateServiceUsers>
|
||||
<!-- type of files (extensions) that are allowed for the file service -->
|
||||
<fileServiceFolders>css,xslt</fileServiceFolders>
|
||||
</webservices>
|
||||
|
||||
<!-- Configuration for repositories -->
|
||||
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
|
||||
<repositories>
|
||||
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
|
||||
</repositories>
|
||||
<templates>
|
||||
<useAspNetMasterPages>true</useAspNetMasterPages>
|
||||
</templates>
|
||||
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
|
||||
<!-- this is used by Umbraco to determine if there's valid classes in the /App_Code folder to be used for Rest/XSLT extensions -->
|
||||
<developer>
|
||||
<appCodeFileExtensions>
|
||||
<ext>cs</ext>
|
||||
<ext>vb</ext>
|
||||
</appCodeFileExtensions>
|
||||
</developer>
|
||||
|
||||
<scripting>
|
||||
<razor>
|
||||
<!-- razor DynamicNode typecasting detects XML and returns DynamicXml - Root elements that won't convert to DynamicXml -->
|
||||
<notDynamicXmlDocumentElements>
|
||||
<element>p</element>
|
||||
<element>div</element>
|
||||
<element>ul</element>
|
||||
<element>span</element>
|
||||
</notDynamicXmlDocumentElements>
|
||||
<dataTypeModelStaticMappings>
|
||||
<!--
|
||||
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
<mapping documentTypeAlias="textPage" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000" documentTypeAlias="textPage" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000" documentTypeAlias="textPage">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
<mapping nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
-->
|
||||
</dataTypeModelStaticMappings>
|
||||
</razor>
|
||||
</scripting>
|
||||
|
||||
<!-- This moves the asp.net viewstate data to the end of the html document instead of having it in the beginning-->
|
||||
<viewstateMoverModule enable="false" />
|
||||
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
|
||||
<!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
|
||||
<!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
|
||||
</logging>
|
||||
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
|
||||
<!-- distributed calls make umbraco use webservices to handle cache refreshing -->
|
||||
<distributedCall enable="false">
|
||||
<!-- the id of the user who's making the calls -->
|
||||
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
|
||||
<user>0</user>
|
||||
<servers>
|
||||
<!-- add ip number or hostname, make sure that it can be reached from all servers -->
|
||||
<!-- <server>127.0.0.1</server>-->
|
||||
</servers>
|
||||
</distributedCall>
|
||||
|
||||
<!-- configuration for webservices -->
|
||||
<!-- webservices are disabled by default. Set enable="True" to enable them -->
|
||||
<webservices enabled="False">
|
||||
<!-- You must set user-rights for each service. Enter the usernames seperated with comma (,) -->
|
||||
<documentServiceUsers>your-username</documentServiceUsers>
|
||||
<fileServiceUsers>your-username</fileServiceUsers>
|
||||
<stylesheetServiceUsers>your-username</stylesheetServiceUsers>
|
||||
<memberServiceUsers>your-username</memberServiceUsers>
|
||||
<templateServiceUsers>your-username</templateServiceUsers>
|
||||
<!-- type of files (extensions) that are allowed for the file service -->
|
||||
<fileServiceFolders>css,xslt</fileServiceFolders>
|
||||
</webservices>
|
||||
|
||||
<!-- Configuration for repositories -->
|
||||
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
|
||||
<repositories>
|
||||
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
|
||||
</repositories>
|
||||
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
|
||||
</settings>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<zipUpload>
|
||||
<fileNodeTypeId>1033</fileNodeTypeId>
|
||||
<imageNodeTypeId>1032</imageNodeTypeId>
|
||||
<folderNodeTypeId>1031</folderNodeTypeId>
|
||||
<imageFileExtensions>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileExtensions>
|
||||
</zipUpload>
|
||||