Compare commits
1112 Commits
Release-4.5.2
...
4.7.2
| Author | SHA1 | Date | |
|---|---|---|---|
| f1bdde9067 | |||
| 163be2aad2 | |||
| c6891dd971 | |||
| 82a8383df3 | |||
| dbaa4912b7 | |||
| a016a661d7 | |||
| 562f533172 | |||
| 57985cd0b2 | |||
| 2eebc84f2f | |||
| 2b9e798c35 | |||
| 3e38b57496 | |||
| 7ddecca574 | |||
| 90338093ba | |||
| fc887b95f1 | |||
| 01d8198579 | |||
| 7b6c711239 | |||
| 980c2d4a7f | |||
| 686e0116d8 | |||
| b96a5a3bd9 | |||
| 6a3e1819aa | |||
| 72da68c08c | |||
| 2e916e252c | |||
| 6f5f7a7be5 | |||
| e09c531404 | |||
| 7b157c5083 | |||
| e6f0c2a17c | |||
| 6eae64eaf3 | |||
| 9f15137832 | |||
| 7e714b1a40 | |||
| 140cf8ec2f | |||
| ad4e5e841d | |||
| 39f3c377be | |||
| c9160dfdda | |||
| eb19283673 | |||
| ea0ffc8ea5 | |||
| b0f0777952 | |||
| 6ecedd51bb | |||
| deb8e46df8 | |||
| fde12a532c | |||
| d6fd2304f1 | |||
| 5aa76b1859 | |||
| e731fb5b03 | |||
| b34b395d9f | |||
| 3b0f2804fd | |||
| aec48c7df9 | |||
| d6341e73b6 | |||
| 82d1a980f7 | |||
| 6fafe1ede1 | |||
| 46e44fd5d1 | |||
| d0e1a23274 | |||
| de378a7bcb | |||
| 2ee63d5790 | |||
| a2b3f62aba | |||
| 0af3ae40db | |||
| 5ee80bc9cc | |||
| 1452b869a8 | |||
| 19eebba8cc | |||
| 95e985b96d | |||
| 62cf50ba8d | |||
| 9da185f330 | |||
| ad0c67365f | |||
| 79f4925faf | |||
| a0a2037813 | |||
| 3baaa9173e | |||
| 49877c4874 | |||
| c7e1350abd | |||
| 0851c04646 | |||
| 407f78c84b | |||
| 293007b8f0 | |||
| 5d0a9e63e2 | |||
| 07a384d4f8 | |||
| 7b1bb810d3 | |||
| 300a31d6b0 | |||
| ac8e9828e9 | |||
| 12c6124714 | |||
| b18612390a | |||
| b7caa18309 | |||
| 10529d9a9a | |||
| 84628a991e | |||
| a7d8d3c6c2 | |||
| 4221d8a53f | |||
| 0eba71171b | |||
| 0c9edb5fbc | |||
| 5aa8868248 | |||
| feeba931bc | |||
| 82c0ac805c | |||
| 1ffbbb257d | |||
| d1d96c6d58 | |||
| bf59d1fca8 | |||
| 2d10702238 | |||
| 132f6405ed | |||
| 2f784920a9 | |||
| 017075d4f6 | |||
| 8dcc8251f5 | |||
| 62249b989b | |||
| 238885746c | |||
| 40495005ac | |||
| 1eb0d3581b | |||
| 8a43220657 | |||
| eb3cb32965 | |||
| 910af5ea99 | |||
| 3522d68755 | |||
| c32e813210 | |||
| cffed78df3 | |||
| 6da379d36d | |||
| f15903a846 | |||
| c315cfbbcd | |||
| ee63128ac2 | |||
| e4cf319f46 | |||
| 4c2ffb00f9 | |||
| c1fa3bfb23 | |||
| b083cb8837 | |||
| 6bd344834c | |||
| 9760ad29c8 | |||
| b5dddc5e7c | |||
| 7cdb0b48de | |||
| caad0e25d1 | |||
| e87205c1fa | |||
| 95d53d66f3 | |||
| ac7f7d97c4 | |||
| 88316b05c4 | |||
| 8b87f0fd46 | |||
| 39706538f9 | |||
| cd3c44ae7c | |||
| 3cc136a15c | |||
| e2a60d55ff | |||
| c097b0f250 | |||
| 1c8579123d | |||
| 9ad129baad | |||
| cc73179b2b | |||
| 4ad18c1d7b | |||
| 51c76dfcd4 | |||
| 265fc0b3ca | |||
| 2e4117d691 | |||
| 124da8781b | |||
| 7edac5756d | |||
| b73a579a94 | |||
| fdbe788d9b | |||
| 9a7d75e1f3 | |||
| c095148dbe | |||
| 5f8da87c23 | |||
| 2db1dfe7fb | |||
| 97180ded7d | |||
| f2243c9d22 | |||
| e7271ad79b | |||
| 273ebf49df | |||
| 656095caee | |||
| 9925c95d2c | |||
| 4d3c145be9 | |||
| 2ba2c0fd61 | |||
| 96cbe17ea9 | |||
| 0efabf6fe4 | |||
| 0ff6775e55 | |||
| c657236f7c | |||
| b023455068 | |||
| f361e20482 | |||
| fc770dd50f | |||
| b6629c9f65 | |||
| 918d5bc720 | |||
| 46253212da | |||
| 5fb5019529 | |||
| 647882af15 | |||
| 96a8b190a4 | |||
| 860a33d9b3 | |||
| 3cfe526d9d | |||
| 0d65c29ffd | |||
| 47e4239bbc | |||
| ba96212505 | |||
| 5363a328a0 | |||
| 5843b5deaf | |||
| e2e0186174 | |||
| 7d3cfa4151 | |||
| adc3a36ac2 | |||
| 9d996aaf43 | |||
| 13e5e5a8df | |||
| 2ea3c4b624 | |||
| d022b4a52a | |||
| 3a7609cba0 | |||
| 4cbd06dad9 | |||
| e72bd130e3 | |||
| c354acb388 | |||
| d0fc01751c | |||
| 30cc6148e7 | |||
| 082d680a36 | |||
| 23ab698665 | |||
| f9f67d4e2e | |||
| 98a1189353 | |||
| d8eb584d7a | |||
| 738380e32a | |||
| 57edbcae25 | |||
| 0f84165b2b | |||
| ff02f5a336 | |||
| b7446be08a | |||
| 5c57c192c9 | |||
| a03b9932ff | |||
| ae3357de0d | |||
| 821188a254 | |||
| 31169380f8 | |||
| 3737a8cf28 | |||
| ba965a95e9 | |||
| 80e6187436 | |||
| 6dcf1fcd8e | |||
| 1a0c9c3e9f | |||
| f6ab67ea78 | |||
| e8a941fc1f | |||
| c1ff80c52d | |||
| f6eb9c77a9 | |||
| f20931cfa4 | |||
| ff5bf40905 | |||
| a66847587c | |||
| d9dc90090b | |||
| 892a382eca | |||
| 17f6ee1c91 | |||
| 48c11f6b45 | |||
| da3364c065 | |||
| e196b4ec13 | |||
| 0dff9c5dfa | |||
| 93be92442c | |||
| e57c49a3f1 | |||
| 89b89655e4 | |||
| 1c26ddd87f | |||
| 304e7976bc | |||
| d5e3ceecec | |||
| d81aed3dc5 | |||
| cfcae904ba | |||
| 8ab1c11bd1 | |||
| 41d3c9f3d9 | |||
| 1164ea3ab1 | |||
| 75d15cdc31 | |||
| 49a0c8a11a | |||
| 8435067e98 | |||
| eff692249d | |||
| 0589d34abd | |||
| 9b4a08950c | |||
| c7c496cadf | |||
| 5988ff5da8 | |||
| cce3cdc18b | |||
| 0475b48a8c | |||
| 56e9cdb045 | |||
| ba8d8f8787 | |||
| a747e4dddc | |||
| 0b47da8d41 | |||
| dc32f500ae | |||
| f1ee827ece | |||
| b59b5052ba | |||
| c63b58612d | |||
| 7209d68028 | |||
| d0d48f18ff | |||
| c5906c0c79 | |||
| 754210456c | |||
| 00141ba801 | |||
| 315003c16f | |||
| 28652815ae | |||
| 3480a5d957 | |||
| 82547abe40 | |||
| 6a1aa9a8e6 | |||
| cdc4c86325 | |||
| 940239f1f2 | |||
| d4ed1efcf5 | |||
| 27aebac7e0 | |||
| 86c9e8bde0 | |||
| 9a1cfafb74 | |||
| 97a9d11cba | |||
| ee57f4c449 | |||
| 2c22bea92f | |||
| 8112f240be | |||
| 0a04252780 | |||
| 74617e4368 | |||
| 4eca6e7fbf | |||
| 288bbe7b91 | |||
| d2ddd9a284 | |||
| fbe150c1ce | |||
| 918cdcdffb | |||
| b79586b4d7 | |||
| 8279e4d471 | |||
| 60892f9909 | |||
| 0cc7799797 | |||
| 019141c042 | |||
| 942a3c3d72 | |||
| f3bedcd707 | |||
| 11b64ccd0d | |||
| 1a6db0ad8e | |||
| 90e1d97ad7 | |||
| 1f6cc18ba4 | |||
| 23145b9981 | |||
| ce4763a956 | |||
| e2bbccdf6f | |||
| 0ea4e2f891 | |||
| b367f63c1d | |||
| c6dd41c36a | |||
| f2d8363556 | |||
| 9c2a9f81f4 | |||
| d63ae05693 | |||
| d727d67ad5 | |||
| 40099d9d22 | |||
| cd13f8de55 | |||
| 6a0dfc2c11 | |||
| e99669d3ae | |||
| ad3d064acb | |||
| bef5f59c26 | |||
| b6c6022272 | |||
| 157e96c935 | |||
| 0661842dea | |||
| 96715d8ef3 | |||
| 2fa56aaca9 | |||
| 013367c8b7 | |||
| 46683c78a9 | |||
| 7540e696cb | |||
| 6c5941196f | |||
| badad9a1c3 | |||
| 8f8b00fee9 | |||
| f1196aa088 | |||
| 7b66d80f5c | |||
| 8348d551f7 | |||
| ff56d5ed22 | |||
| 8d0a227629 | |||
| f8c6e59121 | |||
| 84c6913162 | |||
| 35099746be | |||
| 6c83107f24 | |||
| ae18fcda1a | |||
| 47bd9180dc | |||
| 1d86530879 | |||
| c2eea73b98 | |||
| 734f029679 | |||
| 2fad45f972 | |||
| 5c6e8526da | |||
| 3c52ac851f | |||
| 5bcf591a72 | |||
| 10672f02a1 | |||
| ddf97c30d1 | |||
| 9a56886f1d | |||
| b198edeeaa | |||
| 76f83ddda0 | |||
| 23aa9e60fe | |||
| 3d396d2b63 | |||
| 93d65ced40 | |||
| a079136665 | |||
| 77e8c6dfe2 | |||
| d2b266824b | |||
| 5a6313182e | |||
| 252a3061eb | |||
| 24cabcdad3 | |||
| 0ba61139f2 | |||
| e3d1e3b48c | |||
| 8833034a35 | |||
| 58294a6be9 | |||
| fc2eaecb33 | |||
| cd38cb1412 | |||
| 1b060dfdbf | |||
| 1a2bba4b2b | |||
| 44bfcaf373 | |||
| 073053aa33 | |||
| b624d7479a | |||
| 5b353d7b4c | |||
| 3f3c4a78d7 | |||
| a5e2d1e107 | |||
| b189b70214 | |||
| 1716b94449 | |||
| f5a7001859 | |||
| 111dee7187 | |||
| df04d6ce22 | |||
| 5fdfc0d1f8 | |||
| ddcf34b80c | |||
| a02aca0f62 | |||
| d7e83cb1ee | |||
| fa5b85557f | |||
| 042e373b6a | |||
| 150d4648c1 | |||
| 017ed3635a | |||
| 9949420c6d | |||
| 9b74eee10c | |||
| bc8f21f92d | |||
| 1bf6604da9 | |||
| 5c8eec28c2 | |||
| c7e1c439ff | |||
| 8d19cf6925 | |||
| b52e347396 | |||
| c12e2e8e77 | |||
| 18ec3850da | |||
| 5ca7822262 | |||
| 634aaf757f | |||
| 1e8bf4ff83 | |||
| dec48c7442 | |||
| b566324e7a | |||
| bd09b21bb8 | |||
| 45ee50ed0f | |||
| ea30785baf | |||
| 7edd9e92e5 | |||
| cd170a18ab | |||
| 90539868f3 | |||
| 1121c7ca79 | |||
| 3d8144c617 | |||
| 914ccf873a | |||
| 8666742004 | |||
| f91013618f | |||
| 3239ae8adb | |||
| e8093526d0 | |||
| 905a55a5ee | |||
| 931aef0265 | |||
| 23605b5a4b | |||
| 7422b2a712 | |||
| 9ac64f2668 | |||
| 5a5aafd610 | |||
| c4272eecf3 | |||
| e86d5f79c1 | |||
| 3904f7799e | |||
| fcf92188e9 | |||
| 25dfb4a2da | |||
| 31eb415b72 | |||
| bf3edcf36a | |||
| ff802ebef4 | |||
| ff678dd856 | |||
| 8271892411 | |||
| d6befbd83c | |||
| 4b70a5f56e | |||
| df9a18fb45 | |||
| 4f496ef5da | |||
| aaa90bea14 | |||
| 41d344d481 | |||
| 6be3b5d93b | |||
| bcb399f768 | |||
| 59e41e3912 | |||
| 468f688f20 | |||
| 3f74ee4ab5 | |||
| 60c18bdff9 | |||
| 300da7f04a | |||
| d324ee90a7 | |||
| 5fd694cca9 | |||
| 5491569b8c | |||
| f1b904ecc4 | |||
| 50f9170935 | |||
| dbc8a07628 | |||
| 6519055d21 | |||
| 38bbe32f16 | |||
| 4edc96af7d | |||
| e3f42ef388 | |||
| bba0fcfd5f | |||
| 7ca429cb61 | |||
| 9707a61303 | |||
| 6b2858d552 | |||
| c03ee2cecd | |||
| 38c60c69bf | |||
| 6bc277b4f2 | |||
| 1dae998eaf | |||
| 78a3d02b89 | |||
| 9729ad4d31 | |||
| 11da35ae5f | |||
| cbe94ae6aa | |||
| f58c453334 | |||
| 0202526acc | |||
| cfb21237c0 | |||
| 1f05d43047 | |||
| 6bc71000af | |||
| a32e8894cd | |||
| 6d615e6762 | |||
| b1ff0db8fe | |||
| 3961787463 | |||
| 9b45a81f22 | |||
| 0e9fc4a84b | |||
| 78aaa85765 | |||
| 71c5e35443 | |||
| 603a12c5a0 | |||
| 78ae4132eb | |||
| 9a4f44e73d | |||
| 11d09a6796 | |||
| 8d064c89f7 | |||
| 6936a1db5a | |||
| 007bab36cc | |||
| ccf832fec5 | |||
| 4fcc62f04a | |||
| c09b5102af | |||
| 49c4ce45cb | |||
| 126c62dee5 | |||
| 20bff9acd4 | |||
| c2ff9019cf | |||
| ff3a776617 | |||
| 76bb93fa23 | |||
| 4225ac9d8a | |||
| 6e58c622cd | |||
| ceb8c9d896 | |||
| 5eb20a1101 | |||
| 9196c039d1 | |||
| d54b2416f0 | |||
| 7be3314a11 | |||
| c2acb33933 | |||
| 5ca12fb99f | |||
| b2db75bcb2 | |||
| e2cee9e99d | |||
| 526bc454a5 | |||
| fef629181f | |||
| 33741210b3 | |||
| 970903eb2a | |||
| 9d5c127c14 | |||
| 0071bfbb13 | |||
| 69ccf5a138 | |||
| 4866bcafb8 | |||
| 64914da779 | |||
| 16f78d0f4c | |||
| fa008b3679 | |||
| 03441fab21 | |||
| 3e56fe947a | |||
| 9410d34485 | |||
| 6b431eb000 | |||
| 84d7999f32 | |||
| db89bbc676 | |||
| 344c36a84a | |||
| 868e1bdb42 | |||
| fa5e5de818 | |||
| 0c5acf544e | |||
| 627fbcdd15 | |||
| f64e902bf8 | |||
| b5c78d397d | |||
| fe514e15ea | |||
| 32887c23e5 | |||
| 7df518155d | |||
| 90f5c4ce9a | |||
| cc23fdbd8e | |||
| 3a30c285fe | |||
| d9f420d45a | |||
| 300c975284 | |||
| f8b5e5e89d | |||
| d57bc67121 | |||
| 71aa8a20af | |||
| ef50f7d38c | |||
| 2e6341b945 | |||
| e277e4cadb | |||
| 35cfee3f85 | |||
| 3a76e9caae | |||
| 2def8a520a | |||
| 45fefda660 | |||
| 8dac6662a5 | |||
| 68ce71685d | |||
| ce83c8a1b9 | |||
| 3d5ed109af | |||
| fa4483f08c | |||
| 8a1c8475b8 | |||
| 7f57fde279 | |||
| b20d1bfd4c | |||
| 070a03e827 | |||
| 313d67ed94 | |||
| e7ebcb29bc | |||
| e5c3c8869a | |||
| 878f6fc812 | |||
| 6d0be45acf | |||
| 649a98daf4 | |||
| bcf735f4f8 | |||
| ba3c7fd680 | |||
| 043f0e03b2 | |||
| 03f8aac4e5 | |||
| eba7c9d550 | |||
| 5a5ccfea98 | |||
| 799d718881 | |||
| 0b5ce63c3a | |||
| 39a34954ce | |||
| 83d88e70a5 | |||
| d165b75456 | |||
| e07dfd49a1 | |||
| 2b11cab075 | |||
| a5527769f3 | |||
| 4b8cc30c3f | |||
| 5cc819407c | |||
| 26bf18766b | |||
| 28d5a81403 | |||
| c692b296d7 | |||
| a0dd8aa2ab | |||
| 6382241e4c | |||
| 3ab4944e5e | |||
| 28b48b187a | |||
| fce7ea48b0 | |||
| fbf13d8cf7 | |||
| 00dc8e0356 | |||
| dca21f9ce1 | |||
| 48c635e452 | |||
| 69a1e7000c | |||
| 1c02059509 | |||
| 7631522a9e | |||
| c1f96000b4 | |||
| 873871b6c2 | |||
| 6650394bf9 | |||
| 9259dd897f | |||
| 934c48cac6 | |||
| 5b99b1e803 | |||
| 4a144ea6da | |||
| 991fb6236d | |||
| 05459b12c9 | |||
| 966c792c8b | |||
| 320382a143 | |||
| 2d856cf664 | |||
| 1cf475e120 | |||
| afe872c28e | |||
| cd50056154 | |||
| c2caf8ba91 | |||
| ec7619510a | |||
| 5859cc9867 | |||
| 6e157581ca | |||
| 10bf3511fc | |||
| 6922f1d0d3 | |||
| 8511c2b5c8 | |||
| 7beffb2305 | |||
| f51f5354f1 | |||
| b67f3a9c8e | |||
| 27ec2d16f1 | |||
| 17efba1242 | |||
| 17c3699612 | |||
| 0b4d7902b8 | |||
| 8ada4a4e1e | |||
| e837c3c841 | |||
| af79bb24e5 | |||
| 26e6305e9c | |||
| 5790ff26fd | |||
| 542b892dd5 | |||
| 4af6ea2b3c | |||
| b82a251bb8 | |||
| 582b5797dc | |||
| edc930241b | |||
| f08ca0f014 | |||
| 415f6f38b1 | |||
| 3b7c8d73de | |||
| bae04cd27e | |||
| 447582b018 | |||
| 2af1812b01 | |||
| d8c98ccfd8 | |||
| f4b4c03a9c | |||
| 580b670f33 | |||
| b450b04ee6 | |||
| 9ca7e02e69 | |||
| 7144ff46e7 | |||
| 3b07515730 | |||
| 6f00df4c85 | |||
| 791b31bc3a | |||
| 7c87b09e97 | |||
| 3ae4511532 | |||
| 2fd905edb9 | |||
| db10f1ed26 | |||
| a9dd0a7e65 | |||
| d031e1da91 | |||
| 74f80e2ba5 | |||
| bbfc881a9e | |||
| 018c5050b9 | |||
| 96f2ded0aa | |||
| f0883b0994 | |||
| 571f89bbe3 | |||
| 8e4deca486 | |||
| 5650c6427a | |||
| 7b2750f503 | |||
| 7c7004c73e | |||
| ed2d771d32 | |||
| 300de8c4ab | |||
| e777a97cb6 | |||
| c72f15d1ba | |||
| 7ce70cc09f | |||
| 35bc0cce0d | |||
| 449418c648 | |||
| e67a114a70 | |||
| 461234ad3f | |||
| 6a0e15e8f1 | |||
| 7f82a46f56 | |||
| 9449ab1ed0 | |||
| c1cd915f7d | |||
| 0dbd27f21c | |||
| fec91ebd75 | |||
| 335c7a4333 | |||
| 648ac811e8 | |||
| f6475b3812 | |||
| ef5cb3dd4c | |||
| 4c76081568 | |||
| 0889e9c033 | |||
| 700aa48a2e | |||
| 43ccf77d7e | |||
| 24d5eefe38 | |||
| 551bcdde2f | |||
| 6f1776fb69 | |||
| 33618f9c2a | |||
| ff39e069db | |||
| a2357bad85 | |||
| 3d02429285 | |||
| cef7401ff8 | |||
| 8fb62265b7 | |||
| 62db053500 | |||
| 0edf5a5e5e | |||
| dc1be04202 | |||
| 5c70ba1eb8 | |||
| 38b1385b66 | |||
| b9849a2ded | |||
| 792450328d | |||
| babf5dabe2 | |||
| 1e3eaf8094 | |||
| fec878227e | |||
| a1abd9dd18 | |||
| 44e01c09d6 | |||
| 6eb738e0d3 | |||
| c50d2e994e | |||
| 058b195a12 | |||
| bff788f048 | |||
| cc96e01b4c | |||
| b57b18c0b1 | |||
| 631eb1fecb | |||
| 564fa2659b | |||
| 2177686e43 | |||
| 36e0b28e70 | |||
| 4ac3a5537e | |||
| 51977637b7 | |||
| ee4477f6ab | |||
| 8baa2db7e7 | |||
| 5d3aeee02f | |||
| 6da0a00e06 | |||
| 7d69bed9c9 | |||
| d182a297b8 | |||
| aa3b8fb808 | |||
| 73e552d105 | |||
| 8f2f81b558 | |||
| 48ff65e597 | |||
| 58874238cc | |||
| 8062df53f8 | |||
| 9df031c6fd | |||
| b17e54976f | |||
| 28479e5257 | |||
| fb90e44dad | |||
| 76fc41f14e | |||
| 60a3d581ab | |||
| c4385335a1 | |||
| 2f90f76348 | |||
| 873ee6a7d1 | |||
| fa54d0a1e8 | |||
| 413fe775d1 | |||
| dd1119bcad | |||
| 9efc931b92 | |||
| 09a785537e | |||
| d851afd8e2 | |||
| e883a22093 | |||
| 7dea3b872f | |||
| 6795f700d5 | |||
| 682104a1f1 | |||
| d29eb77383 | |||
| 07804c149b | |||
| b89257b96c | |||
| 288ae8826c | |||
| d00e9c502a | |||
| f4c976e600 | |||
| 83322a1916 | |||
| 8a9a625964 | |||
| b0dcfec61e | |||
| 13d93de517 | |||
| 0a39ee90c2 | |||
| b8b39ae890 | |||
| feff4a5713 | |||
| d3df402d4a | |||
| 87d96f389d | |||
| fc23004a1b | |||
| 4ec0aaab24 | |||
| cbf9a2e7e0 | |||
| 6bf2b10231 | |||
| 792aff0f1a | |||
| 2bbf3c8af2 | |||
| c239578bd8 | |||
| 0c3f57f537 | |||
| 6b423f5082 | |||
| cbea0ad4e7 | |||
| f18fe684cd | |||
| 4795bb9f43 | |||
| 63d5615698 | |||
| 216ab8c966 | |||
| e5f734acf3 | |||
| 3646f8af4b | |||
| 8d16887ba9 | |||
| fb7f28e00d | |||
| 057ab8cd15 | |||
| 9203fb6fed | |||
| 389454868d | |||
| 25daf42363 | |||
| 7b91c3beab | |||
| a36cda81e3 | |||
| aa5f57432d | |||
| 386f008dd7 | |||
| 34e0b10633 | |||
| 4f5d4c05c1 | |||
| 0e6bb6fb10 | |||
| 93f934b0c1 | |||
| 8c7636558b | |||
| 7d4430855f | |||
| abacb50ee8 | |||
| 0b1c8e39e6 | |||
| b0a46e6a06 | |||
| f27c625439 | |||
| d027fdb3d0 | |||
| 4a40b1046e | |||
| 10c9c14037 | |||
| f29a93422e | |||
| 2c3c6ce391 | |||
| 5105a2c9ef | |||
| 6a92a2f321 | |||
| 4578054f1b | |||
| 1d26a0353b | |||
| b375ddf1f8 | |||
| df2cfec816 | |||
| 89182fc3a9 | |||
| bf73588b6e | |||
| e29fe682b7 | |||
| c9c7eed6d9 | |||
| 9b56b76ad4 | |||
| 94722e82dd | |||
| a03fe234e8 | |||
| 5e83d590f9 | |||
| ddbbf5e799 | |||
| 6e51d690ce | |||
| 6a69202f5e | |||
| 06f6111876 | |||
| 0d91a841ff | |||
| 47e9aa6088 | |||
| 7c7df808b4 | |||
| 34eea0742b | |||
| 78c97971aa | |||
| 4f37fb0c00 | |||
| 60ca487ea3 | |||
| 777a857b6b | |||
| 712571fc38 | |||
| 1c08fc0351 | |||
| e765df10fe | |||
| 84d88161fa | |||
| accb94c415 | |||
| 4c0852c0e8 | |||
| e21057e9c8 | |||
| 03de5ca711 | |||
| 99d0b8c37e | |||
| cfa1143eed | |||
| f65bd2b9e3 | |||
| 8fa3ff08b3 | |||
| a2b6626f29 | |||
| 5ba0bb281c | |||
| 38c5a9dcf6 | |||
| badf9784c6 | |||
| 119c1f8eb3 | |||
| 326abb482e | |||
| 23bbc1f785 | |||
| f700525220 | |||
| a9f22c92c8 | |||
| 41497919d1 | |||
| eb131c3f3b | |||
| c5667818e2 | |||
| b2902c18e9 | |||
| 91b4e00ddd | |||
| a345d8c2f1 | |||
| 08a024273b | |||
| c8b81701b9 | |||
| 11c2ff2ec9 | |||
| 0a02e0c90c | |||
| 9e89e158ae | |||
| dabafcc972 | |||
| 2a252dafa4 | |||
| a7b0695ced | |||
| e0c3ed98a5 | |||
| d1fd368fdd | |||
| 41c3db56a0 | |||
| 7e7ca233c0 | |||
| dcfa5662e6 | |||
| 09a371e525 | |||
| 74b134842c | |||
| b77f6496b1 | |||
| 94c1cf0681 | |||
| 9dfe873de0 | |||
| 290e3338f7 | |||
| 90450428c7 | |||
| 934fe90e68 | |||
| 724dc74e8b | |||
| 6b81546606 | |||
| a6ed629fe6 | |||
| 3253310743 | |||
| d172ed2761 | |||
| 071d10445d | |||
| cc29cc8067 | |||
| bbfdfdc372 | |||
| bc6cc2ac00 | |||
| 190419393e | |||
| c9afa582b8 | |||
| 2a96b993e4 | |||
| 6b7697b259 | |||
| cca1a275f0 | |||
| aa3f7b0def | |||
| 75e3c9c8b2 | |||
| 7caa7aea88 | |||
| 75d62d6eae | |||
| 185e5163d4 | |||
| 3fc13e3a12 | |||
| ce3851828c | |||
| 28c9f0c4f6 | |||
| 460e385a07 | |||
| 1d182bdc41 | |||
| aafbb3bfb0 | |||
| 63011b2611 | |||
| b3881002de | |||
| de0fba669a | |||
| 37e2f4bbd8 | |||
| 68dcf4d521 | |||
| df3aef381d | |||
| de049a81bf | |||
| 0cd73c3273 | |||
| abb97482fe | |||
| 864a9ac94a | |||
| d726348bef | |||
| ad205fc928 | |||
| bed8310f7e | |||
| 172f0a53ce | |||
| 931bc4e9bb | |||
| b3b80399d0 | |||
| fbdad77bac | |||
| 730ded46a6 | |||
| 8d3d2fff28 | |||
| c59c66bc33 | |||
| ccd89bef07 | |||
| 9d985b11ba | |||
| 3f68d19ce0 | |||
| af57cc12e4 | |||
| c4e5bae76e | |||
| 64b43ce189 | |||
| 15d0cf2f89 | |||
| 802b33da94 | |||
| 8cdfec1cc0 | |||
| 97897c3062 | |||
| b180f1614f | |||
| 1fdbfff8fe | |||
| a21cbe6512 | |||
| 97e55544a0 | |||
| ea4038f16a | |||
| edc7bb000c | |||
| d17393bcd1 | |||
| 0f457e9874 | |||
| 1d7d959a80 | |||
| 4c52b7e97b | |||
| 252a6f06f8 | |||
| 9adff7e4a9 | |||
| 4d76c17b02 | |||
| 7f565e8df4 | |||
| 79f6f2a2a4 | |||
| 7d65e881c2 | |||
| 793fff9154 | |||
| d98a8543b0 | |||
| c9527ebf8f | |||
| e496f7076d | |||
| d9896f43c6 | |||
| 5b6e34b4da | |||
| 948fb920b7 | |||
| 1bad5aeafe | |||
| 33b7ade10d | |||
| 63dfc251c4 | |||
| 6a185bdc85 | |||
| 3861ecf41d | |||
| 174bc41560 | |||
| bd045838df | |||
| 469c248db5 | |||
| 34dc9036bd | |||
| a61c9d2a77 | |||
| 4671e462eb | |||
| 6bfb41999f | |||
| 4df3ef191a | |||
| 4dc4698b6c | |||
| 82df347d41 | |||
| 3e70a975bb | |||
| f745aedf2a | |||
| 0f93826e17 | |||
| 0cb1877924 | |||
| 325a9e8e0a | |||
| 384b7e852f | |||
| 1ea5bc5d7c | |||
| df18581cd2 | |||
| 0c88c4b776 | |||
| 220983171d | |||
| 07d5ce913c | |||
| 072c3a67bf | |||
| d17197a2dc | |||
| 132bd824a7 | |||
| 91c5ae4204 | |||
| deab9251d3 | |||
| 66ddc8c095 | |||
| ef58e75076 | |||
| 954f8e82c9 | |||
| de0c85f40c | |||
| e94274e9e6 | |||
| 36563d7699 | |||
| 39c6aca833 | |||
| 13615ea270 | |||
| 2e6613cc56 | |||
| 0c86e352b7 | |||
| fc2ed864f5 | |||
| 64cc5eb3e7 | |||
| a71d0f58cb | |||
| ac44fc9646 | |||
| c05750ee63 | |||
| b1b605f3bd | |||
| e65448d28e | |||
| 8a0a33870b | |||
| c0942cdf6b | |||
| ded62dba58 | |||
| dca59ce159 | |||
| a23a937813 | |||
| 7161ff4146 | |||
| bab35e30d8 | |||
| e45583eed2 | |||
| d0ba157501 | |||
| f12a545cd1 | |||
| 06334d1f06 | |||
| fdbfe72fb1 | |||
| b3ea418c15 | |||
| 5b6961a297 | |||
| bc6c01f44c | |||
| 72fb76e4e0 | |||
| 6b3ef0e3bf | |||
| e9f7cc59d5 | |||
| d46eec95de | |||
| f2e207d11e | |||
| 0b3c137fd8 | |||
| 92643f641e | |||
| 46a2c183b3 | |||
| 0369bb46e6 | |||
| 111fcc4967 | |||
| c609fc69ae | |||
| b8832b3ab3 | |||
| 31115465a0 | |||
| 8ec8147b69 | |||
| ee6f92596d | |||
| 4610fc14ea | |||
| af640662bb | |||
| 440ad4a1c5 | |||
| d76bdb80a9 | |||
| f91530777f | |||
| b458eb5b97 | |||
| 4fff2f7906 | |||
| 8ade52ca07 | |||
| 88ef7df6b4 | |||
| 78f96b2556 | |||
| fad4da5eb3 | |||
| b14e2fdaf7 | |||
| bd6232861c | |||
| cd51d592e4 | |||
| 3551c59548 | |||
| 30a3b3f4d8 | |||
| 42db92ba69 | |||
| 0f01f8d588 | |||
| eb7ef0f26e | |||
| 56a2b011f6 | |||
| 06e57f5024 | |||
| 79278e4199 | |||
| 84a3e8dcc6 | |||
| a83ea36dd2 | |||
| a53de5a181 | |||
| ed543a6af4 | |||
| 9c8436d286 | |||
| fd5e6afbbf | |||
| 1ca82c5871 | |||
| d348265950 | |||
| f42ec68a3a | |||
| 5cadb1c360 | |||
| e7c8be2d51 | |||
| bb0a4eb023 | |||
| 358374ebad | |||
| 6c172e79d0 | |||
| 234840b7c4 | |||
| c51936b242 | |||
| ed9ac1d002 | |||
| 3f319b8f11 | |||
| b01a35722a | |||
| b5b66b3f4a | |||
| 3e58afbc8b | |||
| 18488563fa | |||
| e5d1d481c1 | |||
| ffa111617f | |||
| e7b2d77b98 | |||
| ad165945e3 | |||
| bab260c032 | |||
| dcd73c5207 | |||
| 3319ded749 | |||
| 437538b23f | |||
| b2d00d39ac | |||
| 59a5c6692b | |||
| e9325ec857 | |||
| c3044f41fc | |||
| a64dff4f6e | |||
| 56bfaabc7a | |||
| 092732d748 | |||
| f498c0635f | |||
| a2cbadec4e | |||
| 69e5e5d32f | |||
| a2ab040cef | |||
| f8e1994cfe | |||
| da6229be9b | |||
| 0a2517668a | |||
| 949257ca00 | |||
| 9d7065e117 | |||
| 7114de6c36 | |||
| 4ac5f26db0 | |||
| 6a4b9fb906 | |||
| 63edf72bc3 | |||
| ab54ccc918 | |||
| 5c7de15653 | |||
| 6aeffb161d | |||
| 14a177b81e | |||
| 386cd44012 | |||
| 2741d99af9 | |||
| 46a826902a | |||
| 771110c09d | |||
| cbde836c59 | |||
| 51efc8f934 | |||
| b7c9c61182 | |||
| c689870e13 | |||
| 1ee12522f4 | |||
| ffd6debefb | |||
| 6349d400d3 | |||
| 7737059326 | |||
| 3eab36a3ab | |||
| 88d06f54d3 | |||
| 541bb38285 | |||
| 54dfd6d44a |
@@ -0,0 +1,38 @@
|
||||
# use glob syntax
|
||||
syntax: glob
|
||||
|
||||
*.obj
|
||||
*.exe
|
||||
*.pdb
|
||||
*.user
|
||||
*.aps
|
||||
*.pch
|
||||
*.vspscc
|
||||
[Bb]in
|
||||
[Db]ebug*/
|
||||
obj/
|
||||
[Rr]elease*/
|
||||
_ReSharper*/
|
||||
[Tt]est[Rr]esult*
|
||||
[Bb]uild[Ll]og.*
|
||||
*.[Pp]ublish.xml
|
||||
*.suo
|
||||
[sS]ource
|
||||
[sS]andbox
|
||||
umbraco.config
|
||||
*.vs10x
|
||||
App_Data\TEMP\*
|
||||
umbraco\presentation\umbraco\plugins\*
|
||||
umbraco\presentation\usercontrols\*
|
||||
umbraco\presentation\scripts\*
|
||||
umbraco\presentation\fonts\*
|
||||
umbraco\presentation\css\*
|
||||
glob:*App_Code\*
|
||||
glob:*App_Data\*
|
||||
glob:*media\*
|
||||
glob:*masterpages\*
|
||||
glob:*macroScripts\*
|
||||
glob:*xslt\*
|
||||
|
||||
umbraco\presentation\umbraco\plugins\uComponents\uComponentsInstaller.ascx
|
||||
umbraco\presentation\packages\uComponents\MultiNodePicker\CustomTreeService.asmx
|
||||
@@ -0,0 +1,7 @@
|
||||
d0aba247db91d1b70c39c6397b965ca370a67497 Sprint-Juno-A
|
||||
0b8f67be2ca8faf008151d87f232c698de69e735 Release-4.5.0
|
||||
5960c073250926d202861a09472f5f334da6e283 Sprint-Juno-B
|
||||
f15d4ff81a8368e9d42788f7e0ae726f7a70a3b1 Release-4.0.3
|
||||
283065df4d3c27245267709dd2644a479c4f62a5 Release-4.0.4.2
|
||||
ffc34b23e1a03785e4098afa4290d8c03cf10115 Release-4.5.2
|
||||
d03fcffb8834a9583a56813bb44b6abbd9f042cc Release-4.6.0
|
||||
@@ -0,0 +1,24 @@
|
||||
Hi! Thanks for grabbing the Umbraco sourcecode.
|
||||
|
||||
===========================================
|
||||
NOTE - DEFAULT BRANCH EMPTY - December 2010
|
||||
===========================================
|
||||
|
||||
|
||||
- With the help of CodePlex we have migrated much of our previous changesets (as of Dec 13th 2010) from TFS to Mercurial.
|
||||
|
||||
- However, not everything could be migrated to our new branching workflow. So for each nominal group of 4.x changes, we've created named branches. For upcoming 5.x changesets, we'll adhere to our new workflow which we'll describe on the Wiki for contributors.
|
||||
|
||||
- FOR THE MOMENT, the 'default' branch is empty - pending the addition of the 5.0 changesets
|
||||
|
||||
- To switch to the codebase on which you want to work, 'hg update' to the named branch (e.g. "4.6.0") or tag (e.g. "Release-4.5.2") and browse or work from that point.
|
||||
|
||||
|
||||
Thanks to Matt Hawley at CodePlex for his help in our migration!
|
||||
|
||||
Cheers,
|
||||
The Umbraco Team
|
||||
|
||||
http://umbraco.org
|
||||
http://our.umbraco.org
|
||||
http://umbraco.codeplex.com
|
||||
@@ -1,221 +1,13 @@
|
||||
umbraco v3 is licensed under the open source license CPL - Common Public License (attached below). Please notice that it's only v3 that uses the CPL. The prior versions (v2.0, v2.1 and v2.1.x) uses GPL.
|
||||
Umbraco CMS version 4.5 is licensed under the OSI approved MIT License:
|
||||
|
||||
Important License Guidelines - How we see and adopt the CPL
|
||||
- You're free to choose whatever license (both open source and properary licenses) for any umbraco extensions you make as long as these are distributed alone and not bundled with umbraco.
|
||||
- umbraco may only be distributed as a whole. You may not use part of umbraco to create another stand-alone application, this could be using the UI parts to create another CMS.
|
||||
- You may not re-brand umbraco
|
||||
- If in doubt, please contact us (http://umbraco.org) before using our software for other than the original purpose. We have a commercial non-CPL license for those in doubt, wishes not to use CPL licensed software or wishes to build a new product based on parts of umbraco (see http://umbraco.org).
|
||||
Copyright (c) 2007-2010 umbraco I/S.
|
||||
|
||||
Common Public License Version 1.0
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
|
||||
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
|
||||
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
1. DEFINITIONS
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial code and
|
||||
documentation distributed under this Agreement, and
|
||||
|
||||
b) in the case of each subsequent Contributor:
|
||||
|
||||
i) changes to the Program, and
|
||||
|
||||
ii) additions to the Program;
|
||||
|
||||
where such changes and/or additions to the Program originate from and are
|
||||
distributed by that particular Contributor. A Contribution 'originates' from a
|
||||
Contributor if it was added to the Program by such Contributor itself or anyone
|
||||
acting on such Contributor's behalf. Contributions do not include additions to
|
||||
the Program which: (i) are separate modules of software distributed in
|
||||
conjunction with the Program under their own license agreement, and (ii) are not
|
||||
derivative works of the Program.
|
||||
|
||||
"Contributor" means any person or entity that distributes the Program.
|
||||
|
||||
"Licensed Patents " mean patent claims licensable by a Contributor which are
|
||||
necessarily infringed by the use or sale of its Contribution alone or when
|
||||
combined with the Program.
|
||||
|
||||
"Program" means the Contributions distributed in accordance with this Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement,
|
||||
including all Contributors.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
a) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide, royalty-free copyright license to
|
||||
reproduce, prepare derivative works of, publicly display, publicly perform,
|
||||
distribute and sublicense the Contribution of such Contributor, if any, and such
|
||||
derivative works, in source code and object code form.
|
||||
|
||||
b) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
|
||||
Patents to make, use, sell, offer to sell, import and otherwise transfer the
|
||||
Contribution of such Contributor, if any, in source code and object code form.
|
||||
This patent license shall apply to the combination of the Contribution and the
|
||||
Program if, at the time the Contribution is added by the Contributor, such
|
||||
addition of the Contribution causes such combination to be covered by the
|
||||
Licensed Patents. The patent license shall not apply to any other combinations
|
||||
which include the Contribution. No hardware per se is licensed hereunder.
|
||||
|
||||
c) Recipient understands that although each Contributor grants the licenses
|
||||
to its Contributions set forth herein, no assurances are provided by any
|
||||
Contributor that the Program does not infringe the patent or other intellectual
|
||||
property rights of any other entity. Each Contributor disclaims any liability to
|
||||
Recipient for claims brought by any other entity based on infringement of
|
||||
intellectual property rights or otherwise. As a condition to exercising the
|
||||
rights and licenses granted hereunder, each Recipient hereby assumes sole
|
||||
responsibility to secure any other intellectual property rights needed, if any.
|
||||
For example, if a third party patent license is required to allow Recipient to
|
||||
distribute the Program, it is Recipient's responsibility to acquire that license
|
||||
before distributing the Program.
|
||||
|
||||
d) Each Contributor represents that to its knowledge it has sufficient
|
||||
copyright rights in its Contribution, if any, to grant the copyright license set
|
||||
forth in this Agreement.
|
||||
|
||||
3. REQUIREMENTS
|
||||
|
||||
A Contributor may choose to distribute the Program in object code form under its
|
||||
own license agreement, provided that:
|
||||
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
|
||||
b) its license agreement:
|
||||
|
||||
i) effectively disclaims on behalf of all Contributors all warranties and
|
||||
conditions, express and implied, including warranties or conditions of title and
|
||||
non-infringement, and implied warranties or conditions of merchantability and
|
||||
fitness for a particular purpose;
|
||||
|
||||
ii) effectively excludes on behalf of all Contributors all liability for
|
||||
damages, including direct, indirect, special, incidental and consequential
|
||||
damages, such as lost profits;
|
||||
|
||||
iii) states that any provisions which differ from this Agreement are offered
|
||||
by that Contributor alone and not by any other party; and
|
||||
|
||||
iv) states that source code for the Program is available from such
|
||||
Contributor, and informs licensees how to obtain it in a reasonable manner on or
|
||||
through a medium customarily used for software exchange.
|
||||
|
||||
When the Program is made available in source code form:
|
||||
|
||||
a) it must be made available under this Agreement; and
|
||||
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
|
||||
Contributors may not remove or alter any copyright notices contained within the
|
||||
Program.
|
||||
|
||||
Each Contributor must identify itself as the originator of its Contribution, if
|
||||
any, in a manner that reasonably allows subsequent Recipients to identify the
|
||||
originator of the Contribution.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
Commercial distributors of software may accept certain responsibilities with
|
||||
respect to end users, business partners and the like. While this license is
|
||||
intended to facilitate the commercial use of the Program, the Contributor who
|
||||
includes the Program in a commercial product offering should do so in a manner
|
||||
which does not create potential liability for other Contributors. Therefore, if
|
||||
a Contributor includes the Program in a commercial product offering, such
|
||||
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
|
||||
every other Contributor ("Indemnified Contributor") against any losses, damages
|
||||
and costs (collectively "Losses") arising from claims, lawsuits and other legal
|
||||
actions brought by a third party against the Indemnified Contributor to the
|
||||
extent caused by the acts or omissions of such Commercial Contributor in
|
||||
connection with its distribution of the Program in a commercial product
|
||||
offering. The obligations in this section do not apply to any claims or Losses
|
||||
relating to any actual or alleged intellectual property infringement. In order
|
||||
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
|
||||
Contributor in writing of such claim, and b) allow the Commercial Contributor to
|
||||
control, and cooperate with the Commercial Contributor in, the defense and any
|
||||
related settlement negotiations. The Indemnified Contributor may participate in
|
||||
any such claim at its own expense.
|
||||
|
||||
For example, a Contributor might include the Program in a commercial product
|
||||
offering, Product X. That Contributor is then a Commercial Contributor. If that
|
||||
Commercial Contributor then makes performance claims, or offers warranties
|
||||
related to Product X, those performance claims and warranties are such
|
||||
Commercial Contributor's responsibility alone. Under this section, the
|
||||
Commercial Contributor would have to defend claims against the other
|
||||
Contributors related to those performance claims and warranties, and if a court
|
||||
requires any other Contributor to pay any damages as a result, the Commercial
|
||||
Contributor must pay those damages.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
||||
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
|
||||
Recipient is solely responsible for determining the appropriateness of using and
|
||||
distributing the Program and assumes all risks associated with its exercise of
|
||||
rights under this Agreement, including but not limited to the risks and costs of
|
||||
program errors, compliance with applicable laws, damage to or loss of data,
|
||||
programs or equipment, and unavailability or interruption of operations.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
||||
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
||||
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
|
||||
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
If any provision of this Agreement is invalid or unenforceable under applicable
|
||||
law, it shall not affect the validity or enforceability of the remainder of the
|
||||
terms of this Agreement, and without further action by the parties hereto, such
|
||||
provision shall be reformed to the minimum extent necessary to make such
|
||||
provision valid and enforceable.
|
||||
|
||||
If Recipient institutes patent litigation against a Contributor with respect to
|
||||
a patent applicable to software (including a cross-claim or counterclaim in a
|
||||
lawsuit), then any patent licenses granted by that Contributor to such Recipient
|
||||
under this Agreement shall terminate as of the date such litigation is filed. In
|
||||
addition, if Recipient institutes patent litigation against any entity
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
|
||||
itself (excluding combinations of the Program with other software or hardware)
|
||||
infringes such Recipient's patent(s), then such Recipient's rights granted under
|
||||
Section 2(b) shall terminate as of the date such litigation is filed.
|
||||
|
||||
All Recipient's rights under this Agreement shall terminate if it fails to
|
||||
comply with any of the material terms or conditions of this Agreement and does
|
||||
not cure such failure in a reasonable period of time after becoming aware of
|
||||
such noncompliance. If all Recipient's rights under this Agreement terminate,
|
||||
Recipient agrees to cease use and distribution of the Program as soon as
|
||||
reasonably practicable. However, Recipient's obligations under this Agreement
|
||||
and any licenses granted by Recipient relating to the Program shall continue and
|
||||
survive.
|
||||
|
||||
Everyone is permitted to copy and distribute copies of this Agreement, but in
|
||||
order to avoid inconsistency the Agreement is copyrighted and may only be
|
||||
modified in the following manner. The Agreement Steward reserves the right to
|
||||
publish new versions (including revisions) of this Agreement from time to time.
|
||||
No one other than the Agreement Steward has the right to modify this Agreement.
|
||||
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
|
||||
as the Agreement Steward to a suitable separate entity. Each new version of the
|
||||
Agreement will be given a distinguishing version number. The Program (including
|
||||
Contributions) may always be distributed subject to the version of the Agreement
|
||||
under which it was received. In addition, after a new version of the Agreement
|
||||
is published, Contributor may elect to distribute the Program (including its
|
||||
Contributions) under the new version. Except as expressly stated in Sections
|
||||
2(a) and 2(b) above, Recipient receives no rights or licenses to the
|
||||
intellectual property of any Contributor under this Agreement, whether
|
||||
expressly, by implication, estoppel or otherwise. All rights in the Program not
|
||||
expressly granted under this Agreement are reserved.
|
||||
|
||||
This Agreement is governed by the laws of the State of New York and the
|
||||
intellectual property laws of the United States of America. No party to this
|
||||
Agreement will bring a legal action under this Agreement more than one year
|
||||
after the cause of action arose. Each party waives its rights to a jury trial in
|
||||
any resulting litigation.
|
||||
Umbraco versions prior to 4.5 were licensed under a combination of MIT and a propriatary UI license. The license history can be found here:
|
||||
http://umbraco.codeplex.com/license
|
||||
@@ -250,7 +250,7 @@ namespace umbraco.Linq.Core.Node
|
||||
|
||||
foreach (var ancestor in elements)
|
||||
{
|
||||
var alias = Casing.SafeAliasWithForcingCheck(ancestor.Name.LocalName);
|
||||
var alias = Casing.SafeAlias(ancestor.Name.LocalName);
|
||||
var t = KnownTypes[alias];
|
||||
var instaceOfT = (DocTypeBase)Activator.CreateInstance(t); //create an instance of the type and down-cast so we can use it
|
||||
this.LoadFromXml(ancestor, instaceOfT);
|
||||
@@ -276,7 +276,7 @@ namespace umbraco.Linq.Core.Node
|
||||
});
|
||||
|
||||
foreach (var type in types)
|
||||
this._knownTypes.Add(Casing.SafeAliasWithForcingCheck(type.Key), type.Value);
|
||||
this._knownTypes.Add(Casing.SafeAlias(type.Key), type.Value);
|
||||
|
||||
}
|
||||
|
||||
@@ -327,30 +327,67 @@ namespace umbraco.Linq.Core.Node
|
||||
{
|
||||
var attr = ReflectionAssistance.GetUmbracoInfoAttribute(p);
|
||||
|
||||
XElement propertyXml = xml.Element(Casing.SafeAliasWithForcingCheck(attr.Alias));
|
||||
XElement propertyXml = xml.Element(Casing.SafeAlias(attr.Alias));
|
||||
string data = null;
|
||||
//if the XML doesn't contain the property it means that the node hasn't been re-published with the property
|
||||
//so then we'll leave the data at null, otherwise let's grab it
|
||||
if (propertyXml != null)
|
||||
data = propertyXml.Value;
|
||||
//Check if the propertyXml and propertyXml.FirstNode aren't null. If they are we don't need to set the value.
|
||||
if (propertyXml != null && propertyXml.FirstNode != null)
|
||||
{
|
||||
//If the FirstNode is an XElement it means the property contains inner xml and we should return it. Otherwise just return the normal value.
|
||||
if (propertyXml.FirstNode is XElement)
|
||||
{
|
||||
var reader = propertyXml.CreateReader();
|
||||
reader.MoveToContent();
|
||||
data = reader.ReadInnerXml();
|
||||
}
|
||||
else
|
||||
{
|
||||
data = propertyXml.Value;
|
||||
}
|
||||
}
|
||||
|
||||
if (p.PropertyType.IsValueType && p.PropertyType.GetGenericArguments().Length > 0 && typeof(Nullable<>).IsAssignableFrom(p.PropertyType.GetGenericTypeDefinition()))
|
||||
{
|
||||
if (string.IsNullOrEmpty(data))
|
||||
{
|
||||
//non-mandatory structs which have no value will be null
|
||||
p.SetValue(node, null, null);
|
||||
try
|
||||
{
|
||||
p.SetValue(node, null, null);
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
throw new FormatException(
|
||||
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//non-mandatory structs which do have a value have to be cast based on the type of their Nullable<T>, found from the first (well, only) GenericArgument
|
||||
p.SetValue(node, Convert.ChangeType(data, p.PropertyType.GetGenericArguments()[0]), null);
|
||||
try
|
||||
{
|
||||
p.SetValue(node, Convert.ChangeType(data, p.PropertyType.GetGenericArguments()[0]), null);
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
throw new FormatException(
|
||||
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Address how Convert.ChangeType works in globalisation
|
||||
p.SetValue(node, Convert.ChangeType(data, p.PropertyType), null);
|
||||
try
|
||||
{
|
||||
p.SetValue(node, Convert.ChangeType(data, p.PropertyType), null);
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
throw new FormatException(
|
||||
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,16 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>umbraco.Linq.Core</RootNamespace>
|
||||
<AssemblyName>umbraco.Linq.Core</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<umbracoPresentationPath>..\..\..\..\..\umbraco\presentation\bin</umbracoPresentationPath>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -36,6 +40,7 @@
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -146,4 +151,4 @@
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>XCOPY "$(TargetPath)" "$(SolutionDir)\umbraco\presentation\bin" /Y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -0,0 +1,9 @@
|
||||
!! Umbraco - the simple, flexible and friendly ASP.NET CMS
|
||||
For the first time on the Microsoft platform a free user and developer friendly cms that makes it quick and easy to create websites - or a breeze to build complex web applications. umbraco got award-winning integration capabilities and supports your ASP.NET User and Custom Controls out of the box. It's a developers dream and your users will love it too. Used by more than 57.000 active websites including Heinz.com, Peugeot.com, NAIAS.com and Microsofts documentinteropinitiative.org website you can be sure that the technology is proven, stable and scales.
|
||||
[url:More info at http://umbraco.org|http://umbraco.org]
|
||||
|
||||
!! Forums
|
||||
We have a forum running on [url:http://our.umbraco.org]. The discussions area on CodePlex will be for discussions on developing the core, and not on Umbraco-implementations or extensions in general. For those topics, please use [url:http://our.umbraco.org].
|
||||
|
||||
!! Submitting Issues
|
||||
Another way you can contribute to Umbraco is by providing issue reports, for information on how to submit an issue report refer to our [url:online guide|http://our.umbraco.org/wiki/how-tos/submitting-bug-reports].
|
||||
@@ -4,8 +4,8 @@
|
||||
<Deployment enabled="false" />
|
||||
<Execution>
|
||||
<Hosts type="ASP.NET" skipUnhostableTests="false">
|
||||
<AspNet name="ASP.NET" executionType="WebDev" urlToTest="http://localhost:52453">
|
||||
<DevelopmentServer pathToWebSite="C:\Users\hartvig\Documents\Visual Studio 2008\Projects\Core\branches\4.1.0\umbraco\presentation" webApplicationRoot="/" />
|
||||
<AspNet name="ASP.NET" executionType="WebDev" urlToTest="http://localhost:6557">
|
||||
<DevelopmentServer pathToWebSite="C:\Users\hartvig\Documents\Visual Studio 2010\Projects\Core\umbraco\presentation" webApplicationRoot="/" />
|
||||
</AspNet>
|
||||
</Hosts>
|
||||
<TestTypeSpecific>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="umbraco" default="test" basedir=".">
|
||||
<description>Build the umbraco 4.5 Application for asp.net 3.5</description>
|
||||
<description>Build the umbraco 4.6 alpha Application for asp.net 3.5</description>
|
||||
|
||||
<property name="nant.settings.currentframework" value="net-2.0" />
|
||||
|
||||
<!-- filenames and directories, generally won't change -->
|
||||
|
||||
<property name="web.dir" value="D:\inetpub\wwwroot\v4.umbraco.org" />
|
||||
<property name="public.dir" value="D:\inetpub\wwwroot\nightlies\umbraco 4.1 for asp.net 3.5" />
|
||||
<property name="public.dir" value="D:\inetpub\wwwroot\nightlies\umbraco 4.6 for asp.net 3.5" />
|
||||
<property name="root.dir" value="${directory::get-current-directory()}" />
|
||||
<property name="source.dir" value="${root.dir}\umbraco\presentation" />
|
||||
<property name="build.dir" value="${root.dir}\build" />
|
||||
<property name="dlls.dir" value="${root.dir}\foreign dlls" />
|
||||
|
||||
<property name="build.version" value="4.1"/>
|
||||
<property name="build.version" value="4.6 Alpha"/>
|
||||
|
||||
<property name="docs.dir" value="${root.dir}\docs" />
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SqlCE4Umbraco")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("SqlCE4Umbraco")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("04436b0a-1dc6-4ee1-9d96-4c04f1a9f429")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,985 @@
|
||||
/*******************************************************************************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Umbraco database installation script for SQL Server CE 4
|
||||
|
||||
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
|
||||
|
||||
Database version: 4.1.0.0
|
||||
|
||||
Please increment this version number if ANY change is made to this script,
|
||||
so compatibility with scripts for other database systems can be verified easily.
|
||||
The first 3 digits depict the Umbraco version, the last digit is the database version.
|
||||
(e.g. version 4.0.0.3 means "Umbraco version 4.0.0, database version 3")
|
||||
|
||||
Check-in policy: only commit this script if
|
||||
* you ran the Umbraco installer completely;
|
||||
* you ran it on the targetted database system;
|
||||
* you ran the Runway and Module installations;
|
||||
* you were able to browse the Boost site;
|
||||
* you were able to open the Umbraco administration panel;
|
||||
* you have documented the code change in this script;
|
||||
* you have incremented the version number in this script.
|
||||
|
||||
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
********************************************************************************************/
|
||||
|
||||
CREATE TABLE [umbracoRelation]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[parentId] [int] NOT NULL,
|
||||
[childId] [int] NOT NULL,
|
||||
[relType] [int] NOT NULL,
|
||||
[datetime] [datetime] NOT NULL CONSTRAINT [DF_umbracoRelation_datetime] DEFAULT (getdate()),
|
||||
[comment] [nvarchar] (1000) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoRelation] ADD CONSTRAINT [PK_umbracoRelation] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [cmsDocument]
|
||||
(
|
||||
[nodeId] [int] NOT NULL,
|
||||
[published] [bit] NOT NULL,
|
||||
[documentUser] [int] NOT NULL,
|
||||
[versionId] [uniqueidentifier] NOT NULL,
|
||||
[text] [nvarchar] (255) NOT NULL,
|
||||
[releaseDate] [datetime] NULL,
|
||||
[expireDate] [datetime] NULL,
|
||||
[updateDate] [datetime] NOT NULL CONSTRAINT [DF_cmsDocument_updateDate] DEFAULT (getdate()),
|
||||
[templateId] [int] NULL,
|
||||
[alias] [nvarchar] (255) NULL ,
|
||||
[newest] [bit] NOT NULL CONSTRAINT [DF_cmsDocument_newest] DEFAULT (0)
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsDocument] ADD CONSTRAINT [PK_cmsDocument] PRIMARY KEY ([versionId])
|
||||
;
|
||||
CREATE TABLE [umbracoLog]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[userId] [int] NOT NULL,
|
||||
[NodeId] [int] NOT NULL,
|
||||
[Datestamp] [datetime] NOT NULL CONSTRAINT [DF_umbracoLog_Datestamp] DEFAULT (getdate()),
|
||||
[logHeader] [nvarchar] (50) NOT NULL,
|
||||
[logComment] [nvarchar] (1000) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoLog] ADD CONSTRAINT [PK_umbracoLog] PRIMARY KEY ([id])
|
||||
;
|
||||
|
||||
/* TABLES ARE NEVER USED, REMOVED FOR 4.1
|
||||
|
||||
CREATE TABLE [umbracoUserGroup]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[userGroupName] [nvarchar] (255) NOT NULL
|
||||
)
|
||||
;
|
||||
ALTER TABLE [umbracoUserGroup] ADD CONSTRAINT [PK_userGroup] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [umbracoUser2userGroup]
|
||||
(
|
||||
[user] [int] NOT NULL,
|
||||
[userGroup] [int] NOT NULL
|
||||
)
|
||||
;
|
||||
ALTER TABLE [umbracoUser2userGroup] ADD CONSTRAINT [PK_user2userGroup] PRIMARY KEY ([user], [userGroup])
|
||||
;
|
||||
|
||||
*/
|
||||
|
||||
CREATE TABLE [umbracoApp]
|
||||
(
|
||||
[sortOrder] [tinyint] NOT NULL CONSTRAINT [DF_app_sortOrder] DEFAULT (0),
|
||||
[appAlias] [nvarchar] (50) NOT NULL,
|
||||
[appIcon] [nvarchar] (255) NOT NULL,
|
||||
[appName] [nvarchar] (255) NOT NULL,
|
||||
[appInitWithTreeAlias] [nvarchar] (255) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoApp] ADD CONSTRAINT [PK_umbracoApp] PRIMARY KEY ([appAlias])
|
||||
;
|
||||
CREATE TABLE [cmsPropertyData]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[contentNodeId] [int] NOT NULL,
|
||||
[versionId] [uniqueidentifier] NULL,
|
||||
[propertytypeid] [int] NOT NULL,
|
||||
[dataInt] [int] NULL,
|
||||
[dataDate] [datetime] NULL,
|
||||
[dataNvarchar] [nvarchar] (500) NULL,
|
||||
[dataNtext] [ntext] NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsPropertyData] ADD CONSTRAINT [PK_cmsPropertyData] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE INDEX [IX_cmsPropertyData] ON [cmsPropertyData] ([id])
|
||||
;
|
||||
CREATE TABLE [cmsContent]
|
||||
(
|
||||
[pk] [int] NOT NULL IDENTITY(1, 1),
|
||||
[nodeId] [int] NOT NULL,
|
||||
[contentType] [int] NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsContent] ADD CONSTRAINT [PK_cmsContent] PRIMARY KEY ([pk])
|
||||
;
|
||||
CREATE TABLE [cmsContentType]
|
||||
(
|
||||
[pk] [int] NOT NULL IDENTITY(1, 1),
|
||||
[nodeId] [int] NOT NULL,
|
||||
[alias] [nvarchar] (255) NULL,
|
||||
[icon] [nvarchar] (255) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsContentType] ADD CONSTRAINT [PK_cmsContentType] PRIMARY KEY ([pk])
|
||||
;
|
||||
CREATE TABLE [cmsMacroPropertyType]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[macroPropertyTypeAlias] [nvarchar] (50) NULL,
|
||||
[macroPropertyTypeRenderAssembly] [nvarchar] (255) NULL,
|
||||
[macroPropertyTypeRenderType] [nvarchar] (255) NULL,
|
||||
[macroPropertyTypeBaseType] [nvarchar] (255) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsMacroPropertyType] ADD CONSTRAINT [PK_macroPropertyType] PRIMARY KEY ([id])
|
||||
;
|
||||
|
||||
/* TABLE IS NEVER USED, REMOVED FOR 4.1
|
||||
|
||||
CREATE TABLE [umbracoStylesheetProperty]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[stylesheetPropertyEditor] [bit] NOT NULL CONSTRAINT [DF_stylesheetProperty_stylesheetPropertyEditor] DEFAULT (0),
|
||||
[stylesheet] [int] NOT NULL,
|
||||
[stylesheetPropertyAlias] [nvarchar] (50) NULL,
|
||||
[stylesheetPropertyName] [nvarchar] (255) NULL,
|
||||
[stylesheetPropertyValue] [nvarchar] (400) NULL
|
||||
)
|
||||
;
|
||||
|
||||
ALTER TABLE [umbracoStylesheetProperty] ADD CONSTRAINT [PK_stylesheetProperty] PRIMARY KEY ([id])
|
||||
;
|
||||
|
||||
*/
|
||||
|
||||
CREATE TABLE [cmsTab]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[contenttypeNodeId] [int] NOT NULL,
|
||||
[text] [nvarchar] (255) NOT NULL,
|
||||
[sortorder] [int] NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsTab] ADD CONSTRAINT [PK_cmsTab] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [cmsTemplate]
|
||||
(
|
||||
[pk] [int] NOT NULL IDENTITY(1, 1),
|
||||
[nodeId] [int] NOT NULL,
|
||||
[master] [int] NULL,
|
||||
[alias] [nvarchar] (100) NULL,
|
||||
[design] [ntext] NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsTemplate] ADD CONSTRAINT [PK_templates] PRIMARY KEY ([pk])
|
||||
;
|
||||
CREATE TABLE [umbracoUser2app]
|
||||
(
|
||||
[user] [int] NOT NULL,
|
||||
[app] [nvarchar] (50) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoUser2app] ADD CONSTRAINT [PK_user2app] PRIMARY KEY ([user], [app])
|
||||
;
|
||||
CREATE TABLE [umbracoUserType]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[userTypeAlias] [nvarchar] (50) NULL,
|
||||
[userTypeName] [nvarchar] (255) NOT NULL,
|
||||
[userTypeDefaultPermissions] [nvarchar] (50) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoUserType] ADD CONSTRAINT [PK_userType] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [umbracoUser]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[userDisabled] [bit] NOT NULL CONSTRAINT [DF_umbracoUser_userDisabled] DEFAULT (0),
|
||||
[userNoConsole] [bit] NOT NULL CONSTRAINT [DF_umbracoUser_userNoConsole] DEFAULT (0),
|
||||
[userType] [int] NOT NULL,
|
||||
[startStructureID] [int] NOT NULL,
|
||||
[startMediaID] [int] NULL,
|
||||
[userName] [nvarchar] (255) NOT NULL,
|
||||
[userLogin] [nvarchar] (125) NOT NULL,
|
||||
[userPassword] [nvarchar] (125) NOT NULL,
|
||||
[userEmail] [nvarchar] (255) NOT NULL,
|
||||
[userDefaultPermissions] [nvarchar] (50) NULL,
|
||||
[userLanguage] [nvarchar] (10) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoUser] ADD CONSTRAINT [PK_user] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [cmsDocumentType]
|
||||
(
|
||||
[contentTypeNodeId] [int] NOT NULL,
|
||||
[templateNodeId] [int] NOT NULL,
|
||||
[IsDefault] [bit] NOT NULL CONSTRAINT [DF_cmsDocumentType_IsDefault] DEFAULT (0)
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsDocumentType] ADD CONSTRAINT [PK_cmsDocumentType] PRIMARY KEY ([contentTypeNodeId], [templateNodeId])
|
||||
;
|
||||
CREATE TABLE [cmsMemberType]
|
||||
(
|
||||
[pk] [int] NOT NULL IDENTITY(1, 1),
|
||||
[NodeId] [int] NOT NULL,
|
||||
[propertytypeId] [int] NOT NULL,
|
||||
[memberCanEdit] [bit] NOT NULL CONSTRAINT [DF_cmsMemberType_memberCanEdit] DEFAULT (0),
|
||||
[viewOnProfile] [bit] NOT NULL CONSTRAINT [DF_cmsMemberType_viewOnProfile] DEFAULT (0)
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsMemberType] ADD CONSTRAINT [PK_cmsMemberType] PRIMARY KEY ([pk])
|
||||
;
|
||||
CREATE TABLE [cmsMember]
|
||||
(
|
||||
[nodeId] [int] NOT NULL,
|
||||
[Email] [nvarchar] (1000) NOT NULL CONSTRAINT [DF_cmsMember_Email] DEFAULT (''),
|
||||
[LoginName] [nvarchar] (1000) NOT NULL CONSTRAINT [DF_cmsMember_LoginName] DEFAULT (''),
|
||||
[Password] [nvarchar] (1000) NOT NULL CONSTRAINT [DF_cmsMember_Password] DEFAULT ('')
|
||||
)
|
||||
|
||||
;
|
||||
CREATE TABLE [umbracoNode]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[trashed] [bit] NOT NULL CONSTRAINT [DF_umbracoNode_trashed] DEFAULT (0),
|
||||
[parentID] [int] NOT NULL,
|
||||
[nodeUser] [int] NULL,
|
||||
[level] [int] NOT NULL,
|
||||
[path] [nvarchar] (150) NOT NULL,
|
||||
[sortOrder] [int] NOT NULL,
|
||||
[uniqueID] [uniqueidentifier] NULL,
|
||||
[text] [nvarchar] (255) NULL,
|
||||
[nodeObjectType] [uniqueidentifier] NULL,
|
||||
[createDate] [datetime] NOT NULL CONSTRAINT [DF_umbracoNode_createDate] DEFAULT (getdate())
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoNode] ADD CONSTRAINT [PK_structure] PRIMARY KEY ([id])
|
||||
;
|
||||
;
|
||||
CREATE TABLE [cmsPropertyType]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[dataTypeId] [int] NOT NULL,
|
||||
[contentTypeId] [int] NOT NULL,
|
||||
[tabId] [int] NULL,
|
||||
[Alias] [nvarchar] (255) NOT NULL,
|
||||
[Name] [nvarchar] (255) NULL,
|
||||
[helpText] [nvarchar] (1000) NULL,
|
||||
[sortOrder] [int] NOT NULL CONSTRAINT [DF__cmsProper__sortO__1EA48E88] DEFAULT (0),
|
||||
[mandatory] [bit] NOT NULL CONSTRAINT [DF__cmsProper__manda__2180FB33] DEFAULT (0),
|
||||
[validationRegExp] [nvarchar] (255) NULL,
|
||||
[Description] [nvarchar] (2000) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsPropertyType] ADD CONSTRAINT [PK_cmsPropertyType] PRIMARY KEY ([id])
|
||||
;
|
||||
|
||||
CREATE TABLE [cmsMacroProperty]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[macroPropertyHidden] [bit] NOT NULL CONSTRAINT [DF_macroProperty_macroPropertyHidden] DEFAULT (0),
|
||||
[macroPropertyType] [int] NOT NULL,
|
||||
[macro] [int] NOT NULL,
|
||||
[macroPropertySortOrder] [tinyint] NOT NULL CONSTRAINT [DF_macroProperty_macroPropertySortOrder] DEFAULT (0),
|
||||
[macroPropertyAlias] [nvarchar] (50) NOT NULL,
|
||||
[macroPropertyName] [nvarchar] (255) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsMacroProperty] ADD CONSTRAINT [PK_macroProperty] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [cmsMacro]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[macroUseInEditor] [bit] NOT NULL CONSTRAINT [DF_macro_macroUseInEditor] DEFAULT (0),
|
||||
[macroRefreshRate] [int] NOT NULL CONSTRAINT [DF_macro_macroRefreshRate] DEFAULT (0),
|
||||
[macroAlias] [nvarchar] (255) NOT NULL,
|
||||
[macroName] [nvarchar] (255) NULL,
|
||||
[macroScriptType] [nvarchar] (255) NULL,
|
||||
[macroScriptAssembly] [nvarchar] (255) NULL,
|
||||
[macroXSLT] [nvarchar] (255) NULL,
|
||||
[macroCacheByPage] [bit] NOT NULL CONSTRAINT [DF_cmsMacro_macroCacheByPage] DEFAULT (1),
|
||||
[macroCachePersonalized] [bit] NOT NULL CONSTRAINT [DF_cmsMacro_macroCachePersonalized] DEFAULT (0),
|
||||
[macroDontRender] [bit] NOT NULL CONSTRAINT [DF_cmsMacro_macroDontRender] DEFAULT (0)
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsMacro] ADD CONSTRAINT [PK_macro] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [cmsContentVersion]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1) PRIMARY KEY,
|
||||
[ContentId] [int] NOT NULL,
|
||||
[VersionId] [uniqueidentifier] NOT NULL,
|
||||
[VersionDate] [datetime] NOT NULL CONSTRAINT [DF_cmsContentVersion_VersionDate] DEFAULT (getdate())
|
||||
)
|
||||
|
||||
;
|
||||
CREATE TABLE [umbracoAppTree]
|
||||
(
|
||||
[treeSilent] [bit] NOT NULL CONSTRAINT [DF_umbracoAppTree_treeSilent] DEFAULT (0),
|
||||
[treeInitialize] [bit] NOT NULL CONSTRAINT [DF_umbracoAppTree_treeInitialize] DEFAULT (1),
|
||||
[treeSortOrder] [tinyint] NOT NULL,
|
||||
[appAlias] [nvarchar] (50) NOT NULL,
|
||||
[treeAlias] [nvarchar] (150) NOT NULL,
|
||||
[treeTitle] [nvarchar] (255) NOT NULL,
|
||||
[treeIconClosed] [nvarchar] (255) NOT NULL,
|
||||
[treeIconOpen] [nvarchar] (255) NOT NULL,
|
||||
[treeHandlerAssembly] [nvarchar] (255) NOT NULL,
|
||||
[treeHandlerType] [nvarchar] (255) NOT NULL,
|
||||
[action] [nvarchar] (255) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoAppTree] ADD CONSTRAINT [PK_umbracoAppTree] PRIMARY KEY ([appAlias], [treeAlias])
|
||||
;
|
||||
|
||||
CREATE TABLE [cmsContentTypeAllowedContentType]
|
||||
(
|
||||
[Id] [int] NOT NULL,
|
||||
[AllowedId] [int] NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsContentTypeAllowedContentType] ADD CONSTRAINT [PK_cmsContentTypeAllowedContentType] PRIMARY KEY ([Id], [AllowedId])
|
||||
;
|
||||
CREATE TABLE [cmsContentXml]
|
||||
(
|
||||
[nodeId] [int] NOT NULL,
|
||||
[xml] [ntext] NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsContentXml] ADD CONSTRAINT [PK_cmsContentXml] PRIMARY KEY ([nodeId])
|
||||
;
|
||||
CREATE TABLE [cmsDataType]
|
||||
(
|
||||
[pk] [int] NOT NULL IDENTITY(1, 1),
|
||||
[nodeId] [int] NOT NULL,
|
||||
[controlId] [uniqueidentifier] NOT NULL,
|
||||
[dbType] [nvarchar] (50) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsDataType] ADD CONSTRAINT [PK_cmsDataType] PRIMARY KEY ([pk])
|
||||
;
|
||||
CREATE TABLE [cmsDataTypePreValues]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[datatypeNodeId] [int] NOT NULL,
|
||||
[value] [nvarchar] (255) NULL,
|
||||
[sortorder] [int] NOT NULL,
|
||||
[alias] [nvarchar] (50) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsDataTypePreValues] ADD CONSTRAINT [PK_cmsDataTypePreValues] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [cmsDictionary]
|
||||
(
|
||||
[pk] [int] NOT NULL IDENTITY(1, 1),
|
||||
[id] [uniqueidentifier] NOT NULL,
|
||||
[parent] [uniqueidentifier] NOT NULL,
|
||||
[key] [nvarchar] (1000) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsDictionary] ADD CONSTRAINT [PK_cmsDictionary] PRIMARY KEY ([pk])
|
||||
;
|
||||
CREATE TABLE [cmsLanguageText]
|
||||
(
|
||||
[pk] [int] NOT NULL IDENTITY(1, 1),
|
||||
[languageId] [int] NOT NULL,
|
||||
[UniqueId] [uniqueidentifier] NOT NULL,
|
||||
[value] [nvarchar] (1000) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsLanguageText] ADD CONSTRAINT [PK_cmsLanguageText] PRIMARY KEY ([pk])
|
||||
;
|
||||
CREATE TABLE [cmsMember2MemberGroup]
|
||||
(
|
||||
[Member] [int] NOT NULL,
|
||||
[MemberGroup] [int] NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [cmsMember2MemberGroup] ADD CONSTRAINT [PK_cmsMember2MemberGroup] PRIMARY KEY ([Member], [MemberGroup])
|
||||
;
|
||||
CREATE TABLE [cmsStylesheet]
|
||||
(
|
||||
[nodeId] [int] NOT NULL,
|
||||
[filename] [nvarchar] (100) NOT NULL,
|
||||
[content] [ntext] NULL
|
||||
)
|
||||
|
||||
;
|
||||
CREATE TABLE [cmsStylesheetProperty]
|
||||
(
|
||||
[nodeId] [int] NOT NULL,
|
||||
[stylesheetPropertyEditor] [bit] NULL,
|
||||
[stylesheetPropertyAlias] [nvarchar] (50) NULL,
|
||||
[stylesheetPropertyValue] [nvarchar] (400) NULL
|
||||
)
|
||||
|
||||
;
|
||||
CREATE TABLE [umbracoDomains]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[domainDefaultLanguage] [int] NULL,
|
||||
[domainRootStructureID] [int] NULL,
|
||||
[domainName] [nvarchar] (255) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoDomains] ADD CONSTRAINT [PK_domains] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [umbracoLanguage]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[languageISOCode] [nvarchar] (10) NULL,
|
||||
[languageCultureName] [nvarchar] (100) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoLanguage] ADD CONSTRAINT [PK_language] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [umbracoRelationType]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[dual] [bit] NOT NULL,
|
||||
[parentObjectType] [uniqueidentifier] NOT NULL,
|
||||
[childObjectType] [uniqueidentifier] NOT NULL,
|
||||
[name] [nvarchar] (255) NOT NULL,
|
||||
[alias] [nvarchar] (100) NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoRelationType] ADD CONSTRAINT [PK_umbracoRelationType] PRIMARY KEY ([id])
|
||||
;
|
||||
|
||||
/* TABLE IS NEVER USED, REMOVED FOR 4.1
|
||||
|
||||
CREATE TABLE [umbracoStylesheet]
|
||||
(
|
||||
[nodeId] [int] NOT NULL,
|
||||
[filename] [nvarchar] (100) NOT NULL,
|
||||
[content] [ntext] NULL
|
||||
)
|
||||
;
|
||||
|
||||
ALTER TABLE [umbracoStylesheet] ADD CONSTRAINT [PK_umbracoStylesheet] PRIMARY KEY ([nodeId])
|
||||
;
|
||||
|
||||
*/
|
||||
|
||||
CREATE TABLE [umbracoUser2NodeNotify]
|
||||
(
|
||||
[userId] [int] NOT NULL,
|
||||
[nodeId] [int] NOT NULL,
|
||||
[action] [nchar] (1) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoUser2NodeNotify] ADD CONSTRAINT [PK_umbracoUser2NodeNotify] PRIMARY KEY ([userId], [nodeId], [action])
|
||||
;
|
||||
CREATE TABLE [umbracoUser2NodePermission]
|
||||
(
|
||||
[userId] [int] NOT NULL,
|
||||
[nodeId] [int] NOT NULL,
|
||||
[permission] [nchar] (1) NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoUser2NodePermission] ADD CONSTRAINT [PK_umbracoUser2NodePermission] PRIMARY KEY ([userId], [nodeId], [permission])
|
||||
;
|
||||
CREATE TABLE [umbracoUserLogins]
|
||||
(
|
||||
[contextID] [uniqueidentifier] NOT NULL,
|
||||
[userID] [int] NOT NULL,
|
||||
[timeout] [bigint] NOT NULL
|
||||
)
|
||||
|
||||
;
|
||||
ALTER TABLE [umbracoAppTree] ADD
|
||||
CONSTRAINT [FK_umbracoAppTree_umbracoApp] FOREIGN KEY ([appAlias]) REFERENCES [umbracoApp] ([appAlias])
|
||||
;
|
||||
ALTER TABLE [cmsPropertyData] ADD
|
||||
CONSTRAINT [FK_cmsPropertyData_umbracoNode] FOREIGN KEY ([contentNodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
|
||||
/* TABLES ARE NEVER USED, REMOVED FOR 4.1
|
||||
|
||||
ALTER TABLE [umbracoUser2userGroup] ADD
|
||||
CONSTRAINT [FK_user2userGroup_user] FOREIGN KEY ([user]) REFERENCES [umbracoUser] ([id]),
|
||||
CONSTRAINT [FK_user2userGroup_userGroup] FOREIGN KEY ([userGroup]) REFERENCES [umbracoUserGroup] ([id])
|
||||
;
|
||||
|
||||
*/
|
||||
|
||||
ALTER TABLE [cmsDocument] ADD
|
||||
CONSTRAINT [FK_cmsDocument_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsMacroProperty] ADD
|
||||
CONSTRAINT [FK_umbracoMacroProperty_umbracoMacroPropertyType] FOREIGN KEY ([macroPropertyType]) REFERENCES [cmsMacroPropertyType] ([id])
|
||||
;
|
||||
ALTER TABLE [umbracoUser] ADD
|
||||
CONSTRAINT [FK_user_userType] FOREIGN KEY ([userType]) REFERENCES [umbracoUserType] ([id])
|
||||
;
|
||||
ALTER TABLE [umbracoNode] ADD
|
||||
CONSTRAINT [FK_umbracoNode_umbracoNode] FOREIGN KEY ([parentID]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsTemplate] ADD
|
||||
CONSTRAINT [FK_cmsTemplate_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsContentType] ADD
|
||||
CONSTRAINT [FK_cmsContentType_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsPropertyType] ADD
|
||||
CONSTRAINT [FK_cmsPropertyType_cmsTab] FOREIGN KEY ([tabId]) REFERENCES [cmsTab] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsContent] ADD
|
||||
CONSTRAINT [FK_cmsContent_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [umbracoUser2app] ADD
|
||||
CONSTRAINT [FK_umbracoUser2app_umbracoApp] FOREIGN KEY ([app]) REFERENCES [umbracoApp] ([appAlias]),
|
||||
CONSTRAINT [FK_umbracoUser2app_umbracoUser] FOREIGN KEY ([user]) REFERENCES [umbracoUser] ([id])
|
||||
;
|
||||
|
||||
ALTER TABLE [cmsTemplate] DROP CONSTRAINT [FK_cmsTemplate_umbracoNode]
|
||||
;
|
||||
ALTER TABLE [cmsPropertyType] DROP CONSTRAINT [FK_cmsPropertyType_cmsTab]
|
||||
;
|
||||
ALTER TABLE [cmsContent] DROP CONSTRAINT [FK_cmsContent_umbracoNode]
|
||||
;
|
||||
ALTER TABLE [cmsMacroProperty] DROP CONSTRAINT [FK_umbracoMacroProperty_umbracoMacroPropertyType]
|
||||
;
|
||||
ALTER TABLE [umbracoAppTree] DROP CONSTRAINT [FK_umbracoAppTree_umbracoApp]
|
||||
;
|
||||
ALTER TABLE [umbracoUser2app] DROP CONSTRAINT [FK_umbracoUser2app_umbracoApp]
|
||||
;
|
||||
ALTER TABLE [umbracoUser2app] DROP CONSTRAINT [FK_umbracoUser2app_umbracoUser]
|
||||
;
|
||||
ALTER TABLE [cmsPropertyData] DROP CONSTRAINT [FK_cmsPropertyData_umbracoNode]
|
||||
;
|
||||
|
||||
/* TABLE IS NEVER USED, REMOVED FOR 4.1
|
||||
|
||||
ALTER TABLE [umbracoUser2userGroup] DROP CONSTRAINT [FK_user2userGroup_user]
|
||||
;
|
||||
ALTER TABLE [umbracoUser2userGroup] DROP CONSTRAINT [FK_user2userGroup_userGroup]
|
||||
;
|
||||
|
||||
*/
|
||||
|
||||
ALTER TABLE [umbracoUser] DROP CONSTRAINT [FK_user_userType]
|
||||
;
|
||||
ALTER TABLE [cmsContentType] DROP CONSTRAINT [FK_cmsContentType_umbracoNode]
|
||||
;
|
||||
ALTER TABLE [cmsDocument] DROP CONSTRAINT [FK_cmsDocument_umbracoNode]
|
||||
;
|
||||
ALTER TABLE [umbracoNode] DROP CONSTRAINT [FK_umbracoNode_umbracoNode]
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [umbracoNode] ON
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-92, 0, -1, 0, 11, N'-1,-92', 37, 'f0bc4bfb-b499-40d6-ba86-058885a5178c', N'Label', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-90, 0, -1, 0, 11, N'-1,-90', 35, '84c6b441-31df-4ffe-b67e-67d5bc3ae65a', N'Upload', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-89, 0, -1, 0, 11, N'-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', N'Textbox multiple', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-88, 0, -1, 0, 11, N'-1,-88', 33, '0cc0eba1-9960-42c9-bf9b-60e150b429ae', N'Textstring', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-87, 0, -1, 0, 11, N'-1,-87', 32, 'ca90c950-0aff-4e72-b976-a30b1ac57dad', N'Richtext editor', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
|
||||
||INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-51, 0, -1, 0, 11, N'-1,-51', 4, '2e6d3631-066e-44b8-aec4-96f09099b2b5', N'Numeric', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
|
||||
||INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-49, 0, -1, 0, 11, N'-1,-49', 2, '92897bc6-a5f3-4ffe-ae27-f2e7e33dda49', N'True/false', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-43, 0, -1, 0, 1, N'-1,-43', 2, 'fbaf13a8-4036-41f2-93a3-974f678c312a', N'Checkbox list', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20041015 14:11:04.367')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-42, 0, -1, 0, 1, N'-1,-42', 2, '0b6a45e7-44ba-430d-9da5-4e46060b9e03', N'Dropdown', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20041015 14:10:59.000')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-41, 0, -1, 0, 1, N'-1,-41', 2, '5046194e-4237-453c-a547-15db3a07c4e1', N'Date Picker', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20041015 14:10:54.303')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-40, 0, -1, 0, 1, N'-1,-40', 2, 'bb5f57c9-ce2b-4bb9-b697-4caca783a805', N'Radiobox', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20041015 14:10:49.253')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-39, 0, -1, 0, 1, N'-1,-39', 2, 'f38f0ac7-1d27-439c-9f3f-089cd8825a53', N'Dropdown multiple', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20041015 14:10:44.480')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-38, 0, -1, 0, 1, N'-1,-38', 2, 'fd9f1447-6c61-4a7c-9595-5aa39147d318', N'Folder Browser', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20041015 14:10:37.020')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-37, 0, -1, 0, 1, N'-1,-37', 2, '0225af17-b302-49cb-9176-b9f35cab9c17', N'Approved Color', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20041015 14:10:30.580')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-36, 0, -1, 0, 1, N'-1,-36', 2, 'e4d66c0f-b935-4200-81f0-025f7256b89a', N'Date Picker with time', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20041015 14:10:23.007')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-1, 0, -1, 0, 0, N'-1', 0, '916724a5-173d-4619-b97e-b9de133dd6f5', N'SYSTEM DATA: umbraco master root', 'ea7d8624-4cfe-4578-a871-24aa946bf34d', '20040930 14:01:49.920')
|
||||
||INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1031, 0, -1, 1, 1, N'-1,1031', 2, 'f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d', N'Folder', '4ea4382b-2f5a-4c2b-9587-ae9b3cf3602e', '20041201 00:13:40.743')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1032, 0, -1, 1, 1, N'-1,1032', 2, 'cc07b313-0843-4aa8-bbda-871c8da728c8', N'Image', '4ea4382b-2f5a-4c2b-9587-ae9b3cf3602e', '20041201 00:13:43.737')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1033, 0, -1, 1, 1, N'-1,1033', 2, '4c52d8ab-54e6-40cd-999c-7a5f24903e4d', N'File', '4ea4382b-2f5a-4c2b-9587-ae9b3cf3602e', '20041201 00:13:46.210')
|
||||
||INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1034, 0, -1, 0, 1, N'-1,1034', 2, 'a6857c73-d6e9-480c-b6e6-f15f6ad11125', N'Content Picker', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20060103 13:07:29.203')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1035, 0, -1, 0, 1, N'-1,1035', 2, '93929b9a-93a2-4e2a-b239-d99334440a59', N'Media Picker', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20060103 13:07:36.143')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1036, 0, -1, 0, 1, N'-1,1036', 2, '2b24165f-9782-4aa3-b459-1de4a4d21f60', N'Member Picker', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20060103 13:07:40.260')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1038, 0, -1, 0, 1, N'-1,1038', 2, '1251c96c-185c-4e9b-93f4-b48205573cbd', N'Simple Editor', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20060103 13:07:55.250')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1039, 0, -1, 0, 1, N'-1,1039', 2, '06f349a9-c949-4b6a-8660-59c10451af42', N'Ultimate Picker', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20060103 13:07:55.250')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1040, 0, -1, 0, 1, N'-1,1040', 2, '21e798da-e06e-4eda-a511-ed257f78d4fa', N'Related Links', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20060103 13:07:55.250')
|
||||
|INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (1041, 0, -1, 0, 1, N'-1,1041', 2, 'b6b73142-b9c1-4bf8-a16d-e1c23320b549', N'Tags', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20060103 13:07:55.250')
|
||||
|SET IDENTITY_INSERT [umbracoNode] OFF
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [cmsContentType] ON
|
||||
|INSERT INTO [cmsContentType] ([pk], [nodeId], [alias], [icon]) VALUES (532, 1031, N'Folder', N'folder.gif')
|
||||
|INSERT INTO [cmsContentType] ([pk], [nodeId], [alias], [icon]) VALUES (533, 1032, N'Image', N'mediaPhoto.gif')
|
||||
|INSERT INTO [cmsContentType] ([pk], [nodeId], [alias], [icon]) VALUES (534, 1033, N'File', N'mediaMulti.gif')
|
||||
|SET IDENTITY_INSERT [cmsContentType] OFF
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [umbracoUser] ON
|
||||
|INSERT INTO [umbracoUser] ([id], [userDisabled], [userNoConsole], [userType], [startStructureID], [startMediaID], [userName], [userLogin], [userPassword], [userEmail], [userDefaultPermissions], [userLanguage]) VALUES (0, 0, 0, 1, -1, -1, N'Administrator', N'admin', N'default', N'', NULL, N'en')
|
||||
|SET IDENTITY_INSERT [umbracoUser] OFF
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [umbracoUserType] ON
|
||||
|INSERT INTO [umbracoUserType] ([id], [userTypeAlias], [userTypeName], [userTypeDefaultPermissions]) VALUES (1, N'admin', N'Administrators', N'CADMOSKTPIURZ:')
|
||||
|INSERT INTO [umbracoUserType] ([id], [userTypeAlias], [userTypeName], [userTypeDefaultPermissions]) VALUES (2, N'writer', N'Writer', N'CAH:')
|
||||
|INSERT INTO [umbracoUserType] ([id], [userTypeAlias], [userTypeName], [userTypeDefaultPermissions]) VALUES (3, N'editor', N'Editors', N'CADMOSKTPUZ:')
|
||||
|insert into umbracoUserType ([id], [userTypeAlias], [userTypeName], [userTypeDefaultPermissions]) values (4, N'translator', N'Translator', 'A')
|
||||
|SET IDENTITY_INSERT [umbracoUserType] OFF
|
||||
;
|
||||
!!!INSERT INTO [umbracoUser2app] ([user], [app]) VALUES (0, N'content')
|
||||
|INSERT INTO [umbracoUser2app] ([user], [app]) VALUES (0, N'developer')
|
||||
|INSERT INTO [umbracoUser2app] ([user], [app]) VALUES (0, N'media')
|
||||
|INSERT INTO [umbracoUser2app] ([user], [app]) VALUES (0, N'member')
|
||||
|INSERT INTO [umbracoUser2app] ([user], [app]) VALUES (0, N'settings')
|
||||
|INSERT INTO [umbracoUser2app] ([user], [app]) VALUES (0, N'users')
|
||||
|INSERT INTO [umbracoApp] ([appAlias], [sortOrder], [appIcon], [appName], [appInitWithTreeAlias]) VALUES (N'content', 0, N'.traycontent', N'Indhold', N'content')
|
||||
|INSERT INTO [umbracoApp] ([appAlias], [sortOrder], [appIcon], [appName], [appInitWithTreeAlias]) VALUES (N'developer', 7, N'.traydeveloper', N'Developer', NULL)
|
||||
|INSERT INTO [umbracoApp] ([appAlias], [sortOrder], [appIcon], [appName], [appInitWithTreeAlias]) VALUES (N'media', 1, N'.traymedia', N'Mediearkiv', NULL)
|
||||
|INSERT INTO [umbracoApp] ([appAlias], [sortOrder], [appIcon], [appName], [appInitWithTreeAlias]) VALUES (N'member', 8, N'.traymember', N'Medlemmer', NULL)
|
||||
|INSERT INTO [umbracoApp] ([appAlias], [sortOrder], [appIcon], [appName], [appInitWithTreeAlias]) VALUES (N'settings', 6, N'.traysettings', N'Indstillinger', NULL)
|
||||
|INSERT INTO [umbracoApp] ([appAlias], [sortOrder], [appIcon], [appName], [appInitWithTreeAlias]) VALUES (N'users', 5, N'.trayusers', N'Brugere', NULL)
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'content', N'content', 1, 1, 0, N'Indhold', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadContent')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'cacheBrowser', 0, 1, 0, N'CacheBrowser', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadCache')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'CacheItem', 0, 0, 0, N'Cachebrowser', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadCacheItem')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'datatype', 0, 1, 1, N'Datatyper', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadDataTypes')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'macros', 0, 1, 2, N'Macros', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadMacros')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'xslt', 0, 1, 5, N'XSLT Files', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadXslt')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'media', N'media', 0, 1, 0, N'Medier', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadMedia')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'member', N'member', 0, 1, 0, N'Medlemmer', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadMembers')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'member', N'memberGroup', 0, 1, 1, N'MemberGroups', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadMemberGroups')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'member', N'memberType', 0, 1, 2, N'Medlemstyper', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadMemberTypes')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType], [action]) VALUES (N'settings', N'dictionary', 0, 1, 3, N'Dictionary', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadDictionary', N'openDictionary()')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'settings', N'languages', 0, 1, 4, N'Languages', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadLanguages')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'settings', N'mediaTypes', 0, 1, 5, N'Medietyper', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadMediaTypes')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'settings', N'nodeTypes', 0, 1, 6, N'Dokumenttyper', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadNodeTypes')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'settings', N'stylesheetProperty', 0, 0, 0, N'Stylesheet Property', N'', N'', N'umbraco', N'loadStylesheetProperty')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'settings', N'stylesheets', 0, 1, 0, N'Stylesheets', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadStylesheets')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'settings', N'templates', 0, 1, 1, N'Templates', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadTemplates')
|
||||
|INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'users', N'users', 0, 1, 0, N'Brugere', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadUsers')
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [cmsMacroPropertyType] ON
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (3, N'mediaCurrent', N'umbraco.macroRenderings', N'media', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (4, N'contentSubs', N'umbraco.macroRenderings', N'content', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (5, N'contentRandom', N'umbraco.macroRenderings', N'content', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (6, N'contentPicker', N'umbraco.macroRenderings', N'content', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (13, N'number', N'umbraco.macroRenderings', N'numeric', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (14, N'bool', N'umbraco.macroRenderings', N'yesNo', N'Boolean')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (16, N'text', N'umbraco.macroRenderings', N'text', N'String')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (17, N'contentTree', N'umbraco.macroRenderings', N'content', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (18, N'contentType', N'umbraco.macroRenderings', N'contentTypeSingle', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (19, N'contentTypeMultiple', N'umbraco.macroRenderings', N'contentTypeMultiple', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (20, N'contentAll', N'umbraco.macroRenderings', N'content', N'Int32')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (21, N'tabPicker', N'umbraco.macroRenderings', N'tabPicker', N'String')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (22, N'tabPickerMultiple', N'umbraco.macroRenderings', N'tabPickerMultiple', N'String')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (23, N'propertyTypePicker', N'umbraco.macroRenderings', N'propertyTypePicker', N'String')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (24, N'propertyTypePickerMultiple', N'umbraco.macroRenderings', N'propertyTypePickerMultiple', N'String')
|
||||
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (25, N'textMultiLine', N'umbraco.macroRenderings', N'textMultiple', N'String')
|
||||
|SET IDENTITY_INSERT [cmsMacroPropertyType] OFF
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [cmsTab] ON
|
||||
|INSERT INTO [cmsTab] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (3, 1032, N'Image', 1)
|
||||
|INSERT INTO [cmsTab] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (4, 1033, N'File', 1)
|
||||
|INSERT INTO [cmsTab] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (5, 1031, N'Contents', 1)
|
||||
|SET IDENTITY_INSERT [cmsTab] OFF
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [cmsPropertyType] ON
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (6, -90, 1032, 3, N'umbracoFile', N'Upload image', NULL, 0, 0, NULL, NULL)
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (7, -92, 1032, 3, N'umbracoWidth', N'Width', NULL, 0, 0, NULL, NULL)
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (8, -92, 1032, 3, N'umbracoHeight', N'Height', NULL, 0, 0, NULL, NULL)
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (9, -92, 1032, 3, N'umbracoBytes', N'Size', NULL, 0, 0, NULL, NULL)
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (10, -92, 1032, 3, N'umbracoExtension', N'Type', NULL, 0, 0, NULL, NULL)
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (24, -90, 1033, 4, N'umbracoFile', N'Upload file', NULL, 0, 0, NULL, NULL)
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (25, -92, 1033, 4, N'umbracoExtension', N'Type', NULL, 0, 0, NULL, NULL)
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (26, -92, 1033, 4, N'umbracoBytes', N'Size', NULL, 0, 0, NULL, NULL)
|
||||
|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (27, -38, 1031, 5, N'contents', N'Contents:', NULL, 0, 0, NULL, NULL)
|
||||
|SET IDENTITY_INSERT [cmsPropertyType] OFF
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [umbracoLanguage] ON
|
||||
|INSERT INTO [umbracoLanguage] ([id], [languageISOCode], [languageCultureName]) VALUES (1, N'en-US', N'en-US')
|
||||
|SET IDENTITY_INSERT [umbracoLanguage] OFF
|
||||
;
|
||||
INSERT INTO [cmsContentTypeAllowedContentType] ([Id], [AllowedId]) VALUES (1031, 1031)
|
||||
;
|
||||
INSERT INTO [cmsContentTypeAllowedContentType] ([Id], [AllowedId]) VALUES (1031, 1032)
|
||||
;
|
||||
INSERT INTO [cmsContentTypeAllowedContentType] ([Id], [AllowedId]) VALUES (1031, 1033)
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [cmsDataType] ON
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (4, -49, '38b352c1-e9f8-4fd8-9324-9a2eab06d97a', 'Integer')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (6, -51, '1413afcb-d19a-4173-8e9a-68288d2a73b8', 'Integer')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (8, -87, '5E9B75AE-FACE-41c8-B47E-5F4B0FD82F83', 'Ntext')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (9, -88, 'ec15c1e5-9d90-422a-aa52-4f7622c63bea', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (10, -89, '67db8357-ef57-493e-91ac-936d305e0f2a', 'Ntext')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (11, -90, '5032a6e6-69e3-491d-bb28-cd31cd11086c', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (12, -91, 'a74ea9c9-8e18-4d2a-8cf6-73c6206c5da6', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (13, -92, '6c738306-4c17-4d88-b9bd-6546f3771597', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (14, -36, 'b6fb1622-afa5-4bbf-a3cc-d9672a442222', 'Date')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (15, -37, 'f8d60f68-ec59-4974-b43b-c46eb5677985', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (16, -38, 'cccd4ae9-f399-4ed2-8038-2e88d19e810c', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (17, -39, '928639ed-9c73-4028-920c-1e55dbb68783', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (18, -40, 'a52c7c1c-c330-476e-8605-d63d3b84b6a6', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (19, -41, '23e93522-3200-44e2-9f29-e61a6fcbb79a', 'Date')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (20, -42, 'a74ea9c9-8e18-4d2a-8cf6-73c6206c5da6', 'Integer')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (21, -43, 'b4471851-82b6-4c75-afa4-39fa9c6a75e9', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (22, -44, 'a3776494-0574-4d93-b7de-efdfdec6f2d1', 'Ntext')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (23, -128, 'a52c7c1c-c330-476e-8605-d63d3b84b6a6', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (24, -129, '928639ed-9c73-4028-920c-1e55dbb68783', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (25, -130, 'a74ea9c9-8e18-4d2a-8cf6-73c6206c5da6', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (26, -131, 'a74ea9c9-8e18-4d2a-8cf6-73c6206c5da6', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (27, -132, 'a74ea9c9-8e18-4d2a-8cf6-73c6206c5da6', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (28, -133, '6c738306-4c17-4d88-b9bd-6546f3771597', 'Ntext')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (29, -134, '928639ed-9c73-4028-920c-1e55dbb68783', 'Nvarchar')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (30, -50, 'aaf99bb2-dbbe-444d-a296-185076bf0484', 'Date')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (31, 1034, '158aa029-24ed-4948-939e-c3da209e5fba', 'Integer')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (32, 1035, 'ead69342-f06d-4253-83ac-28000225583b', 'Integer')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (33, 1036, '39f533e4-0551-4505-a64b-e0425c5ce775', 'Integer')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (35, 1038, '60b7dabf-99cd-41eb-b8e9-4d2e669bbde9', 'Ntext')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (36, 1039, 'cdbf0b5d-5cb2-445f-bc12-fcaaec07cf2c', 'Ntext')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (37, 1040, '71b8ad1a-8dc2-425c-b6b8-faa158075e63', 'Ntext')
|
||||
|INSERT INTO [cmsDataType] ([pk], [nodeId], [controlId], [dbType]) VALUES (38, 1041, '4023e540-92f5-11dd-ad8b-0800200c9a66', 'Ntext')
|
||||
|SET IDENTITY_INSERT [cmsDataType] OFF
|
||||
;
|
||||
ALTER TABLE [cmsTemplate] ADD CONSTRAINT [FK_cmsTemplate_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsPropertyType] ADD CONSTRAINT [FK_cmsPropertyType_cmsTab] FOREIGN KEY ([tabId]) REFERENCES [cmsTab] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsContent] ADD CONSTRAINT [FK_cmsContent_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsMacroProperty] ADD CONSTRAINT [FK_umbracoMacroProperty_umbracoMacroPropertyType] FOREIGN KEY ([macroPropertyType]) REFERENCES [cmsMacroPropertyType] ([id])
|
||||
;
|
||||
ALTER TABLE [umbracoAppTree] ADD CONSTRAINT [FK_umbracoAppTree_umbracoApp] FOREIGN KEY ([appAlias]) REFERENCES [umbracoApp] ([appAlias])
|
||||
;
|
||||
ALTER TABLE [umbracoUser2app] ADD CONSTRAINT [FK_umbracoUser2app_umbracoApp] FOREIGN KEY ([app]) REFERENCES [umbracoApp] ([appAlias])
|
||||
;
|
||||
ALTER TABLE [umbracoUser2app] ADD CONSTRAINT [FK_umbracoUser2app_umbracoUser] FOREIGN KEY ([user]) REFERENCES [umbracoUser] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsPropertyData] ADD CONSTRAINT [FK_cmsPropertyData_umbracoNode] FOREIGN KEY ([contentNodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [umbracoUser] ADD CONSTRAINT [FK_user_userType] FOREIGN KEY ([userType]) REFERENCES [umbracoUserType] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsContentType] ADD CONSTRAINT [FK_cmsContentType_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [cmsDocument] ADD CONSTRAINT [FK_cmsDocument_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
ALTER TABLE [umbracoNode] ADD CONSTRAINT [FK_umbracoNode_umbracoNode] FOREIGN KEY ([parentID]) REFERENCES [umbracoNode] ([id])
|
||||
;
|
||||
!!!set identity_insert umbracoNode on
|
||||
|insert into umbracoNode (id, trashed, parentID, nodeUser, level, path, sortOrder, uniqueID, text, nodeObjectType) values (-20, 0, -1, 0, 0, '-1,-20', 0, '0F582A79-1E41-4CF0-BFA0-76340651891A', 'Recycle Bin', '01BB7FF2-24DC-4C0C-95A2-C24EF72BBAC8')
|
||||
|set identity_insert umbracoNode off
|
||||
;
|
||||
ALTER TABLE cmsDataTypePreValues ALTER COLUMN value NVARCHAR(2500) NULL
|
||||
;
|
||||
CREATE TABLE [cmsTask]
|
||||
(
|
||||
[closed] [bit] NOT NULL CONSTRAINT [DF__cmsTask__closed__04E4BC85] DEFAULT ((0)),
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[taskTypeId] [int] NOT NULL,
|
||||
[nodeId] [int] NOT NULL,
|
||||
[parentUserId] [int] NOT NULL,
|
||||
[userId] [int] NOT NULL,
|
||||
[DateTime] [datetime] NOT NULL CONSTRAINT [DF__cmsTask__DateTim__05D8E0BE] DEFAULT (getdate()),
|
||||
[Comment] [nvarchar] (500) NULL
|
||||
)
|
||||
;
|
||||
ALTER TABLE [cmsTask] ADD CONSTRAINT [PK_cmsTask] PRIMARY KEY ([id])
|
||||
;
|
||||
CREATE TABLE [cmsTaskType]
|
||||
(
|
||||
[id] [int] NOT NULL IDENTITY(1, 1),
|
||||
[alias] [nvarchar] (255) NOT NULL
|
||||
)
|
||||
;
|
||||
ALTER TABLE [cmsTaskType] ADD CONSTRAINT [PK_cmsTaskType] PRIMARY KEY ([id])
|
||||
;
|
||||
ALTER TABLE [cmsTask] ADD
|
||||
CONSTRAINT [FK_cmsTask_cmsTaskType] FOREIGN KEY ([taskTypeId]) REFERENCES [cmsTaskType] ([id])
|
||||
;
|
||||
insert into cmsTaskType (alias) values ('toTranslate')
|
||||
;
|
||||
/* Add send to translate actions to admins and editors */
|
||||
update umbracoUserType set userTypeDefaultPermissions = userTypeDefaultPermissions + '5' where userTypeAlias in ('editor','admin')
|
||||
;
|
||||
/* Add translator usertype */
|
||||
;
|
||||
insert into umbracoRelationType (dual, parentObjectType, childObjectType, name, alias) values (1, 'c66ba18e-eaf3-4cff-8a22-41b16d66a972', 'c66ba18e-eaf3-4cff-8a22-41b16d66a972', 'Relate Document On Copy','relateDocumentOnCopy')
|
||||
;
|
||||
ALTER TABLE cmsMacro ADD macroPython nvarchar(255)
|
||||
;
|
||||
|
||||
INSERT INTO [umbracoAppTree]([treeSilent], [treeInitialize], [treeSortOrder], [appAlias], [treeAlias], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES(0, 1, 4, 'developer', 'python', 'Python Files', 'folder.gif', 'folder_o.gif', 'umbraco', 'loadPython')
|
||||
;
|
||||
INSERT INTO [umbracoAppTree]([treeSilent], [treeInitialize], [treeSortOrder], [appAlias], [treeAlias], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES(0, 1, 2, 'settings', 'scripts', 'Scripts', 'folder.gif', 'folder_o.gif', 'umbraco', 'loadScripts')
|
||||
;
|
||||
alter TABLE [cmsContentType]
|
||||
add [thumbnail] nvarchar(255) NOT NULL CONSTRAINT
|
||||
[DF_cmsContentType_thumbnail] DEFAULT ('folder.png')
|
||||
;
|
||||
alter TABLE [cmsContentType]
|
||||
add [description] nvarchar(1500) NULL
|
||||
;
|
||||
ALTER TABLE umbracoLog ALTER COLUMN logComment NVARCHAR(4000) NULL
|
||||
;
|
||||
!!!SET IDENTITY_INSERT [cmsDataTypePreValues] ON
|
||||
|insert into cmsDataTypePreValues (id, dataTypeNodeId, [value], sortorder, alias) values (3,-87,',code,undo,redo,cut,copy,mcepasteword,stylepicker,bold,italic,bullist,numlist,outdent,indent,mcelink,unlink,mceinsertanchor,mceimage,umbracomacro,mceinserttable,mcecharmap,' + nchar(124) + '1' + nchar(124) + '1,2,3,' + nchar(124) + '0' + nchar(124) + '500,400' + nchar(124) + '1049,' + nchar(124) + '', 0, '')
|
||||
|insert into cmsDataTypePreValues (id, dataTypeNodeId, [value], sortorder, alias) values (4,1041,'default', 0, 'group')
|
||||
|SET IDENTITY_INSERT [cmsDataTypePreValues] OFF
|
||||
;
|
||||
/* 3.1 SQL changes */
|
||||
INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'packager', 0, 1, 3, N'Packages', N'folder.gif', N'folder_o.gif', N'umbraco', N'loadPackager')
|
||||
;
|
||||
INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'packagerPackages', 0, 0, 1, N'Packager Packages', N'folder.gif', N'folder_o.gif', N'umbraco', N'loadPackages');
|
||||
|
||||
|
||||
/* Add ActionBrowse as a default permission to all user types that have ActionUpdate */
|
||||
UPDATE umbracoUserType SET userTypeDefaultPermissions = userTypeDefaultPermissions + 'F' WHERE CHARINDEX('A',userTypeDefaultPermissions,0) >= 1
|
||||
AND CHARINDEX('F',userTypeDefaultPermissions,0) < 1
|
||||
;
|
||||
/* Add ActionToPublish to all users types that have the alias 'writer' */
|
||||
UPDATE umbracoUserType SET userTypeDefaultPermissions = userTypeDefaultPermissions + 'H' WHERE userTypeAlias = 'writer'
|
||||
AND CHARINDEX('F',userTypeDefaultPermissions,0) < 1
|
||||
;
|
||||
/* Add ActionBrowse to all user permissions for nodes that have the ActionUpdate permission */
|
||||
INSERT INTO umbracoUser2NodePermission (userID, nodeId, permission)
|
||||
SELECT userID, nodeId, 'F' FROM umbracoUser2NodePermission WHERE permission='A'
|
||||
;
|
||||
/* Add ActionToPublish permissions to all nodes for users that are of type 'writer' */
|
||||
INSERT INTO umbracoUser2NodePermission (userID, nodeId, permission)
|
||||
SELECT DISTINCT userID, nodeId, 'H' FROM umbracoUser2NodePermission WHERE userId IN
|
||||
(SELECT umbracoUser.id FROM umbracoUserType INNER JOIN umbracoUser ON umbracoUserType.id = umbracoUser.userType WHERE (umbracoUserType.userTypeAlias = 'writer'))
|
||||
;
|
||||
/* Add the contentRecycleBin tree type */
|
||||
INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType)
|
||||
VALUES (0, 0, 0, 'content', 'contentRecycleBin', 'RecycleBin', 'folder.gif', 'folder_o.gif', 'umbraco', 'cms.presentation.Trees.ContentRecycleBin')
|
||||
;
|
||||
/* Add the UserType tree type */
|
||||
INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType)
|
||||
VALUES (0, 1, 1, 'users', 'userTypes', 'User Types', 'folder.gif', 'folder_o.gif', 'umbraco', 'cms.presentation.Trees.UserTypes')
|
||||
;
|
||||
/* Add the User Permission tree type */
|
||||
INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType)
|
||||
VALUES (0, 1, 2, 'users', 'userPermissions', 'User Permissions', 'folder.gif', 'folder_o.gif', 'umbraco', 'cms.presentation.Trees.UserPermissions');
|
||||
|
||||
|
||||
/* TRANSLATION RELATED SQL */
|
||||
INSERT INTO [umbracoApp] ([appAlias], [sortOrder], [appIcon], [appName], [appInitWithTreeAlias]) VALUES (N'translation', 5, N'.traytranslation', N'Translation', NULL)
|
||||
;
|
||||
INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType)
|
||||
VALUES (0, 1, 1, 'translation','openTasks', 'Tasks assigned to you', '.sprTreeFolder', '.sprTreeFolder_o', 'umbraco', 'loadOpenTasks');
|
||||
;
|
||||
INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType)
|
||||
VALUES (0, 1, 2, 'translation','yourTasks', 'Tasks created by you', '.sprTreeFolder', '.sprTreeFolder_o', 'umbraco', 'loadYourTasks');
|
||||
;
|
||||
alter TABLE [cmsContentType]
|
||||
add [masterContentType] int NULL CONSTRAINT
|
||||
[DF_cmsContentType_masterContentType] DEFAULT (0)
|
||||
;
|
||||
CREATE TABLE [cmsTagRelationship](
|
||||
[nodeId] [int] NOT NULL,
|
||||
[tagId] [int] NOT NULL)
|
||||
;
|
||||
|
||||
CREATE TABLE [cmsTags](
|
||||
[id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[tag] [nvarchar](200) NULL,
|
||||
[parentId] [int] NULL,
|
||||
[group] [nvarchar](100) NULL)
|
||||
;
|
||||
alter TABLE [umbracoUser]
|
||||
add [defaultToLiveEditing] bit NOT NULL CONSTRAINT
|
||||
[DF_umbracoUser_defaultToLiveEditing] DEFAULT (0)
|
||||
;
|
||||
|
||||
/* INSERT NEW MEDIA RECYCLE BIN NODE */
|
||||
!!!SET IDENTITY_INSERT [umbracoNode] ON
|
||||
|INSERT INTO umbracoNode (id, trashed, parentID, nodeUser, level, path, sortOrder, uniqueID, text, nodeObjectType) VALUES (-21, 0, -1, 0, 0, '-1,-21', 0, 'BF7C7CBC-952F-4518-97A2-69E9C7B33842', 'Recycle Bin', 'CF3D8E34-1C1C-41e9-AE56-878B57B32113')
|
||||
|SET IDENTITY_INSERT [umbracoNode] OFF
|
||||
;
|
||||
/* Add the mediaRecycleBin tree type */
|
||||
INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType)
|
||||
VALUES (0, 0, 0, 'media', 'mediaRecycleBin', 'RecycleBin', 'folder.gif', 'folder_o.gif', 'umbraco', 'cms.presentation.Trees.MediaRecycleBin')
|
||||
;
|
||||
|
||||
/* PREVIEW */
|
||||
CREATE TABLE [cmsPreviewXml](
|
||||
[nodeId] [int] NOT NULL,
|
||||
[versionId] [uniqueidentifier] NOT NULL,
|
||||
[timestamp] [datetime] NOT NULL,
|
||||
[xml] [ntext] NOT NULL)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
||||
ADD NEW PRIMARY KEYS, FOREIGN KEYS AND INDEXES FOR VERSION 4.1
|
||||
|
||||
IMPORTANT!!!!!
|
||||
YOU MUST MAKE SURE THAT THE SCRIPT BELOW THIS MATCHES THE KeysIndexesAndConstraints.sql FILE FOR THE MANUAL UPGRADE
|
||||
|
||||
*/
|
||||
|
||||
/************************** CLEANUP ***********************************************/
|
||||
|
||||
/************************** CLEANUP END ********************************************/
|
||||
|
||||
/************************** RESEEDING NEEDED FOR SQL CE 4 ************************/
|
||||
ALTER TABLE [umbracoNode] ALTER COLUMN id IDENTITY(1042,1)
|
||||
;
|
||||
ALTER TABLE [cmsContentType] ALTER COLUMN pk IDENTITY(535,1)
|
||||
;
|
||||
ALTER TABLE [umbracoUser] ALTER COLUMN id IDENTITY(1,1)
|
||||
;
|
||||
ALTER TABLE [umbracoUserType] ALTER COLUMN id IDENTITY(5,1)
|
||||
;
|
||||
ALTER TABLE [cmsMacroPropertyType] ALTER COLUMN id IDENTITY(26,1)
|
||||
;
|
||||
ALTER TABLE [cmsTab] ALTER COLUMN id IDENTITY(6,1)
|
||||
;
|
||||
ALTER TABLE [cmsPropertyType] ALTER COLUMN id IDENTITY(28,1)
|
||||
;
|
||||
ALTER TABLE [umbracoLanguage] ALTER COLUMN id IDENTITY(2,1)
|
||||
;
|
||||
ALTER TABLE [cmsDataType] ALTER COLUMN pk IDENTITY(39,1)
|
||||
;
|
||||
ALTER TABLE [cmsDataTypePreValues] ALTER COLUMN id IDENTITY(5,1)
|
||||
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{5BA5425F-27A7-4677-865E-82246498AA2E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SQLCE4Umbraco</RootNamespace>
|
||||
<AssemblyName>SQLCE4Umbraco</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\foreign dlls\SQLCE4\System.Data.SqlServerCe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<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" />
|
||||
<Compile Include="SqlCEParameter.cs" />
|
||||
<Compile Include="SqlCeProviderException.cs" />
|
||||
<Compile Include="SqlCEResources1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>SqlCEResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SqlCETableUtility.cs" />
|
||||
<Compile Include="SqlCEUtility.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Sql\Total.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="SqlCEResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>SqlCEResources1.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\umbraco\datalayer\umbraco.datalayer.csproj">
|
||||
<Project>{C7CB79F0-1C97-4B33-BFA7-00731B579AE2}</Project>
|
||||
<Name>umbraco.datalayer</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/************************************************************************************
|
||||
*
|
||||
* Umbraco Data Layer
|
||||
* MIT Licensed work
|
||||
* ©2008 Ruben Verborgh
|
||||
*
|
||||
***********************************************************************************/
|
||||
|
||||
using System.Data.SqlServerCe;
|
||||
using umbraco.DataLayer;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that adapts a SqlDataReader.SqlDataReader to a RecordsReaderAdapter.
|
||||
/// </summary>
|
||||
public class SqlCeDataReaderHelper : RecordsReaderAdapter<SqlCeDataReader>
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqlServerDataReader"/> class.
|
||||
/// </summary>
|
||||
/// <param name="dataReader">The data reader.</param>
|
||||
public SqlCeDataReaderHelper(System.Data.SqlServerCe.SqlCeDataReader dataReader) : base(dataReader) { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region RecordsReaderAdapter Members
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance has records.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if this instance has records; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public override bool HasRecords
|
||||
{
|
||||
get { return DataReader.HasRows; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/************************************************************************************
|
||||
*
|
||||
* Umbraco Data Layer
|
||||
* MIT Licensed work
|
||||
* ©2008 Ruben Verborgh
|
||||
*
|
||||
***********************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.Xml;
|
||||
using System.Diagnostics;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.DataLayer.SqlHelpers.SqlServer;
|
||||
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
/// <summary>
|
||||
/// Sql Helper for an SQL Server database.
|
||||
/// </summary>
|
||||
public class SqlCEHelper : SqlHelper<SqlCeParameter>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqlCEHelper"/> class.
|
||||
/// </summary>
|
||||
/// <param name="connectionString">The connection string.</param>
|
||||
public SqlCEHelper(string connectionString) : base(connectionString)
|
||||
{
|
||||
m_Utility = new SqlCEUtility(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new parameter for use with this specific implementation of ISqlHelper.
|
||||
/// </summary>
|
||||
/// <param name="parameterName">Name of the parameter.</param>
|
||||
/// <param name="value">Value of the parameter.</param>
|
||||
/// <returns>A new parameter of the correct type.</returns>
|
||||
/// <remarks>Abstract factory pattern</remarks>
|
||||
public override IParameter CreateParameter(string parameterName, object value)
|
||||
{
|
||||
return new SqlCEParameter(parameterName, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes a command that returns a single value.
|
||||
/// </summary>
|
||||
/// <param name="commandText">The command text.</param>
|
||||
/// <param name="parameters">The parameters.</param>
|
||||
/// <returns>The return value of the command.</returns>
|
||||
protected override object ExecuteScalar(string commandText, SqlCeParameter[] parameters)
|
||||
{
|
||||
#if DEBUG && DebugDataLayer
|
||||
// Log Query Execution
|
||||
Trace.TraceInformation(GetType().Name + " SQL ExecuteScalar: " + commandText);
|
||||
#endif
|
||||
|
||||
return SqlCeApplicationBlock.ExecuteScalar(ConnectionString, CommandType.Text, commandText, parameters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes a command and returns the number of rows affected.
|
||||
/// </summary>
|
||||
/// <param name="commandText">The command text.</param>
|
||||
/// <param name="parameters">The parameters.</param>
|
||||
/// <returns>
|
||||
/// The number of rows affected by the command.
|
||||
/// </returns>
|
||||
protected override int ExecuteNonQuery(string commandText, SqlCeParameter[] parameters)
|
||||
{
|
||||
#if DEBUG && DebugDataLayer
|
||||
// Log Query Execution
|
||||
Trace.TraceInformation(GetType().Name + " SQL ExecuteNonQuery: " + commandText);
|
||||
#endif
|
||||
|
||||
return SqlCeApplicationBlock.ExecuteNonQuery(ConnectionString, CommandType.Text, commandText, parameters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes a command and returns a records reader containing the results.
|
||||
/// </summary>
|
||||
/// <param name="commandText">The command text.</param>
|
||||
/// <param name="parameters">The parameters.</param>
|
||||
/// <returns>
|
||||
/// A data reader containing the results of the command.
|
||||
/// </returns>
|
||||
protected override IRecordsReader ExecuteReader(string commandText, SqlCeParameter[] parameters)
|
||||
{
|
||||
#if DEBUG && DebugDataLayer
|
||||
// Log Query Execution
|
||||
Trace.TraceInformation(GetType().Name + " SQL ExecuteReader: " + commandText);
|
||||
#endif
|
||||
|
||||
return new SqlCeDataReaderHelper(SqlCeApplicationBlock.ExecuteReader(ConnectionString, CommandType.Text,
|
||||
commandText, parameters));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
/************************************************************************************
|
||||
*
|
||||
* Umbraco Data Layer
|
||||
* MIT Licensed work
|
||||
* ©2008 Ruben Verborgh
|
||||
*
|
||||
***********************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Resources;
|
||||
using umbraco.DataLayer.Utility.Installer;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
/// <summary>
|
||||
/// Database installer for an SQL Server data source.
|
||||
/// </summary>
|
||||
public class SqlCEInstaller : DefaultInstallerUtility<SqlCEHelper>
|
||||
{
|
||||
#region Private Constants
|
||||
|
||||
/// <summary>The latest database version this installer supports.</summary>
|
||||
private const DatabaseVersion LatestVersionSupported = DatabaseVersion.Version4_1;
|
||||
|
||||
/// <summary>The specifications to determine the database version.</summary>
|
||||
private static readonly VersionSpecs[] m_VersionSpecs = new VersionSpecs[] {
|
||||
new VersionSpecs("id","umbracoNode", "-21", DatabaseVersion.Version4_1),
|
||||
new VersionSpecs("action","umbracoAppTree",DatabaseVersion.Version4),
|
||||
new VersionSpecs("description","cmsContentType",DatabaseVersion.Version3),
|
||||
new VersionSpecs("id","sysobjects",DatabaseVersion.None) };
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the installer can upgrade the data source.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if the installer can upgrade the data source; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
/// <remarks>Empty data sources can't be upgraded, just installed.</remarks>
|
||||
public override bool CanUpgrade
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version specification for evaluation by DetermineCurrentVersion.
|
||||
/// Only first matching specification is taken into account.
|
||||
/// </summary>
|
||||
/// <value>The version specifications.</value>
|
||||
protected override VersionSpecs[] VersionSpecs
|
||||
{
|
||||
get { return m_VersionSpecs; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqlCEInstaller"/> class.
|
||||
/// </summary>
|
||||
/// <param name="sqlHelper">The SQL helper.</param>
|
||||
public SqlCEInstaller(SqlCEHelper sqlHelper) : base(sqlHelper, LatestVersionSupported)
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region DefaultInstaller Members
|
||||
|
||||
/// <summary>
|
||||
/// Returns the sql to do a full install
|
||||
/// </summary>
|
||||
protected override string FullInstallSql
|
||||
{
|
||||
get { return SqlCEResources.Total; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the sql to do an upgrade
|
||||
/// </summary>
|
||||
protected override string UpgradeSql
|
||||
{
|
||||
get
|
||||
{
|
||||
string upgradeFile = string.Format("{0}_Upgrade", CurrentVersion.ToString());
|
||||
return SqlCEResources.ResourceManager.GetString(upgradeFile);
|
||||
}
|
||||
}
|
||||
|
||||
// We need to override this as the default way of detection a db connection checks for systables that doesn't exist
|
||||
// in a CE db
|
||||
protected override DatabaseVersion DetermineCurrentVersion()
|
||||
{
|
||||
DatabaseVersion version = base.DetermineCurrentVersion();
|
||||
if (version != DatabaseVersion.Unavailable)
|
||||
{
|
||||
return version;
|
||||
}
|
||||
|
||||
// verify connection
|
||||
try
|
||||
{
|
||||
if (SqlCeApplicationBlock.VerifyConnection(base.SqlHelper.ConnectionString))
|
||||
return DatabaseVersion.None;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Trace.WriteLine(e.ToString());
|
||||
}
|
||||
|
||||
return DatabaseVersion.Unavailable;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/************************************************************************************
|
||||
*
|
||||
* Umbraco Data Layer
|
||||
* MIT Licensed work
|
||||
* ©2008 Ruben Verborgh
|
||||
*
|
||||
***********************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.Data.SqlTypes;
|
||||
using umbraco.DataLayer;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameter class for the SqlCEHelper.
|
||||
/// </summary>
|
||||
public class SqlCEParameter : SqlParameterAdapter<SqlCeParameter>
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqlCEParameter"/> class.
|
||||
/// </summary>
|
||||
/// <param name="parameterName">Name of the parameter.</param>
|
||||
/// <param name="value">Value of the parameter.</param>
|
||||
public SqlCEParameter(string parameterName, object value)
|
||||
: base(new SqlCeParameter(parameterName, value))
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Total" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>sql\total.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,88 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.1
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SqlCE4Umbraco {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class SqlCEResources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal SqlCEResources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SQLCE4Umbraco.SqlCEResources", typeof(SqlCEResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to /*******************************************************************************************
|
||||
///
|
||||
///
|
||||
///
|
||||
///
|
||||
///
|
||||
///
|
||||
///
|
||||
/// Umbraco database installation script for SQL Server
|
||||
///
|
||||
///IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
|
||||
///
|
||||
/// Database version: 4.1.0.0
|
||||
///
|
||||
/// Please increment this version number if ANY change is made to this script,
|
||||
/// so compatibility with scripts for other database systems can be verified easily.
|
||||
/// The first 3 digits depict the Umbraco versi [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string Total {
|
||||
get {
|
||||
return ResourceManager.GetString("Total", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using umbraco.DataLayer.Utility.Table;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
/// <summary>
|
||||
/// SQL Server implementation of <see cref="DefaultTableUtility<S>"/>.
|
||||
/// </summary>
|
||||
public class SqlCETableUtility : DefaultTableUtility<SqlCEHelper>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqlCETableUtility"/> class.
|
||||
/// </summary>
|
||||
/// <param name="sqlHelper">The SQL helper.</param>
|
||||
public SqlCETableUtility(SqlCEHelper sqlHelper)
|
||||
: base(sqlHelper)
|
||||
{ }
|
||||
|
||||
#region DefaultTableUtility<SqlCEHelper> members
|
||||
|
||||
/// <summary>
|
||||
/// Gets the table with the specified name.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>The table, or <c>null</c> if no table with that name exists.</returns>
|
||||
public override ITable GetTable(string name)
|
||||
{
|
||||
if (name == null)
|
||||
throw new ArgumentNullException("name");
|
||||
|
||||
ITable table = null;
|
||||
|
||||
// get name in correct casing
|
||||
name = SqlHelper.ExecuteScalar<string>("SELECT name FROM sys.tables WHERE name=@name",
|
||||
SqlHelper.CreateParameter("name", name));
|
||||
if (name != null)
|
||||
{
|
||||
table = new DefaultTable(name);
|
||||
|
||||
using (IRecordsReader reader = SqlHelper.ExecuteReader(
|
||||
@"SELECT c.name AS Name, st.name AS DataType, c.max_length, c.is_nullable, c.is_identity
|
||||
FROM sys.tables AS t
|
||||
JOIN sys.columns AS c ON t.object_id = c.object_id
|
||||
JOIN sys.schemas AS s ON s.schema_id = t.schema_id
|
||||
JOIN sys.types AS ty ON ty.user_type_id = c.user_type_id
|
||||
JOIN sys.types st ON ty.system_type_id = st.user_type_id
|
||||
WHERE t.name = @name
|
||||
ORDER BY c.column_id", SqlHelper.CreateParameter("name", name)))
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
table.AddField(table.CreateField(reader.GetString("Name"), GetType(reader)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves or updates the table.
|
||||
/// </summary>
|
||||
/// <param name="table">The table to be saved.</param>
|
||||
public override void SaveTable(ITable table)
|
||||
{
|
||||
if (table == null)
|
||||
throw new ArgumentNullException("table");
|
||||
|
||||
ITable oldTable = GetTable(table.Name);
|
||||
|
||||
// create the table if it didn't exist, update fields otherwise
|
||||
if (oldTable == null)
|
||||
{
|
||||
CreateTable(table);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (IField field in table)
|
||||
{
|
||||
// create the field if it did't exist in the old table
|
||||
if (oldTable.FindField(field.Name)==null)
|
||||
{
|
||||
CreateColumn(table, field);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Helper Methods
|
||||
|
||||
/// <summary>
|
||||
/// Creates the table in the data source.
|
||||
/// </summary>
|
||||
/// <param name="table">The table.</param>
|
||||
protected virtual void CreateTable(ITable table)
|
||||
{
|
||||
Debug.Assert(table != null);
|
||||
|
||||
// create enumerator and check for first field
|
||||
IEnumerator<IField> fieldEnumerator = table.GetEnumerator();
|
||||
bool hasNext = fieldEnumerator.MoveNext();
|
||||
if(!hasNext)
|
||||
throw new ArgumentException("The table must contain at least one field.");
|
||||
|
||||
// create query
|
||||
StringBuilder createTableQuery = new StringBuilder();
|
||||
createTableQuery.AppendFormat("CREATE TABLE [{0}] (", SqlHelper.EscapeString(table.Name));
|
||||
|
||||
// add fields
|
||||
while (hasNext)
|
||||
{
|
||||
// add field name and type
|
||||
IField field = fieldEnumerator.Current;
|
||||
createTableQuery.Append('[').Append(field.Name).Append(']');
|
||||
createTableQuery.Append(' ').Append(GetDatabaseType(field));
|
||||
|
||||
// append comma if a following field exists
|
||||
hasNext = fieldEnumerator.MoveNext();
|
||||
if (hasNext)
|
||||
{
|
||||
createTableQuery.Append(',');
|
||||
}
|
||||
}
|
||||
|
||||
// close CREATE TABLE x (...) bracket
|
||||
createTableQuery.Append(')');
|
||||
|
||||
// execute query
|
||||
try
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(createTableQuery.ToString());
|
||||
}
|
||||
catch (Exception executeException)
|
||||
{
|
||||
throw new UmbracoException(String.Format("Could not create table '{0}'.", table), executeException);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new column in the table.
|
||||
/// </summary>
|
||||
/// <param name="table">The table.</param>
|
||||
/// <param name="field">The field used to create the column.</param>
|
||||
protected virtual void CreateColumn(ITable table, IField field)
|
||||
{
|
||||
Debug.Assert(table != null && field != null);
|
||||
|
||||
StringBuilder addColumnQuery = new StringBuilder();
|
||||
addColumnQuery.AppendFormat("ALTER TABLE [{0}] ADD [{1}] {2}",
|
||||
SqlHelper.EscapeString(table.Name),
|
||||
SqlHelper.EscapeString(field.Name),
|
||||
SqlHelper.EscapeString(GetDatabaseType(field)));
|
||||
try
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(addColumnQuery.ToString());
|
||||
}
|
||||
catch (Exception executeException)
|
||||
{
|
||||
throw new UmbracoException(String.Format("Could not create column '{0}' in table '{1}'.",
|
||||
field, table.Name), executeException);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the .Net type corresponding to the specified database data type.
|
||||
/// </summary>
|
||||
/// <param name="dataTypeReader">The data type reader.</param>
|
||||
/// <returns>The .Net type</returns>
|
||||
protected virtual Type GetType(IRecordsReader dataTypeReader)
|
||||
{
|
||||
string typeName = dataTypeReader.GetString("DataType");
|
||||
|
||||
switch (typeName)
|
||||
{
|
||||
case "bit": return typeof(bool);
|
||||
case "tinyint": return typeof(byte);
|
||||
case "datetime": return typeof(DateTime);
|
||||
// TODO: return different decimal type according to field precision
|
||||
case "decimal": return typeof(decimal);
|
||||
case "uniqueidentifier": return typeof(Guid);
|
||||
case "smallint": return typeof(Int16);
|
||||
case "int": return typeof(Int32);
|
||||
case "bigint": return typeof(Int64);
|
||||
case "nvarchar": return typeof(string);
|
||||
default:
|
||||
throw new ArgumentException(String.Format("Cannot convert database type '{0}' to a .Net type.",
|
||||
typeName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the database type corresponding to the field, complete with field properties.
|
||||
/// </summary>
|
||||
/// <param name="field">The field.</param>
|
||||
/// <returns>The database type.</returns>
|
||||
protected virtual string GetDatabaseType(IField field)
|
||||
{
|
||||
StringBuilder fieldBuilder = new StringBuilder();
|
||||
|
||||
fieldBuilder.Append(GetDatabaseTypeName(field));
|
||||
fieldBuilder.Append(field.HasProperty(FieldProperties.Identity) ? " IDENTITY(1,1)" : String.Empty);
|
||||
fieldBuilder.Append(field.HasProperty(FieldProperties.NotNull) ? " NOT NULL" : " NULL");
|
||||
|
||||
return fieldBuilder.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the database type, without field properties.
|
||||
/// </summary>
|
||||
/// <param name="field">The field.</param>
|
||||
/// <returns></returns>
|
||||
protected virtual string GetDatabaseTypeName(IField field)
|
||||
{
|
||||
switch (field.DataType.FullName)
|
||||
{
|
||||
case "System.Boolean": return "bit";
|
||||
case "System.Byte": return "tinyint";
|
||||
case "System.DateTime": return "datetime";
|
||||
case "System.Decimal": return "decimal(28)";
|
||||
case "System.Double": return "decimal(15)";
|
||||
case "System.Single": return "decimal(7)";
|
||||
case "System.Guid": return "uniqueidentifier";
|
||||
case "System.Int16": return "smallint";
|
||||
case "System.Int32": return "int";
|
||||
case "System.Int64": return "bigint";;
|
||||
case "System.String":
|
||||
string type = "nvarchar";
|
||||
return field.Size == 0 ? type : String.Format("{0}({1})", type, field.Size);
|
||||
default:
|
||||
throw new ArgumentException(String.Format("Cannot convert '{0}' to a database type.", field));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/************************************************************************************
|
||||
*
|
||||
* Umbraco Data Layer
|
||||
* MIT Licensed work
|
||||
* ©2008 Ruben Verborgh
|
||||
*
|
||||
***********************************************************************************/
|
||||
|
||||
using umbraco.DataLayer.Utility;
|
||||
using umbraco.DataLayer.Utility.Installer;
|
||||
using umbraco.DataLayer.Utility.Table;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility for an SQL Server data source.
|
||||
/// </summary>
|
||||
public class SqlCEUtility : DefaultUtility<SqlCEHelper>
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqlServerUtility"/> class.
|
||||
/// </summary>
|
||||
/// <param name="sqlHelper">The SQL helper.</param>
|
||||
public SqlCEUtility(SqlCEHelper sqlHelper) : base(sqlHelper)
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region DefaultUtility Members
|
||||
|
||||
/// <summary>
|
||||
/// Creates an installer.
|
||||
/// </summary>
|
||||
/// <returns>The SQL Server installer.</returns>
|
||||
public override IInstallerUtility CreateInstaller()
|
||||
{
|
||||
return new SqlCEInstaller(SqlHelper);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a table utility.
|
||||
/// </summary>
|
||||
/// <returns>The table utility</returns>
|
||||
public override ITableUtility CreateTableUtility()
|
||||
{
|
||||
return new SqlCETableUtility(SqlHelper);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using SQLCE4Umbraco;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
public class SqlCeApplicationBlock
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="connectionString"></param>
|
||||
/// <param name="commandType"></param>
|
||||
/// <param name="commandText"></param>
|
||||
/// <param name="commandParameters"></param>
|
||||
/// <returns></returns>
|
||||
public static object ExecuteScalar(
|
||||
string connectionString,
|
||||
CommandType commandType,
|
||||
string commandText,
|
||||
params SqlCeParameter[] commandParameters
|
||||
)
|
||||
{
|
||||
object retVal;
|
||||
|
||||
try
|
||||
{
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
using (SqlCeCommand cmd = new SqlCeCommand(commandText, conn))
|
||||
{
|
||||
AttachParameters(cmd, commandParameters);
|
||||
Debug.WriteLine("---------------------------------SCALAR-------------------------------------");
|
||||
Debug.WriteLine(commandText);
|
||||
Debug.WriteLine("----------------------------------------------------------------------------");
|
||||
retVal = cmd.ExecuteScalar();
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
catch (Exception ee)
|
||||
{
|
||||
throw new SqlCeProviderException("Error running Scalar: \nSQL Statement:\n" + commandText + "\n\nException:\n" + ee.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="connectionString"></param>
|
||||
/// <param name="commandType"></param>
|
||||
/// <param name="commandText"></param>
|
||||
/// <param name="commandParameters"></param>
|
||||
public static int ExecuteNonQuery(
|
||||
string connectionString,
|
||||
CommandType commandType,
|
||||
string commandText,
|
||||
params SqlCeParameter[] commandParameters
|
||||
)
|
||||
{
|
||||
try
|
||||
{
|
||||
int rowsAffected;
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
// this is for multiple queries in the installer
|
||||
if (commandText.Trim().StartsWith("!!!"))
|
||||
{
|
||||
commandText = commandText.Trim().Trim('!');
|
||||
string[] commands = commandText.Split('|');
|
||||
string currentCmd = String.Empty;
|
||||
|
||||
foreach (string cmd in commands)
|
||||
{
|
||||
try
|
||||
{
|
||||
currentCmd = cmd;
|
||||
if (!String.IsNullOrWhiteSpace(cmd))
|
||||
{
|
||||
SqlCeCommand c = new SqlCeCommand(cmd, conn);
|
||||
c.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.WriteLine("*******************************************************************");
|
||||
Debug.WriteLine(currentCmd);
|
||||
Debug.WriteLine(e);
|
||||
Debug.WriteLine("*******************************************************************");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.WriteLine("----------------------------------------------------------------------------");
|
||||
Debug.WriteLine(commandText);
|
||||
Debug.WriteLine("----------------------------------------------------------------------------");
|
||||
SqlCeCommand cmd = new SqlCeCommand(commandText, conn);
|
||||
AttachParameters(cmd, commandParameters);
|
||||
rowsAffected = cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
return rowsAffected;
|
||||
}
|
||||
catch (Exception ee)
|
||||
{
|
||||
throw new SqlCeProviderException("Error running NonQuery: \nSQL Statement:\n" + commandText + "\n\nException:\n" + ee.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="connectionString"></param>
|
||||
/// <param name="commandType"></param>
|
||||
/// <param name="commandText"></param>
|
||||
/// <param name="commandParameters"></param>
|
||||
/// <returns></returns>
|
||||
public static SqlCeDataReader ExecuteReader(
|
||||
string connectionString,
|
||||
CommandType commandType,
|
||||
string commandText,
|
||||
params SqlCeParameter[] commandParameters
|
||||
)
|
||||
{
|
||||
try
|
||||
{
|
||||
Debug.WriteLine("---------------------------------READER-------------------------------------");
|
||||
Debug.WriteLine(commandText);
|
||||
Debug.WriteLine("----------------------------------------------------------------------------");
|
||||
SqlCeDataReader reader;
|
||||
SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString);
|
||||
|
||||
try
|
||||
{
|
||||
SqlCeCommand cmd = new SqlCeCommand(commandText, conn);
|
||||
AttachParameters(cmd, commandParameters);
|
||||
reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
}
|
||||
catch
|
||||
{
|
||||
conn.Close();
|
||||
throw;
|
||||
}
|
||||
|
||||
return reader;
|
||||
}
|
||||
catch (Exception ee)
|
||||
{
|
||||
throw new SqlCeProviderException("Error running Reader: \nSQL Statement:\n" + commandText + "\n\nException:\n" + ee.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static bool VerifyConnection(string connectionString)
|
||||
{
|
||||
bool isConnected = false;
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
isConnected = conn.State == ConnectionState.Open;
|
||||
}
|
||||
|
||||
return isConnected;
|
||||
}
|
||||
|
||||
private static void AttachParameters(SqlCeCommand command, SqlCeParameter[] commandParameters)
|
||||
{
|
||||
foreach (SqlCeParameter parameter in commandParameters)
|
||||
{
|
||||
if ((parameter.Direction == ParameterDirection.InputOutput) && (parameter.Value == null))
|
||||
{
|
||||
parameter.Value = DBNull.Value;
|
||||
}
|
||||
command.Parameters.Add(parameter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
public class SqlCeProviderException : Exception
|
||||
{
|
||||
public SqlCeProviderException() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SqlCeProviderException(string message) : base(message)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,21 +2,30 @@ 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
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for KeyValuePrevalueEditor.
|
||||
/// </summary>
|
||||
|
||||
[ClientDependency(ClientDependencyType.Javascript, "Jeditable/jquery.jeditable.js", "UmbracoClient")]
|
||||
public class KeyValuePrevalueEditor : System.Web.UI.WebControls.PlaceHolder, interfaces.IDataPrevalue
|
||||
{
|
||||
|
||||
// UI controls
|
||||
public System.Web.UI.WebControls.DropDownList _dropdownlist;
|
||||
public TextBox _textbox;
|
||||
private TextBox _tbhidden;
|
||||
public umbraco.uicontrols.PropertyPanel pp1 = new umbraco.uicontrols.PropertyPanel();
|
||||
public umbraco.uicontrols.PropertyPanel pp2 = new umbraco.uicontrols.PropertyPanel();
|
||||
|
||||
@@ -56,10 +65,15 @@ namespace umbraco.editorControls
|
||||
_textbox = new TextBox();
|
||||
_textbox.ID = "AddValue";
|
||||
|
||||
_tbhidden = new TextBox();
|
||||
_tbhidden.Attributes.Add("style", "display:none;");
|
||||
_tbhidden.CssClass = "valuesHiddenInput";
|
||||
|
||||
// put the childcontrols in context - ensuring that
|
||||
// the viewstate is persisted etc.
|
||||
this.Controls.Add(_dropdownlist);
|
||||
this.Controls.Add(_textbox);
|
||||
this.Controls.Add(_tbhidden);
|
||||
|
||||
_dropdownlist.Items.Add(DBTypes.Date.ToString());
|
||||
_dropdownlist.Items.Add(DBTypes.Integer.ToString());
|
||||
@@ -70,6 +84,22 @@ namespace umbraco.editorControls
|
||||
protected override void OnInit(EventArgs e) {
|
||||
base.OnInit(e);
|
||||
|
||||
|
||||
System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;
|
||||
|
||||
|
||||
page.ClientScript.RegisterClientScriptInclude(
|
||||
"umbraco.editorControls.KeyValuePrevalueEditor.js",
|
||||
page.ClientScript.GetWebResourceUrl(typeof(KeyValuePrevalueEditor), "umbraco.editorControls.KeyValuePrevalueEditor.js"));
|
||||
|
||||
|
||||
HtmlHead head = (HtmlHead)page.Header;
|
||||
HtmlLink link = new HtmlLink();
|
||||
link.Attributes.Add("href", page.ClientScript.GetWebResourceUrl(typeof(KeyValuePrevalueEditor), "umbraco.editorControls.KeyValuePrevalueEditor.css"));
|
||||
link.Attributes.Add("type", "text/css");
|
||||
link.Attributes.Add("rel", "stylesheet");
|
||||
head.Controls.Add(link);
|
||||
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
@@ -96,13 +126,55 @@ namespace umbraco.editorControls
|
||||
public void Save()
|
||||
{
|
||||
_datatype.DBType = (cms.businesslogic.datatype.DBTypes)Enum.Parse(typeof(cms.businesslogic.datatype.DBTypes), _dropdownlist.SelectedValue, true);
|
||||
// If the add new prevalue textbox is filled out - add the value to the collection.
|
||||
|
||||
//changes in name and sortorder
|
||||
if (!string.IsNullOrEmpty(_tbhidden.Text))
|
||||
{
|
||||
int so = 0;
|
||||
foreach (string row in _tbhidden.Text.Split(';'))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(row))
|
||||
{
|
||||
|
||||
int id = 0;
|
||||
|
||||
if (row.Split('|').Length == 2 && int.TryParse(row.Split('|')[0], out id) && row.Split('|')[1].Length > 0)
|
||||
{
|
||||
|
||||
IParameter[] SqlParams = new IParameter[] {
|
||||
SqlHelper.CreateParameter("@value",row.Split('|')[1]),
|
||||
SqlHelper.CreateParameter("@sortorder",so),
|
||||
SqlHelper.CreateParameter("@id",id)};
|
||||
SqlHelper.ExecuteNonQuery("update cmsDataTypePreValues set [value] = @value, sortorder = @sortorder where id = @id", SqlParams);
|
||||
|
||||
}
|
||||
|
||||
so++;
|
||||
}
|
||||
}
|
||||
|
||||
_tbhidden.Text = "";
|
||||
}
|
||||
|
||||
// If the add new prevalue textbox is filled out - add the value to the collection.
|
||||
if (_textbox.Text != "")
|
||||
{
|
||||
|
||||
int so = -1;
|
||||
|
||||
try
|
||||
{
|
||||
so = SqlHelper.ExecuteScalar<int>("select max(sortorder) from cmsDataTypePreValues where datatypenodeid = @dtdefid",
|
||||
SqlHelper.CreateParameter("@dtdefid", _datatype.DataTypeDefinitionId));
|
||||
so++;
|
||||
}
|
||||
catch { }
|
||||
|
||||
IParameter[] SqlParams = new IParameter[] {
|
||||
SqlHelper.CreateParameter("@value",_textbox.Text),
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
|
||||
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')",SqlParams);
|
||||
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId),
|
||||
SqlHelper.CreateParameter("@so",so)};
|
||||
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,@so,'')",SqlParams);
|
||||
_textbox.Text = "";
|
||||
|
||||
ScriptManager.GetCurrent(Page).SetFocus(_textbox);
|
||||
@@ -115,13 +187,14 @@ namespace umbraco.editorControls
|
||||
_dropdownlist.RenderControl(writer);
|
||||
writer.Write("<br style='clear: both'/></div>");
|
||||
|
||||
SortedList _prevalues = Prevalues;
|
||||
List<KeyValuePair<int, String>> _prevalues = PrevaluesAsKeyValuePairList;
|
||||
if (_prevalues.Count > 0) {
|
||||
writer.Write("<div class='propertyItem'><table style='width: 100%'>");
|
||||
writer.Write("<tr><th style='width: 15%'>Text</th><td colspan='2'>Value</td></tr>");
|
||||
writer.Write("<div class='propertyItem'><table style='width: 100%' id=\"prevalues\">");
|
||||
writer.Write("<tr class='header'><th style='width: 15%'>Text</th><td colspan='2'>Value</td></tr>");
|
||||
|
||||
foreach (object key in _prevalues.Keys) {
|
||||
writer.Write("<tr><td>" + _prevalues[key].ToString() + "</td><td> " + key + "</td><td><a href='?id=" + _datatype.DataTypeDefinitionId + "&delete=" + key.ToString() + "'>" + ui.Text("delete") + "</a></td></tr>");
|
||||
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 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>");
|
||||
}
|
||||
@@ -129,14 +202,16 @@ namespace umbraco.editorControls
|
||||
writer.Write("<div class='propertyItem'><div class='propertyItemheader'>" + ui.Text("addPrevalue") + "</div>");
|
||||
_textbox.RenderControl(writer);
|
||||
writer.Write("<br style='clear: both'/></div>");
|
||||
|
||||
|
||||
|
||||
_tbhidden.RenderControl(writer);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public SortedList Prevalues {
|
||||
get
|
||||
{
|
||||
|
||||
SortedList retval = new SortedList();
|
||||
IRecordsReader dr = SqlHelper.ExecuteReader(
|
||||
"Select id, [value] from cmsDataTypePreValues where DataTypeNodeId = "
|
||||
@@ -148,5 +223,23 @@ namespace umbraco.editorControls
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public List<KeyValuePair<int, String>> PrevaluesAsKeyValuePairList
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
List<KeyValuePair<int, String>> items = new List<KeyValuePair<int, String>>();
|
||||
|
||||
IRecordsReader dr = SqlHelper.ExecuteReader(
|
||||
"Select id, [value] from cmsDataTypePreValues where DataTypeNodeId = "
|
||||
+ _datatype.DataTypeDefinitionId + " order by sortorder");
|
||||
|
||||
while (dr.Read())
|
||||
items.Add(new KeyValuePair<int, string>(dr.GetInt("id"), dr.GetString("value")));
|
||||
dr.Close();
|
||||
return items;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
#prevalues .ui-sortable-helper
|
||||
{
|
||||
border: 2px dotted #ccc;
|
||||
background-color: #EEE;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
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)",
|
||||
handle: '.handle',
|
||||
update: function () {
|
||||
|
||||
ResetValues();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
function ResetValues() {
|
||||
|
||||
var val = "";
|
||||
|
||||
jQuery("#prevalues .row").each(function () {
|
||||
|
||||
var text = jQuery(".text", this).html();
|
||||
var value = jQuery(".value", this).html();
|
||||
|
||||
|
||||
val += value + "|" + text + ";";
|
||||
|
||||
});
|
||||
|
||||
jQuery(".valuesHiddenInput").val(val);
|
||||
}
|
||||
|
||||
function ConfirmPrevalueDelete() {
|
||||
return confirm("Are you sure you want to delete");
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class CheckBox: DataEditorSettingType
|
||||
{
|
||||
private System.Web.UI.WebControls.CheckBox cb = new System.Web.UI.WebControls.CheckBox();
|
||||
|
||||
private string _val = string.Empty;
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return cb.Checked.ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class CheckBoxList : DataEditorSettingType
|
||||
{
|
||||
private System.Web.UI.WebControls.CheckBoxList cbl = new System.Web.UI.WebControls.CheckBoxList();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
string retVal = string.Empty;
|
||||
|
||||
foreach (System.Web.UI.WebControls.ListItem item in cbl.Items)
|
||||
{
|
||||
if (item.Selected)
|
||||
retVal += item.Value + ";";
|
||||
}
|
||||
return retVal;
|
||||
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
cbl.ID = sender.GetName();
|
||||
|
||||
cbl.Items.Clear();
|
||||
|
||||
foreach (string s in Prevalues)
|
||||
{
|
||||
System.Web.UI.WebControls.ListItem item = new System.Web.UI.WebControls.ListItem(s);
|
||||
|
||||
if(_val.Contains(s + ";"))
|
||||
item.Selected = true;
|
||||
|
||||
cbl.Items.Add(item);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
cbl.SelectedValue = DefaultValue;
|
||||
|
||||
|
||||
return cbl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class DropDownList: DataEditorSettingType
|
||||
{
|
||||
private System.Web.UI.WebControls.DropDownList ddl = new System.Web.UI.WebControls.DropDownList();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddl.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
ddl.ID = sender.GetName();
|
||||
|
||||
ddl.Items.Clear();
|
||||
|
||||
foreach (string s in Prevalues)
|
||||
{
|
||||
ddl.Items.Add(s);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
ddl.SelectedValue = DefaultValue;
|
||||
else
|
||||
ddl.SelectedValue = _val;
|
||||
|
||||
return ddl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class ListBox : DataEditorSettingType
|
||||
{
|
||||
private System.Web.UI.WebControls.ListBox lb = new System.Web.UI.WebControls.ListBox();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return lb.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
lb.ID = sender.GetName();
|
||||
|
||||
lb.CssClass = "guiInputStandardSize";
|
||||
|
||||
lb.Items.Clear();
|
||||
|
||||
foreach (string s in Prevalues)
|
||||
{
|
||||
lb.Items.Add(s);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
lb.SelectedValue = DefaultValue;
|
||||
else
|
||||
lb.SelectedValue = _val;
|
||||
|
||||
return lb;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class ListBoxMultiple : DataEditorSettingType
|
||||
{
|
||||
private System.Web.UI.WebControls.ListBox lb = new System.Web.UI.WebControls.ListBox();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
string retVal = string.Empty;
|
||||
|
||||
foreach (System.Web.UI.WebControls.ListItem item in lb.Items)
|
||||
{
|
||||
if (item.Selected)
|
||||
retVal += item.Value + ";";
|
||||
}
|
||||
return retVal;
|
||||
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
lb.ID = sender.GetName();
|
||||
lb.SelectionMode = System.Web.UI.WebControls.ListSelectionMode.Multiple;
|
||||
lb.CssClass = "guiInputStandardSize";
|
||||
lb.Items.Clear();
|
||||
|
||||
foreach (string s in Prevalues)
|
||||
{
|
||||
System.Web.UI.WebControls.ListItem item = new System.Web.UI.WebControls.ListItem(s);
|
||||
|
||||
if (_val.Contains(s + ";"))
|
||||
item.Selected = true;
|
||||
|
||||
lb.Items.Add(item);
|
||||
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
lb.SelectedValue = DefaultValue;
|
||||
|
||||
return lb;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class Password : DataEditorSettingType
|
||||
{
|
||||
private TextBox tb = new TextBox();
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return tb.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
tb.Text = value;
|
||||
tb.Attributes["value"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
tb.ID = sender.GetName();
|
||||
|
||||
tb.TextMode = TextBoxMode.Password;
|
||||
tb.CssClass = "guiInputText guiInputStandardSize";
|
||||
|
||||
if (string.IsNullOrEmpty(tb.Text) && !string.IsNullOrEmpty(DefaultValue))
|
||||
tb.Text = DefaultValue;
|
||||
|
||||
return tb;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class BasePicker: DataEditorSettingType
|
||||
{
|
||||
public Guid ObjectGuid { get; set; }
|
||||
|
||||
private System.Web.UI.WebControls.DropDownList ddl = new System.Web.UI.WebControls.DropDownList();
|
||||
|
||||
private string _val = string.Empty;
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddl.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
|
||||
ddl.ID = sender.GetName();
|
||||
|
||||
ddl.Items.Clear();
|
||||
List<KeyValuePair<String, String>> items = new List<KeyValuePair<String, String>>();
|
||||
|
||||
if (ObjectGuid != Guid.Empty)
|
||||
{
|
||||
Guid[] guids = umbraco.cms.businesslogic.CMSNode.getAllUniquesFromObjectType(ObjectGuid);
|
||||
foreach (Guid g in guids)
|
||||
{
|
||||
umbraco.cms.businesslogic.CMSNode node = new umbraco.cms.businesslogic.CMSNode(g);
|
||||
items.Add(new KeyValuePair<string, string>(node.Id.ToString(), node.Text));
|
||||
}
|
||||
}
|
||||
|
||||
items.Sort(delegate(KeyValuePair<String, String> x, KeyValuePair<String, String> y) { return x.Value.CompareTo(y.Value); });
|
||||
|
||||
foreach (KeyValuePair<String, String> kv in items)
|
||||
{
|
||||
ddl.Items.Add(new System.Web.UI.WebControls.ListItem(kv.Value, kv.Key));
|
||||
}
|
||||
|
||||
System.Web.UI.WebControls.ListItem li = new System.Web.UI.WebControls.ListItem("Choose...", "");
|
||||
li.Selected = true;
|
||||
ddl.Items.Insert(0, li);
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
ddl.SelectedValue = DefaultValue;
|
||||
else
|
||||
ddl.SelectedValue = _val;
|
||||
|
||||
return ddl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class Content : DataEditorSettingType
|
||||
{
|
||||
private ContentPickerWithXpathOption cc = new ContentPickerWithXpathOption();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return cc.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
|
||||
cc.ShowXPath = false;
|
||||
cc.ID = sender.GetName().Replace(" ", "_");
|
||||
|
||||
cc.Value = _val;
|
||||
return cc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ContentWithXpath : DataEditorSettingType
|
||||
{
|
||||
private ContentPickerWithXpathOption cc = new ContentPickerWithXpathOption();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return cc.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
cc.ShowXPath = true;
|
||||
cc.ID = sender.GetName().Replace(" ", "_");
|
||||
|
||||
cc.Value = _val;
|
||||
return cc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class ContentPickerWithXpathOption : WebControl
|
||||
{
|
||||
private bool _showXPath = true;
|
||||
|
||||
public bool ShowXPath
|
||||
{
|
||||
get { return _showXPath; }
|
||||
set { _showXPath = value; }
|
||||
}
|
||||
|
||||
private umbraco.controls.ContentPicker cc;
|
||||
private TextBox tb;
|
||||
|
||||
public ContentPickerWithXpathOption()
|
||||
{
|
||||
EnsureChildControls();
|
||||
}
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "contentpickerxpath", @"
|
||||
|
||||
function showXpathTextbox(control)
|
||||
{
|
||||
$('.picker',$('#' + control)).hide();
|
||||
$('.xpath',$('#' + control)).show();
|
||||
}
|
||||
|
||||
function showContentPicker(control)
|
||||
{
|
||||
$('.xpath',$('#' + control)).hide();
|
||||
$('.xpath input',$('#' + control)).val('');
|
||||
$('.picker',$('#' + control)).show();
|
||||
}
|
||||
", true);
|
||||
|
||||
base.OnInit(e);
|
||||
}
|
||||
|
||||
protected override void CreateChildControls()
|
||||
{
|
||||
cc = new umbraco.controls.ContentPicker();
|
||||
this.Controls.Add(cc);
|
||||
|
||||
|
||||
if (_showXPath)
|
||||
{
|
||||
tb = new TextBox();
|
||||
tb.CssClass = "guiInputText guiInputStandardSize";
|
||||
this.Controls.Add(tb);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RenderChildren(System.Web.UI.HtmlTextWriter writer)
|
||||
{
|
||||
|
||||
writer.Write(string.Format("<div class=\"picker\"{0}>", tb.Text != string.Empty ? " style=\"display:none\"" : ""));
|
||||
cc.RenderControl(writer);
|
||||
|
||||
if (_showXPath)
|
||||
{
|
||||
writer.Write(string.Format(
|
||||
" <a href=\"javascript:showXpathTextbox('{0}');\">Or enter Xpath</a>",
|
||||
this.ClientID));
|
||||
|
||||
writer.Write("</div>");
|
||||
|
||||
writer.Write(string.Format("<div class=\"xpath\"{0}>", !(tb.Text != string.Empty) ? " style=\"display:none\"" : ""));
|
||||
tb.RenderControl(writer);
|
||||
|
||||
writer.Write(string.Format(
|
||||
" <a href=\"javascript:showContentPicker('{0}');\">Or pick node</a>",
|
||||
this.ClientID));
|
||||
}
|
||||
|
||||
writer.Write("</div>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private string _val = string.Empty;
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
if (_showXPath && tb.Text != string.Empty)
|
||||
return tb.Text;
|
||||
else
|
||||
return cc.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
_val = value;
|
||||
|
||||
int nodeId;
|
||||
|
||||
if (int.TryParse(_val, out nodeId))
|
||||
cc.Value = _val;
|
||||
else if (ShowXPath)
|
||||
tb.Text = _val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.uicontrols.DatePicker;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class Date: DataEditorSettingType
|
||||
{
|
||||
private DateTimePicker dp = new DateTimePicker();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return dp.DateTime.ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
|
||||
dp.ShowTime = false;
|
||||
|
||||
dp.ID = sender.GetName().Replace(" ", "_");
|
||||
|
||||
if(!string.IsNullOrEmpty(_val))
|
||||
dp.DateTime = Convert.ToDateTime(_val);
|
||||
|
||||
return dp;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.uicontrols.DatePicker;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class DateWithTime : DataEditorSettingType
|
||||
{
|
||||
private DateTimePicker dp = new DateTimePicker();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return dp.DateTime.ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
|
||||
dp.ShowTime = true;
|
||||
|
||||
dp.ID = sender.GetName().Replace(" ", "_");
|
||||
|
||||
if (!string.IsNullOrEmpty(_val))
|
||||
dp.DateTime = Convert.ToDateTime(_val);
|
||||
|
||||
return dp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
|
||||
public class DocumentType: BasePicker {
|
||||
public DocumentType() {
|
||||
ObjectGuid = new Guid("a2cb7800-f571-4787-9638-bc48539a0efb");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class Field : DataEditorSettingType
|
||||
{
|
||||
private System.Web.UI.WebControls.DropDownList ddl = new System.Web.UI.WebControls.DropDownList();
|
||||
|
||||
private string _val = string.Empty;
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddl.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
|
||||
ddl.ID = sender.GetName();
|
||||
|
||||
ddl.Items.Clear();
|
||||
List<KeyValuePair<String, String>> items = new List<KeyValuePair<String, String>>();
|
||||
|
||||
|
||||
string[] preValuesSource = { "@createDate", "@creatorName", "@level", "@nodeType", "@nodeTypeAlias", "@pageID", "@pageName", "@parentID", "@path", "@template", "@updateDate", "@writerID", "@writerName" };
|
||||
|
||||
string fieldSql = "select distinct alias from cmsPropertyType order by alias";
|
||||
|
||||
IRecordsReader dataTypes = umbraco.BusinessLogic.Application.SqlHelper.ExecuteReader(fieldSql);
|
||||
ddl.DataTextField = "alias";
|
||||
ddl.DataValueField = "alias";
|
||||
ddl.DataSource = dataTypes;
|
||||
ddl.DataBind();
|
||||
|
||||
foreach (string s in preValuesSource)
|
||||
{
|
||||
ddl.Items.Add(new System.Web.UI.WebControls.ListItem(s, s.Replace("@", "")));
|
||||
}
|
||||
|
||||
|
||||
System.Web.UI.WebControls.ListItem li = new System.Web.UI.WebControls.ListItem("Choose...", "");
|
||||
li.Selected = true;
|
||||
ddl.Items.Insert(0, li);
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
ddl.SelectedValue = DefaultValue;
|
||||
else
|
||||
ddl.SelectedValue = _val;
|
||||
|
||||
return ddl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class Media : DataEditorSettingType
|
||||
{
|
||||
|
||||
private umbraco.controls.ContentPicker mp = new umbraco.controls.ContentPicker();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
return mp.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
int output;
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, out output))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
|
||||
mp.ID = sender.GetName().Replace(" ", "_");
|
||||
|
||||
mp.AppAlias = "media";
|
||||
mp.TreeAlias = "media";
|
||||
|
||||
int output;
|
||||
if (!string.IsNullOrEmpty(_val) && int.TryParse(_val, out output))
|
||||
{
|
||||
mp.Value = _val;
|
||||
|
||||
}
|
||||
return mp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class MediaType : BasePicker
|
||||
{
|
||||
public MediaType()
|
||||
{
|
||||
ObjectGuid = new Guid("4ea4382b-2f5a-4c2b-9587-ae9b3cf3602e");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class MemberGroup : BasePicker
|
||||
{
|
||||
public MemberGroup()
|
||||
{
|
||||
ObjectGuid = new Guid("366e63b9-880f-4e13-a61c-98069b029728");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class MemberType : BasePicker
|
||||
{
|
||||
public MemberType()
|
||||
{
|
||||
ObjectGuid = new Guid("9b5416fb-e72f-45a9-a07b-5a9a2709ce43");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
|
||||
namespace umbraco.editorControls.SettingControls.Pickers
|
||||
{
|
||||
public class Path : DataEditorSettingType
|
||||
{
|
||||
private PathPicker pp = new PathPicker();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return pp.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
|
||||
|
||||
pp.ID = sender.GetName().Replace(" ", "_");
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
pp.Value = DefaultValue;
|
||||
else
|
||||
pp.Value = _val;
|
||||
|
||||
return pp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class PathPicker : WebControl
|
||||
{
|
||||
private TextBox tb;
|
||||
|
||||
public PathPicker()
|
||||
{
|
||||
EnsureChildControls();
|
||||
}
|
||||
|
||||
protected override void CreateChildControls()
|
||||
{
|
||||
|
||||
tb = new TextBox();
|
||||
tb.CssClass = "guiInputText guiInputStandardSize";
|
||||
tb.ID = this.ID + "input";
|
||||
this.Controls.Add(tb);
|
||||
|
||||
}
|
||||
|
||||
protected override void Render(System.Web.UI.HtmlTextWriter writer)
|
||||
{
|
||||
tb.RenderControl(writer);
|
||||
|
||||
writer.WriteLine(string.Format(" <a onclick=\"{0}\"href=\"javascript:void(0);\">Select</a>",
|
||||
string.Format("javascript:UmbClientMgr.openModalWindow('developer/packages/directoryBrowser.aspx?target={0}', 'Choose a file or a folder', true, 400, 500, 0, 0); return false;", tb.ClientID)));
|
||||
|
||||
}
|
||||
|
||||
private string _val = string.Empty;
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return tb.Text;
|
||||
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
_val = value;
|
||||
tb.Text = _val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class RadioButtonList: DataEditorSettingType
|
||||
{
|
||||
private System.Web.UI.WebControls.RadioButtonList rbl = new System.Web.UI.WebControls.RadioButtonList();
|
||||
|
||||
private string _val = string.Empty;
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return rbl.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
_val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
rbl.ID = sender.GetName();
|
||||
|
||||
rbl.Items.Clear();
|
||||
|
||||
foreach (string s in Prevalues)
|
||||
{
|
||||
rbl.Items.Add(s);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
|
||||
rbl.SelectedValue = DefaultValue;
|
||||
else
|
||||
rbl.SelectedValue = _val;
|
||||
|
||||
return rbl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class TextArea : DataEditorSettingType
|
||||
{
|
||||
private TextBox tb = new TextBox();
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return tb.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
tb.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
tb.ID = sender.GetName();
|
||||
tb.TextMode = TextBoxMode.MultiLine;
|
||||
tb.CssClass = "guiInputText guiInputStandardSize";
|
||||
tb.Rows = 7;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
public class TextField : DataEditorSettingType
|
||||
{
|
||||
private TextBox tb = new TextBox();
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return tb.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
tb.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
tb.ID = sender.GetName();
|
||||
tb.TextMode = TextBoxMode.SingleLine;
|
||||
tb.CssClass = "guiInputText guiInputStandardSize";
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(tb.Text) && !string.IsNullOrEmpty(DefaultValue))
|
||||
tb.Text = DefaultValue;
|
||||
|
||||
return tb;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
|
||||
[assembly: System.Web.UI.WebResource("umbraco.editorControls.SettingControls.js.Values.js", "text/js")]
|
||||
[assembly: System.Web.UI.WebResource("umbraco.editorControls.SettingControls.css.Values.css", "text/css")]
|
||||
namespace umbraco.editorControls.SettingControls
|
||||
{
|
||||
|
||||
public class Values : DataEditorSettingType
|
||||
{
|
||||
|
||||
private Panel p = new Panel();
|
||||
private TextBox tb = new TextBox();
|
||||
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return tb.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
tb.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
||||
{
|
||||
tb.ID = sender.GetName();
|
||||
tb.CssClass = "valuesInput";
|
||||
tb.Attributes.Add("style", "display:none;");
|
||||
|
||||
|
||||
string html = "<div class='values'>";
|
||||
|
||||
html += "</div>";
|
||||
|
||||
html += "<input type='text' class='valueInput' />";
|
||||
html += " <a onclick=\"valuesDataEditorSettingTypeAddValue(this); return false;\" href='#' class='Add'>Add Value</a>";
|
||||
|
||||
|
||||
p.Controls.Add(new System.Web.UI.LiteralControl("<div class='valuesDataEditorSettingType'>"));
|
||||
p.Controls.Add(new System.Web.UI.LiteralControl(html));
|
||||
p.Controls.Add(tb);
|
||||
p.Controls.Add(new System.Web.UI.LiteralControl("</div>"));
|
||||
|
||||
|
||||
System.Web.UI.Page page = (System.Web.UI.Page)HttpContext.Current.Handler;
|
||||
|
||||
|
||||
page.ClientScript.RegisterClientScriptInclude(
|
||||
"umbraco.editorControls.SettingControls.js.Values.js",
|
||||
page.ClientScript.GetWebResourceUrl(typeof(Values), "umbraco.editorControls.SettingControls.js.Values.js"));
|
||||
|
||||
|
||||
HtmlHead head = (HtmlHead)page.Header;
|
||||
HtmlLink link = new HtmlLink();
|
||||
link.Attributes.Add("href", page.ClientScript.GetWebResourceUrl(typeof(Values), "umbraco.editorControls.SettingControls.css.Values.css"));
|
||||
link.Attributes.Add("type", "text/css");
|
||||
link.Attributes.Add("rel", "stylesheet");
|
||||
head.Controls.Add(link);
|
||||
|
||||
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
.valuesDataEditorSettingType .value
|
||||
{
|
||||
padding-bottom:5px;
|
||||
}
|
||||
|
||||
.valuesDataEditorSettingType .value .del
|
||||
{
|
||||
color:Red;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.valuesDataEditorSettingType .value .handle
|
||||
{
|
||||
cursor:move;
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
jQuery(".valuesDataEditorSettingType").each(function () {
|
||||
|
||||
var vals = jQuery(".valuesInput", this).val();
|
||||
|
||||
var values = jQuery(".values", this);
|
||||
|
||||
var vals_array = vals.split(";");
|
||||
var part_num = 0;
|
||||
while (part_num < vals_array.length) {
|
||||
|
||||
if (vals_array[part_num] != "") {
|
||||
var existingValue = "<div class='value'><span>" + vals_array[part_num] + "</span> <a class='del'>Delete</a> <a class='handle'>Drag</a></div>";
|
||||
|
||||
values.append(existingValue);
|
||||
}
|
||||
part_num++;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
jQuery(".valuesDataEditorSettingType .value .del").click(function () {
|
||||
jQuery(this).parent().remove();
|
||||
valuesDataEditorSettingTypeResetValues();
|
||||
});
|
||||
|
||||
|
||||
jQuery(".valuesDataEditorSettingType .value span").valuesInlineEdit();
|
||||
|
||||
|
||||
jQuery(".valuesDataEditorSettingType .values").sortable({
|
||||
handle : '.handle',
|
||||
update : function () {
|
||||
|
||||
valuesDataEditorSettingTypeResetValues();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function valuesDataEditorSettingTypeAddValue(sender) {
|
||||
|
||||
|
||||
var valuesDataEditorSettingType = jQuery(sender).parent();
|
||||
|
||||
var value = jQuery(".valueInput", valuesDataEditorSettingType).val();
|
||||
|
||||
if (value != "") {
|
||||
|
||||
var values = jQuery(".values", valuesDataEditorSettingType);
|
||||
|
||||
var newValue = "<div class='value'><span>" + value + "</span> <a class='del'>Delete</a> <a class='handle'>Drag</a></div>";
|
||||
|
||||
values.append(newValue);
|
||||
|
||||
jQuery(".valuesDataEditorSettingType .value span").valuesInlineEdit();
|
||||
|
||||
jQuery(".valueInput", valuesDataEditorSettingType).val("");
|
||||
|
||||
|
||||
valuesDataEditorSettingTypeSetValues(values, jQuery(".valuesInput", valuesDataEditorSettingType));
|
||||
}
|
||||
|
||||
|
||||
jQuery(".valuesDataEditorSettingType .value .del").click(function () {
|
||||
jQuery(this).parent().remove();
|
||||
valuesDataEditorSettingTypeResetValues();
|
||||
});
|
||||
|
||||
jQuery(".valuesDataEditorSettingType .values").sortable({
|
||||
handle : '.handle',
|
||||
update : function () {
|
||||
|
||||
valuesDataEditorSettingTypeResetValues();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function valuesDataEditorSettingTypeSetValues(valuesContainer,valuesInput) {
|
||||
|
||||
var vals = "";
|
||||
jQuery(".value", valuesContainer).each(function () {
|
||||
|
||||
vals += jQuery("span",this).html() + ";";
|
||||
});
|
||||
|
||||
valuesInput.val(vals);
|
||||
}
|
||||
|
||||
function valuesDataEditorSettingTypeResetValues() {
|
||||
jQuery(".valuesDataEditorSettingType").each(function () {
|
||||
|
||||
valuesDataEditorSettingTypeSetValues(jQuery(".values", this), jQuery(".valuesInput", this));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
(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);
|
||||
valuesDataEditorSettingTypeResetValues();
|
||||
}, 200);
|
||||
})
|
||||
.focus();
|
||||
}
|
||||
})
|
||||
.hover(
|
||||
function () {
|
||||
$(this).addClass(options.hover);
|
||||
},
|
||||
function () {
|
||||
$(this).removeClass(options.hover);
|
||||
}
|
||||
);
|
||||
|
||||
if (!self.value()) {
|
||||
self.html($(placeholderHtml));
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
@@ -13,7 +13,7 @@ namespace umbraco.editorControls.checkboxlist
|
||||
get
|
||||
{
|
||||
if (_Editor == null)
|
||||
_Editor = new checkboxlistEditor(Data,((KeyValuePrevalueEditor)PrevalueEditor).Prevalues);
|
||||
_Editor = new checkboxlistEditor(Data,((KeyValuePrevalueEditor)PrevalueEditor).PrevaluesAsKeyValuePairList);
|
||||
return _Editor;
|
||||
}
|
||||
}
|
||||
|
||||