Compare commits

..

825 Commits

Author SHA1 Message Date
hartvig f1bdde9067 Changes version number to 4.7.2 2012-04-10 08:42:59 -02:00
hartvig 163be2aad2 Updates feedproxy logic: Corrects minor error in xpath query and adds logging when unallowed requests happens 2012-04-10 08:42:10 -02:00
leekelleher c6891dd971 FeedProxy: Introduced a config file to define the allowed hostnames. Also added a package action to allow hostnames. 2012-04-06 11:06:05 -01:00
leekelleher 82a8383df3 Revised fix for FeedProxy.aspx, opens the URL restriction for use, still requiring the user to be logged into back-office. 2012-04-05 14:26:23 -01:00
tg@umbraco.com dbaa4912b7 Merge 2012-04-05 11:09:06 -02:00
tg@umbraco.com a016a661d7 Fixes open proxy issue with the /umbraco/dashboard/FeedProxy.aspx page 2012-04-05 11:06:54 -02:00
agrath 562f533172 Merge 2012-02-28 10:42:40 -13:00
agrath 57985cd0b2 Publish notification/workflow fails when using Distributed Calls, performedUser is null - check for null and replace with admin user 2012-02-28 10:39:02 -13:00
Casey Neehouse 2eebc84f2f WI# 30472 Placed check on hashtable add to check item has not already been added. 2012-02-21 16:03:46 -01:00
Casey Neehouse 2b9e798c35 WI#30727 addendum - Missed adding a lock to the ClearProcessedRequests method 2012-02-11 02:34:59 +05:00
Casey Neehouse 3e38b57496 WI#30727 Added lock to requestHandler _processedRequests Hashtable to block
duplicate entries
2012-02-11 02:28:09 +05:00
Casey Neehouse 7ddecca574 WI#30726 - Add check for UseAspNetMasterPages thus skipping the checkForMaster
that is not necessary
2012-02-11 01:13:41 +05:00
hartvig 90338093ba Change exception type for Work items: 30702 2012-02-03 05:24:32 -01:00
hartvig fc887b95f1 Work items: 30702 2012-02-03 05:08:04 -01:00
hartvig 01d8198579 Work items: 30690 2012-01-27 09:13:48 -01:00
agrath 7b6c711239 Allow CData tags to be embedded in a RichTextEditor controls contents 2012-01-17 14:32:08 -13:00
agrath 980c2d4a7f Fix DynamicXml eating - inside CData sections 2012-01-17 14:27:22 -13:00
agrath 686e0116d8 Allow CData tags to be embedded in a textboxmultiple controls contents 2012-01-17 14:26:48 -13:00
agrath b96a5a3bd9 Merge 2012-01-17 11:44:16 -13:00
agrath 6a3e1819aa Added guid for enhanced content picker for integer upcast 2012-01-17 11:43:16 -13:00
hartvig 72da68c08c Fixes error in cache patch 2012-01-11 11:17:56 -01:00
hartvig 2e916e252c Fixes a cache null ref issue in ClearCacheItem (patch by Sir Stéphane Gay) 2012-01-10 10:59:03 -01:00
agrath 6f5f7a7be5 Add another to IntegerDataTypeModel identified from the Cultiv Razor Examples project 2012-01-09 21:08:41 -13:00
agrath e09c531404 Add two more guids to IntegerDataTypeModel identified from the Cultiv Razor Examples project 2012-01-09 20:56:38 -13:00
agrath 7b157c5083 Added IntegerDataTypeModel and HtmlStringDataTypeModel to the core and removed the internal integer upcasting code. Model will automatically apply for 'Numeric' data type. use umbraco.MacroEngines.RazorDataTypeModels.IntegerDataTypeModel to apply a staticMapping in umbracoSettings for a given datatype or alias as per previous commit 2012-01-09 12:58:15 -13:00
agrath e6f0c2a17c added umbracoSettings.scripting.razor.dataTypeModelStaticMappings to allow RazorDataTypeModels to be specified in the umbracoSettings.config file. These static mappings override the dynamic mappings provided by the RazorDataTypeModel attribute, including priority (from previous commit). You can use this feature to force a particular data type [optionally on a specific document type and/or property] to use a specific model, or exclude the data type guid and just use the aliases. This feature is inteded to be used when you want to force a particular type to return as Integer. See next commit for detail about the Type Names to use. 2012-01-09 12:38:22 -13:00
agrath 6eae64eaf3 Merge 2012-01-09 08:27:22 -13:00
agrath 9f15137832 Made RazorDataTypeModel attribute multiple instance (meaning you can apply the same model to multiple data types without seperate copies of the model). Added a priority with a default of 100 to the model binder attribute. 2012-01-09 08:26:39 -13:00
hartvig 7e714b1a40 Work items: 30423 2012-01-09 11:56:04 -01:00
hartvig 140cf8ec2f Work items: 30659 2012-01-06 08:50:55 -01:00
hartvig ad4e5e841d Work items: 30657 2012-01-06 08:39:26 -01:00
hartvig 39f3c377be Work items: 30660 2012-01-06 08:32:50 -01:00
hartvig c9160dfdda Work items: 30630 2012-01-06 08:06:57 -01:00
hartvig eb19283673 Updating version number to 4.7.1.1 2011-12-22 10:23:57 -01:00
hartvig ea0ffc8ea5 Work items: 30273 2011-12-22 10:20:17 -01:00
hartvig b0f0777952 Merge pull request 2011-12-22 10:00:57 -01:00
hartvig 6ecedd51bb Minor updates to macro rendering and re-adding unused methods but this time marked obsolete for b/w compat. 2011-12-22 09:35:06 -01:00
vertino deb8e46df8 Removed the reference to 'umbracoGui.css'. 2011-12-21 18:03:40 +00:00
agrath fde12a532c Merge 2011-12-20 08:08:35 -13:00
agrath d6fd2304f1 Added support for Decimal on UserControl macros and fixed an issue reported by attack_monkey where usercontrol macro properties that were not set caused FormatException rather than default values 2011-12-20 07:44:43 -13:00
sgay 5aa76b1859 bugfix macro.cs issue with cache key 2011-12-20 13:41:51 -01:00
agrath e731fb5b03 Fixed an issue with && in DynamicNodeList.Where causing False&&False to be true 2011-12-19 13:51:11 -13:00
agrath b34b395d9f Merge 2011-12-04 15:10:59 -13:00
agrath 3b0f2804fd Fixed IsHelpers on IGrouping (DynamicNode.GroupBy) 2011-12-04 15:07:58 -13:00
hartvig aec48c7df9 Major refactor of macro.cs, fixing huge memory leak in caching of xsltExtensions. Work items: 30616, 30522 2011-11-25 14:03:09 -01:00
starfighter83 d6341e73b6 Fixes: TinyMCE Embed Media - Insert youtube video not working
Work items: 30378
2011-11-16 10:21:52 -01:00
starfighter83 82d1a980f7 updates to tinyMCE media plugin, working again except the preview in the dialog 2011-11-15 15:06:35 -01:00
starfighter83 6fafe1ede1 Merge 2011-11-15 07:36:47 -01:00
starfighter83 46e44fd5d1 Fixes issue with default 404 handler and culture based error pages when a dummy domain is used to attach the language 2011-11-15 07:34:19 -01:00
hartvig d0e1a23274 WIP updates to macro engine (better error handling). Be aware that it breaks current build! 2011-11-10 08:07:16 -01:00
mattbrailsford de378a7bcb Updatedt uGoLive to latest dll 2011-11-09 07:57:25 +00:00
mattbrailsford 2ee63d5790 Merge 2011-11-08 21:44:45 +00:00
mattbrailsford a2b3f62aba Updated uGoLive to v1.1 2011-11-08 21:43:23 +00:00
hartvig 0af3ae40db Found an error in the loading of cached controls (MacroEngine and .NET controls) that could result in empty macro cache under heavy load 2011-11-07 10:07:22 -01:00
mattbrailsford 5ee80bc9cc Updated uGoLive js script to latest 2011-11-01 19:28:12 +00:00
mattbrailsford 1452b869a8 Updated uGoLive js script to latest 2011-11-01 19:06:33 +00:00
mattbrailsford 19eebba8cc Added uGoLive dashboard 2011-11-01 16:55:06 +00:00
agrath 95e985b96d Fixed umbraco.cms.businesslogic.Tags.Tag.AddTagsToNode so it works on SqlCE. Added umbraco.cms.businesslogic.Tags.MergeTagsToNode 2011-10-31 10:16:44 -13:00
hartvig 62cf50ba8d Work items: 30041 2011-10-24 10:41:41 -02:00
hartvig 9da185f330 Adds single quote to the default list of characters to exclude from niceurls 2011-10-24 06:57:14 -02:00
agrath ad0c67365f Missed one of the if statements 2011-10-16 09:25:20 -13:00
agrath 79f4925faf Fixed a null in @Library.Wrap check that wasn't short circuiting as intended 2011-10-16 09:24:14 -13:00
sgay a0a2037813 fix #30534 - extra <br/> tags in RTE 2011-10-11 10:02:32 -02:00
agrath 3baaa9173e Changed the behaviour of Library.NodeById and Library.MediaById with invalid ids to return DynamicNull and checked for this in DynamicNode's obsolete methods to maintain backwards compatibility 2011-10-09 07:06:52 -13:00
agrath 49877c4874 Made @Library.NodeById and @Library.MediaById return DynamicNull when the node was not found, rather than an empty DynamicNode instance with Id == 0 (Which is what NodeFactory returns). To support backwards compatibility, DynamicNull supports .Id == 0 and .Name == " 2011-10-09 06:43:37 -13:00
agrath c7e1350abd Added .Name [string.Empty] and .Id [0] to DynamicNull and added implicit casts to int and string - backwards compat support for next commit 2011-10-09 06:36:56 -13:00
agrath 0851c04646 Made the new @Library.StripHtml (HtmlAgilityPack based) handle strings which don't contain HTML 2011-10-09 06:24:06 -13:00
agrath 407f78c84b Made OrderBy(Name) and OrderBy(name) work the same as OrderBy(nodeName) 2011-10-09 06:16:24 -13:00
agrath 293007b8f0 Merge 2011-10-04 08:36:55 -13:00
agrath 5d0a9e63e2 Rewrote @Library.StripHtml to use HtmlAgilityPack rather than a forward only string walker 2011-10-04 08:34:34 -13:00
hartvig 07a384d4f8 Work items: 30431, 30513 2011-09-29 09:45:50 -02:00
hartvig 7b1bb810d3 Work items: 29973 2011-09-27 07:23:16 -02:00
hartvig 300a31d6b0 Adds further validation to the Umbraco Member APIs to not allow a loginname as an empty string 2011-09-27 07:18:36 -02:00
hartvig ac8e9828e9 Updates to member username validation (throw nicer exceptions) 2011-09-27 07:01:22 -02:00
hartvig 12c6124714 Work items: 30028 2011-09-27 06:23:22 -02:00
hartvig b18612390a Fix by dimitri_kourk for 4.7.1 issue with Preview. Work items: 30502 2011-09-26 08:50:56 -02:00
agrath b7caa18309 Added a fake getter method to .Items on DynamicNodeList that was tripping up the latest uBlogsy beta. Could be a backwards compatibility issue 2011-09-22 13:10:01 -12:00
agrath 10529d9a9a Fixed another issue where CSV strings were swallowed by DynamicNode trying to interpret them as integers. This upcast will now only happen if you are using the datatype Integer/Number 2011-09-22 11:56:07 -12:00
agrath 84628a991e Fixed an issue where custom properties (e.g. not the defaults that are in examine) on media items would come back as XML representations when they were empty strings.
For example, a property, caption would come back as <caption></caption> if empty.
The processing code assumed that because the .Value was empty, the property contained XML but didn't check to see if it had children or attributes before returning the XML representation.
2011-09-22 11:20:09 -12:00
agrath a7d8d3c6c2 Fixed a StackOverflow when using .Descendants on Media 2011-09-21 22:31:18 -12:00
agrath 4221d8a53f Added missing constructor overloads back onto DynamicMedia 2011-09-21 21:29:52 -12:00
agrath 0eba71171b Merge 2011-09-21 21:22:57 -12:00
agrath 0c9edb5fbc Fixed an issue with HasValue recursive overloads not passing the recursive flag down to GetProperty 2011-09-21 21:20:08 -12:00
hartvig 5aa8868248 Work items: 30500 2011-09-22 06:42:18 -02:00
hartvig feeba931bc Default config setting was wrong 2011-09-21 08:05:44 -02:00
hartvig 82c0ac805c Merge 2011-09-21 05:11:14 -02:00
hartvig 1ffbbb257d Setting version number to 4.7.1 2011-09-21 05:09:53 -02:00
Shandem d1d96c6d58 Fixed model: 30493, 30471 2011-09-20 20:39:03 -10:00
neehouse bf59d1fca8 Clear response before redirect on ensured pages and end response on transfer. 2011-09-19 21:00:48 +04:00
hartvig 2d10702238 Work items: 30480 2011-09-16 09:32:04 -02:00
Darren@Darren-Laptop 132f6405ed Fix Codeplex #30479 - Dynamic assemblies in Umbraco cause XSLTs to break - TypeFinder.cs. Just return if the assembly is dynamic. 2011-09-16 10:21:57 -01:00
hartvig 2f784920a9 Fixes in regards to trust initialization and TypeResolver 2011-09-15 09:38:28 -02:00
hartvig 017075d4f6 Setting 4.7.1.Beta version number 2011-09-15 08:37:38 -02:00
hartvig 8dcc8251f5 Work items: 23386 2011-09-14 19:13:24 -02:00
hartvig 62249b989b Final speed optimizations for SQL CE 4... 2011-09-14 19:07:09 -02:00
hartvig 238885746c Work items: 30201 2011-09-14 18:37:49 -02:00
hartvig 40495005ac Adios dreaded lock screen. You'll only be missed by bankers. But they'll have the option to enable it... Work items: 30310 2011-09-14 18:05:51 -02:00
hartvig 1eb0d3581b Work items: 30473, 30193 2011-09-14 17:44:34 -02:00
hartvig 8a43220657 Work items: 30204 2011-09-14 17:25:30 -02:00
hartvig eb3cb32965 Error in previous commit 2011-09-14 16:20:39 -02:00
hartvig 910af5ea99 Work items: 30363 2011-09-14 16:18:05 -02:00
hartvig 3522d68755 Work items: 29795 2011-09-14 16:02:32 -02:00
hartvig c32e813210 Updates to internal permission handling in Umbraco 4.7.1 2011-09-14 13:52:33 -02:00
hartvig cffed78df3 Work items: 30151 2011-09-12 14:14:11 -02:00
hartvig 6da379d36d Work items: 30368 2011-09-12 12:47:35 -02:00
hartvig f15903a846 Work items: 30363 2011-09-12 12:31:27 -02:00
hartvig c315cfbbcd Work items: 29670 2011-09-12 11:41:21 -02:00
hartvig ee63128ac2 Work items: 28737 2011-09-12 11:26:27 -02:00
hartvig e4cf319f46 Error with previous push 2011-09-12 11:22:09 -02:00
hartvig 4c2ffb00f9 Work items: 30148 2011-09-12 11:19:37 -02:00
hartvig c1fa3bfb23 Work items: 30075 2011-09-09 10:21:21 -02:00
hartvig b083cb8837 Fixes bugs in 4.7 preview engine. Work items: 30208, 30288 2011-09-09 09:46:04 -02:00
agrath 6bd344834c Merge 2011-09-06 10:30:35 -12:00
agrath 9760ad29c8 Added a cached fallback for custom properties for media when that media item was loaded from examine as the examine fields collection doesn't contain them 2011-09-06 10:28:43 -12:00
agrath b5dddc5e7c Bypassed a dictionary lookup if the datatype is Guid.Empty 2011-09-06 10:27:20 -12:00
hartvig 7cdb0b48de Merge 2011-09-06 07:44:51 -02:00
hartvig caad0e25d1 Work items: 30313, 29864 2011-09-06 07:43:36 -02:00
PerPloug e87205c1fa Merge 2011-09-06 07:35:34 -02:00
PerPloug 95d53d66f3 default.build update to 4.7.1 paths 2011-09-06 07:32:48 -02:00
PerPloug ac7f7d97c4 Updated nant file 2011-09-06 07:28:24 -02:00
hartvig 88316b05c4 Work items: 29835 2011-09-06 07:26:17 -02:00
hartvig 8b87f0fd46 Refactoring of Umbraco Members auth. Work items: 30237, 30334, 30350, 30342 2011-09-06 07:08:15 -02:00
hartvig 39706538f9 Work items: 30448 2011-09-05 06:44:19 -02:00
hartvig cd3c44ae7c Work items: 30446 2011-09-05 06:39:17 -02:00
agrath 3cc136a15c Merge 2011-09-01 08:48:43 -12:00
agrath e2a60d55ff Changed the return type of Pluck when the list was empty from DynamicNull to List<Object>[0] 2011-09-01 08:46:18 -12:00
agrath c097b0f250 Prevented OrderBy from throwing an error when presented with an empty list 2011-09-01 08:45:43 -12:00
hartvig 1c8579123d Work items: 30359 2011-08-31 07:12:30 -02:00
starfighter83 9ad129baad Partially applied pull request 1339, related to GlobalSettings.UseSSL 2011-08-30 07:01:32 -02:00
starfighter83 cc73179b2b Merge 2011-08-30 06:24:35 -02:00
starfighter83 4ad18c1d7b Fixes: RTE Style Selector wraps elements in spans and doesn't allow removal
Applies pull request 1459
Work Items: 30440
2011-08-30 06:23:30 -02:00
agrath 51c76dfcd4 Merge 2011-08-29 11:22:08 -12:00
agrath 265fc0b3ca Improved the handling of DynamicNull when using OrderBy 2011-08-29 11:19:34 -12:00
starfighter83 2e4117d691 Fixes small issues with tinymce config
Work Items: 29945 29829
2011-08-29 09:03:45 -02:00
starfighter83 124da8781b Applies pull request 1121
Work Items: 27050
2011-08-29 05:40:16 -02:00
starfighter83 7edac5756d Fixes: Incorrect url used in GzipModule Disables Rich text editor in Port Forward environment
Work Items: 29936
2011-08-26 06:42:56 -02:00
starfighter83 b73a579a94 Fixes: Data types cannot be renamed
Work Items: 29281
2011-08-25 10:40:59 -02:00
starfighter83 fdbe788d9b Fixes: Security bug with Dashboard (updated dashboard.config to add access node and deny editor and writer on kits control)
Work Items: 30331
2011-08-25 09:26:27 -02:00
starfighter83 9a7d75e1f3 Fixes: Razor example template not correct
Work Items: 30329
2011-08-25 07:38:57 -02:00
starfighter83 c095148dbe Fixes: IE Display Issue with the Move Content dialog
Work Items: 30199
2011-08-25 07:17:20 -02:00
starfighter83 5f8da87c23 Fixes: umbraco.library.GetItem no longer retrieves elements of the node
Work Items: 29078
2011-08-25 06:20:40 -02:00
starfighter83 2db1dfe7fb Fixes Deleting/Changing the default language en-US not possible
Work Items: 28788
2011-08-25 06:02:34 -02:00
starfighter83 97180ded7d Merge 2011-08-25 05:46:03 -02:00
starfighter83 f2243c9d22 Updates jquery,jquery UI and some related scripts/stylesheets, fixes issue with IE9
Work Items: 30137
2011-08-25 05:45:04 -02:00
Shandem e7271ad79b updated config 2011-08-24 16:57:59 -10:00
starfighter83 273ebf49df Merge 2011-08-24 07:24:46 -02:00
starfighter83 656095caee Fixes: Not able to use textMultiLine as macro parameter in wizard
Work Items: 29883
2011-08-24 07:24:13 -02:00
agrath 9925c95d2c merge 2011-08-18 15:00:35 -12:00
agrath 4d3c145be9 Added support to DynamicQueryable to support property accesses via reflection on DynamicNode properties, e.g. list.GroupBy(uBlogsyPostDate.Date) 2011-08-18 14:30:42 -12:00
hartvig 2ba2c0fd61 Work items: 30410 2011-08-18 13:24:55 -02:00
hartvig 96cbe17ea9 Work items: 30418 2011-08-18 13:17:59 -02:00
hartvig 0efabf6fe4 Merge 2011-08-18 07:39:57 -02:00
hartvig 0ff6775e55 Fixes "CSS path does not change when umbracoCssDirectory is added in web.config" Work items: 30417 2011-08-18 07:38:58 -02:00
agrath c657236f7c Fixed DynamicBackingItem autodetection of Media used in NodeById, now you can use NodeById to get Media or Content nodes 2011-08-17 21:27:09 -12:00
agrath b023455068 Added an overload to NodesById and DynamicBackingItem/DynamicNode to signify you want a List<int> to be treated as media, not content 2011-08-15 10:18:15 -12:00
agrath f361e20482 Traced exception message out on DynamicNode 2011-08-11 15:36:54 -12:00
agrath fc770dd50f Merge 2011-08-11 13:05:03 -12:00
agrath b6629c9f65 Merge 2011-08-11 13:03:40 -12:00
agrath 918d5bc720 Fixed a VirtualUrl issue with images in TinyMCE editors not having the ~/ replaced when SystemDirectories.Media contained a ~ and the image was larger than the TinyMCE size 2011-08-11 13:03:27 -12:00
agrath 46253212da Added a ContainsKey check to a dictionary and expanded shorthand ifs to longhand for readability 2011-08-11 13:02:47 -12:00
psterling 5fb5019529 Added Polish language file - credit to the folks from Microsoft Poland for the translation work 2011-08-09 23:07:27 +07:00
psterling 647882af15 Added Portuguese Brazil language file - credit to Carlos Casalicchio for the translation work 2011-08-09 23:04:19 +07:00
starfighter83 96a8b190a4 Fixes: Create Media Button Permissions BUG
Work Items: 30396
2011-08-08 06:36:31 -02:00
agrath 860a33d9b3 Changed return type of Library.StripHtml to be HtmlString to facilitate partial strips feature still returning HTML and not wanting to encode the result 2011-08-07 14:07:09 -12:00
starfighter83 3cfe526d9d Fixes: Changing icon on membertype does not do anything
Work Items: 29853
2011-08-04 08:17:35 -02:00
starfighter83 0d65c29ffd Fixes: Empty string for LoginName can be saved in Members interface and breaks Member creation
Work Items: 30367
2011-08-03 10:22:36 -02:00
starfighter83 47e4239bbc Fixes: Renaming XSLT deletes the file
Work Items: 29287
2011-08-03 08:27:17 -02:00
starfighter83 ba96212505 Fixes issue with Base and dictionary items
Work Items: 30382
2011-08-03 08:07:25 -02:00
starfighter83 5363a328a0 Merge 2011-08-03 07:50:30 -02:00
starfighter83 5843b5deaf Adds confirmation before deleting prevalue
Work Items: 30384
2011-08-03 07:49:08 -02:00
agrath e2e0186174 Added TryGetIndex to DynamicNodeList to allow [] indexing 2011-08-01 11:11:00 -12:00
agrath 7d3cfa4151 Added .Except, .Intersect, .Union and .Distinct to DynamicNodeList 2011-07-31 17:05:44 -12:00
agrath adc3a36ac2 Changed the decimal parsing in ConvertPropertyValueByDataType so it only tries to do this if the string contains the current decimal seperator character to prevent CSV strings from converting to decimals in cultures where , is used as the decimal seperator 2011-07-31 16:34:58 -12:00
agrath 9d996aaf43 More @Library.Truncate parser fixes 2011-07-31 16:27:43 -12:00
agrath 13e5e5a8df Fixed a bug in @Library.Truncate regarding attempting to close tags which were not open when the truncation occurred before any tags had been opened. 2011-07-31 11:16:45 -12:00
agrath 2ea3c4b624 Got rid of InternalHtmlString as it wasn't being used and was throwing off some of the RazorLibraryCore overloads 2011-07-31 10:10:01 -12:00
agrath d022b4a52a Added the datatype GUID to the DateTime parsing code for the Date picker without time 2011-07-28 11:51:04 -12:00
agrath 3a7609cba0 Another fix for Catch FileNotFound exceptions in ExamineBackedMedia which are thrown by Examine currently (bug?) on a LoadBalanced file store after a publish occurs. When caught, ExamineBackedMedia will fall back to GetMedia as if the media item wasn't in the examine index 2011-07-28 09:44:23 -12:00
agrath 4cbd06dad9 Added missing .css to csscolors on the EditorType.HTML as it was throwing 404s, probably meant that embedded style in a template wasn't highlighted properly? 2011-07-28 09:18:02 -12:00
agrath e72bd130e3 Further changes to fix bug with 'incorrect number of lambda paramters' issue with .Where when using && and || 2011-07-26 14:02:25 -12:00
agrath c354acb388 Added umbraco.library:NiceUrlWithDomain for returning the node URL including the domain & root irrespective of site settings. Caches seperately to the standard NiceUrl method so that you can use both without cache collisions 2011-07-26 14:01:37 -12:00
agrath d0fc01751c Added some more entries to .hgignore for when you're testing with a starterkit installed 2011-07-26 13:59:36 -12:00
agrath 30cc6148e7 Added web.config transform file for ssaodsk01 2011-07-26 13:58:55 -12:00
starfighter83 082d680a36 Adds validation to data editor settings (IsRequired and RegexValidationStatement) 2011-07-26 11:18:22 -02:00
starfighter83 23ab698665 Adds default value support to Field data editor setting type 2011-07-26 08:31:07 -02:00
starfighter83 f9f67d4e2e Adds default value support to DocumentType, MediaType, MemberGroup, MemberType data editor setting types 2011-07-26 08:28:12 -02:00
starfighter83 98a1189353 Adds default value support to Path data editor setting type 2011-07-26 08:25:39 -02:00
starfighter83 d8eb584d7a Adds default value support to Checkbox data editor setting type 2011-07-26 08:21:46 -02:00
starfighter83 738380e32a Adds default value support to CheckBoxList data editor setting type 2011-07-26 08:18:27 -02:00
starfighter83 57edbcae25 Adds default value support to DropDownList data editor setting type 2011-07-26 08:17:35 -02:00
starfighter83 0f84165b2b Adds default value support to ListBox and ListBoxMultiple data editor setting types 2011-07-26 08:15:28 -02:00
starfighter83 ff02f5a336 Adds default value support to Password data editor setting type 2011-07-26 08:09:59 -02:00
starfighter83 b7446be08a Adds default value support to RadioButtonList data editor setting type 2011-07-26 08:08:40 -02:00
starfighter83 5c57c192c9 Adds default value support to TextArea data editor setting type 2011-07-26 08:04:52 -02:00
starfighter83 a03b9932ff Fixes: scheduled tasks stops
Work Items: 30376
2011-07-26 06:44:03 -02:00
agrath ae3357de0d Fixed a bug with .Where && and || throwing invalid number of parameters for lambda when both left & right were not lambdas, e.g. Visible && NodeTypeAlias != umbNewsArticleItem 2011-07-24 13:55:36 -12:00
agrath 821188a254 Added work desktop web.config xslt transform 2011-07-24 13:54:30 -12:00
agrath@gmail.com 31169380f8 Changed the return type of RTE to a different HtmlString (internal) so that it can be implicitly convertible for string for If comparisons. Added an extension method for string.HasValue so that .Where can invoke it to improve readibility when comparing RTE to empty string based on feedback from @cultiv. Cleaned up an empty if in DynamicQuerable 2011-07-21 20:19:54 -12:00
agrath@gmail.com 3737a8cf28 Catch FileNotFound exceptions in ExamineBackedMedia which are thrown by Examine currently (bug?) on a LoadBalanced file store after a publish occurs. When caught, ExamineBackedMedia will fall back to GetMedia as if the media item wasn't in the examine index 2011-07-21 13:15:20 -12:00
agrath@gmail.com ba965a95e9 Made ConvertPropertyValueByDataType return DynamicNull instead of empty string when the datatype is a Date/Time and the TryParse fails. Only applied DateTime parsing to datatype Date/Time rather than always trying it 2011-07-21 12:18:58 -12:00
agrath@gmail.com 80e6187436 Made DynamicNull implictly convertable to DateTime (.MinValue) to support next change 2011-07-21 12:17:55 -12:00
agrath@gmail.com 6dcf1fcd8e Slight optimisation in ExtensionMethodFinder. Previous commits fixed #30346 2011-07-21 11:42:34 -12:00
agrath@gmail.com 1a0c9c3e9f merge 2011-07-21 11:35:58 -12:00
agrath@gmail.com f6ab67ea78 Added support to ExtensionMethodFinder to do overload type resolution to locate the correct extension method based on types when there are multiple overloads available 2011-07-21 11:27:34 -12:00
agrath@gmail.com e8a941fc1f Added support for invoking extension methods on native properties on DynamicNode where the native property type is string (e.g. NodeTypeAlias, Name). Half fixes ContainsAny support 2011-07-21 11:25:15 -12:00
sgay c1ff80c52d Fix member cookie value encoding [#30350] 2011-07-21 14:48:39 -02:00
sgay f6eb9c77a9 Add RenderEvent to Macro control [#30362] 2011-07-14 06:54:14 -02:00
sgay f20931cfa4 Refactored Razor DynamicNode.XPath() to returns an empty list when no nodes are found, instead of throwing [#30361] 2011-07-14 06:47:40 -02:00
agrath@gmail.com ff5bf40905 Merge 2011-07-11 12:23:14 -12:00
agrath@gmail.com a66847587c Added pluck aggregates Sum/Average/Min/Max to DynamicNodeList 2011-07-11 12:20:02 -12:00
agrath@gmail.com d9dc90090b Changed @Library.MediaById(.) to return a DynamicMedia again so that specific media functionality can be added. DynamicMedia is just an empty subclass of DynamicNode currently 2011-07-11 11:27:31 -12:00
agrath@gmail.com 892a382eca Added HasValue overloads that function like If/Where shorthands for writing out a value if a property has a value, e.g. Class Name 2011-07-11 11:24:00 -12:00
agrath@gmail.com 17f6ee1c91 Made PropertyResult IHtmlString so if you @Model.GetProperty(propName) then you get the value but it's still a PropertyResult/IProperty 2011-07-11 11:20:31 -12:00
agrath@gmail.com 48c11f6b45 Added TryInvoke and TryGetIndex methods to DynamicNull to prevent crashes on missing properties 2011-07-11 11:13:31 -12:00
agrath@gmail.com da3364c065 Added umbraco\presentation\umbraco\plugins\* to ignore 2011-07-11 11:12:47 -12:00
hartvig e196b4ec13 Fixes issues related to UrlResolving. Work items: 30353, 30324 and 30352 2011-07-07 14:21:04 -02:00
hartvig 0dff9c5dfa Fixes Ensure valid template aliases, work item: 30347 2011-07-06 09:45:02 -02:00
hartvig 93be92442c Fixes "Edit language broken", work item: 30332 2011-07-06 09:36:20 -02:00
hartvig e57c49a3f1 Solves "pressing enter in Locked screen triggers cancel instead of renew", work item: 30345 2011-07-06 06:23:36 -02:00
hartvig 89b89655e4 Fixes work items: 30337 2011-07-06 05:49:58 -02:00
hartvig 1c26ddd87f Adds CTRL+S support in all edit pages + loads of warning clean up 2011-07-05 11:30:06 -02:00
agrath@gmail.com 304e7976bc Detects a null reference exception which occurs when a document type is not transferred properly and cmsPropertyData is missing records and rethrow it with detail about the problem 2011-07-04 15:17:44 -12:00
agrath@gmail.com d5e3ceecec Made IsHelper methods on DynamicNode and DynamicXml return HtmlString instead of string 2011-07-03 22:41:33 -12:00
agrath@gmail.com d81aed3dc5 Fixed ExamineBackedMedia.NodeTypeAlias - was using the wrong Values key 2011-07-03 21:02:35 -12:00
agrath@gmail.com cfcae904ba Added implicit conversion between DynamicNull and bool (false) which allows you to go @if(@Model.dynamicNullProperty) 2011-07-03 19:25:16 -12:00
agrath@gmail.com 8ab1c11bd1 Made @Library.NodeById and @Library.MediaById DynamicNull safe, will return DynamicNull instead of 'Cannot instantiate a DynamicNode without an id' 2011-07-03 18:31:47 -12:00
agrath@gmail.com 41d3c9f3d9 Formatting in Linq Foreach of IRazorDataTypeModel cache build code 2011-07-03 10:14:04 -12:00
agrath@gmail.com 1164ea3ab1 Fixed a bug where if the ContentType (DocumentType) tree was a different tree to the Content or Media (Node) tree then the datatype lookup could fail when retrieving a property recursively.
If GetProperty recursively walked up the content tree to the first node that defined the property and eventutally found it, and the NodeType[Alias] of the node it was found on was not a parent of the original content's node type, then the lookup would fail.
Changed DynamicBackingItem.GetProperty (and PropertyResult class) to return the Node/Context where the property is being returned from and used this context's NodeTypeAlias as the in the data type lookup.
2011-07-03 09:32:29 -12:00
agrath@gmail.com 75d15cdc31 Made GetProperty break earlier if context/parent is null (prevents NRE) and slightly changed behaviour so that empty strings will go recursively to the parent. Added prefix to property access (_) which will cause the property to be looked up recursively. This syntax is used when you want to get the value recursively, but you want to still apply the IRazorDataTypeModel (as @Model.GetPropertyValue won't do that). Syntax is: @Model._propertyName - had to be a _ as that is legal c# 2011-07-02 17:29:47 -12:00
agrath@gmail.com 49a0c8a11a Changed return type of @Library.If to IHtmlString so that you can return HTML with it 2011-07-02 17:27:27 -12:00
agrath@gmail.com 8435067e98 Added overload to @Library.If for trueValue only 2011-06-30 11:56:16 -12:00
agrath@gmail.com eff692249d Made the int.TryParse and decimal.TryParse in DynamicNode culture aware so that , and . as numeric/decimal seperators are handled properly 2011-06-30 11:00:15 -12:00
agrath@gmail.com 0589d34abd Changed the implementation of IRazorDataTypeModel to allow for immutable types to be returned such as string, int. Thanks @zpqrtbnk 2011-06-30 10:32:50 -12:00
agrath@gmail.com 9b4a08950c Added support for attribute first child fallback in DynamicXml 2011-06-30 10:16:30 -12:00
agrath@gmail.com c7c496cadf Removed a razor namespace added in an early 4.7.1 build that shouldn't have been there anymore. Wasn't used when debugging but when doing a nant build it got included 2011-06-29 17:47:28 -12:00
agrath@gmail.com 5988ff5da8 Added a try/catch to GetPropertyInternal to catch a potential MissingMethodException when trying to locate a property that didn't exist 2011-06-29 17:45:08 -12:00
agrath@gmail.com cce3cdc18b fixed some potential crashes in datatype lookups and a keyalreadyexists exception in datatype lookup 2011-06-29 17:36:37 -12:00
agrath@gmail.com 0475b48a8c Fixed an issue with new DynamicNode() and DynamicNode.XPath using the wrong overload, thanks @cultiv 2011-06-29 17:18:10 -12:00
agrath@gmail.com 56e9cdb045 Added overloads to @Library.Truncate and @Library.StripHtml for DynamicNull to prevent errors when properties may not exist 2011-06-27 16:52:04 -12:00
agrath@gmail.com ba8d8f8787 Changed @Library methods which return Dynamic* types to return type dynamic as methods on DynamicNodeList etc wouldn't work due to the type not being dynamic. Because @Model.NodeById got moved to @Library.NodeById and @Model is dynamic, this problem didn't exist before 2011-06-27 12:45:17 -12:00
agrath@gmail.com a747e4dddc Merge 2011-06-26 11:27:52 -12:00
agrath@gmail.com 0b47da8d41 Added @Library.Truncate to simulate string.left but not error when string is < length and be html tag aware. Optionally adds elipsis to end of strings 2011-06-26 11:26:02 -12:00
agrath@gmail.com dc32f500ae Added @Library.StripHtml to remove HTML tags from a string 2011-06-26 09:51:46 -12:00
hartvig f1ee827ece SQL CE 4 double open connection in VerifyConnection method. Thanks Jesper Hauge/Erik Ejskov Jensen for catching that one! 2011-06-23 07:44:13 -02:00
agrath@gmail.com b59b5052ba Bug fix: slightly changed behaviour of ordering code when dealing with dynamic properties (e.g. user properties not fields on DynamicNode) and missing data, thanks @Cultiv for the report 2011-06-22 01:08:15 -08:00
agrath@gmail.com c63b58612d Renamed a variable on one of the overloads of @Library.Wrap and changed the behaviour of Visible so that it applies at render time, not tag creation time instead of returning null, this will enable chaining for invisible tags as well as being able to change your mind about whether the tag should render or not 2011-06-20 11:11:18 -02:00
agrath@gmail.com 7209d68028 Realised that IHtmlString is an interface and may have a method I can implement to avoid .Write() or .ToHtml() on HtmlTagWrapper. Implemented and tested this. Victory. 2011-06-20 07:47:29 -02:00
agrath@gmail.com d0d48f18ff Removed upcasting for uComponents multitreenode picker in DynamicNode ConvertPropertyValueByDataType in favour of the new plugin interface [I]RazorDataTypeModel 2011-06-19 14:40:10 -02:00
agrath@gmail.com c5906c0c79 merge 2011-06-19 08:35:49 -02:00
agrath@gmail.com 754210456c Renamed ssaolap01 dev database 2011-06-19 08:19:45 -02:00
agrath@gmail.com 00141ba801 Added a new feature for plugin developers to create a model class that DynamicNode will return for their data type instead of the underlying type 2011-06-19 08:19:11 -02:00
agrath@gmail.com 315003c16f Changed settings to developer in the erorr message 2011-06-19 07:34:40 -02:00
agrath@gmail.com 28652815ae Improved the error message for a KeyNotFound exception in datatype factory 2011-06-19 07:27:47 -02:00
agrath@gmail.com 3480a5d957 Made DynamicNodeList.XPath only work for content as it is the only one with an XML Backing document 2011-06-18 15:46:34 -02:00
hartvig 82547abe40 Adds missing SqlCeContextGuardian file 2011-06-17 09:20:59 -02:00
hartvig 6a1aa9a8e6 Massive performance increase on SQL CE4 thanks to Jesper Hauge and Erik Ejlskov Jensen (SQL CE MVP) from Twins #h5yr Work items: 28347 2011-06-17 07:03:45 -02:00
agrath@gmail.com cdc4c86325 Added ContainsKey check to Language Dictionary to fix a KeyAlreadyExists exception on app startup. Fixes work item 30195 2011-06-16 11:45:01 -02:00
agrath@gmail.com 940239f1f2 Added HtmlTagWrapper.AddChildren and HtmlTagWrapper.AddChildrenAt methods 2011-06-16 11:02:23 -02:00
agrath@gmail.com d4ed1efcf5 Fixed bug with HtmlTagWrapper.Write not writing if no children or attributes but class names were set 2011-06-16 10:59:36 -02:00
agrath@gmail.com 27aebac7e0 Aliased HtmlTagWrapper.Write as HtmlTagWrapper.ToHtml to match DynamicXml.ToHtml 2011-06-16 10:58:13 -02:00
agrath@gmail.com 86c9e8bde0 Added IsNotEqual IfHelper to DynamicNode and DynamicXml 2011-06-16 10:55:41 -02:00
agrath@gmail.com 9a1cfafb74 Made DynamicXml implicitly search child[0] if no match for dot notation chained child, fixes a regression/backwards compat change break due to the way elements are now consistently returned as sets 2011-06-16 09:54:53 -02:00
agrath@gmail.com 97a9d11cba Added ToHtml method to DynamicXml which allows you to get an IHtmlString back if you didn't want DynamicXml for XML syntactically correct data 2011-06-16 09:29:38 -02:00
agrath@gmail.com ee57f4c449 Adds pageName attribute to DynamicNode
Rename NodeById to NodesById when dealing with multiple parameters
Fixes work item 30290 : Strip - in element and attribute names for DynamicXml
2011-06-13 15:21:16 -02:00
agrath@gmail.com 2c22bea92f Renamed inconsistently named multiple NodeById methods 2011-06-13 12:59:36 -02:00
agrath@gmail.com 8112f240be Fixed an issue with GetProperty not finding properties according to the same case rules as DynamicNode and not falling back to local properties when the property wasn't on the Document Type 2011-06-13 12:28:35 -02:00
agrath@gmail.com 0a04252780 BugFix: Reworked GetProperty to support camel case conversion and reflective property access for non DocumentType properties 2011-06-13 10:15:29 -02:00
agrath@gmail.com 74617e4368 merge 2011-06-13 09:36:44 -02:00
agrath@gmail.com 4eca6e7fbf updated ignore file and adding web.config transform 2011-06-13 09:35:34 -02:00
agrath@gmail.com 288bbe7b91 Added OrderBy to Grouping so the nested lists can be ordered by (supports single property only but does handle desc)
You can control the Group order by manipulating the source list order. Groups will be enumerated in the order they occur.
2011-06-13 09:12:11 -02:00
agrath@gmail.com d2ddd9a284 Implemented DynamicNodeList.InGroupsOf, DynamicNodeList.GroupedInto and DynamicNodeList.GroupBy 2011-06-13 08:53:06 -02:00
agrath@gmail.com fbe150c1ce Fixed a stack overflow in Wrap 2011-06-13 08:39:32 -02:00
agrath@gmail.com 918cdcdffb Added XPath filter & search to DynamicXml class
Added empty method stubs to DynamicNodeList for grouping functionality
2011-06-13 07:13:00 -02:00
agrath@gmail.com b79586b4d7 Added new methods to HtmlTagWrapper: AddChild(TagWrapperBase [text or node]), AddChild(string), AddChildAt, RemoveChildAt, ClearChildren
Added new overloads to Library.Wrap - Adding children in one call and applying predicate check (bool - use @Model.Where() to return a bool)
Added new DynamicNode.Where overload that doesn't ternary text and just returns true/false (same as Element.Match in prototypejs)
2011-06-13 07:01:04 -02:00
hartvig 8279e4d471 Fixes issue with compatibility between .NET Membership and Umbraco Members on logout. Work items: 30171 2011-06-13 06:44:50 -02:00
agrath@gmail.com 60892f9909 fixed .Attr with HtmlTagWrapper 2011-06-12 20:33:48 -02:00
agrath@gmail.com 0cc7799797 HtmlTagWrapper don't write if empty, class methods, attribute methods 2011-06-12 20:12:52 -02:00
agrath@gmail.com 019141c042 Added Anonymous property collections to HtmlTagWrapper 2011-06-12 19:06:09 -02:00
agrath@gmail.com 942a3c3d72 HtmlTagWrapper, a new class to emit content wrapped in HTML tags. Similar to a cross between HtmlGenericControl and Webforms control and Razor HTML helpers.
First commit - internal attributes, classes, children and single tag wrapping.
Todo: don't write if empty, class methods, attribute methods, anonymous attribute parsing
2011-06-12 15:03:38 -02:00
hartvig f3bedcd707 Updates to template editor to insert macro/item elements as self closing tag 2011-06-12 14:32:38 -02:00
agrath@gmail.com 11b64ccd0d Fixed an issue with parent recursion and an ArgumentException being thrown when I really want null if no parent
Added DynamicNode.Where to enable string predicate parsing IIF
Added overloads to DynamicXml which take an xml string and a XPathNodeIterator
Added If method to @Library to make ternaries easier to read in a Razor template (no need for extra brackets)
Added ToDynamicXml overload methods for XPathNodeIterator and XElement to @Library
2011-06-12 13:34:15 -02:00
hartvig 1a6db0ad8e Issue with Media cache when moving, work items: 30326 2011-06-12 13:25:48 -02:00
hartvig 90e1d97ad7 Performance issue in ResolveUrls, work items 30324 2011-06-12 12:59:12 -02:00
agrath@gmail.com 1f6cc18ba4 Clarified exceptions when using NodeById and MediaById and passing empty strings, e.g. if your source came from @Parameter 2011-06-12 12:17:00 -02:00
agrath@gmail.com 23145b9981 Added @Library.Concatenate and @Library.Join 2011-06-12 12:09:59 -02:00
agrath@gmail.com ce4763a956 Added @Library.Coalesce 2011-06-12 12:00:05 -02:00
agrath@gmail.com e2bbccdf6f Added fallback overloads to GetPropertyValue - GetPropertyValue(string alias, bool recursive, string fallback), GetPropertyValue(string alias, string fallback) 2011-06-12 11:55:38 -02:00
agrath@gmail.com 0ea4e2f891 Added IsHelpers to DynamicXml
Added As<T>() [ return (item as T); ] to @Library
Added ToDynamicXml(string) to @Library
2011-06-12 11:50:35 -02:00
agrath@gmail.com b367f63c1d Fixed null reference problems with new dynamicbackingitem
Fixed recursive property null reference problems
Fixed issue with node having no children and property check crashing
Made DynamicXml behave more consistently based on user feedback
Added IsNull and HasValue to PropertyResult (comes back from GetProperty but you may need to cast it)
Added new Model.IsNull(string alias, bool recursive) and Model.HasValue(string alias, bool recursive) and Model.IsNull(string alias) and Model.HasValue(string alias)
2011-06-12 11:21:44 -02:00
agrath@gmail.com c6dd41c36a Deleted some unused class files 2011-06-12 08:23:28 -02:00
agrath@gmail.com f2d8363556 Added IsHelper methods back into DynamicNode after I accidentally removed them while refactoring
Added new IsHelper methods for IsModZero, IsNotModZero, IsPosition, IsNotPosition, IsNotFirst, IsNotLast
Added .Count to DynamicXML
Fixed Media .Url and .NiceUrl to bring back umbracoFile
Moved MediaById and NodeById implementations to RazorLibraryCore and deprecated original methods with redirection
Fixed parsing issue with ExamineBackedMedia XPathNodeIterator cast method
2011-06-12 08:23:10 -02:00
agrath@gmail.com 9c2a9f81f4 Finished ExamineBackedMedia implementation and fixed bug with GetMedia fallback in example code (didn't add current node attributes so was inconsistent compared to examine) 2011-06-12 06:40:18 -02:00
agrath@gmail.com d63ae05693 Got rid of DynamicMedia and DynamicMediaList implementations (still there but subclasses of DynamicNode & DynamicNodeList now) to enable navigation on Media
Started implementing ExamineBackedMedia instead of using new Media()
2011-06-11 22:15:01 -02:00
matt d727d67ad5 Fixed issue with registering adobe air mimetype when it is already declared at the server level (http://our.umbraco.org/projects/website-utilities/desktop-media-uploader/bugs,-feedback-and-suggestions/17101-Won't-Install) 2011-05-26 07:40:31 -01:00
agrath@gmail.com 40099d9d22 Made DynamicNode and DynamicMedia share an intermediary base class (that inherits from DynamicObject) rather than both inheriting from DynamicObject directly
Want to share some functionality between them
2011-05-21 14:55:10 -12:00
agrath@gmail.com cd13f8de55 Can't change the web.config for a 4.7.x release, redid implementation to not require web.config change 2011-05-21 14:47:57 -12:00
agrath@gmail.com 6a0dfc2c11 Razor @Library empty implementation 2011-05-21 14:34:46 -12:00
hartvig e99669d3ae SSL TLC and a little Macro RTE love. Fixes work items: 30285, 27438, 30295, 30286, 30261, 30192 2011-05-09 09:58:12 -02:00
starfighter83 ad3d064acb Merge 2011-05-09 05:05:37 -02:00
starfighter83 bef5f59c26 Fixes issue with installer hanging at 35% when doing upgrade 2011-05-09 05:04:20 -02:00
hartvig b6c6022272 Work items 30244 2011-05-04 09:40:54 -02:00
hartvig 157e96c935 Work items: 30272, 30280 2011-05-02 09:42:34 -02:00
starfighter83 0661842dea Fixes: Modal Dialogs closes when overlay is clicked
Work Items: 30264
2011-04-28 07:40:32 -02:00
starfighter83 96715d8ef3 Minor change to cms.businesslogic.template.Template.cs 2011-04-28 07:24:19 -02:00
starfighter83 2fa56aaca9 Fixed: Latest Edit dashboard is broken (4.7)
Work Items: 30262
2011-04-27 12:28:28 -02:00
starfighter83 013367c8b7 Fixed: Update Password Module breaks all other dashboard controls
Work Items: 30044
2011-04-27 12:20:05 -02:00
starfighter83 46683c78a9 Fixes: User Permission: Not able to edit page permission when long page names are there in the content tree
Work Items: 30265
2011-04-27 12:04:26 -02:00
starfighter83 7540e696cb Fixes: Rolling back the version of a Document with no Template specified causes a YSOD
Work Items: 30252
2011-04-27 10:56:01 -02:00
starfighter83 6c5941196f Forcing .NET 2.0 security rules, to make it possible to run in medium trust 2011-04-27 07:03:55 -02:00
starfighter83 badad9a1c3 small update to previous commit (move or copy dialog) 2011-04-26 13:01:39 -02:00
starfighter83 8f8b00fee9 Fixes issue with permissions on child nodes not being checked when doing a move or copy
Work Items: 30128, 30129
2011-04-26 12:24:18 -02:00
starfighter83 f1196aa088 Uses jeditable for key value prevalue editor inline edit, should support all chars now 2011-04-26 10:00:41 -02:00
starfighter83 7b66d80f5c Merge 2011-04-21 10:19:19 -02:00
starfighter83 8348d551f7 Small update when editing media, other props like width, height will also be refreshed in ui when uploading/deleting image 2011-04-21 10:18:41 -02:00
hartvig ff56d5ed22 Updates to code editor saving routines 2011-04-21 07:37:57 -02:00
starfighter83 8d0a227629 Fixes: Admin user is unable to remove the start node filed values
Work Items: 30255
2011-04-20 07:11:14 -02:00
starfighter83 f8c6e59121 Merge 2011-04-20 06:53:35 -02:00
starfighter83 84c6913162 Fixes: Media, Selecting remove checkbox removes the image but does not remove its specifications
Work Items: 30254
2011-04-20 06:52:28 -02:00
hartvig 35099746be Adds missing Exception file 2011-04-20 05:23:47 -02:00
hartvig 6c83107f24 Merge 2011-04-18 17:44:42 -02:00
hartvig ae18fcda1a Work items 30127 2011-04-18 17:43:23 -02:00
starfighter83 47bd9180dc Fixes: Constrain proportion checkbox should be removed
Work Items: 23421
2011-04-18 11:16:23 -02:00
starfighter83 1d86530879 Fixes Insert / edit embedded media problem in Umbraco 4.7.0
Work Items: 30205
2011-04-18 10:30:24 -02:00
starfighter83 c2eea73b98 Fixes Wrong TinyMCE stylesheet order
Work Items: 30184, 30183
2011-04-18 10:10:13 -02:00
starfighter83 734f029679 Adds mask to datepicker input field
Work Items: 30186
2011-04-18 08:37:25 -02:00
hartvig 2fad45f972 Fixes issue with internal app/section based user validation 2011-04-16 04:54:08 +07:00
agrath@gmail.com 5c6e8526da Changed IsLast implementation to behave properly when the DynamicNodeList is not a parent item children list
Changed IsHelper default valueIfFalse to be string.Empty on IsHelper(Func<DynamicNode,bool> func, string valueIfTrue) implementation
2011-04-05 23:15:23 -12:00
agrath@gmail.com 3c52ac851f Slight change to handling of True/False when value isn't defined on a node but property is in DynamicNode 2011-04-05 23:06:30 -12:00
agrath@gmail.com 5bcf591a72 Fixed OrderBy for multiple properties when one or more of those properties is a real property on DynamicNode [CreateDate etc]
Fixed OrderBy so it doesn't crash when ordering by a property which doesn't exist on one of the DynamicNodes in the set
2011-03-25 10:48:03 -13:00
agrath@gmail.com 10672f02a1 Fixed .OrderBy with single properties which are implemented as actual properties (e.g. Level, CreateDate, UpdateDate) - dynamic properties should have ordered correctly 2011-03-25 09:47:00 -13:00
agrath@gmail.com ddf97c30d1 Added ul, span to the list of excluded elements for DynamicXml 2011-03-25 09:34:55 -13:00
agrath@gmail.com 9a56886f1d Made !, != true more robust when property may not exist on a node
Fixed some cases of && breaking where the wrong number of parameters was passed to the LambdaExpression
2011-03-25 09:34:39 -13:00
agrath@gmail.com b198edeeaa Made DynamicNodeList.Where, DynamicNodeList.OrderBy public again 2011-03-25 09:33:39 -13:00
agrath@gmail.com 76f83ddda0 Fixed RTE types in DynamicNode from still getting converted to DynamicXml due to missing return statement 2011-03-25 09:33:00 -13:00
agrath@gmail.com 23aa9e60fe Added GetProperty(string alias, bool recursive) overload to DynamicNode
Added GetPropertyValue(string alias) and GetPropertyValue(string alias, bool recursive) to DynamicNode
2011-03-22 19:01:17 -13:00
agrath@gmail.com 3d396d2b63 Added Index/Position method to DynamicNode for when it's contained within a DynamicNodeList and you're iterating
Added bool IsHelper(Func<DynamicNode,bool>), string IsHelper(Func<DynamicNode,bool>, string valueIfTrue), string IsHelper(Func<DynamicNode,bool>, string valueIfTrue, string valueIfFlase)
Added IsFirst/IsLast/IsOdd/IsEven helpers for checking position in current context/list
Added IsEqual for checking if the current node matches another by Id
Added IsDescendant/IsDescendantOrSelf/IsAncestor/IsAncestorOrSelf for checking relationships between two nodes
2011-03-22 18:48:57 -13:00
agrath@gmail.com 93d65ced40 Add IsNull and HasValue methods to Dynamic* classes
**Breaking Change: DynamicNull.HasValue and DynamicNull.IsNull have been changed from properties to methods
Rename umbraco.MacroEngines.ExtensionMethods as umbraco.MacroEngines.PrivateExtensionMethods
Implement extension method invokes for DynamicNode
2011-03-22 18:02:32 -13:00
boxbinary a079136665 Fix for umbracoContentXMLUseLocalTemp trying to make a directory with the name "umbraco.config" rather than the container "UmbracoData"
Work Items: 30167
2011-03-15 09:30:56 +00:00
hartvig 77e8c6dfe2 Adds IE9 pinning support by Matt Brailsford 2011-03-14 19:05:35 -01:00
hartvig d2b266824b Adds Related links razor template 2011-03-14 18:38:39 -01:00
hartvig 5a6313182e Added documentation to all Razor templates 2011-03-14 18:14:37 -01:00
starfighter83 252a3061eb update to uc wrapper serialization helper 2011-03-14 12:48:47 -01:00
starfighter83 24cabcdad3 update to SerializationHelper 2011-03-14 12:34:16 -01:00
starfighter83 0ba61139f2 Merge 2011-03-14 12:32:49 -01:00
starfighter83 e3d1e3b48c Adds SerializationHelper to userControlWrapper (makes it super easy to do xml properties with uc wrapper) 2011-03-14 12:32:00 -01:00
hartvig 8833034a35 Updates to Razor snippets (WIP) 2011-03-14 11:42:41 -01:00
starfighter83 58294a6be9 Merge 2011-03-14 09:46:38 -01:00
starfighter83 fc2eaecb33 adding files related to tinymce upgrade 2011-03-14 09:46:21 -01:00
starfighter83 cd38cb1412 Updates tinymce to 3.4 2011-03-14 09:44:03 -01:00
agrath@gmail.com 1b060dfdbf Implemented Pluck/Select to extract a given property from a DynamicNodeList and return it as a List<T>
Example:
var colours = @Model.Children.Select("colour");
//Red, Green, Blue ...
Uses the parser from .Where internally
Aliased as .Pluck
2011-03-12 16:29:02 -13:00
agrath@gmail.com 1a2bba4b2b Added data type detection for MNTP/CSV to return List<int> and fix for NodeById/MediaById to handle List<int> correctly 2011-03-12 15:19:54 -13:00
agrath@gmail.com 44bfcaf373 Changed the decimal.TryParse code slightly to replace , with . before parse attempt
This is because strings like this: "2442,5453,5366" were incorrectly parsing to be "244254535366"
2011-03-12 15:07:17 -13:00
agrath@gmail.com 073053aa33 Work Item: 30160 (DataType lookups not working correctly) 2011-03-12 13:21:34 -13:00
agrath@gmail.com b624d7479a Fixes work item: 30156, using prop.Contains(string) || !prop.Contains(string)
Added ContainsInsensitive extension method for use inside .Where (fixed method finder too)
2011-03-12 12:33:09 -13:00
matt 5b353d7b4c Work Item: 30153 2011-03-10 15:14:25 +00:00
hartvig 3f3c4a78d7 4.7 it is... 2011-03-10 13:25:44 -01:00
hartvig a5e2d1e107 Work items: 30152 2011-03-10 13:17:40 -01:00
agrath@gmail.com b189b70214 Merge 2011-03-09 07:55:54 -13:00
agrath@gmail.com 1716b94449 Added some extra properties/functions to DynamicNull to provide a way to check to see if a child doc type actually exists.
.HasProperty will check for a property existence but because the child types are returned as DynamicNull, you couldn't check for null equality.
Use DynamicNull's .IsNull (true) or .HasValue (false) or .Count() (0) or a typeof check
2011-03-09 07:52:05 -13:00
agrath@gmail.com f5a7001859 Fixed handling of get properties on DynamicNode when used in a BinaryExpression and neither side is a LambdaExpression 2011-03-09 07:42:43 -13:00
starfighter83 111dee7187 Merge 2011-03-09 16:28:42 -01:00
starfighter83 df04d6ce22 Fixes issue with breadcrumb razor cshtml template 2011-03-09 16:28:25 -01:00
hartvig 5fdfc0d1f8 Work items: 30072 2011-03-09 09:23:08 -01:00
agrath@gmail.com ddcf34b80c Added .Sibling to DynamicNodeWalker which is a shorthand for checking both .Next() and .Previous()
overloads are .Sibling(int) [which you can pass negative to and is equivilent to .Previous(+int) ] or .Sibling(string) which checks nodeTypeAlias
.Sibling(string) will start walking forward at the current node and then wrap back to 0 until it reaches the starting point again
2011-03-08 19:54:55 -13:00
agrath@gmail.com a02aca0f62 Added support to DynamicNodeWalker for finding nodes that are Up/Down/Previous/Next by NodeTypeAlias
Up and down are similar to Ancestors(string nodeTypeAlias)/Descendants(string nodeTypeAlias) but return the first match
2011-03-08 19:42:59 -13:00
agrath@gmail.com d7e83cb1ee Added support to DynamicNodeWalker so that .Next() and .Previous() can be called on nodes which did not come from a DynamicNodeList (e.g. a node you have from @Model) - assuming it has a parent 2011-03-08 19:22:41 -13:00
agrath@gmail.com fa5b85557f Added support to DynamicNodeList for .Add and .Remove methods to support this use case:
http://our.umbraco.org/forum/developers/razor/17934-Creating-a-DynamicNodeList-with-a-'for'-loop
2011-03-08 19:06:55 -13:00
agrath@gmail.com 042e373b6a Added support for iterating over DynamicXml
e.g. @foreach(var level in @Model.someXmlProperty.Book)
2011-03-08 19:00:44 -13:00
agrath@gmail.com 150d4648c1 Added support for chaining properties if a previous property access returns DynamicNull 2011-03-08 19:00:04 -13:00
agrath@gmail.com 017ed3635a Fixed .Ancestors(int) to return ancestors where the level <= int rather than level = int to match .Descendants(int) >= behaviour 2011-03-08 18:43:59 -13:00
agrath@gmail.com 9949420c6d Change HasAccess and IsProtected to be getters so they can be used in .Where
http://umbraco.codeplex.com/workitem/30096

Add support to DynamicQueryable for accessing properties that are not dynamic and are actually defined on DynamicNode
2011-03-08 18:38:06 -13:00
agrath@gmail.com 9b74eee10c Ensure that getdatatype doesn't throw an exception
http://our.umbraco.org/forum/developers/razor/18085-Access-custom-node-properties-with-Razor
2011-03-08 18:22:31 -13:00
agrath@gmail.com bc8f21f92d Added implementation for .Visible which wraps umbracoNaviHide != 1 2011-03-08 18:09:06 -13:00
hartvig 1bf6604da9 Work items: 30124 2011-03-08 11:19:06 -01:00
hartvig 5c8eec28c2 Work items: 30088 2011-03-08 11:17:44 -01:00
hartvig c7e1c439ff Work items: 30125 2011-03-08 11:12:49 -01:00
hartvig 8d19cf6925 Work items: 30143 2011-03-08 11:00:16 -01:00
hartvig b52e347396 Work items: 30142 2011-03-08 10:30:58 -01:00
PerPloug c12e2e8e77 symbol files 2011-03-04 13:05:23 -01:00
PerPloug 18ec3850da Merge 2011-03-04 12:15:37 -01:00
PerPloug 5ca7822262 Build file symbols 2011-03-04 12:14:13 -01:00
hartvig 634aaf757f Add support for finding app_code extensions in subfolders for xslt/rest extension discovery 2011-03-03 09:16:03 -01:00
hartvig 1e8bf4ff83 Work items: 30110 2011-03-03 08:41:05 -01:00
starfighter83 dec48c7442 Merge 2011-03-02 13:57:44 -01:00
starfighter83 b566324e7a Merge 2011-03-02 13:57:15 -01:00
starfighter83 bd09b21bb8 Fixes: Splitbuttons in edit template should only be activated on click
Work Items: 30097
2011-03-02 13:56:37 -01:00
hartvig 45ee50ed0f Adding HasCookieValue back to StateHelper and marking it obsolete 2011-03-02 13:50:29 -01:00
hartvig ea30785baf Work items: 30101 2011-03-02 13:17:30 -01:00
Elijah 7edd9e92e5 DLR Editor Now Saves Files In Sub Dirs 2011-03-02 01:48:58 -11:00
PerPloug cd170a18ab Removes python folder and empties macroScripts folder 2011-03-01 12:19:19 -01:00
starfighter83 90539868f3 style updates to splitbutton 2011-03-01 09:18:18 -01:00
starfighter83 1121c7ca79 changes width of splitbutton menu 2011-03-01 09:08:28 -01:00
starfighter83 3d8144c617 changes position of razor splitbutton in template editor menu 2011-03-01 08:58:44 -01:00
starfighter83 914ccf873a splitbutton finetuning 2011-03-01 08:35:34 -01:00
starfighter83 8666742004 Merge 2011-03-01 07:24:32 -01:00
starfighter83 f91013618f changes to splitbutton js 2011-03-01 07:24:07 -01:00
hartvig 3239ae8adb Missing updates to legacy and dlr projects 2011-02-28 19:41:06 -01:00
starfighter83 e8093526d0 Merge 2011-02-28 14:37:53 -01:00
starfighter83 905a55a5ee Adds some js so that the macro dropdown in template editor doesn't go outside the screen 2011-02-28 14:37:15 -01:00
hartvig 931aef0265 Merge 2011-02-28 13:03:58 -01:00
hartvig 23605b5a4b Changing /python to /macroScripts 2011-02-28 13:03:09 -01:00
starfighter83 7422b2a712 Merge 2011-02-28 12:03:58 -01:00
starfighter83 9ac64f2668 Style update to split button 2011-02-28 12:03:09 -01:00
hartvig 5a5aafd610 Merge 2011-02-28 11:49:29 -01:00
hartvig c4272eecf3 Casing error in webpages:Enabled appSetting (all credit to @elijahGlover for spotting!) 2011-02-28 11:48:13 -01:00
starfighter83 e86d5f79c1 style update to split button, down arrow always visible 2011-02-28 11:36:12 -01:00
starfighter83 3904f7799e fixed ie issue with macro split button 2011-02-28 11:32:10 -01:00
starfighter83 fcf92188e9 Merge 2011-02-28 11:19:17 -01:00
starfighter83 25dfb4a2da Merge 2011-02-28 11:18:39 -01:00
PerPloug 31eb415b72 Merge 2011-02-28 11:18:19 -01:00
PerPloug bf3edcf36a version number change to 4.7 2011-02-28 11:16:56 -01:00
starfighter83 ff802ebef4 Merge 2011-02-28 11:16:55 -01:00
hartvig ff678dd856 Marking the changeset as 4.7 RC! 2011-02-28 11:16:21 -01:00
starfighter83 8271892411 Updated to macro button on edit template page (split button, possible to choose macro from dropdown menu) 2011-02-28 11:16:20 -01:00
hartvig d6befbd83c Issue with Membership and homepage + updates to razor templates. Work items: 30072 2011-02-28 11:14:28 -01:00
PerPloug 4b70a5f56e Merge 2011-02-28 11:10:32 -01:00
PerPloug df9a18fb45 missing symbol files 2011-02-28 11:10:02 -01:00
agrath@gmail.com 4f496ef5da Updated web.config.ssaolap01.xslt 2011-02-27 22:56:12 -13:00
agrath@gmail.com aaa90bea14 More graceful handling of missing properties in .Where - TryGetMember now returns DynamicNull
Only return DynamicNull if property truely doesn't exist - if it does exist and has no value, still return null
2011-02-27 22:55:50 -13:00
PerPloug 41d344d481 Merge 2011-02-28 10:47:27 -01:00
PerPloug 6be3b5d93b build version id 2011-02-28 10:46:48 -01:00
hartvig bcb399f768 Merge 2011-02-28 10:03:19 -01:00
hartvig 59e41e3912 Work items: 30086, 30087 2011-02-28 10:01:53 -01:00
PerPloug 468f688f20 Merge 2011-02-28 09:55:40 -01:00
PerPloug 3f74ee4ab5 adding system.webpages to build dir 2011-02-28 09:55:02 -01:00
agrath@gmail.com 60c18bdff9 More graceful handling of missing properties in .Where - TryGetMember now returns DynamicNull (IEnumerable with fake .Where and .OrderBy) when the property/child type doesn't exist.
Expression Tree in DynamicQueryable explictly checks for this type and forces that portion of the predicate/expression tree to return true, bypassing the missing property
Handy when you are checking e.g. a boolean property in a .Where and that boolean doesn't exist on all nodes.
2011-02-27 21:53:45 -13:00
PerPloug 300da7f04a One more change to build file 2011-02-28 09:46:21 -01:00
PerPloug d324ee90a7 Change build order 2011-02-28 09:36:57 -01:00
PerPloug 5fd694cca9 nant build 2011-02-28 09:29:34 -01:00
PerPloug 5491569b8c Merge 2011-02-28 09:23:43 -01:00
PerPloug f1b904ecc4 web.config 2011-02-28 09:23:21 -01:00
PerPloug 50f9170935 sdasda 2011-02-28 09:22:32 -01:00
PerPloug dbc8a07628 sdsad 2011-02-28 09:21:22 -01:00
PerPloug 6519055d21 New nant file 2011-02-28 09:16:35 -01:00
starfighter83 38bbe32f16 Fixes styling issue with split button and chrome 2011-02-28 09:02:42 -01:00
starfighter83 4edc96af7d Merge 2011-02-28 08:35:26 -01:00
starfighter83 e3f42ef388 Update to template split button, new location of razor templates 2011-02-28 08:34:29 -01:00
agrath@gmail.com bba0fcfd5f Merge 2011-02-27 09:00:00 -13:00
agrath@gmail.com 7ca429cb61 Added overloads to AncestorsOrSelf, Ancestors, Descendants, DecendentsOrSelf to filter by Level or NodeTypeAlias
Rewrote implementations internally so a Func<DynamicNode,bool> [or Func<INode,bool>] is used so that there's only one implementation of each
2011-02-27 08:55:15 -13:00
hartvig 9707a61303 Work items: 30078 2011-02-27 18:00:30 -01:00
hartvig 6b2858d552 Updating namespaces in umbraco.MacroEngines.Iron project 2011-02-27 14:49:00 -01:00
hartvig c03ee2cecd Missing assemblyinfo.cs 2011-02-27 14:43:20 -01:00
hartvig 38c60c69bf Adding umbraco.MacroEngines.Iron 2011-02-27 14:37:09 -01:00
hartvig 6bc277b4f2 Work items: 30052 2011-02-27 13:23:01 -01:00
hartvig 1dae998eaf Work items: 30073
Encoding issues in temporary razor files and general developer scripting editor
2011-02-27 12:46:22 -01:00
hartvig 78a3d02b89 Clean up of xslt and dashboard config files 2011-02-27 12:17:04 -01:00
hartvig 9729ad4d31 Work items: 30082
Properties from Richtext editor isn't encoded by razor anymore as DynamicNode will return an IHtmlString for RTE properties
Changed the lookups of Yes/no and tinmce datatypes ids to consts as these won't change anyway
2011-02-27 12:13:04 -01:00
hartvig 11da35ae5f Exclude IronPython and IronRuby from default distribution (will be separate download). Work items: 30081 2011-02-27 11:57:33 -01:00
agrath@gmail.com cbe94ae6aa Refactored ExtensionMethod search code from DynamicNodeList (searches for extension methods e.g. .Random()) to tidy it up
Moved Extension Method searching code to seperate static class
Moved all the defined extension methods for DynamicNode into the same ExtensionMethods.cs file
Changed the way that .ContainsAny within a where is evaluated to use the ExtensionMethodFinder class - should allow extra search methods to be defined
2011-02-26 16:15:45 -13:00
Elijah f58c453334 Fixed Unary StartsWith("~") Razor 2011-02-26 16:26:06 -11:00
Elijah 0202526acc Updated Legacy Macro Engines to work with new changed IMacroEngine 2011-02-26 16:10:16 -11:00
Elijah cfb21237c0 Added FileLocation To <umbraco:macro /> template control 2011-02-26 16:05:30 -11:00
agrath@gmail.com 1f05d43047 Added new overloads to MediaById and NodeById which take List<object> or params object[] and return DynamicNodeList or DynamicMediaList [new - doesn't support OrderBy,Where etc]
Added to allow retreiving multiple items by id when you know the Ids, e.g.: using MNTP to select nodes and then needing to get them in Razor
2011-02-26 11:43:23 -13:00
agrath@gmail.com 6bc71000af Commit of updated umbraco.MacroEngines.csproj 2011-02-26 11:12:26 -13:00
agrath@gmail.com a32e8894cd Added support for calling non standard extension method style helpers within a .Where
Intended as a future extensibility point, provides a way for the parser to redirect into a static method library of helpers
Currently, only one method is available - ContainsAny
Functions like string.Contains but uses needles from a List<string>

var values = new Dictionary<string,object>();
var keywords = new List<string>();
keywords.Add("Five");
keywords.Add("Four");
values.Add("keywords",keywords);
var items = @Model.Children.Where("Name.ContainsAny(keywords)", values);
2011-02-26 11:12:06 -13:00
agrath@gmail.com 6d615e6762 Work on DynamicQueryable to support .Where("bodyText.Contains(\"string\")")
Chaining works too: .Where("Name.SubString(1,3).Contains(\"v\")");
2011-02-25 16:58:17 -13:00
agrath@gmail.com b1ff0db8fe Work on DynamicQueryable to support .Where("shouldBeVisible && Level < 4") rather than .Where("shouldBeVisible == true && Level < 4")
Confirmed other test cases of .Where still work
2011-02-25 12:16:03 -13:00
agrath@gmail.com 3961787463 Added DynamicNode.HasProperty(string) method to check to see if a particular DynamicNode has a property 2011-02-25 00:51:41 -13:00
agrath@gmail.com 9b45a81f22 Rewrote implementation of HandleDynamicNodeLambdas in DynamicQueryable.cs to be easier to read and handle unboxing and type conversion when the output type of the lambda is convertable between the left and right side.
Allows this syntax to work now:
@Model.Children.Where("updateDate < DateTime.Now.AddDays(-2)")
This didn't work previously in 4.7beta because updateDate was still boxed as an object and object < DateTime can't be implicitly converted

@Model.Children.Where("bodyText.Contains('ipsum')") still doesn't work because the parser doesn't know how to invoke .Contains on a LambdaExpression (yet)
2011-02-25 00:39:53 -13:00
starfighter83 0e9fc4a84b Merge 2011-02-25 09:23:17 -01:00
starfighter83 78aaa85765 Fine tuning to edit template split button 2011-02-25 09:20:54 -01:00
agrath@gmail.com 71c5e35443 Added DynamicNodeWalker and implementation on DynamicNode and DynamicNodeList
DynamicNodeWalker is our secret weapon in the fight against the Rebel XSLT Alliance
Navigate nodes by calling Up(), Down(), Next() and Previous() on them
Next(1) will jump two items along within the current list, whereas Next() will walk by one within the list
Previous(1) will move two items backwards within the current list
Up() is a special wrapper around .Parent which has an overload .Up(int) to replace @Model.Parent.Parent.Parent... [.Up(2)]
Down() will take you to the first Child item and is equivilent to .Children.First(), use .Down(1) to replace .Children.First().Children
If one of the NodeWalker functions fails to find a node at the requested position, it will return null
2011-02-24 17:19:50 -13:00
agrath@gmail.com 603a12c5a0 Split umbraco.MacroEngines.Juno into two subfolders (namespaces remain the same)
RazorCore contains all the core razor engine implementation
RazorDynamicNode contains all the DynamicNode functionality and associated support files
2011-02-24 16:05:54 -13:00
agrath@gmail.com 78ae4132eb Added IEnumerable Map method used in Descendants feature
Fixed DynamicNodeList.OrderBy where there was only one column and the ordering was descending
Added DateTime.TryParse support to DynamicNode property retrieval to allow OrderBy and Where to have date support
Added IsProtected & HasAccess to DynamicNode
Added .AncestorsOrSelf to DynamicNode
Added .Descendants to DynamicNode [Deep Children]
Added .DescendantsAndSelf [Deep Children]
Fixed .nodeTypeAlias children collection crashing when the node didn't contain any children of that type
Added cshtml templates first versions for DynamicNode, these are samples I demo'ed at the Auckland umbraco meetup the night of 4.7beta release
2011-02-24 15:56:52 -13:00
psterling 9a4f44e73d Merge 2011-02-25 03:53:50 +08:00
psterling 11d09a6796 Added explanatory text to connection error messages in installer 2011-02-25 03:51:37 +08:00
starfighter83 8d064c89f7 Merge 2011-02-24 14:58:57 -01:00
starfighter83 6936a1db5a Update to edit template toolbar, WIP 2011-02-24 14:57:33 -01:00
matt 007bab36cc Rolled back changes to web.config 2011-02-24 14:58:20 +00:00
matt ccf832fec5 Removed rouge zipupload files, and fixed missing DMU dashboard (didn't realize the config file was in multiple places) 2011-02-24 14:43:53 +00:00
slace 4fcc62f04a merge 2011-02-23 01:17:53 -11:00
starfighter83 c09b5102af Fixes: TinyMCE no longer defaults <P> tags around text
Work Items: 29964
2011-02-23 09:26:40 -01:00
starfighter83 49c4ce45cb Merge 2011-02-23 07:54:52 -01:00
starfighter83 126c62dee5 Merge 2011-02-23 07:50:07 -01:00
starfighter83 20bff9acd4 Fixes: Inserted macro in rte always positioned above existing content (in IE)
Work Items: 30061
2011-02-23 07:49:15 -01:00
Elijah c2ff9019cf Microsoft.Web.Infrastructure.dll is required, missed it bacause webmatrix was installed 2011-02-22 21:14:52 -11:00
hartvig ff3a776617 Fix for parents in DynamicNode by Agrath 2011-02-23 00:16:50 -01:00
slace 76bb93fa23 changing umbraco.presentation project to .NET 4.0 2011-02-22 13:44:54 -11:00
hartvig 4225ac9d8a 4.7.0.beta 2011-02-22 23:10:34 -01:00
hartvig 6e58c622cd Work Items: 30059 2011-02-22 23:03:23 -01:00
hartvig ceb8c9d896 Work items: 29237 2011-02-22 23:00:41 -01:00
hartvig 5eb20a1101 Better error reporting inside the NiceUrl engine 2011-02-22 13:53:56 -01:00
hartvig 9196c039d1 Patches via GPLwhite => Work items: 30057 2011-02-22 13:30:20 -01:00
hartvig d54b2416f0 Work items: 30050 2011-02-22 13:27:45 -01:00
hartvig 7be3314a11 Work items: 29917, 30065, 30066 2011-02-22 13:23:15 -01:00
hartvig c2acb33933 Fix by Lee Kelleher. Work items: 30064 2011-02-22 12:55:50 -01:00
hartvig 5ca12fb99f Work items: 29918 2011-02-22 12:00:15 -01:00
hartvig b2db75bcb2 Fixes issues with macro caching, Work items: 29891 2011-02-22 11:52:58 -01:00
hartvig e2cee9e99d Work items: 29972 2011-02-22 11:21:22 -01:00
hartvig 526bc454a5 Work items: 29149 2011-02-22 11:03:28 -01:00
hartvig fef629181f Work items: 29934 2011-02-22 09:45:21 -01:00
hartvig 33741210b3 Fix to macro container bug. Thank you to the 'mysterious patcher'. Work items: 29874 2011-02-22 09:11:45 -01:00
psterling 970903eb2a Added graceful installation completion option when no connection to repo exists 2011-02-22 13:13:58 +08:00
Elijah 9d5c127c14 Resharper Renamed My Property!!! Now Fixed :( 2011-02-21 17:27:32 -11:00
Elijah 0071bfbb13 webPages:Enabled requires a lowercase "W" 2011-02-21 17:01:55 -11:00
PerPloug 69ccf5a138 AddRestExtension package action, swicth to use XmlHelper instead of doc.load(); 2011-02-21 12:49:45 -01:00
hartvig 4866bcafb8 Fixes issue with tildes in content, work items: 30048 2011-02-21 11:12:38 -01:00
hartvig 64914da779 Adding missing files 2011-02-21 10:05:13 -01:00
hartvig 16f78d0f4c Merge of razor query improvements (missing one file in merge, though - will be added in next commit!) 2011-02-21 09:28:13 -01:00
PerPloug fa008b3679 Removing umbraco.MacroEngines.Legacy files from build 2011-02-21 09:05:34 -01:00
agrath@gmail.com 03441fab21 Added umbraco.Settings entry for controlling what document element types are parsed as DynamicXml
Added documentElement checking to DynamicXml convert for DynamicNode property get to solve a potential issue with XHTML RTEs
Fixed issue with calling @Model.Children.First() in testing (null Children in testing)
Put some commented placeholder code in .XPath->DynamicNodeList inside DynamicNode.cs for future return of DynamicXml if not valid List<NodeFactory.Node>
2011-02-20 19:55:06 -13:00
psterling 3e56fe947a Add catch for no internet connection on final Installer screen 2011-02-21 05:38:03 +08:00
psterling 9410d34485 Update to DB selection text in installer 2011-02-21 05:05:03 +08:00
agrath@gmail.com 6b431eb000 Fixed a bug in DynamicNode when the string contained "false" it would fail and not return (bool)false
Decided that if using @Model.XPath and you were in testing, then the resulting DynamicNodeList should contain self/this, not be empty
Should allow chaining to work when in test mode

Fixed a potential issue when DynamicNode got returned during testing because there are no children
and then property accesses would return false causing chaining to break

Added [a somewhat experimental] DynamicXml and xml fragment detection within DynamicNode to DynamicXml,
When accessing a string property that contains XML, you can now continue your dot based access
Call .ToXml() to get the real XML string again
Call .XPath(string) to run a XPath query on the fragment and return another DynamicXml
Example:
	<Catalog>
	  <Book id="bk101">
	    <Author>Garghentini, Davide</Author>
	    <Title>XML Developer's Guide</Title>
	    <Genre>Computer</Genre>
	    ...
	@Model.Children.Random().someXmlProperty.Catalog.Book[1].Genre
	@Model.Children.Random().someXmlProperty.Book[1].XPath(".//Genre")
	@Model.Children.Random().someXmlProperty.Book[1].ToXml()
2011-02-19 21:19:45 -13:00
agrath@gmail.com 84d7999f32 Added .XPath helper to DynamicNode list that allows you to use XPath to query from the current node represented in XML (e.g. if you have a child DynamicNode which actually exists part way down the original dom from NodeFactory then get it at that position (allowing you to use .. to move to parent)
Nodes are attempted to be turned back into NodeFactory.Node when returned by XPath and then wrapped in DynamicNode and then DynamicNodeList

Added .Random parameterless overload to pick a single random node from the DynamicNodeList

Example of new Methods being used:
<img src='@Model.XPath("//ChildItem[catCount = 2]").Random().Media("catPicture","umbracoFile")'/>
2011-02-19 20:05:02 -13:00
Elijah db89bbc676 Merge 2011-02-18 04:12:41 -11:00
Elijah 344c36a84a Updated presentation web.config for razor support 2011-02-18 04:03:14 -11:00
Elijah 868e1bdb42 Updated Build Web.Config To Support Razor 2011-02-18 03:32:39 -11:00
hartvig fa5e5de818 Updates to fetching macro parameters in a case insensitive way 2011-02-18 13:12:58 -01:00
PerPloug 0c5acf544e Merge 2011-02-18 13:08:50 -01:00
PerPloug 627fbcdd15 Version number for nant 2011-02-18 13:06:06 -01:00
hartvig f64e902bf8 Merge 2011-02-18 13:03:47 -01:00
hartvig b5c78d397d Updates to fetching extension methods in a more stable way in DynamicNodeList 2011-02-18 13:02:20 -01:00
PerPloug fe514e15ea Removal of another post-build-event that fails if done in release mode 2011-02-18 12:52:06 -01:00
PerPloug 32887c23e5 Nant files for 4.6.2 2011-02-18 12:44:32 -01:00
hartvig 7df518155d Clean up of merging 2011-02-18 10:09:20 -01:00
hartvig 90f5c4ce9a Merge initial merge of Agraths improvements (might break compilation atm) 2011-02-18 09:38:19 -01:00
agrath@gmail.com cc23fdbd8e Added .Random implementation from the blog post so it's internal to 4.6.2 2011-02-17 20:57:12 -13:00
agrath@gmail.com 3a30c285fe Updated .OrderBy implementation to support OrderBy,OrderByDescending,ThenBy,ThenByDescending properly on DynamicNodeList
Usage is: @foreach(var item in home.ChildItems.OrderBy("catCount, colour desc"))
If you use the simple form of home.ChildItems.OrderBy("catCount") it will use a simpler/faster implementation
2011-02-17 19:07:22 -13:00
agrath@gmail.com d9f420d45a Added .OrderBy method to DynamicNodeList
Only supports single pass, ascending currently, so no ThenBy implementation or Descending variants
The original query parser supports OrderBy("catCount, name desc") by nesting Expression.Call
Current implementation for DynamicNodeList supports OrderBy("catCount") only
2011-02-17 14:52:05 -13:00
agrath@gmail.com 300c975284 Moved caching of property data type from DynamicNode to a static method in ContentType
Simplified SQL query used for property type lookup
Added cache clearing for propertyType cache when ContentType.ClearCache is called
Improves performance of new razor property lookups - most improvement on large sets
2011-02-17 14:23:20 -13:00
hartvig f8b5e5e89d Merge of DougMs patches 2011-02-17 17:19:06 -01:00
hartvig d57bc67121 Merge of Sebastiaans patches 2011-02-17 16:56:22 -01:00
hartvig 71aa8a20af Merge of ElijahGs brilliant razor implementation 2011-02-17 16:52:15 -01:00
hartvig ef50f7d38c Merge more of sgays patches 2011-02-17 16:07:22 -01:00
hartvig 2e6341b945 Merge sgay patches 2011-02-17 13:42:28 -01:00
Elijah e277e4cadb Dynamic keyword is back for Parameters/Dictionary 2011-02-16 22:53:11 -10:00
Elijah 35cfee3f85 inline @inherts not required, fix 2011-02-16 21:42:45 -10:00
Elijah 3a76e9caae Supports default @inherits directive umbraco.MacroEngines.DynamicNodeContext 2011-02-16 21:29:35 -10:00
Elijah 2def8a520a .razor ext added as a Build Provider 2011-02-16 18:42:14 -10:00
Elijah 45fefda660 editMacro.aspx - adds sub directory slash/now shows "Browse scripting files on server..." 2011-02-16 18:40:40 -10:00
matt 8dac6662a5 Updated DMU with latest changes
Changed DMU version number to 2.1.0 to allow for additional work on original DMU project if needed
2011-02-16 18:48:03 +00:00
Elijah 68ce71685d Updated config added factoryType 2011-02-16 01:49:31 -11:00
Elijah ce83c8a1b9 Added SupportedUIExtensions to IMacroEngine 2011-02-16 01:48:40 -11:00
Elijah 3d5ed109af .razor proxy .cshtml file ext- #unbreakingcode 2011-02-16 01:32:04 -11:00
PerPloug fa4483f08c /base issue with virtual directories fixes: 30042 2011-02-16 08:27:41 -01:00
Elijah 8a1c8475b8 Update Interfaces BaseContext 2011-02-13 22:54:51 -11:00
Elijah 7f57fde279 Seperated Parameter & Culture Dict
Fixed inline auto inherit directive
2011-02-13 22:54:14 -11:00
agrath@gmail.com b20d1bfd4c Added support for string Comparisons e.g. @Model.Children.Where("menuType = \"Top Menu\") and support for And/Or @Model.Children.Where("menuType == \"Top Menu\ || menuType == \"Bottom Menu\"") 2011-02-07 17:28:59 -13:00
agrath@gmail.com 070a03e827 Fixed DynamicNodeList extension method invocation finding the wrong method when the method being checked was defined on a class that implemented no interfaces
Caused user-loaded extension methods on DynamicNodeList to be pretty unreliable (would work sometimes, sometimes wouldn't find method - particularly after an iisreset)
2011-02-07 15:29:44 -13:00
agrath@gmail.com 313d67ed94 Added reference to datalayer (to get SqlHelper) from DynamicNode 2011-02-07 14:11:03 -13:00
agrath@gmail.com e7ebcb29bc Broke string properties with new typecasting stuff by returning false instead of true if the typecasting failed (e.g. it was actually a string)
Changed this to a return true

Replaced some API calls via Document & Property (database level, not nodefactory) with a single SQL scalar where I was getting the control type (to determine if "0"/"1" should actually be "true"/"false")
Should perform a lot better now
2011-02-07 14:10:38 -13:00
agrath@gmail.com e5c3c8869a Upgraded DynamicNode to do some type inferrence from the IProperty type .Value which is a string
Already had support for YesNoType (where the string value is 1 or 0) being converted/parsed to boolean
Added some TryParse calls to int and decimal respecitvely so that if a IProperty.Value is a valid decimal or int it will be returned from DynamicNode.TryGetMember as such
This enables the .Where operator to have the correct type after property retrieval so that some numerical comparisons will work

Added support for >, >=, <, <= and %[mod] to .Where
@Model.Children.Where("catCount > 1")
@Model.Children.Where("catCount % 2 == 0")
2011-02-07 13:12:34 -13:00
agrath@gmail.com 878f6fc812 Added support for some more Func<> types in my Where implementation
Refactored GenerateEqual into a Factory method HandleDynamicNodeLambdas that takes an ExpressionType
Implemented Expression.NotEqual
@Model.Children.Where("shouldBeVisible != true") => children that are hidden
2011-02-07 10:23:40 -13:00
agrath@gmail.com 6d0be45acf Changed some type comparisons where I determine if the LambdaExpression is Func<DynamicNode,object> to handle simple equality operations:
e.g. @Model.Children.Where("shouldBeVisible == true")
Also changed internal where implementation to handle Func<DynamicNode,bool> as well as Func<DynamicNode,object>
Both left & right side as lambda expressions should work (though I haven't tested this yet)
e.g. @Model.Children.Where("property1 == property2")
Only == (Expression.Equals) is supported currently due to the extra code required to invoke the lambda when generating the final comparison expression
2011-02-07 08:56:59 -13:00
agrath@gmail.com 649a98daf4 Added missing DynamicQueryable and DynamicQueryableBinders class files for previous commit 2011-02-06 19:53:07 -13:00
agrath@gmail.com bcf735f4f8 Added support for DynamicLinq in place of Lambda syntax. The short version is you can't use a Lambda with a DynamicNode
e.g. @Model.Children.Where(node=>node.shouldBeVisible)
To solve this, I used the DynamicQueryable class from the Linq samples which has a parser that can take a string then modified the internals a bit so
that if your object is a DynamicObject, an additional expression tree is generated which calls the TryGetMember on it
The end result is that you can now do this [I have Random(this DynamicNodeList nodes, int max) in my bin folder]
@Model.Children.Where("shouldBeVisible").Random(2) => two nodes, randomly picked, from the ones that should be visible
*Only* Where is implemented here currently, I'll add support by OrderBy and ThenBy after I've tested some more complex scenarios.
I need to fix a small issue with my DynamicLoading of extensions - under some scenarios the class doesn't get found and i'm not sure why.
2011-02-06 19:52:05 -13:00
matt ba3c7fd680 Added a wmode parameter to DMU badge to prevent it displaying on top of the lock modal popup 2011-02-06 14:49:26 +00:00
matt 043f0e03b2 Merge 2011-02-05 12:46:28 +00:00
matt 03f8aac4e5 Added DMU Flex source
Changed all TheOutfield namesspaces to Umbraco
Added DMU dasboards
Removed ZipUpload dashboards
Added air mimetype to web.config
2011-02-05 12:21:04 +00:00
agrath@gmail.com eba7c9d550 Overloads for DynamicMedia and DynamicNode constructors that take object and string respectively
New DynamicNode .MediaById (because @Model is DynamicNode) to find a media item by id, e.g. if you are using it with @Model.Parameters.imageId
Overloads for MediaById and NodeById that take object and string to match constructors
2011-02-02 15:51:51 -13:00
agrath@gmail.com 5a5ccfea98 Changed reflection of assemblies to all assemblies in bin folder via BuildManager instead of currently loaded assemblies 2011-02-02 13:05:10 -13:00
agrath@gmail.com 799d718881 Refactored my implementation of IEnumerables being returned from .Children etc to return a new type called DynamicNodeList instead of a DynamicNode (singular) containing a nested list.
This makes the code cleaner and also allows for the .Items (underlying initialization data for DynamicNodeList) to be exposed when you have an instance and hide all of the singular properties etc (Url, Name) that are on DynamicNode - they're not applicable for a List.
Rewrote the reflection code for calling methods on DynamicNodeList to allow mix-ins (e.g. external dlls) to have an extension method defined for DynamicNodeList (e.g. Random(nodeCount))
Lambda syntax still doesn't work (e.g. Children.Where(item=>item.shouldBeVisible)) however methods that don't take lamdas (Take, Random[external], Skip, ElementAt, First, etc) work
2011-02-02 11:52:09 -13:00
sgay 0b5ce63c3a fix #29949 - do not hide errors when loading xslt ext 2011-02-01 13:18:22 -01:00
sgay 39a34954ce fix #29989 - refactor TypeFinder and TypeResolver 2011-02-01 13:17:49 -01:00
agrath@gmail.com 83d88e70a5 Fixed an issue with boolean casting in razor file for if shorthand when properties didn't have value 2011-01-31 08:37:44 -13:00
sebastiaan d165b75456 Workitem: 29976 - Additional fix, sometimes the niceUrl does NOT start with a slash, in which case you wouldn´t want to strip the first character 2011-01-31 15:02:24 -01:00
sebastiaan e07dfd49a1 Workitem: 29976 - Additional fix in wording, the word for ´login´ in Dutch is not ´aanmelden´ (which means: ´to register´), but ´inloggen´. 2011-01-31 10:35:58 -01:00
sebastiaan 2b11cab075 Fixes 29976
NiceUrlFetch now uses the new niceUrlJuno function. The result of niceUrlJuno does not include a leading slash. The old NiceUrl (used in the presentation of the URL) does include one, leading to wrong URLs.
2011-01-31 08:43:38 -01:00
matt a5527769f3 Forgot to save project file before commiting 2011-01-30 17:50:37 +00:00
matt 4b8cc30c3f Added Desktop Media Uploader factories, HttpHandler and initial Dashboard control.
Need to finish dashboard control, swap with ZipUpload and test.
2011-01-30 17:39:20 +00:00
Elijah 5cc819407c *Breaking Change* Removed Parameter & Culture Dictionaries - results in easier to read razor 2011-01-29 03:24:12 -10:00
agrath@gmail.com 26bf18766b Fixed a bad check in my patch for booleans that wasn't installation-portable by making it check the DataTypeDefinition instead of ContentTypeId.
Added a cache for the propertyType lookup (within a single DynamicNode instance) in case the razor logic needs to check the same boolean multiple times within a node.
Should improve performance if working with large trees & repeatedly checking a boolean value
2011-01-28 14:36:13 -13:00
sebastiaan 28d5a81403 Workitem 26949 - Fixed: Login field doesn't fit Dutch translation 2011-01-28 13:35:07 -01:00
agrath@gmail.com c692b296d7 Added Pascal Case support to DynamicMedia and .Media helper 2011-01-27 21:56:09 -13:00
agrath@gmail.com a0dd8aa2ab Improves access to media items when working in Razor
Added a new DynamicMedia class that wraps umbraco.cms.businesslogic.media.Media which caches GetProperty calls (while DynamicMedia is instantiated)
Added method to DynamicNode to retrieve a property as DynamicMedia: @Model.Media("catPicture"); or @Model.Media("catPicture").umbracoFile;
Added overload to DynamicNode Media method for shorthand if you only want one property; @Model.Media("catPicture","umbracoFile");
@Model.catPicture will still return the nodeId of the media item because we can't easily check the propertyType (no propertyType on IProperty)
2011-01-27 21:38:06 -13:00
agrath@gmail.com 6382241e4c Special casing in DynamicNode property retrieval for when the property being retrieved is True/False. I'm not sure how comfortable I am with having to go to Document to get the proerty info or the check of the ContentTypeId but the syntactic sugar of being able to go:
if(@Model.shouldBeVisible) {...} where shouldBeVisible is a true/false property on the datatype is pretty nice
2011-01-27 15:29:38 -13:00
agrath@gmail.com 3ab4944e5e If you're dealing with dynamicNode such as using:
var someNode = new umbraco.MacroEngines.DynamicNode(1046) in your template, it instantiates a DynamicNode like you'd expect, but then it doesn't function as a dynamic object
because it wasn't initialised as a dynamic variable [dynamic someNode = new umbraco.MacroEngines.DynamicNode(1046)]

Added a method to DynamicNode called NodeById which returns a new DynamicNode with the ID you pass, so you can call it off @Model
e.g. var item = @Model.NodeById(1046) will still function as a dynamic, even though it was defined as var
2011-01-27 14:49:56 -13:00
agrath@gmail.com 28b48b187a Added DynamicNode constructor that takes an int and passes it to NodeFactory so you can go var @clientNode = new umbraco.MacroEngines.DynamicNode(1560); 2011-01-27 14:22:28 -13:00
agrath@gmail.com fce7ea48b0 Didn't test the AncestorOrSelf changes on a non-parent node. Changed implementation to call into Func<DynamicNode,bool> to check Level == 1
Also fixed post-build rule on umbraco.MacroEngines which had an incorrect path for copying umbraco.MacroEngines to presentation (allows debug without manual file copy, I think)
2011-01-27 13:07:10 -13:00
agrath@gmail.com fbf13d8cf7 Fixed support for AncestorOrSelf when in Test mode (the INode passed to the razor script in testing has a null parent)
Added AncestorOrSelf overload which doesn't require a Func<DynamicNode,bool> argument

Both changes modify DynamicNode.Parent so that if there is no parent, it returns itself instead of null, (you can't new DynamicNode(null) as it throws exception)
and then in the AncestorOrSelf checks, the loop makes sure that it won't get stuck by continually returning itself (because this.Parent returns this)
2011-01-27 12:59:34 -13:00
DougM 00dc8e0356 fix #29829 - Edit datatype -> Richtext editor displays incorrect icons for remove formatting and media 2011-01-27 19:23:13 +00:00
agrath@gmail.com dca21f9ce1 Added support for Macro Parameters in Razor Macros (@Model.Parameters.AnimalName) where AnimalName is defined on the Macro as a Parameter 2011-01-26 08:28:16 -13:00
DougM 48c635e452 fix #29904 - Rich text editor 'insert link' breaks when selecting node with single quote in name (incorreclty marked as fixed in work item) 2011-01-26 20:38:01 +00:00
agrath@gmail.com 69a1e7000c Added support for calling IEnumerable methods which return IEnumerable (e.g. Skip,Take) rather than single nodes (e.g. First,ElementAt) 2011-01-26 07:35:55 -13:00
DougM 1c02059509 fix #29945 - RTE xhtml strict compliant underline and strikethrough 2011-01-26 20:25:08 +00:00
sgay 7631522a9e fix #29966 - cache xslt extensions 2011-01-26 10:46:47 -01:00
agrath@gmail.com c1f96000b4 Adding web.config transformation file for agrath/Gareth Evans/Sniper Systems Laptop 2011-01-25 22:31:33 -13:00
agrath@gmail.com 873871b6c2 Fixing messup 2011-01-25 22:30:56 -13:00
agrath@gmail.com 6650394bf9 Upgraded DynamicNode to handle IEnumerable better so that you can chain method/property calls through an IEnumerable set like this: @Model.Children.Count() or @Model.Children.ElementAt(2) 2011-01-25 22:24:51 -13:00
agrath@gmail.com 9259dd897f Upgraded DynamicNode to handle IEnumerable better so that you can chain method/property calls through an IEnumerable set like this: @Model.Children.Count() or @Model.Children.ElementAt(2) 2011-01-25 22:24:40 -13:00
sgay 934c48cac6 fix #29956 - refactor cookies 2011-01-25 12:14:05 -01:00
starfighter83 5b99b1e803 Fixes small issue with installer db step 2011-01-25 10:36:35 -01:00
starfighter83 4a144ea6da Merge 2011-01-25 09:39:59 -01:00
starfighter83 991fb6236d Fixes: Possible to upload to media root when user doesn't have access (start media node set)
Work Items: 29942
2011-01-25 09:39:24 -01:00
psterling 05459b12c9 backed out fix for #29741 - updates default Admin Language to en-US including date/time/currency formats 2011-01-25 01:45:06 +08:00
hartvig 966c792c8b Patch by sgay. Work items: 29889 2011-01-24 09:58:14 -01:00
starfighter83 320382a143 Small css update to skin customization dialog 2011-01-24 08:04:18 -01:00
starfighter83 2d856cf664 Merge 2011-01-24 07:41:38 -01:00
starfighter83 1cf475e120 Update to installer, makes 'Connection string' input bigger 2011-01-24 07:40:45 -01:00
Elijah afe872c28e Added InjectContext
Using WebPageBase.CreateInstanceFromVirtualPath to create instances
RenderPage now works, copying Parameters/Node
2011-01-23 00:41:33 -10:00
psterling cd50056154 update to API Wiki link in default dashboard 2011-01-21 23:50:30 +08:00
psterling c2caf8ba91 fixes #29741 - updates default Admin Language to en-US including date/time/currency formats 2011-01-21 23:32:51 +08:00
Elijah ec7619510a Merge 2011-01-21 05:26:26 -10:00
Elijah 5859cc9867 Added BaseContext Future Stub 2011-01-21 05:22:49 -10:00
sgay 6e157581ca fix #29889 - content tabs issues 2011-01-21 14:10:52 -01:00
Elijah 10bf3511fc changed activator to use the build engine object factory 2011-01-21 04:58:54 -10:00
Elijah 6922f1d0d3 **Breaking Change IMacroEngine** passes physical path into the validate method
Added CultureDictionary Escape Char _
Razor Validation Added
Inline @inherits directive added when not found
DLR Scripting Engine Validation Soft Fail
2011-01-21 04:26:26 -10:00
Elijah 8511c2b5c8 Added Dynamic Property For Fetching Dictionary Items
Added Base Dynamic Lambda Dictionary
2011-01-21 02:37:03 -10:00
hartvig 7beffb2305 Merge of gplwhite patches, reviewed by hartvig. Work items: 29833 2011-01-21 11:20:01 -01:00
hartvig f51f5354f1 Merge of sgays patches, reviewed by hartvig. Work items: 29931, 29930, 29929, 29928, 29927, 29926, 29447, 29443, 29470, 28975, 29889 2011-01-21 11:10:01 -01:00
PerPloug b67f3a9c8e Missing build dependencie for release target 2011-01-21 07:32:38 -01:00
PerPloug 27ec2d16f1 Updated build.config for webPi package generation 2011-01-21 07:18:31 -01:00
Elijah 17efba1242 Removed Old Razor Stuff 2011-01-20 21:55:51 -10:00
PerPloug 17c3699612 WebPi Assets 2011-01-21 06:42:21 -01:00
PerPloug 0b4d7902b8 Adding missing SqlCE Manifests for x86 + amd64 2011-01-21 06:41:51 -01:00
Elijah 8ada4a4e1e Merge 2011-01-20 18:00:38 -10:00
Elijah e837c3c841 updated macroengine csproj RazorBuildProvider.cs/App.config 2011-01-20 17:55:59 -10:00
Elijah af79bb24e5 Added Medium Trust Support, Razor DLL's can now exist in the GAC or BIN
Added Inline Razor Support - Caches Templates In The App_Data directory for now
Taken out umbdebug from the engine, as it caches the debug content
Custom Build Provider - Future Stub
2011-01-20 17:52:56 -10:00
Elijah 26e6305e9c Add Helper Binaries - Microsoft.Web.Helpers - System.Web.Helpers 2011-01-20 17:49:38 -10:00
sgay 5790ff26fd fix #29931 - cleanup member statue management 2011-01-20 14:19:06 -01:00
sgay 542b892dd5 fix #29930 2011-01-20 14:08:15 -01:00
sgay 4af6ea2b3c fix #29929 2011-01-20 14:04:32 -01:00
sgay b82a251bb8 fix #29928 2011-01-20 14:01:17 -01:00
sgay 582b5797dc fix #29927 2011-01-20 14:00:08 -01:00
sgay edc930241b fix #29926 2011-01-20 13:56:20 -01:00
sgay f08ca0f014 fix #29447 - fail to rebuild content tree 2011-01-20 13:51:47 -01:00
sgay 415f6f38b1 should fix #29443 - duplicate node in content tree 2011-01-20 13:50:29 -01:00
sgay 3b7c8d73de fix #29470 - macros rendered twice 2011-01-20 13:47:46 -01:00
starfighter83 bae04cd27e WIP installer db step update 2011-01-20 11:42:26 -01:00
starfighter83 447582b018 Update to installer, adds continue button to validate permissions step 2011-01-20 11:10:19 -01:00
starfighter83 2af1812b01 WIP installer db step refactor, opens video help link in new window 2011-01-20 09:45:34 -01:00
starfighter83 d8c98ccfd8 WIP installer db step refactor 2011-01-20 09:23:04 -01:00
starfighter83 f4b4c03a9c Merge 2011-01-19 08:27:35 -01:00
starfighter83 580b670f33 Fixes: RTE can't cleanup pasted code automatically(umbraco 4.6.1)
Work Items: 29897
2011-01-19 08:27:00 -01:00
Elijah b450b04ee6 Added Fully Qualified Namespace For RazorBuildProvider 2011-01-18 16:15:55 -10:00
Elijah 9ca7e02e69 Added Web.Config To Configure Razor
Updated csproj dependency paths
2011-01-18 14:23:26 -10:00
Elijah 7144ff46e7 Added Razor ASP.NET WebPages Dependencies 2011-01-18 14:17:47 -10:00
Elijah 3b07515730 Renamed RazorEngine, Context Now Inherits From WebPageBase 2011-01-18 13:55:19 -10:00
Elijah 6f00df4c85 Updated Razor To Use System.Web.Complication.BuildManager 2011-01-18 06:14:06 -10:00
gplwhite 791b31bc3a Work Item #29833
Avoid saving an empty Xml document to the file-based content cache when a database connection is not available.
2011-01-17 15:00:49 -13:00
sgay 7c87b09e97 fix #28975 - broken macros cache 2011-01-17 14:19:54 -01:00
sgay 3ae4511532 fix #29889 - broken content tabs 2011-01-17 14:19:10 -01:00
hartvig 2fd905edb9 Work items: 29899 2011-01-17 09:34:40 -01:00
starfighter83 db10f1ed26 Merge 2011-01-17 06:47:00 -01:00
starfighter83 a9dd0a7e65 Fixed: RestExtensionMethod doesn't honour returnXml property
Work Items: 29898
2011-01-17 06:46:20 -01:00
hartvig d031e1da91 Work items: 29888 2011-01-15 22:06:28 +05:00
PerPloug 74f80e2ba5 Merge 2011-01-12 14:09:59 -01:00
PerPloug bbfc881a9e EditorControls.csproj release configuration fubar 2011-01-12 14:06:47 -01:00
starfighter83 018c5050b9 Merge 2011-01-12 14:06:46 -01:00
starfighter83 96f2ded0aa Merge 2011-01-12 14:05:12 -01:00
starfighter83 f0883b0994 Fixes tinymce media/members issue 2011-01-12 13:59:44 -01:00
PerPloug 571f89bbe3 Recommit of TinyMCE for media and members 2011-01-12 13:58:08 -01:00
hartvig 8e4deca486 Fixes issue with tinymce on media/members (missing commit) 2011-01-12 12:59:07 -01:00
PerPloug 5650c6427a Removes xml files from /bin on release builds 2011-01-12 12:47:12 -01:00
PerPloug 7b2750f503 Disables umbraco.test project in release mode due to MsTest limitation 2011-01-12 12:35:53 -01:00
PerPloug 7c7004c73e Merge 2011-01-12 12:17:44 -01:00
PerPloug ed2d771d32 Changing the build runner configuration requires editing this XML, move configuration to Teamcity, defaults to Release 2011-01-12 12:16:19 -01:00
hartvig 300de8c4ab Marked as 4.6.1 2011-01-12 11:44:35 -01:00
starfighter83 e777a97cb6 Merge 2011-01-12 10:50:57 -01:00
starfighter83 c72f15d1ba Fixes: Unable to set a link in the rich text editor
Work Items: 29861
2011-01-12 10:50:13 -01:00
hartvig 7ce70cc09f Merge 2011-01-12 10:20:21 -01:00
hartvig 35bc0cce0d Work items: 29016 2011-01-12 10:18:53 -01:00
starfighter83 449418c648 Fixes: Deleting Razor scripting files
Work Items: 29859
2011-01-12 10:14:40 -01:00
PerPloug e67a114a70 just a test to see if the right branch i build 2011-01-12 08:50:29 -01:00
PerPloug 461234ad3f Change nant build to 4.6.1 2011-01-12 08:19:00 -01:00
PerPloug 6a0e15e8f1 Auto-removal of .orig files during nant build 2011-01-12 08:06:01 -01:00
hartvig 7f82a46f56 Work items: 29860, 29858 2011-01-12 07:57:21 -01:00
boxbinary 9449ab1ed0 Opening a new branch for 4.6.1 development in the future.
This will be merged back into 4.6.0, and tagged with the appropriate release, when complete.
2011-01-12 01:18:17 +00:00
boxbinary c1cd915f7d Adding tag for 4.6.0 release (yay) 2011-01-12 01:14:14 +00:00
hartvig 0dbd27f21c Adds <httpRuntime requestValidationMode="2.0" /> to default web.config 2011-01-11 21:13:25 -01:00
hartvig fec91ebd75 Setting version number to 4.6.0 - ahhh 2011-01-11 19:08:15 -01:00
PerPloug 335c7a4333 Missing *.pdb files removal from nant 2011-01-11 18:28:35 -01:00
PerPloug 648ac811e8 Merge 2011-01-11 12:52:22 -01:00
PerPloug f6475b3812 Changes default.nant build ID to 4.6 RC1 2011-01-11 12:50:47 -01:00
hartvig ef5cb3dd4c RC 2011-01-11 12:49:36 -01:00
hartvig 4c76081568 Fix to find all dashboards for a section (even if scattered over multiple area elements) 2011-01-11 12:31:30 -01:00
PerPloug 0889e9c033 Merge, Work items: 29844 2011-01-11 12:21:12 -01:00
PerPloug 700aa48a2e New Nibble.ZipUpload.dll which lowercases extensions before creating media items 2011-01-11 12:18:58 -01:00
hartvig 43ccf77d7e Adds helper text for SQL CE 2011-01-11 12:15:22 -01:00
hartvig 24d5eefe38 Merge 2011-01-11 12:02:56 -01:00
hartvig 551bcdde2f Work items: 29830 2011-01-11 11:59:04 -01:00
PerPloug 6f1776fb69 Work items: 29769 adds 40px to the member create dialog 2011-01-11 11:58:39 -01:00
PerPloug 33618f9c2a Merge 2011-01-11 11:36:52 -01:00
PerPloug ff39e069db Reproduced #29779, Calling RefreshContent() after database upgrade fixes empty paths
work items: 29779
2011-01-11 11:32:56 -01:00
PerPloug a2357bad85 Reproduced #29779, Calling RefreshContent() after database upgrade fixes empty paths
work items: 29779
2011-01-11 11:30:07 -01:00
hartvig 3d02429285 Merge 2011-01-11 11:18:34 -01:00
hartvig cef7401ff8 Work items: 29778 2011-01-11 11:14:31 -01:00
PerPloug 8fb62265b7 Work items: 29836 2011-01-11 10:53:17 -01:00
PerPloug 62db053500 Fixes #29836 CloseTriggrs type changed to CloseTriggers (modal.js line 27) 2011-01-11 10:49:51 -01:00
hartvig 0edf5a5e5e Work items: 29841 2011-01-11 10:31:57 -01:00
hartvig dc1be04202 Work items: 29848 2011-01-11 10:24:39 -01:00
hartvig 5c70ba1eb8 Work items: 28882 2011-01-11 10:03:08 -01:00
hartvig 38b1385b66 Fixes issues with uploading files/images. Work items: 29196 2011-01-11 09:42:28 -01:00
boxbinary b9849a2ded Fixes: "Installer bug in IE8: password confirm message is white color. you can't see it"
Work Items: 29843
2011-01-11 09:32:38 +00:00
hartvig 792450328d Work items: 29846 2011-01-11 07:20:03 -01:00
psterling babf5dabe2 fixes #29792 - Link to UrlRewritingManual in the UrlRewriting.config is not working 2011-01-11 03:02:18 +08:00
psterling 1e3eaf8094 updates to license links in about dialog 2011-01-11 02:54:35 +08:00
psterling fec878227e update database installation video link in installer database step 2011-01-11 01:20:39 +08:00
starfighter83 a1abd9dd18 Merge 2011-01-10 14:11:32 -01:00
starfighter83 44e01c09d6 Fixes: Tilde (~) in media path (when getting property value in .net)
Work Items: 28598
2011-01-10 14:11:19 -01:00
hartvig 6eb738e0d3 Fixes issue with SQL CE and loading macros on front end: Work Items: 29781 2011-01-10 13:33:55 -01:00
PerPloug c50d2e994e Adds RazorEngine.core and .templates to nant build 2011-01-10 13:24:56 -01:00
pgregorynz 058b195a12 Timeout bar translation keys for EN 2011-01-10 01:10:45 -13:00
pgregorynz bff788f048 lockout modal styling 2011-01-10 01:03:00 -13:00
hartvig cc96e01b4c Enhanced Razor support. Adds caching, pre-compilation of templates and support for helpers and more. Work items: 29817 2011-01-10 12:23:26 -01:00
starfighter83 b57b18c0b1 Merge 2011-01-10 11:22:38 -01:00
starfighter83 631eb1fecb Fixes: Macros inserted in the RTE get extraneous <p> tags above and below
Work Items: 21883
2011-01-10 11:22:07 -01:00
hartvig 564fa2659b Work Items: 29822 2011-01-10 08:28:58 -01:00
starfighter83 2177686e43 Make sure user is logged back in when he enters correct password 2011-01-07 14:46:54 -01:00
starfighter83 36e0b28e70 Merge 2011-01-07 14:33:12 -01:00
starfighter83 4ac3a5537e Does a lock out instead of a logout when user is idle to long 2011-01-07 14:32:19 -01:00
boxbinary 51977637b7 UX Tweak: Removes shadow from body text in installer. Modifies shadow on step tabs and h1. 2011-01-07 14:09:17 +00:00
PerPloug ee4477f6ab Merge 2011-01-07 10:41:19 -01:00
PerPloug 8baa2db7e7 Removing unnedded update.ascx file from installer 2011-01-07 10:31:59 -01:00
PerPloug 5d3aeee02f Adds upgrade support to installer 2011-01-07 10:18:34 -01:00
pgregorynz 6da0a00e06 Dashboard updates 2011-01-06 22:17:40 -13:00
starfighter83 7d69bed9c9 Fixed: Exception "This document already has a DocumentElement node"
Work Items: 29412
2011-01-07 09:56:19 -01:00
starfighter83 d182a297b8 Merge 2011-01-07 09:21:13 -01:00
starfighter83 aa3b8fb808 Fixed: Juno, installing starter kit from developer section works but ends in YSOD
Fixed: Juno, installing skin from developer section works but ends in YSOD
Work Items: 29821, 29820
2011-01-07 09:20:32 -01:00
boxbinary 73e552d105 Merge 2011-01-07 01:26:06 +00:00
boxbinary 8f2f81b558 Code env fix: Removes source control bindings from csproj files.
Code env fix: Modified .hgignore to ignore .vs10x files and anything in App_Data\TEMP
Fix: upon saving a document type, if the alias has changed, document Xml is regenerated in the db and the Xml caches are told to update.
Fix: upon saving a document type, if the name has changed, the tree updates with that change
Work Items: 29197, 28738
2011-01-07 01:23:09 +00:00
slace 48ff65e597 adding CurrentPage to the .NET macros 2011-01-06 12:22:34 -11:00
slace 58874238cc Adding a more detailed exception when parsing fails for LINQ to Umbraco 2011-01-06 12:09:24 -11:00
Tim Saunders 8062df53f8 Renabled paging paging on skinning step in installer as it is now dynamic. 2011-01-06 19:32:42 +00:00
Tim Saunders 9df031c6fd Text ammendmens to the installer and hiding of the next and back buttons on the skin page. NOTE: These will need to be re-enabled when there are more skins. 2011-01-06 16:43:36 +00:00
starfighter83 b17e54976f small update (related to chrome / macro) 2011-01-06 14:50:19 -01:00
starfighter83 28479e5257 Merge 2011-01-06 13:56:55 -01:00
starfighter83 fb90e44dad Fixes 28639: Chrome crashes in 4.5 when editing macro parameters in TinyMCE 2011-01-06 13:55:38 -01:00
Adam Shallcross 76fc41f14e Merge merged css changes into repo 2011-01-06 14:31:53 +00:00
Adam Shallcross 60a3d581ab Added missing files and updated CSS for missing styles on starter kit panel and bg in text to make it stand out a bit more from the page 2011-01-06 14:19:42 +00:00
starfighter83 c4385335a1 Fixes 29249: Publish At and Remove At do not work 2011-01-06 10:42:19 -01:00
starfighter83 2f90f76348 adds web.config. ... .xslt 2011-01-06 09:24:41 -01:00
starfighter83 873ee6a7d1 Merge 2011-01-06 09:06:06 -01:00
starfighter83 fa54d0a1e8 Fixes 29799: Macro Container: ordering macros throws exception on some nodes 2011-01-06 09:04:41 -01:00
pgregorynz 413fe775d1 Removed references to the installer images directory from presentation project 2011-01-05 12:49:26 -13:00
pgregorynz dd1119bcad Merge 2011-01-05 12:35:49 -13:00
pgregorynz 9efc931b92 adding link to getting started to the THEEND step on the installer 2011-01-05 12:14:09 -13:00
pgregorynz 09a785537e Adding link to getting started guide on dashboard 2011-01-05 12:09:28 -13:00
Tim Saunders d851afd8e2 Merged installer text changes 2011-01-05 13:05:33 +00:00
Tim Saunders e883a22093 Installer text and spelling corrections. 2011-01-05 12:58:42 +00:00
starfighter83 7dea3b872f Fixes broken build 2011-01-05 11:45:28 -01:00
starfighter83 6795f700d5 small updates to skinning 2011-01-05 11:38:49 -01:00
starfighter83 682104a1f1 some includes (related to TinyMCE upgrade) 2011-01-05 09:21:31 -01:00
starfighter83 d29eb77383 Updates TinyMCE to 3.3.9.3 (latest stable) 2011-01-05 09:17:29 -01:00
starfighter83 07804c149b Merge 2011-01-05 08:17:20 -01:00
starfighter83 b89257b96c Fixes issue with macro container css not being found 2011-01-05 08:15:42 -01:00
Tim Saunders 288ae8826c Updated the instruction text to fix grammar, spelling and readability issues 2011-01-04 18:20:49 +00:00
starfighter83 d00e9c502a Fixes 29798: Importing Document Type with a Master set adds properties to incorrect tab 2011-01-04 08:48:16 -01:00
starfighter83 f4c976e600 updates /config/create/ui.xml 2011-01-04 08:34:19 -01:00
starfighter83 83322a1916 Fixes 29790: Could not find file zipUpload.config 2011-01-04 08:07:26 -01:00
starfighter83 8a9a625964 Fixes 27419: Deleting copied content nodes with an uploadfile property results in deletion of original uploaded file 2011-01-03 09:15:35 -01:00
starfighter83 b0dcfec61e Merge 2011-01-03 08:37:11 -01:00
starfighter83 13d93de517 Merge 2011-01-03 08:36:52 -01:00
starfighter83 0a39ee90c2 trying to merge 2011-01-03 08:36:19 -01:00
starfighter83 b8b39ae890 Fixes: created documnet type can't be deleted, I can assure you that this is a bug. Work Items : 29789 2011-01-03 08:34:26 -01:00
psterling feff4a5713 Fixes #29793 to allow arbitrary return value length from user-defined /base methods 2010-12-31 01:26:39 +08:00
slace d3df402d4a setting the umbraco.config to be ignored and adding a DynamicNode method to do AncestorOrSelf 2010-12-28 00:04:11 -11:00
hartvig 87d96f389d Fixes #29784 and #29788 + updates jQuery to v1.4.4 2010-12-27 09:27:07 -01:00
slace fc23004a1b fixing spelling error 2010-12-26 18:19:08 -11:00
slace 4ec0aaab24 adding pluralization support for finding children 2010-12-26 18:05:47 -11:00
slace cbf9a2e7e0 changed the DynamicNode to also handle child types through property accessors as well 2010-12-26 17:50:21 -11:00
slace 6bf2b10231 web.config changes 2010-12-26 16:27:47 -11:00
slace 792aff0f1a merge 2010-12-25 22:47:48 -11:00
slace 2bbf3c8af2 changin the DLR macro engine also contain a dynamic object 2010-12-25 22:45:32 -11:00
slace c239578bd8 updating hgignore to handle v5 source 2010-12-25 22:37:03 -11:00
slace 0c3f57f537 making the DynamicNode object work more like a Node object without having to rely on reflection 2010-12-25 22:36:12 -11:00
pgregorynz 6b423f5082 move remaining images to umbraco_client/installer images directory remove /install/images 2010-12-23 11:08:45 -13:00
pgregorynz cbea0ad4e7 sets the ie images for the filter in lt7.css to be relative in the installer to allow images from umbraco_client directory 2010-12-23 10:58:27 -13:00
hartvig f18fe684cd It's a beta, baby! 2010-12-23 22:40:56 -01:00
hartvig 4795bb9f43 Fixes caching issue in IE installer 2010-12-23 22:14:38 -01:00
hartvig 63d5615698 Fixes installer ie issue (by duplicating image files - better fix for final release) 2010-12-23 21:42:40 -01:00
hartvig 216ab8c966 Updates to NodeFactory 2010-12-23 20:42:50 -01:00
starfighter83 e5f734acf3 small changes to noNodes page 2010-12-23 10:05:28 -01:00
starfighter83 3646f8af4b Fixes #29760: Update design of no nodes page (so it fits with new installer) 2010-12-23 09:57:21 -01:00
starfighter83 8d16887ba9 Fixes #29771: Juno, installer, when installing starter kit progress has caption for skins 2010-12-23 09:40:23 -01:00
starfighter83 fb7f28e00d Moving installer js and css so it can be used on no nodes page 2010-12-23 09:35:44 -01:00
starfighter83 057ab8cd15 Fixes #29770 : Juno, developer / packages / install skin avoid installing the same skin twice 2010-12-23 06:48:03 -01:00
starfighter83 9203fb6fed Fixes #29768, Juno, installer, last step, replace community blog and twitter feed with video feed 2010-12-23 06:30:01 -01:00
starfighter83 389454868d Fixes #29766 : Juno, default dashboards, 'Click to hide this in the future' nearly invisible 2010-12-23 06:02:14 -01:00
starfighter83 25daf42363 Merge 2010-12-23 05:52:09 -01:00
slace 7b91c3beab merge 2010-12-22 13:39:47 -11:00
slace a36cda81e3 merge 2010-12-22 13:38:33 -11:00
PerPloug aa5f57432d Missing children and ChildrenAslist methods on nodefactory wrapper 2010-12-22 20:25:55 -01:00
PerPloug 386f008dd7 Node Factory Wrapper to ensure backwards compat 2010-12-22 20:04:58 -01:00
psterling 34e0b10633 Fixes #28796 - public access null reference exception with Single User Page Protection 2010-12-23 03:14:01 +08:00
starfighter83 4f5d4c05c1 fixes 29764: Juno, ysod when creating doctype under other doctype 2010-12-22 13:42:44 -01:00
starfighter83 0e6bb6fb10 Merge 2010-12-22 12:32:06 -01:00
starfighter83 93f934b0c1 Fixes #29765 : Juno, can't add params to macro 2010-12-22 12:30:53 -01:00
PerPloug 8c7636558b macroEngines build file 2010-12-22 10:41:27 -01:00
hartvig 7d4430855f Excluding unit tests from default build 2010-12-22 09:56:54 -01:00
hartvig abacb50ee8 Updates to unit tests and ContentType caching 2010-12-22 09:48:53 -01:00
PerPloug 0b1c8e39e6 Merge 2010-12-22 09:00:48 -01:00
PerPloug b0a46e6a06 Merge 2010-12-22 09:00:22 -01:00
PerPloug f27c625439 updated nant build for razord 2010-12-22 08:59:48 -01:00
PerPloug d027fdb3d0 updated nant build for razord 2010-12-22 08:56:52 -01:00
starfighter83 4a40b1046e Merge 2010-12-22 08:09:26 -01:00
starfighter83 10c9c14037 Fixes js error in IE / skin customizer 2010-12-22 08:07:47 -01:00
psterling f29a93422e Copy updates to default dashboards 2010-12-22 03:52:23 +08:00
starfighter83 2c3c6ce391 fixes #29745: New Installer, if you don't install starter kit, don't show 'Preview your new site' option 2010-12-21 11:52:14 -01:00
starfighter83 5105a2c9ef small update to abstractdataeditor 2010-12-21 11:49:06 -01:00
starfighter83 6a92a2f321 Fixes #29759: Not possible to make a property that is using a datatype with the usercontrolwrapper mandatory 2010-12-21 10:02:09 -01:00
starfighter83 4578054f1b fixed #29758: ValidationProperty not picked up when using AbstractDataEditor 2010-12-21 09:39:55 -01:00
starfighter83 1d26a0353b update to usercontrol wrapper, detect if value is xml (if it is, don't store in cdata) 2010-12-21 08:14:41 -01:00
starfighter83 b375ddf1f8 Fixes 29631, tilde not resolved (PropertyContextHelpOption set to icon) 2010-12-20 13:03:47 -01:00
starfighter83 df2cfec816 implements #29749 , return proper http status code when base fails 2010-12-20 12:48:34 -01:00
starfighter83 89182fc3a9 update to usercontrolwrapper prevalue editor, so it loads any additional settings after saving usercontrol selection 2010-12-20 12:12:53 -01:00
starfighter83 bf73588b6e Merge 2010-12-17 08:04:09 -01:00
starfighter83 e29fe682b7 makes it possible to have custom settings on datatypes using the usercontrol wrapper 2010-12-17 08:00:08 -01:00
hartvig c9c7eed6d9 Merge 2010-12-16 23:58:10 -01:00
hartvig 9b56b76ad4 Merge 2010-12-16 23:57:47 -01:00
hartvig 94722e82dd Adding support for Public Properties on Dashboard controls (simply add values as attributes on the <control/> element [case-sensitive!]) 2010-12-16 23:39:31 -01:00
slace a03fe234e8 adding hgignore to default head 2010-12-16 11:13:53 -11:00
slace 5e83d590f9 removing (and ignoring) the .suo file 2010-12-16 11:09:50 -11:00
Tim Saunders ddbbf5e799 Various bug fixes and enhancements to the installer, including: stop animation of progress bar when it reaches 100%, Fixed validtion display errors, fixed database form JQuery issues. 2010-12-16 18:31:18 +00:00
starfighter83 6e51d690ce XsltExtension attribute (now also searches in assemblies, not only app_code) 2010-12-16 11:15:56 -01:00
slace 6a69202f5e some clean up of the restExtension.cs file to make it a bit more robust 2010-12-16 00:28:45 -11:00
starfighter83 06f6111876 updates RestExtension attribute so it also picks up types from app_code 2010-12-16 09:33:08 -01:00
starfighter83 0d91a841ff Merge 2010-12-16 09:09:57 -01:00
starfighter83 47e9aa6088 introduces the RestExtension and RestExtensionMethod attribute 2010-12-16 09:06:39 -01:00
PerPloug 7c7df808b4 nuget.build file 2010-12-15 13:43:24 -01:00
PerPloug 34eea0742b Merge 2010-12-15 13:40:48 -01:00
PerPloug 78c97971aa Missing nuget.build file 2010-12-15 13:32:32 -01:00
starfighter83 4f37fb0c00 Changes targetframework back to 3.5 2010-12-15 13:24:53 -01:00
starfighter83 60ca487ea3 Merge 2010-12-15 12:43:43 -01:00
starfighter83 777a857b6b Merge 2010-12-15 12:40:29 -01:00
starfighter83 712571fc38 fixes broken build 2010-12-15 12:39:49 -01:00
starfighter83 1c08fc0351 WIP another small change to /umbraco/developer/packages/starterkits.aspx page (styling the skin overview) 2010-12-15 11:44:33 -01:00
starfighter83 e765df10fe WIP skinning, change to /umbraco/developer/packages/starterkits.aspx page 2010-12-15 11:33:15 -01:00
PerPloug 84d88161fa nuget.build file for building umbraco dlls as a nuget package 2010-12-15 09:28:25 -01:00
PerPloug accb94c415 Changes from Temp Juno SVN Repo 2010-12-15 09:27:05 -01:00
slace 4c0852c0e8 Adding section on submitting bugs 2010-12-14 11:39:13 -11:00
slace e21057e9c8 Adding readme file 2010-12-14 11:38:48 -11:00
boxbinary 03de5ca711 Adding 'Getting started' note following TFS migration 2010-12-14 22:29:40 +00:00
admin 99d0b8c37e Adding tags 2010-12-14 03:19:56 +08:00
936 changed files with 47182 additions and 16596 deletions
+38
View File
@@ -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
+7
View File
@@ -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
+24
View File
@@ -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
+8 -216
View File
@@ -1,221 +1,13 @@
umbraco v3 is licensed under the open source license CPL - Common Public License (attached below). Please notice that it's only v3 that uses the CPL. The prior versions (v2.0, v2.1 and v2.1.x) uses GPL.
Umbraco CMS version 4.5 is licensed under the OSI approved MIT License:
Important License Guidelines - How we see and adopt the CPL
- You're free to choose whatever license (both open source and properary licenses) for any umbraco extensions you make as long as these are distributed alone and not bundled with umbraco.
- umbraco may only be distributed as a whole. You may not use part of umbraco to create another stand-alone application, this could be using the UI parts to create another CMS.
- You may not re-brand umbraco
- If in doubt, please contact us (http://umbraco.org) before using our software for other than the original purpose. We have a commercial non-CPL license for those in doubt, wishes not to use CPL licensed software or wishes to build a new product based on parts of umbraco (see http://umbraco.org).
Copyright (c) 2007-2010 umbraco I/S.
Common Public License Version 1.0
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1. DEFINITIONS
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"Contribution" means:
a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the
Program.
Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not apply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipient receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
Umbraco versions prior to 4.5 were licensed under a combination of MIT and a propriatary UI license. The license history can be found here:
http://umbraco.codeplex.com/license
@@ -352,18 +352,42 @@ namespace umbraco.Linq.Core.Node
if (string.IsNullOrEmpty(data))
{
//non-mandatory structs which have no value will be null
p.SetValue(node, null, null);
try
{
p.SetValue(node, null, null);
}
catch (FormatException ex)
{
throw new FormatException(
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
}
}
else
{
//non-mandatory structs which do have a value have to be cast based on the type of their Nullable<T>, found from the first (well, only) GenericArgument
p.SetValue(node, Convert.ChangeType(data, p.PropertyType.GetGenericArguments()[0]), null);
try
{
p.SetValue(node, Convert.ChangeType(data, p.PropertyType.GetGenericArguments()[0]), null);
}
catch (FormatException ex)
{
throw new FormatException(
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
}
}
}
else
{
// TODO: Address how Convert.ChangeType works in globalisation
p.SetValue(node, Convert.ChangeType(data, p.PropertyType), null);
try
{
p.SetValue(node, Convert.ChangeType(data, p.PropertyType), null);
}
catch (FormatException ex)
{
throw new FormatException(
string.Format("Unable to cast '{0}' to the appropriate type ({1}) for node `{2}`. The alias of the property being parsed is {3}. Refer to inner exception for more details", data, p.PropertyType.FullName, node.Id, attr.Alias), ex);
}
}
}
}
@@ -10,12 +10,16 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>umbraco.Linq.Core</RootNamespace>
<AssemblyName>umbraco.Linq.Core</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<umbracoPresentationPath>..\..\..\..\..\umbraco\presentation\bin</umbracoPresentationPath>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -36,6 +40,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -146,4 +151,4 @@
<PropertyGroup>
<PostBuildEvent>XCOPY "$(TargetPath)" "$(SolutionDir)\umbraco\presentation\bin" /Y</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
+9
View File
@@ -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].
+2 -2
View File
@@ -4,8 +4,8 @@
<Deployment enabled="false" />
<Execution>
<Hosts type="ASP.NET" skipUnhostableTests="false">
<AspNet name="ASP.NET" executionType="WebDev" urlToTest="http://localhost:52453">
<DevelopmentServer pathToWebSite="C:\Users\hartvig\Documents\Visual Studio 2008\Projects\Core\branches\4.1.0\umbraco\presentation" webApplicationRoot="/" />
<AspNet name="ASP.NET" executionType="WebDev" urlToTest="http://localhost:6557">
<DevelopmentServer pathToWebSite="C:\Users\hartvig\Documents\Visual Studio 2010\Projects\Core\umbraco\presentation" webApplicationRoot="/" />
</AspNet>
</Hosts>
<TestTypeSpecific>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="DesktopMediaUploader.mxml" projectUUID="9115d8c5-0cb4-4a34-8702-48456cca7762" version="6">
<compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="1" linkType="1" path="libs"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
<applications>
<application path="DesktopMediaUploader.mxml">
<airExcludes>
<airExclude path="assets/dmu_orange.fla"/>
<airExclude path="assets/logo.psd"/>
<airExclude path="assets/icon-128-old.png"/>
<airExclude path="assets/icon-128.psd"/>
</airExcludes>
</application>
</applications>
<modules/>
<buildCSSFiles/>
</actionScriptProperties>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
+24
View File
@@ -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;
}
}
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

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="&lt;font color='#666666'&gt;{Model.folderPath.replace(/\//g, ' ')}&lt;/font&gt;{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 &gt; 0}" includeInLayout="{uploadItems.length &gt; 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 &amp;&amp; Model.folderId}" styleName="orange" height="35" left="25" right="25" click="btnUpload_Click(event)"/>
</s:Group>
@@ -12,10 +12,14 @@
<AssemblyName>SQLCE4Umbraco</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -50,6 +54,7 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SqlCeApplicationBlock.cs" />
<Compile Include="SqlCeContextGuardian.cs" />
<Compile Include="SqlCEDataReader.cs" />
<Compile Include="SqlCEHelper.cs" />
<Compile Include="SqlCEInstaller.cs" />
@@ -5,6 +5,7 @@ using System.Text;
using System.Data.SqlServerCe;
using System.Data;
using System.Diagnostics;
using SQLCE4Umbraco;
namespace SqlCE4Umbraco
{
@@ -29,10 +30,8 @@ namespace SqlCE4Umbraco
try
{
using (SqlCeConnection conn = new SqlCeConnection())
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
{
conn.ConnectionString = connectionString;
conn.Open();
using (SqlCeCommand cmd = new SqlCeCommand(commandText, conn))
{
AttachParameters(cmd, commandParameters);
@@ -68,7 +67,7 @@ namespace SqlCE4Umbraco
try
{
int rowsAffected;
using (SqlCeConnection conn = new SqlCeConnection())
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
{
// this is for multiple queries in the installer
if (commandText.Trim().StartsWith("!!!"))
@@ -76,8 +75,6 @@ namespace SqlCE4Umbraco
commandText = commandText.Trim().Trim('!');
string[] commands = commandText.Split('|');
string currentCmd = String.Empty;
conn.ConnectionString = connectionString;
conn.Open();
foreach (string cmd in commands)
{
@@ -105,8 +102,6 @@ namespace SqlCE4Umbraco
Debug.WriteLine("----------------------------------------------------------------------------");
Debug.WriteLine(commandText);
Debug.WriteLine("----------------------------------------------------------------------------");
conn.ConnectionString = connectionString;
conn.Open();
SqlCeCommand cmd = new SqlCeCommand(commandText, conn);
AttachParameters(cmd, commandParameters);
rowsAffected = cmd.ExecuteNonQuery();
@@ -142,9 +137,8 @@ namespace SqlCE4Umbraco
Debug.WriteLine(commandText);
Debug.WriteLine("----------------------------------------------------------------------------");
SqlCeDataReader reader;
SqlCeConnection conn = new SqlCeConnection();
conn.ConnectionString = connectionString;
conn.Open();
SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString);
try
{
SqlCeCommand cmd = new SqlCeCommand(commandText, conn);
@@ -168,10 +162,8 @@ namespace SqlCE4Umbraco
public static bool VerifyConnection(string connectionString)
{
bool isConnected = false;
using (SqlCeConnection conn = new SqlCeConnection())
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
{
conn.ConnectionString = connectionString;
conn.Open();
isConnected = conn.State == ConnectionState.Open;
}
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.SqlServerCe;
using System.Linq;
using System.Text;
namespace SQLCE4Umbraco
{
public static class SqlCeContextGuardian
{
private static SqlCeConnection _constantOpenConnection;
private static object objLock = new object();
// Awesome SQL CE 4 speed improvement by Erik Ejskov Jensen - SQL CE 4 MVP
// It's not an issue with SQL CE 4 that we never close the connection
public static SqlCeConnection Open(string connectionString)
{
var connectionStringBuilder = new DbConnectionStringBuilder();
try
{
connectionStringBuilder.ConnectionString = connectionString;
}
catch (Exception ex)
{
throw new ArgumentException("Bad connection string.", "connectionString", ex);
}
connectionStringBuilder.Remove("datalayer");
// SQL CE 4 performs better when there's always a connection open in the background
ensureOpenBackgroundConnection(connectionStringBuilder.ConnectionString);
SqlCeConnection conn = new SqlCeConnection(connectionStringBuilder.ConnectionString);
conn.Open();
return conn;
}
private static void ensureOpenBackgroundConnection(string connectionString)
{
lock (objLock)
{
if (_constantOpenConnection == null)
{
_constantOpenConnection = new SqlCeConnection(connectionString);
_constantOpenConnection.Open();
}
else if (_constantOpenConnection.State != ConnectionState.Open)
_constantOpenConnection.Open();
}
}
}
}
@@ -39,6 +39,11 @@ namespace umbraco.editorControls
{
StoreItemId(_data);
// zb-00024 #299260 : see the loooong comments in OnLoad
// setting the value here seems OK but use this.Value to ensure
// that the hidden control exists
this.Value = StoredItemId != -1 ? StoredItemId.ToString() : "";
base.OnInit(e);
}
@@ -53,6 +58,33 @@ namespace umbraco.editorControls
{
ItemIdValue.Value = StoredItemId != -1 ? StoredItemId.ToString() : "";
}
// zb-00024 #299260 : support postback
// on postback ItemIdValue.Value is restored by LoadPostData
// on non-postback it is initialized by the code above
// w/RCC when clicking on 'edit' it is not initialized
// StoredItemId is initialized in OnInit with whatever comes from the
// database, or from what the RCC decides we need to display--but when
// we changes something in the web page, it is handled by LoadPostData
// RCC 'edit':
// ItemIdValue.Value has no value, or a wrong value, which we should ignore
// StoredItemId is initialized with the right value in RCC code
// so we'd need to set ItemIdValue.Value from it
// but if we do it in prerender then we copy over the /old/ StoredItemIt
// value which was the one before we saved... because we don't refresh it
// when we update
// and if we refresh it here we are in trouble because we overwrite what
// comes from the form and we can't actually change the value anymore
// so we should change it /once/ the ItemIdValue.Value changes have been
// akn
// the viewed image ID is set in mediaChoose onPreRender from
// ItemIdValue.Value so we really want it to have a value!
}
#region IDataField Members
@@ -2,13 +2,14 @@ using System;
using System.Collections;
using System.Web.UI;
using System.Web.UI.WebControls;
using ClientDependency.Core;
using umbraco.BusinessLogic;
using umbraco.DataLayer;
using System.Collections.Generic;
using System.Web.UI.HtmlControls;
[assembly: System.Web.UI.WebResource("umbraco.editorControls.KeyValuePrevalueEditor.js", "text/js")]
[assembly: System.Web.UI.WebResource("umbraco.editorControls.KeyValuePrevalueEditor.css", "text/css")]
namespace umbraco.editorControls
@@ -16,6 +17,8 @@ namespace umbraco.editorControls
/// <summary>
/// Summary description for KeyValuePrevalueEditor.
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "Jeditable/jquery.jeditable.js", "UmbracoClient")]
public class KeyValuePrevalueEditor : System.Web.UI.WebControls.PlaceHolder, interfaces.IDataPrevalue
{
@@ -191,7 +194,7 @@ namespace umbraco.editorControls
foreach (KeyValuePair<int, String> item in _prevalues)
{
writer.Write("<tr class=\"row\"><td class=\"text\">" + item.Value + "</td><td class=\"value\"> " + item.Key.ToString() + "</td><td><a href='?id=" + _datatype.DataTypeDefinitionId + "&delete=" + item.Key.ToString() + "'>" + ui.Text("delete") + "</a> <span class=\"handle\" style=\"cursor:move\">sort<span></td></tr>");
writer.Write("<tr class=\"row\"><td class=\"text\">" + item.Value + "</td><td class=\"value\"> " + item.Key.ToString() + "</td><td><a onclick='javascript:return ConfirmPrevalueDelete();' href='?id=" + _datatype.DataTypeDefinitionId + "&delete=" + item.Key.ToString() + "'>" + ui.Text("delete") + "</a> <span class=\"handle\" style=\"cursor:move\">sort<span></td></tr>");
}
writer.Write("</table><br style='clear: both'/></div>");
}
@@ -1,7 +1,7 @@
jQuery(document).ready(function () {
jQuery("#prevalues .text").valuesInlineEdit();
jQuery("#prevalues .text").editable(function (value, settings) { $(this).html(value); ResetValues(); }, { onblur: 'submit', tooltip: 'Click to edit', cssclass: 'inlineEditor' });
jQuery("#prevalues tbody").sortable({
items: "tr:not(.header)",
@@ -35,83 +35,6 @@ function ResetValues() {
jQuery(".valuesHiddenInput").val(val);
}
//inline edit
(function ($) {
$.fn.valuesInlineEdit = function (options) {
options = $.extend({
hover: 'hover',
value: '',
save: '',
placeholder: 'Click to edit'
}, options);
return $.each(this, function () {
$.valuesInlineEdit(this, options);
});
}
$.valuesInlineEdit = function (obj, options) {
var self = $(obj),
placeholderHtml = '<span class="inlineEdit-placeholder">' + options.placeholder + '</span>';
self.value = function (newValue) {
if (arguments.length) {
self.data('value', $(newValue).hasClass('inlineEdit-placeholder') ? '' : newValue);
}
return self.data('value');
}
self.value($.trim(self.text()) || options.value);
self.bind('click', function (event) {
var $this = $(event.target);
if ($this.is(self[0].tagName) || $this.hasClass('inlineEdit-placeholder')) {
self
.html('<input type="text" value="' + self.value() + '">')
.find('input')
.bind('blur', function () {
if ($this.children('input').val().length > 0) {
try {
self.value($this.children('input').val());
} catch (err) { }
}
else {
self.value('Click to edit');
}
if (self.timer) {
window.clearTimeout(self.timer);
}
self.timer = window.setTimeout(function () {
self.html(self.value() || placeholderHtml);
self.removeClass(options.hover);
ResetValues();
}, 200);
})
.focus();
}
})
.hover(
function () {
$(this).addClass(options.hover);
},
function () {
$(this).removeClass(options.hover);
}
);
if (!self.value()) {
self.html($(placeholderHtml));
}
}
})(jQuery);
function ConfirmPrevalueDelete() {
return confirm("Are you sure you want to delete");
}
@@ -10,6 +10,8 @@ namespace umbraco.editorControls.SettingControls
{
private System.Web.UI.WebControls.CheckBox cb = new System.Web.UI.WebControls.CheckBox();
private string _val = string.Empty;
public override string Value
{
get
@@ -18,14 +20,20 @@ namespace umbraco.editorControls.SettingControls
}
set
{
if (value == true.ToString())
cb.Checked = true;
if (!string.IsNullOrEmpty(value))
_val = value;
}
}
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
{
cb.ID = sender.GetName();
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue) && DefaultValue == true.ToString())
cb.Checked = true;
else if(_val == true.ToString())
cb.Checked = true;
return cb;
}
}
@@ -51,6 +51,8 @@ namespace umbraco.editorControls.SettingControls
}
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
cbl.SelectedValue = DefaultValue;
return cbl;
@@ -35,7 +35,10 @@ namespace umbraco.editorControls.SettingControls
ddl.Items.Add(s);
}
ddl.SelectedValue = _val;
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
ddl.SelectedValue = DefaultValue;
else
ddl.SelectedValue = _val;
return ddl;
}
@@ -37,7 +37,10 @@ namespace umbraco.editorControls.SettingControls
lb.Items.Add(s);
}
lb.SelectedValue = _val;
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
lb.SelectedValue = DefaultValue;
else
lb.SelectedValue = _val;
return lb;
}
@@ -45,14 +45,13 @@ namespace umbraco.editorControls.SettingControls
if (_val.Contains(s + ";"))
item.Selected = true;
lb.Items.Add(item);
}
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
lb.SelectedValue = DefaultValue;
return lb;
}
@@ -31,6 +31,10 @@ namespace umbraco.editorControls.SettingControls
tb.TextMode = TextBoxMode.Password;
tb.CssClass = "guiInputText guiInputStandardSize";
if (string.IsNullOrEmpty(tb.Text) && !string.IsNullOrEmpty(DefaultValue))
tb.Text = DefaultValue;
return tb;
}
}
@@ -57,8 +57,10 @@ namespace umbraco.editorControls.SettingControls.Pickers
ddl.Items.Insert(0, li);
ddl.SelectedValue = _val;
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
ddl.SelectedValue = DefaultValue;
else
ddl.SelectedValue = _val;
return ddl;
}
@@ -159,7 +159,7 @@ namespace umbraco.editorControls.SettingControls.Pickers
if (_showXPath && tb.Text != string.Empty)
return tb.Text;
else
return cc.Text;
return cc.Value;
}
set
{
@@ -170,7 +170,7 @@ namespace umbraco.editorControls.SettingControls.Pickers
int nodeId;
if (int.TryParse(_val, out nodeId))
cc.Text = _val;
cc.Value = _val;
else if (ShowXPath)
tb.Text = _val;
}
@@ -55,7 +55,10 @@ namespace umbraco.editorControls.SettingControls.Pickers
li.Selected = true;
ddl.Items.Insert(0, li);
ddl.SelectedValue = _val;
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
ddl.SelectedValue = DefaultValue;
else
ddl.SelectedValue = _val;
return ddl;
}
@@ -32,7 +32,11 @@ namespace umbraco.editorControls.SettingControls.Pickers
pp.ID = sender.GetName().Replace(" ", "_");
pp.Value = _val;
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
pp.Value = DefaultValue;
else
pp.Value = _val;
return pp;
}
}
@@ -35,7 +35,10 @@ namespace umbraco.editorControls.SettingControls
rbl.Items.Add(s);
}
rbl.SelectedValue = _val;
if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue))
rbl.SelectedValue = DefaultValue;
else
rbl.SelectedValue = _val;
return rbl;
}
@@ -32,6 +32,9 @@ namespace umbraco.editorControls.SettingControls
if (string.IsNullOrEmpty(tb.Text) && this.Prevalues.Count > 0)
tb.Text = this.Prevalues[0];
else if (string.IsNullOrEmpty(tb.Text) && !string.IsNullOrEmpty(DefaultValue))
tb.Text = DefaultValue;
return tb;
}
@@ -124,8 +124,6 @@ namespace umbraco.editorControls.imagecropper
int xml_x2 = Convert.ToInt32(xmlNode.Attributes["x2"].Value);
int xml_y2 = Convert.ToInt32(xmlNode.Attributes["y2"].Value);
DateTime fileDate = Convert.ToDateTime(_xml.DocumentElement.Attributes["date"].Value);
// only use xml values if image is the same and different from defaults (document is stored inbetween image upload and cropping)
//if (xml_x2 - xml_x != preset.TargetWidth || xml_y2 - xml_y != preset.TargetHeight)
//fileDate == imageInfo.DateStamp && (
@@ -413,8 +413,8 @@ $.Jcrop = function(obj,opt)
drawBorders: true,
dragEdges: true,
boxWidth: 0,
boxHeight: 0,
boxWidth: (jQuery(window).width()*0.85),
boxHeight: (jQuery(window).height()*0.85),
boundary: 8,
animationDelay: 20,
@@ -16,7 +16,7 @@ namespace umbraco.editorControls.imagecropper
if (root == null) return null;
XmlNode dateStampNode = doc.CreateNode(XmlNodeType.Attribute, "date", null);
dateStampNode.Value = imageInfo.DateStamp.ToString();
dateStampNode.Value = imageInfo.DateStamp.ToString("s");
root.Attributes.SetNamedItem(dateStampNode);
for (int i = 0; i < data.Count; i++)
@@ -18,7 +18,7 @@ namespace umbraco.editorControls.macrocontainer
{
[ClientDependency(ClientDependencyType.Javascript, "ui/jqueryui.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Css, "/macroContainer/macroContainer.css", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Css, "macroContainer/macroContainer.css", "UmbracoClient")]
public class Editor : UpdatePanel, IDataEditor
{
private IData _data;
@@ -257,18 +257,24 @@ namespace umbraco.editorControls.macrocontainer
{
string number = temp.Substring(temp.LastIndexOf('=') + 1);
MacroEditor current = ((MacroEditor)this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + number));
if (current.Visible)
value += current.MacroTag;
if (this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + number) != null)
{
MacroEditor current = ((MacroEditor)this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + number));
if (current.Visible)
value += current.MacroTag;
}
}
}
else
{
for (int i = 0; i < _maxNumber; i++)
{
MacroEditor current = ((MacroEditor)this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + i.ToString()));
if (current.Visible)
value += current.MacroTag;
if (this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + i.ToString()) != null)
{
MacroEditor current = ((MacroEditor)this.ContentTemplateContainer.FindControl(ID + "macroeditor_" + i.ToString()));
if (current.Visible)
value += current.MacroTag;
}
}
}
_data.Value = value;
@@ -63,15 +63,11 @@ namespace umbraco.editorControls.macrocontainer
// with _macroSelectDropdown.Items.Add(new ListItem(GetMacroNameFromAlias(item), item));
private string GetMacroNameFromAlias(string alias)
{
umbraco.DataLayer.IRecordsReader dr = umbraco.BusinessLogic.Application.SqlHelper.ExecuteReader("select macroName from cmsMacro where macroAlias = @alias",
umbraco.BusinessLogic.Application.SqlHelper.CreateParameter("@alias", alias));
if (dr.Read())
return dr.GetString("macroName");
else
return string.Empty;
var macro = umbraco.macro.GetMacro(alias);
return macro == null ? string.Empty : macro.Name;
}
void _delete_Click(object sender, EventArgs e)
{
_macroSelectDropdown.SelectedIndex = 0;
+6 -4
View File
@@ -5,7 +5,6 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using umbraco.BusinessLogic;
using umbraco.DataLayer;
using umbraco.presentation.nodeFactory;
using umbraco.presentation;
using ClientDependency.Core.Controls;
using ClientDependency.Core;
@@ -54,9 +53,12 @@ namespace umbraco.editorControls.tags
if (li.Value == "0")
{
tagId = umbraco.cms.businesslogic.Tags.Tag.AddTag(li.Text, _group);
// NH 4.7.1 if a tag doesn't have an id associated we'll do a 2nd check in case the XHR request went wrong
// from Codeplex 30151
tagId = cms.businesslogic.Tags.Tag.GetTagId(li.Text, _group);
if (tagId == 0)
tagId = cms.businesslogic.Tags.Tag.AddTag(li.Text, _group);
li.Value = tagId.ToString();
}
else
{
@@ -152,7 +154,7 @@ namespace umbraco.editorControls.tags
// we need an empty try/catch as Node.GetCurrent() will throw an exception if we're outside of Umbraco Context
try
{
Node currentNode = Node.GetCurrent();
NodeFactory.Node currentNode = NodeFactory.Node.GetCurrent();
if (currentNode != null)
{
pageId = currentNode.Id.ToString();
@@ -6,41 +6,46 @@ using System.Collections;
namespace umbraco.editorControls.textfield
{
public class TextFieldEditor : TextBox, interfaces.IDataEditor
{
private interfaces.IData _data;
public class TextFieldEditor : TextBox, interfaces.IDataEditor
{
private interfaces.IData _data;
public TextFieldEditor(interfaces.IData Data) {
_data = Data;
}
public TextFieldEditor(interfaces.IData Data)
{
_data = Data;
}
public virtual bool TreatAsRichTextEditor
{
get {return false;}
}
public virtual bool TreatAsRichTextEditor
{
get { return false; }
}
public bool ShowLabel
{
get {return true;}
}
public bool ShowLabel
{
get { return true; }
}
public Control Editor {get{return this;}}
public Control Editor { get { return this; } }
public void Save()
{
_data.Value = this.Text;
}
public void Save()
{
//GE 2012-01-18
//allow the textboxmultiple datatype to contain CDATA tags
_data.Value = this.Text.Replace("<![CDATA[", "<!--CDATAOPENTAG-->").Replace("]]>", "<!--CDATACLOSETAG-->");
}
protected override void OnInit(EventArgs e)
{
if (this.CssClass == "")
this.CssClass = "umbEditorTextField";
if (_data != null && _data.Value != null)
Text = _data.Value.ToString();
base.OnInit(e);
}
}
protected override void OnInit(EventArgs e)
{
if (this.CssClass == "")
this.CssClass = "umbEditorTextField";
//GE 2012-01-18
//allow the textboxmultiple datatype to contain CDATA tags
if (_data != null && _data.Value != null)
Text = _data.Value.ToString().Replace("<!--CDATAOPENTAG-->", "<![CDATA[").Replace("<!--CDATACLOSETAG-->", "]]>");
base.OnInit(e);
}
}
}
+42 -34
View File
@@ -121,7 +121,7 @@ namespace umbraco.editorControls.tinyMCE3
IDictionaryEnumerator pluginEnum = tinyMCEConfiguration.Plugins.GetEnumerator();
while (pluginEnum.MoveNext())
{
var plugin = (tinyMCEPlugin) pluginEnum.Value;
var plugin = (tinyMCEPlugin)pluginEnum.Value;
if (plugin.UseOnFrontend || (!onFront && !plugin.UseOnFrontend))
_plugins += "," + plugin.Name;
}
@@ -133,7 +133,7 @@ namespace umbraco.editorControls.tinyMCE3
config.Add("plugins", _plugins);
// Check advanced settings
if (("," + _advancedUsers + ",").IndexOf("," + UmbracoEnsuredPage.CurrentUser.UserType.Id + ",") >
if (UmbracoEnsuredPage.CurrentUser != null && ("," + _advancedUsers + ",").IndexOf("," + UmbracoEnsuredPage.CurrentUser.UserType.Id + ",") >
-1)
config.Add("umbraco_advancedMode", "true");
else
@@ -185,7 +185,11 @@ namespace umbraco.editorControls.tinyMCE3
}
// language
config.Add("language", User.GetCurrent().Language);
string userLang = (UmbracoEnsuredPage.CurrentUser != null) ?
(User.GetCurrent().Language.Contains("-") ?
User.GetCurrent().Language.Substring(0, User.GetCurrent().Language.IndexOf("-")) : User.GetCurrent().Language)
: "en";
config.Add("language", userLang);
config.Add("content_css", cssFiles);
config.Add("theme_umbraco_styles", styles);
@@ -194,7 +198,7 @@ namespace umbraco.editorControls.tinyMCE3
IDictionaryEnumerator ide = tinyMCEConfiguration.Commands.GetEnumerator();
while (ide.MoveNext())
{
var cmd = (tinyMCECommand) ide.Value;
var cmd = (tinyMCECommand)ide.Value;
if (_editorButtons.IndexOf("," + cmd.Alias + ",") > -1)
_activateButtons += cmd.Alias + ",";
else
@@ -215,12 +219,12 @@ namespace umbraco.editorControls.tinyMCE3
while (ide.MoveNext())
{
string mceCommand = ide.Value.ToString();
var curPriority = (int) ide.Key;
var curPriority = (int)ide.Key;
// Check priority
if (separatorPriority > 0 &&
Math.Floor(decimal.Parse(curPriority.ToString())/10) >
Math.Floor(decimal.Parse(separatorPriority.ToString())/10))
Math.Floor(decimal.Parse(curPriority.ToString()) / 10) >
Math.Floor(decimal.Parse(separatorPriority.ToString()) / 10))
_activateButtons += "separator,";
_activateButtons += mceCommand + ",";
@@ -320,28 +324,26 @@ namespace umbraco.editorControls.tinyMCE3
{
parsedString = replaceMacroTags(parsedString).Trim();
// clean macros and add paragraph element for tidy
bool removeParagraphs = false;
if (parsedString.Length > 16 && parsedString.ToLower().Substring(0, 17) == "|||?umbraco_macro")
{
removeParagraphs = true;
parsedString = "<p>" + parsedString + "</p>";
}
// tidy html
// tidy html - refactored, see #30534
if (UmbracoSettings.TidyEditorContent)
{
// always wrap in a <div> - using <p> was a bad idea
parsedString = "<div>" + parsedString + "</div>";
string tidyTxt = library.Tidy(parsedString, false);
if (tidyTxt != "[error]")
{
// compensate for breaking macro tags by tidy
parsedString = tidyTxt.Replace("/?>", "/>");
if (removeParagraphs)
{
if (parsedString.Length - parsedString.Replace("<", "").Length == 2)
parsedString = parsedString.Replace("<p>", "").Replace("</p>", "");
}
parsedString = tidyTxt;
// remove pesky \r\n, and other empty chars
parsedString = parsedString.Trim(new char[] { '\r', '\n', '\t', ' ' });
// compensate for breaking macro tags by tidy (?)
parsedString = parsedString.Replace("/?>", "/>");
// remove the wrapping <div> - safer to check that it is still here
if (parsedString.StartsWith("<div>") && parsedString.EndsWith("</div>"))
parsedString = parsedString.Substring("<div>".Length, parsedString.Length - "<div></div>".Length);
}
else
{
@@ -365,6 +367,10 @@ namespace umbraco.editorControls.tinyMCE3
parsedString = parsedString.Replace(helper.GetBaseUrl(HttpContext.Current), "");
}
//Allow CDATA nested into RTE without exceptions
// GE 2012-01-18
parsedString = parsedString.Replace("<![CDATA[", "<!--CDATAOPENTAG-->").Replace("]]>", "<!--CDATACLOSETAG-->");
// if text is an empty parargraph, make it all empty
if (parsedString.ToLower() == "<p></p>")
parsedString = "";
@@ -432,7 +438,7 @@ namespace umbraco.editorControls.tinyMCE3
get
{
initButtons();
return _buttons.Count*40 + 300;
return _buttons.Count * 40 + 300;
}
}
@@ -443,10 +449,10 @@ namespace umbraco.editorControls.tinyMCE3
try
{
// add current page info
base.NodeId = ((cms.businesslogic.datatype.DefaultData) _data).NodeId;
base.NodeId = ((cms.businesslogic.datatype.DefaultData)_data).NodeId;
if (NodeId != 0)
{
base.VersionId = ((cms.businesslogic.datatype.DefaultData) _data).Version;
base.VersionId = ((cms.businesslogic.datatype.DefaultData)_data).Version;
config.Add("theme_umbraco_pageId", base.NodeId.ToString());
config.Add("theme_umbraco_versionId", base.VersionId.ToString());
@@ -463,7 +469,7 @@ namespace umbraco.editorControls.tinyMCE3
{
config.Add("umbraco_toolbar_id",
ElementIdPreFix +
((cms.businesslogic.datatype.DefaultData) _data).PropertyId);
((cms.businesslogic.datatype.DefaultData)_data).PropertyId);
}
}
else
@@ -484,8 +490,10 @@ namespace umbraco.editorControls.tinyMCE3
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
//Allow CDATA nested into RTE without exceptions
// GE 2012-01-18
if (_data != null && _data.Value != null)
base.Text = _data.Value.ToString();
base.Text = _data.Value.ToString().Replace("<!--CDATAOPENTAG-->", "<![CDATA[").Replace("<!--CDATACLOSETAG-->", "]]>");
}
private string replaceMacroTags(string text)
@@ -586,7 +594,7 @@ namespace umbraco.editorControls.tinyMCE3
{
try
{
var cmd = (tinyMCECommand) tinyMCEConfiguration.Commands[button];
var cmd = (tinyMCECommand)tinyMCEConfiguration.Commands[button];
string appendValue = "";
if (cmd.Value != "")
@@ -611,17 +619,17 @@ namespace umbraco.editorControls.tinyMCE3
while (ide.MoveNext())
{
object buttonObj = ide.Value;
var curPriority = (int) ide.Key;
var curPriority = (int)ide.Key;
// Check priority
if (separatorPriority > 0 &&
Math.Floor(decimal.Parse(curPriority.ToString())/10) >
Math.Floor(decimal.Parse(separatorPriority.ToString())/10))
Math.Floor(decimal.Parse(curPriority.ToString()) / 10) >
Math.Floor(decimal.Parse(separatorPriority.ToString()) / 10))
_menuIcons.Add("|");
try
{
var e = (editorButton) buttonObj;
var e = (editorButton)buttonObj;
MenuIconI menuItem = new MenuIconClass();
@@ -70,7 +70,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
base.Attributes.Add("style", "visibility: hidden");
config.Add("mode", "exact");
config.Add("theme", "umbraco");
config.Add("umbraco_path", IOHelper.ResolveUrl( SystemDirectories.Umbraco ));
config.Add("umbraco_path", IOHelper.ResolveUrl(SystemDirectories.Umbraco));
CssClass = "tinymceContainer";
plugin.ConfigSection configSection = (plugin.ConfigSection)System.Web.HttpContext.Current.GetSection("TinyMCE");
@@ -117,89 +117,89 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
}
protected override void OnLoad(EventArgs args)
{
if (!IsInLiveEditingMode)
this.config["elements"] = this.ClientID;
{
if (!IsInLiveEditingMode)
this.config["elements"] = this.ClientID;
bool first = true;
bool first = true;
// Render HTML for TinyMCE instance
// in the liveediting mode we're always preloading tinymce script
if (!IsInLiveEditingMode)
{
//TinyMCE uses it's own compressor so leave it up to ScriptManager to render
ScriptManager.RegisterClientScriptInclude(this, this.GetType(), _versionId.ToString(), this.ScriptURI);
}
else
{
//We're in live edit mode so add the base js file to the dependency list
ClientDependencyLoader.Instance.RegisterDependency("tinymce3/tiny_mce_src.js",
"UmbracoClient", ClientDependencyType.Javascript);
}
// Render HTML for TinyMCE instance
// in the liveediting mode we're always preloading tinymce script
if (!IsInLiveEditingMode)
{
//TinyMCE uses it's own compressor so leave it up to ScriptManager to render
ScriptManager.RegisterClientScriptInclude(this, this.GetType(), _versionId.ToString(), this.ScriptURI);
}
else
{
//We're in live edit mode so add the base js file to the dependency list
ClientDependencyLoader.Instance.RegisterDependency("tinymce3/tiny_mce_src.js",
"UmbracoClient", ClientDependencyType.Javascript);
}
// Write script tag start
m_scriptInitBlock.Append(HtmlTextWriter.TagLeftChar.ToString());
m_scriptInitBlock.Append("script");
m_scriptInitBlock.Append(" type=\"text/javascript\"");
m_scriptInitBlock.Append(HtmlTextWriter.TagRightChar.ToString());
m_scriptInitBlock.Append("\n");
// Write script tag start
m_scriptInitBlock.Append(HtmlTextWriter.TagLeftChar.ToString());
m_scriptInitBlock.Append("script");
m_scriptInitBlock.Append(" type=\"text/javascript\"");
m_scriptInitBlock.Append(HtmlTextWriter.TagRightChar.ToString());
m_scriptInitBlock.Append("\n");
m_scriptInitBlock.Append("tinyMCE.init({\n");
m_scriptInitBlock.Append("tinyMCE.init({\n");
// Write options
foreach (string key in this.config.Keys)
{
//TODO: This is a hack to test if we can prevent tinymce from automatically download languages
if (!IsInLiveEditingMode || (key != "language"))
{
string val = this.config[key];
// Write options
foreach (string key in this.config.Keys)
{
//TODO: This is a hack to test if we can prevent tinymce from automatically download languages
if (!IsInLiveEditingMode || (key != "language"))
{
string val = this.config[key];
if (!first)
m_scriptInitBlock.Append(",\n");
else
first = false;
if (!first)
m_scriptInitBlock.Append(",\n");
else
first = false;
// Is boolean state or string
if (val == "true" || val == "false")
m_scriptInitBlock.Append(key + ":" + this.config[key]);
else
m_scriptInitBlock.Append(key + ":'" + this.config[key] + "'");
}
}
// Is boolean state or string
if (val == "true" || val == "false")
m_scriptInitBlock.Append(key + ":" + this.config[key]);
else
m_scriptInitBlock.Append(key + ":'" + this.config[key] + "'");
}
}
m_scriptInitBlock.Append("\n});\n");
// we're wrapping the tinymce init call in a load function when in live editing,
// so we'll need to close that function declaration
if (IsInLiveEditingMode)
{
m_scriptInitBlock.Append(@"(function() { var f =
m_scriptInitBlock.Append("\n});\n");
// we're wrapping the tinymce init call in a load function when in live editing,
// so we'll need to close that function declaration
if (IsInLiveEditingMode)
{
m_scriptInitBlock.Append(@"(function() { var f =
function() {
if(document.getElementById('__umbraco_tinyMCE'))
tinyMCE.execCommand('mceAddControl',false,'").Append(ClientID).Append(@"');
ItemEditing.remove_startEdit(f);
}
ItemEditing.add_startEdit(f);})();");
m_scriptInitBlock.Append(@"(function() { var f =
m_scriptInitBlock.Append(@"(function() { var f =
function() {
tinyMCE.execCommand('mceRemoveControl',false,'").Append(ClientID).Append(@"');
ItemEditing.remove_stopEdit(f);
}
ItemEditing.add_stopEdit(f);})();");
}
}
// Write script tag end
m_scriptInitBlock.Append(HtmlTextWriter.EndTagLeftChars);
m_scriptInitBlock.Append("script");
m_scriptInitBlock.Append(HtmlTextWriter.TagRightChar.ToString());
// Write script tag end
m_scriptInitBlock.Append(HtmlTextWriter.EndTagLeftChars);
m_scriptInitBlock.Append("script");
m_scriptInitBlock.Append(HtmlTextWriter.TagRightChar.ToString());
// add to script manager
if (IsInLiveEditingMode)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), new Guid().ToString(),
m_scriptInitBlock.ToString(), false);
}
// add to script manager
if (IsInLiveEditingMode)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), new Guid().ToString(),
m_scriptInitBlock.ToString(), false);
}
}
}
string ScriptURI
@@ -288,7 +288,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
string localMediaPath = IOHelper.ResolveUrl(SystemDirectories.Media);
// Find all media images
string pattern = String.Format("<img [^>]*src=\"(?<mediaString>{0}[^\"]*)\" [^>]*>", SystemDirectories.Media);
string pattern = String.Format("<img [^>]*src=\"(?<mediaString>{0}[^\"]*)\" [^>]*>", localMediaPath);
MatchCollection tags =
Regex.Matches(html, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
@@ -306,11 +306,17 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
Regex.Matches(tag.Value.Replace(">", " >"),
"(?<attributeName>\\S*)=\"(?<attributeValue>[^\"]*)\"|(?<attributeName>\\S*)=(?<attributeValue>[^\"|\\s]*)\\s",
RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
//GE: Add ContainsKey check and expand the ifs for readability
foreach (Match attributeSet in m)
{
if (attributeSet.Groups["attributeName"].Value.ToString().ToLower() != "src")
ht.Add(attributeSet.Groups["attributeName"].Value.ToString(),
attributeSet.Groups["attributeValue"].Value.ToString());
{
if (!ht.ContainsKey(attributeSet.Groups["attributeName"].Value.ToString()))
{
ht.Add(attributeSet.Groups["attributeName"].Value.ToString(), attributeSet.Groups["attributeValue"].Value.ToString());
}
}
}
// build the element
@@ -429,7 +435,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
{
string[] umbracoPathSplit = IOHelper.ResolveUrl(SystemDirectories.Umbraco).Split('/');
string umbracoPath = "";
for (int i = 0; i < umbracoPathSplit.Length - 1; i++)
umbracoPath += umbracoPathSplit[i] + "/";
@@ -446,10 +452,12 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
string pattern = @"(<\?UMBRACO_MACRO\W*[^>]*/>)";
MatchCollection tags =
Regex.Matches(content, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
Regex.Matches(content, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
// Page for macro rendering
page p = new page(nodeId, versionId);
// page p = new page(nodeId, versionId);
System.Web.HttpContext.Current.Items["macrosAdded"] = 0;
System.Web.HttpContext.Current.Items["pageID"] = nodeId.ToString();
@@ -464,7 +472,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
// Insert macro contents here...
macro m;
if (helper.FindAttribute(attributes, "macroID") != "")
m = new macro(int.Parse(helper.FindAttribute(attributes, "macroID")));
m = macro.GetMacro(int.Parse(helper.FindAttribute(attributes, "macroID")));
else
{
// legacy: Check if the macroAlias is typed in lowercasing
@@ -477,7 +485,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
}
if (macroAlias != "")
m = new macro(Macro.GetByAlias(macroAlias).Id);
m = macro.GetMacro(macroAlias);
else
throw new ArgumentException("umbraco is unable to identify the macro. No id or macroalias was provided for the macro in the macro tag.", tag.Groups[1].Value);
}
@@ -14,25 +14,27 @@ using umbraco.IO;
namespace umbraco.editorControls.tinyMCE3.webcontrol.plugin
{
/// <summary>
/// Description of HttpHandler.
/// </summary>
public class GzipModule : IModule {
/// <summary></summary>
/// <param name="context">Request context.</param>
public void ProcessRequest(HttpContext context) {
HttpRequest request = context.Request;
HttpResponse response = context.Response;
HttpServerUtility server = context.Server;
GzipCompressor gzipCompressor = new GzipCompressor();
ConfigSection configSection = (ConfigSection) System.Web.HttpContext.Current.GetSection("TinyMCE");
string suffix = "", enc;
string[] languages = request.QueryString["languages"].Split(',');
bool supportsGzip;
/// Description of HttpHandler.
/// </summary>
public class GzipModule : IModule
{
/// <summary></summary>
/// <param name="context">Request context.</param>
public void ProcessRequest(HttpContext context)
{
HttpRequest request = context.Request;
HttpResponse response = context.Response;
HttpServerUtility server = context.Server;
GzipCompressor gzipCompressor = new GzipCompressor();
ConfigSection configSection = (ConfigSection)System.Web.HttpContext.Current.GetSection("TinyMCE");
string suffix = "", enc;
string[] languages = request.QueryString["languages"].Split(',');
bool supportsGzip;
// Set response headers
response.ContentType = "text/javascript";
response.Charset = "UTF-8";
response.Buffer = false;
// Set response headers
response.ContentType = "text/javascript";
response.Charset = "UTF-8";
response.Buffer = false;
// UMBRACO: Populate the configsection if it's empty
if (configSection == null)
@@ -43,72 +45,78 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol.plugin
configSection.GzipExpiresOffset = TimeSpan.FromDays(10).Ticks;
}
// Setup cache
response.Cache.SetExpires(DateTime.Now.AddTicks(configSection.GzipExpiresOffset));
response.Cache.SetCacheability(HttpCacheability.Public);
response.Cache.SetValidUntilExpires(false);
// Setup cache
response.Cache.SetExpires(DateTime.Now.AddTicks(configSection.GzipExpiresOffset));
response.Cache.SetCacheability(HttpCacheability.Public);
response.Cache.SetValidUntilExpires(false);
// Check if it supports gzip
enc = Regex.Replace("" + request.Headers["Accept-Encoding"], @"\s+", "").ToLower();
supportsGzip = enc.IndexOf("gzip") != -1 || request.Headers["---------------"] != null;
enc = enc.IndexOf("x-gzip") != -1 ? "x-gzip" : "gzip";
// Check if it supports gzip
enc = Regex.Replace("" + request.Headers["Accept-Encoding"], @"\s+", "").ToLower();
supportsGzip = enc.IndexOf("gzip") != -1 || request.Headers["---------------"] != null;
enc = enc.IndexOf("x-gzip") != -1 ? "x-gzip" : "gzip";
// Handle mode/suffix
if (configSection.Mode != null)
suffix = "_" + configSection.Mode;
// Handle mode/suffix
if (configSection.Mode != null)
suffix = "_" + configSection.Mode;
gzipCompressor.AddData("var tinyMCEPreInit = {base : '" + new Uri(request.Url, configSection.InstallPath).ToString() + "', suffix : '" + suffix + "'};");
gzipCompressor.AddData("var tinyMCEPreInit = {base : '" + configSection.InstallPath + "', suffix : '" + suffix + "'};");
// Add core
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/tiny_mce" + suffix + ".js"));
// Add core
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/tiny_mce" + suffix + ".js"));
// Add core languages
foreach (string lang in languages)
// Add core languages
foreach (string lang in languages)
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/langs/" + lang + ".js"));
// Add themes
if (request.QueryString["themes"] != null) {
foreach (string theme in request.QueryString["themes"].Split(',')) {
// Add themes
if (request.QueryString["themes"] != null)
{
foreach (string theme in request.QueryString["themes"].Split(','))
{
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/themes/" + theme + "/editor_template" + suffix + ".js"));
// Add theme languages
foreach (string lang in languages) {
// Add theme languages
foreach (string lang in languages)
{
string path = IOHelper.MapPath(configSection.InstallPath + "/themes/" + theme + "/langs/" + lang + ".js");
if (File.Exists(path))
gzipCompressor.AddFile(path);
}
if (File.Exists(path))
gzipCompressor.AddFile(path);
}
gzipCompressor.AddData("tinymce.ThemeManager.urls['" + theme + "'] = tinymce.baseURL+'/themes/" + theme + "';");
}
}
gzipCompressor.AddData("tinymce.ThemeManager.urls['" + theme + "'] = tinymce.baseURL+'/themes/" + theme + "';");
}
}
// Add plugins
if (request.QueryString["plugins"] != null) {
foreach (string plugin in request.QueryString["plugins"].Split(',')) {
// Add plugins
if (request.QueryString["plugins"] != null)
{
foreach (string plugin in request.QueryString["plugins"].Split(','))
{
gzipCompressor.AddFile(IOHelper.MapPath(configSection.InstallPath + "/plugins/" + plugin + "/editor_plugin" + suffix + ".js"));
// Add plugin languages
foreach (string lang in languages) {
// Add plugin languages
foreach (string lang in languages)
{
string path = IOHelper.MapPath(configSection.InstallPath + "/plugins/" + plugin + "/langs/" + lang + ".js");
if (File.Exists(path))
gzipCompressor.AddFile(path);
}
if (File.Exists(path))
gzipCompressor.AddFile(path);
}
gzipCompressor.AddData("tinymce.ThemeManager.urls['" + plugin + "'] = tinymce.baseURL+'/plugins/" + plugin + "';");
}
}
gzipCompressor.AddData("tinymce.ThemeManager.urls['" + plugin + "'] = tinymce.baseURL+'/plugins/" + plugin + "';");
}
}
// Output compressed file
gzipCompressor.NoCompression = !supportsGzip || configSection.GzipNoCompression;
if (!gzipCompressor.NoCompression)
response.AppendHeader("Content-Encoding", enc);
// Output compressed file
gzipCompressor.NoCompression = !supportsGzip || configSection.GzipNoCompression;
if (!gzipCompressor.NoCompression)
response.AppendHeader("Content-Encoding", enc);
gzipCompressor.DiskCache = configSection.GzipDiskCache;
gzipCompressor.CachePath = configSection.GzipCachePath;
gzipCompressor.DiskCache = configSection.GzipDiskCache;
gzipCompressor.CachePath = configSection.GzipCachePath;
gzipCompressor.Compress(response.OutputStream);
}
}
gzipCompressor.Compress(response.OutputStream);
}
}
}
@@ -36,9 +36,9 @@ namespace umbraco.editorControls.tinymce
ht.Add(attributeSet.Groups["attributeName"].Value.ToString().ToLower(),
attributeSet.Groups["attributeValue"].Value.ToString());
if (attributeSet.Groups["attributeName"].Value.ToString().ToLower() == "width")
orgWidth = int.Parse(attributeSet.Groups["attributeValue"].Value.ToString());
int.TryParse(attributeSet.Groups["attributeValue"].Value.ToString(), out orgWidth);
else if (attributeSet.Groups["attributeName"].Value.ToString().ToLower() == "height")
orgHeight = int.Parse(attributeSet.Groups["attributeValue"].Value.ToString());
int.TryParse(attributeSet.Groups["attributeValue"].Value.ToString(), out orgHeight);
}
// If rel attribute exists and if it's different from current sizing we should resize the image!
@@ -67,7 +67,8 @@ namespace umbraco.editorControls.tinymce
Log.Add(LogTypes.Error, User.GetUser(0), -1,
"Error resizing image in editor: " + err.ToString());
}
} else
}
else
{
cleanTag = StripSrc(cleanTag, ht);
@@ -76,7 +77,7 @@ namespace umbraco.editorControls.tinymce
cleanTag += " width=\"" + helper.FindAttribute(ht, "width") + "\"";
cleanTag += " height=\"" + helper.FindAttribute(ht, "height") + "\"";
}
}
}
else
@@ -142,13 +143,13 @@ namespace umbraco.editorControls.tinymce
if (orgHeight > 0 && orgWidth > 0 && resizeDim != "" && orgSrc != "")
{
// Check dimensions
if (Math.Abs(orgWidth/newWidth) > Math.Abs(orgHeight/newHeight))
if (Math.Abs(orgWidth / newWidth) > Math.Abs(orgHeight / newHeight))
{
newHeight = (int) Math.Round((float) newWidth*(orgHeight/orgWidth));
newHeight = (int)Math.Round((float)newWidth * (orgHeight / orgWidth));
}
else
{
newWidth = (int) Math.Round((float) newHeight*(orgWidth/orgHeight));
newWidth = (int)Math.Round((float)newHeight * (orgWidth / orgHeight));
}
// update orgSrc to remove umbraco reference
@@ -156,6 +157,7 @@ namespace umbraco.editorControls.tinymce
if (IOHelper.ResolveUrl(orgSrc).IndexOf(resolvedMedia) > -1)
{
orgSrc = SystemDirectories.Media + orgSrc.Substring(orgSrc.IndexOf(resolvedMedia) + resolvedMedia.Length); //, orgSrc.Length - orgSrc.IndexOf(String.Format("/media/", SystemDirectories.Media)));
}
string ext = orgSrc.Substring(orgSrc.LastIndexOf(".") + 1, orgSrc.Length - orgSrc.LastIndexOf(".") - 1);
newSrc = orgSrc.Replace("." + ext, "_" + newWidth.ToString() + "x" + newHeight.ToString() + ".jpg");
@@ -199,8 +201,13 @@ namespace umbraco.editorControls.tinymce
finalWidth = newWidth;
finalHeight = newHeight;
//GE: When the SystemDirectories.Media contains a ~, newSrc will also contain this and hasn't been resolved.
//This causes the editor to save content which contains a virtual url, and thus the image doesn't serve
//the admin editor successfully displays the image because the HTML is rewritten, but when you get the RTE content in the template
//it hasn't been replaced
//2011-08-12 added a IOHelper.ResolveUrl call around newSrc
return
" src=\"" + newSrc + "\" width=\"" + newWidth.ToString() + "\" height=\"" + newHeight.ToString() +
" src=\"" + IOHelper.ResolveUrl(newSrc) + "\" width=\"" + newWidth.ToString() + "\" height=\"" + newHeight.ToString() +
"\"";
}
}
@@ -260,6 +260,10 @@ namespace umbraco.editorControls.tinymce
SqlHelper.CreateParameter("@value",data),
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid",SqlParams);
// we need to populate the parameters again due to an issue with SQL CE
SqlParams = new IParameter[] {
SqlHelper.CreateParameter("@value",data),
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')",SqlParams);
}
@@ -77,7 +77,6 @@ namespace umbraco.editorControls.ultimatepicker
break;
case "dropdownlist":
return dropdownlistNodes.SelectedValue;
break;
case "listbox":
foreach (ListItem item in listboxNodes.Items)
{
@@ -126,6 +126,10 @@ namespace umbraco.editorControls.ultimatepicker
SqlHelper.CreateParameter("@value",data),
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid", SqlParams);
// need to unlock the parameters (for SQL CE compat)
SqlParams = new IParameter[] {
SqlHelper.CreateParameter("@value",data),
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')", SqlParams);
@@ -27,13 +27,17 @@
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<OldToolsVersion>3.5</OldToolsVersion>
<IsWebBootstrapper>true</IsWebBootstrapper>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<PublishUrl>http://localhost/umbraco.editorControls/</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
@@ -48,6 +52,7 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\umbraco\presentation\bin\</OutputPath>
@@ -74,7 +79,7 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\..\umbraco\presentation\bin\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -344,6 +349,8 @@
<Compile Include="tinymce\TinyMCELegacyControl.cs" />
<Compile Include="tinymce\tinyMCEImageHelper.cs" />
<Compile Include="tinymce\tinyMCEPreValueConfigurator.cs" />
<Compile Include="userControlWrapper\SerializationHelper.cs" />
<Compile Include="userControlWrapper\usercontrolData.cs" />
<Compile Include="wysiwyg\editorButton.cs" />
<Compile Include="tinyMCE3\TinyMCE.cs" />
<Compile Include="tinyMCE3\tinyMCE3dataType.cs" />
@@ -417,6 +424,7 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="KeyValuePrevalueEditor.js" />
<EmbeddedResource Include="KeyValuePrevalueEditor.css" />
<Content Include="mediapicker\MediaPicker.js" />
<EmbeddedResource Include="SettingControls\css\Values.css" />
<EmbeddedResource Include="SettingControls\js\Values.js" />
@@ -91,6 +91,27 @@ namespace umbraco.editorControls
// set filename in db to nothing
_text = "";
_data.Value = _text;
//also clear umbracoWidth, umbracoHeight, umbracoExtension, umbracoBytes
cms.businesslogic.Content content = cms.businesslogic.Content.GetContentFromVersion(this._data.Version);
foreach (string prop in "umbracoExtension,umbracoBytes,umbracoWidth,umbracoHeight".Split(','))
{
try
{
content.getProperty(prop).Value = string.Empty;
noEdit bytesControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_" + prop);
if (bytesControl != null)
{
bytesControl.RefreshLabel(string.Empty);
}
}
catch {
//if first one fails we can assume that props don't exist
break;
}
}
}
if (this.PostedFile != null)
@@ -104,8 +125,9 @@ namespace umbraco.editorControls
//}
// Find filename
_text = SafeUrl(this.PostedFile.FileName);
// Find filename (removed the safe url here as it removes fullpath characters (such as c:\ becomes c:) - the safe url should only be used when saving the
// local filename
_text = this.PostedFile.FileName;
string filename;
string _fullFilePath;
@@ -113,7 +135,8 @@ namespace umbraco.editorControls
if (umbraco.UmbracoSettings.UploadAllowDirectories)
{
filename = _text.Substring(_text.LastIndexOf(IOHelper.DirSepChar) + 1, _text.Length - _text.LastIndexOf(IOHelper.DirSepChar) - 1).ToLower();
// moved the safeUrl call to here as it's the local file name to be stored
filename = SafeUrl(_text.Substring(_text.LastIndexOf(IOHelper.DirSepChar) + 1, _text.Length - _text.LastIndexOf(IOHelper.DirSepChar) - 1).ToLower());
// Create a new folder in the /media folder with the name /media/propertyid
@@ -156,7 +179,7 @@ namespace umbraco.editorControls
{
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoExtension").Value = ext;
content.getProperty("umbracoExtension").Value = ext;
noEdit extensionControl = uploadField.FindControlRecursive<noEdit>(this.Page, "umbracoExtension");
noEdit extensionControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoExtension");
if (extensionControl != null)
{
extensionControl.RefreshLabel(content.getProperty("umbracoExtension").Value.ToString());
@@ -172,7 +195,7 @@ namespace umbraco.editorControls
System.IO.FileInfo fi = new FileInfo(_fullFilePath);
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoBytes").Value = fi.Length.ToString();
content.getProperty("umbracoBytes").Value = fi.Length.ToString();
noEdit bytesControl = uploadField.FindControlRecursive<noEdit>(this.Page, "umbracoBytes");
noEdit bytesControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoBytes");
if (bytesControl != null)
{
bytesControl.RefreshLabel(content.getProperty("umbracoBytes").Value.ToString());
@@ -198,13 +221,13 @@ namespace umbraco.editorControls
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoWidth").Value = fileWidth.ToString();
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoHeight").Value = fileHeight.ToString();
content.getProperty("umbracoWidth").Value = fileWidth.ToString();
noEdit widthControl = uploadField.FindControlRecursive<noEdit>(this.Page, "umbracoWidth");
noEdit widthControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoWidth");
if (widthControl != null)
{
widthControl.RefreshLabel(content.getProperty("umbracoWidth").Value.ToString());
}
content.getProperty("umbracoHeight").Value = fileHeight.ToString();
noEdit heightControl = uploadField.FindControlRecursive<noEdit>(this.Page, "umbracoHeight");
noEdit heightControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoHeight");
if (heightControl != null)
{
heightControl.RefreshLabel(content.getProperty("umbracoHeight").Value.ToString());
@@ -84,7 +84,11 @@ namespace umbraco.editorControls.uploadfield
SqlHelper.CreateParameter("@value",data),
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid",SqlParams);
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')",SqlParams);
// need to unlock the parameters (for SQL CE compat)
SqlParams = new IParameter[] {
SqlHelper.CreateParameter("@value",data),
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')", SqlParams);
}
protected override void Render(HtmlTextWriter writer)
@@ -0,0 +1,34 @@
using System;
using System.Text;
using System.Xml.Serialization;
using System.IO;
using System.Xml;
namespace umbraco.editorControls.userControlGrapper
{
public class SerializationHelper
{
public static object ValueFromXmlString(object value, Type type)
{
XmlSerializer ser = new XmlSerializer(type);
StringReader strRdr = new StringReader(value.ToString());
XmlTextReader xmlRdr = new XmlTextReader(strRdr);
object obj = ser.Deserialize(xmlRdr);
xmlRdr.Close();
strRdr.Close();
return obj;
}
public static string ValueToXmlString(object value)
{
MemoryStream str = new MemoryStream();
XmlSerializer ser = new XmlSerializer(value.GetType());
ser.Serialize(str, value);
str.Seek(0, System.IO.SeekOrigin.Begin);
XmlDocument doc = new XmlDocument();
doc.Load(str);
str.Close();
return doc.InnerXml;
}
}
}
@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace umbraco.editorControls.userControlGrapper
{
public class usercontrolData : umbraco.cms.businesslogic.datatype.DefaultData
{
public usercontrolData(umbraco.cms.businesslogic.datatype.BaseDataType DataType) : base(DataType) { }
public override System.Xml.XmlNode ToXMl(System.Xml.XmlDocument data)
{
if (this.Value != null)
{
XmlDocument xd = new XmlDocument();
try
{
xd.LoadXml(this.Value.ToString());
return data.ImportNode(xd.DocumentElement, true);
}
catch
{
return base.ToXMl(data);
}
}
else
{
return base.ToXMl(data);
}
}
}
}
@@ -10,14 +10,25 @@ using System.Web.UI.HtmlControls;
using umbraco.interfaces;
using umbraco.editorControls;
using umbraco.cms.businesslogic.datatype;
using System.Collections.Generic;
using umbraco.IO;
namespace umbraco.editorControls.userControlGrapper
{
[ValidationProperty("Value")]
public class usercontrolDataEditor : System.Web.UI.WebControls.PlaceHolder, umbraco.interfaces.IDataEditor
{
private umbraco.interfaces.IData _data;
private string _usercontrolPath;
public object Value
{
get
{
return ((IUsercontrolDataEditor)Controls[0]).value;
}
}
public usercontrolDataEditor(umbraco.interfaces.IData Data, string UsercontrolPath)
{
@@ -49,13 +60,52 @@ namespace umbraco.editorControls.userControlGrapper
{
base.OnInit (e);
this.Controls.Add(
new System.Web.UI.UserControl().LoadControl(_usercontrolPath));
Control oControl = new System.Web.UI.UserControl().LoadControl(_usercontrolPath);
if (HasSettings(oControl.GetType()))
{
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
List<Setting<string, string>> s = ss.GetSettings(((umbraco.cms.businesslogic.datatype.DefaultData)_data).DataTypeDefinitionId);
ss.Dispose();
foreach (Setting<string, string> setting in s)
{
try
{
if(!string.IsNullOrEmpty(setting.Key))
{
oControl.GetType().InvokeMember(setting.Key, System.Reflection.BindingFlags.SetProperty, null, oControl, new object[] { setting.Value });
}
}
catch (MissingMethodException) { }
}
}
this.Controls.Add(oControl);
if (!Page.IsPostBack)
((IUsercontrolDataEditor)Controls[0] as IUsercontrolDataEditor).value = _data.Value;
}
private bool HasSettings(Type t)
{
bool hasSettings = false;
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
{
object[] o = p.GetCustomAttributes(typeof(DataEditorSetting), true);
if (o.Length > 0)
{
hasSettings = true;
break;
}
}
return hasSettings;
}
}
}
@@ -31,7 +31,7 @@ namespace umbraco.editorControls.userControlGrapper
get
{
if (_baseData == null)
_baseData = new umbraco.cms.businesslogic.datatype.DefaultData(this);
_baseData = new usercontrolData(this);
return _baseData;
}
}
@@ -1,5 +1,6 @@
using System;
using System.Configuration;
using System.Drawing;
using System.Web;
using System.Web.Security;
using System.Web.UI;
@@ -13,26 +14,30 @@ using umbraco.BusinessLogic;
using umbraco.editorControls;
using umbraco.IO;
using System.Collections.Generic;
using umbraco.cms.businesslogic.datatype;
namespace umbraco.editorControls.userControlGrapper
{
public class usercontrolPrevalueEditor : System.Web.UI.WebControls.PlaceHolder, umbraco.interfaces.IDataPrevalue
{
public ISqlHelper SqlHelper
{
get { return Application.SqlHelper; }
}
public class usercontrolPrevalueEditor : System.Web.UI.WebControls.PlaceHolder, umbraco.interfaces.IDataPrevalue
{
public ISqlHelper SqlHelper
{
get { return Application.SqlHelper; }
}
#region IDataPrevalue Members
#region IDataPrevalue Members
// referenced datatype
private umbraco.cms.businesslogic.datatype.BaseDataType _datatype;
// referenced datatype
private umbraco.cms.businesslogic.datatype.BaseDataType _datatype;
private DropDownList _dropdownlist;
private DropDownList _dropdownlistUserControl;
private DropDownList _dropdownlist;
private DropDownList _dropdownlistUserControl;
private PlaceHolder _phSettings;
private Dictionary<string, DataEditorSettingType> dtSettings = new Dictionary<string, DataEditorSettingType>();
public usercontrolPrevalueEditor(umbraco.cms.businesslogic.datatype.BaseDataType DataType)
public usercontrolPrevalueEditor(umbraco.cms.businesslogic.datatype.BaseDataType DataType)
{
// state it knows its datatypedefinitionid
_datatype = DataType;
@@ -52,106 +57,283 @@ namespace umbraco.editorControls.userControlGrapper
_dropdownlistUserControl = new DropDownList();
_dropdownlistUserControl.ID = "usercontrol";
_phSettings = new PlaceHolder();
_phSettings.ID = "settings";
// put the childcontrols in context - ensuring that
// the viewstate is persisted etc.
Controls.Add(_dropdownlist);
Controls.Add(_dropdownlistUserControl);
Controls.Add(_phSettings);
// populate the usercontrol dropdown
_dropdownlistUserControl.Items.Add(new ListItem(ui.Text("choose"), ""));
populateUserControls( IOHelper.MapPath( SystemDirectories.Usercontrols) );
// populate the usercontrol dropdown
_dropdownlistUserControl.Items.Add(new ListItem(ui.Text("choose"), ""));
populateUserControls( IOHelper.MapPath( SystemDirectories.Usercontrols) );
}
private void populateUserControls(string path)
{
DirectoryInfo di = new DirectoryInfo(path);
foreach (FileInfo uc in di.GetFiles("*.ascx"))
{
string root = IOHelper.MapPath(SystemDirectories.Root);
private void populateUserControls(string path)
{
DirectoryInfo di = new DirectoryInfo(path);
foreach (FileInfo uc in di.GetFiles("*.ascx"))
{
string root = IOHelper.MapPath(SystemDirectories.Root);
_dropdownlistUserControl.Items.Add(
new ListItem(
uc.FullName.Substring(root.Length).Replace(IOHelper.DirSepChar, '/'))
_dropdownlistUserControl.Items.Add(
new ListItem(
uc.FullName.Substring(root.Length).Replace(IOHelper.DirSepChar, '/'))
/*
new ListItem(
uc.FullName.Substring( uc.FullName.IndexOf(root), uc.FullName.Length - uc.FullName.IndexOf(root)).Replace(IOHelper.DirSepChar, '/'))
*/
);
/*
new ListItem(
uc.FullName.Substring( uc.FullName.IndexOf(root), uc.FullName.Length - uc.FullName.IndexOf(root)).Replace(IOHelper.DirSepChar, '/'))
*/
);
}
foreach (DirectoryInfo dir in di.GetDirectories())
populateUserControls(dir.FullName);
}
}
foreach (DirectoryInfo dir in di.GetDirectories())
populateUserControls(dir.FullName);
}
public Control Editor
{
get
{
return this;
}
}
public Control Editor
{
get
{
return this;
}
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!Page.IsPostBack)
{
string config = Configuration;
if (config != "")
{
_dropdownlistUserControl.SelectedValue = config;
}
_dropdownlist.SelectedValue = _datatype.DBType.ToString();
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!Page.IsPostBack)
{
string config = Configuration;
if (config != "")
{
_dropdownlistUserControl.SelectedValue = config;
}
}
}
_dropdownlist.SelectedValue = _datatype.DBType.ToString();
public void Save()
{
_datatype.DBType = (umbraco.cms.businesslogic.datatype.DBTypes)Enum.Parse(typeof(umbraco.cms.businesslogic.datatype.DBTypes), _dropdownlist.SelectedValue, true);
// Generate data-string
string data = _dropdownlistUserControl.SelectedValue;
}
// If the add new prevalue textbox is filled out - add the value to the collection.
IParameter[] SqlParams = new IParameter[] {
SqlHelper.CreateParameter("@value",data),
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid", SqlParams);
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')", SqlParams);
}
//check for settings
if (!string.IsNullOrEmpty(Configuration))
LoadSetttings(Configuration);
protected override void Render(HtmlTextWriter writer)
{
writer.WriteLine("<table>");
writer.WriteLine("<tr><th>Database datatype</th><td>");
_dropdownlist.RenderControl(writer);
writer.Write("</td></tr>");
writer.Write("<tr><th>Usercontrol:</th><td>");
_dropdownlistUserControl.RenderControl(writer);
writer.Write("</td></tr>");
writer.Write("</table>");
}
}
public string Configuration
{
get
{
object conf =
SqlHelper.ExecuteScalar<object>("select value from cmsDataTypePreValues where datatypenodeid = @datatypenodeid",
SqlHelper.CreateParameter("@datatypenodeid", _datatype.DataTypeDefinitionId));
if (conf != null)
return conf.ToString();
else
return "";
private Dictionary<string, DataEditorSetting> GetSettings(Type t)
{
Dictionary<string, DataEditorSetting> settings = new Dictionary<string, DataEditorSetting>();
}
}
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
{
#endregion
}
object[] o = p.GetCustomAttributes(typeof(DataEditorSetting), true);
if (o.Length > 0)
settings.Add(p.Name, (DataEditorSetting)o[0]);
}
return settings;
}
private bool HasSettings(Type t)
{
bool hasSettings = false;
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
{
object[] o = p.GetCustomAttributes(typeof(DataEditorSetting), true);
if (o.Length > 0)
{
hasSettings = true;
break;
}
}
return hasSettings;
}
private void LoadSetttings(string fileName)
{
if (System.IO.File.Exists(IOHelper.MapPath("~/" + fileName)))
{
UserControl oControl = (UserControl)this.Page.LoadControl(@"~/" + fileName);
Type type = oControl.GetType();
Dictionary<string, DataEditorSetting> settings = GetSettings(type);
foreach (KeyValuePair<string, DataEditorSetting> kv in settings)
{
DataEditorSettingType dst = kv.Value.GetDataEditorSettingType();
dtSettings.Add(kv.Key, dst);
DataEditorPropertyPanel panel = new DataEditorPropertyPanel();
panel.Text = kv.Value.GetName();
panel.Text += "<br/><small>" + kv.Value.description + "</small>";
if (HasSettings(type))
{
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
List<Setting<string, string>> s = ss.GetSettings(_datatype.DataTypeDefinitionId);
ss.Dispose();
if (s.Find(set => set.Key == kv.Key).Value != null)
dst.Value = s.Find(set => set.Key == kv.Key).Value;
}
panel.Controls.Add(dst.RenderControl(kv.Value));
Label invalid = new Label();
invalid.Attributes.Add("style", "color:#8A1F11");
invalid.ID = "lbl" + kv.Key;
panel.Controls.Add(invalid);
_phSettings.Controls.Add(panel);
}
}
}
public void Save()
{
bool hasErrors = false;
foreach (KeyValuePair<string, DataEditorSettingType> k in dtSettings)
{
var result = k.Value.Validate();
Label lbl = FindControlRecursive<Label>(_phSettings, "lbl" + k.Key);
if(result == null && lbl != null)
{
if(lbl != null)
lbl.Text = string.Empty;
}
else
{
if(hasErrors == false)
hasErrors = true;
if (lbl != null)
lbl.Text = " " + result.ErrorMessage;
}
}
if (!hasErrors)
{
_datatype.DBType =
(umbraco.cms.businesslogic.datatype.DBTypes)
Enum.Parse(typeof (umbraco.cms.businesslogic.datatype.DBTypes), _dropdownlist.SelectedValue, true);
// Generate data-string
string data = _dropdownlistUserControl.SelectedValue;
// If the add new prevalue textbox is filled out - add the value to the collection.
IParameter[] SqlParams = new IParameter[]
{
SqlHelper.CreateParameter("@value", data),
SqlHelper.CreateParameter("@dtdefid", _datatype.DataTypeDefinitionId)
};
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid", SqlParams);
// we need to populate the parameters again due to an issue with SQL CE
SqlParams = new IParameter[]
{
SqlHelper.CreateParameter("@value", data),
SqlHelper.CreateParameter("@dtdefid", _datatype.DataTypeDefinitionId)
};
SqlHelper.ExecuteNonQuery(
"insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')",
SqlParams);
//settings
DataEditorSettingsStorage ss = new DataEditorSettingsStorage();
//ss.ClearSettings(_datatype.DataTypeDefinitionId);
int i = 0;
foreach (KeyValuePair<string, DataEditorSettingType> k in dtSettings)
{
ss.InsertSetting(_datatype.DataTypeDefinitionId, k.Key, k.Value.Value, i);
i++;
}
ss.Dispose();
if (dtSettings.Count == 0)
{
if (!string.IsNullOrEmpty(Configuration))
LoadSetttings(Configuration);
}
}
}
protected override void Render(HtmlTextWriter writer)
{
writer.WriteLine("<div class=\"propertyItem\">");
writer.WriteLine("<div class=\"propertyItemheader\">Database datatype</div>");
writer.WriteLine("<div class=\"propertyItemContent\">");
_dropdownlist.RenderControl(writer);
writer.Write("</div></div>");
writer.WriteLine("<div class=\"propertyItem\">");
writer.WriteLine("<div class=\"propertyItemheader\">Usercontrol:</div>");
writer.WriteLine("<div class=\"propertyItemContent\">");
_dropdownlistUserControl.RenderControl(writer);
writer.Write("</div></div>");
_phSettings.RenderControl(writer);
}
public string Configuration
{
get
{
object conf =
SqlHelper.ExecuteScalar<object>("select value from cmsDataTypePreValues where datatypenodeid = @datatypenodeid",
SqlHelper.CreateParameter("@datatypenodeid", _datatype.DataTypeDefinitionId));
if (conf != null)
return conf.ToString();
else
return "";
}
}
private static T FindControlRecursive<T>(Control parent, string id) where T : Control
{
if ((parent is T) && (parent.ID == id))
{
return (T)parent;
}
foreach (Control control in parent.Controls)
{
T foundControl = FindControlRecursive<T>(control, id);
if (foundControl != null)
{
return foundControl;
}
}
return default(T);
}
#endregion
}
}
+2 -1
View File
@@ -56,7 +56,8 @@ namespace umbraco.editorControls
/// <param name="output"> The HTML writer to write out to </param>
protected override void Render(HtmlTextWriter output)
{
if (!Page.IsPostBack && _data != null && _data.Value != null)
// zb-00024 #299260 : always render, postback or not postback
if (_data != null && _data.Value != null)
{
if (_data.Value.ToString() == "1")
this.Checked = true;
-1
View File
@@ -19,7 +19,6 @@ namespace umbraco.macroRenderings
{
string _value = "";
bool _multiple = false;
private static ISqlHelper _sqlHelper;
public bool ShowCaption
{
@@ -27,10 +27,14 @@
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
+13 -12
View File
@@ -13,7 +13,8 @@ using System.Linq;
using ClientDependency.Core.Controls;
using umbraco.IO;
namespace umbraco.uicontrols {
namespace umbraco.uicontrols
{
[ClientDependency(ClientDependencyType.Javascript, "CodeArea/javascript.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "CodeArea/UmbracoEditor.js", "UmbracoClient")]
@@ -29,7 +30,7 @@ namespace umbraco.uicontrols {
protected TextBox CodeTextBox;
public bool AutoResize { get; set ; }
public bool AutoResize { get; set; }
public int OffSetX { get; set; }
public int OffSetY { get; set; }
public string Text
@@ -68,7 +69,7 @@ namespace umbraco.uicontrols {
{
ClientDependencyLoader.Instance.RegisterDependency("CodeMirror/js/codemirror.js", "UmbracoClient", ClientDependencyType.Javascript);
ClientDependencyLoader.Instance.RegisterDependency("CodeArea/styles.css", "UmbracoClient", ClientDependencyType.Css);
}
}
}
protected override void CreateChildControls()
@@ -82,7 +83,7 @@ namespace umbraco.uicontrols {
CodeTextBox.Attributes.Add("class", "codepress");
CodeTextBox.Attributes.Add("wrap", "off");
}
CodeTextBox.TextMode = TextBoxMode.MultiLine;
this.CssClass = "codepress";
@@ -105,7 +106,7 @@ namespace umbraco.uicontrols {
}
}
protected override void Render(HtmlTextWriter writer)
protected override void Render(HtmlTextWriter writer)
{
EnsureChildControls();
@@ -116,18 +117,18 @@ namespace umbraco.uicontrols {
jsEventCode = RenderBasicEditor();
}
else
{
{
writer.WriteBeginTag("div");
writer.WriteAttribute("id", this.ClientID);
writer.WriteAttribute("class", this.CssClass);
this.ControlStyle.AddAttributesToRender(writer);
writer.Write(HtmlTextWriter.TagRightChar);
writer.Write(HtmlTextWriter.TagRightChar);
CodeTextBox.RenderControl(writer);
writer.WriteEndTag("div");
jsEventCode = RenderCodeEditor();
}
if (this.AutoResize)
@@ -153,7 +154,7 @@ namespace umbraco.uicontrols {
if (!UmbracoSettings.ScriptDisableEditor && HttpContext.Current.Request.Browser.Browser == "IE")
{
jsEventCode += "jQuery('<p style=\"color:#999\">" + ui.Text("codemirroriewarning").Replace("'", "\\'") +"</p>').insertAfter('#" + this.ClientID + "');";
jsEventCode += "jQuery('<p style=\"color:#999\">" + ui.Text("codemirroriewarning").Replace("'", "\\'") + "</p>').insertAfter('#" + this.ClientID + "');";
}
}
@@ -199,7 +200,7 @@ namespace umbraco.uicontrols {
break;
case EditorType.HTML:
parserFiles = new string[] { "parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js", "parsehtmlmixed.js" };
cssFile = new string[] { "xmlcolors.css", "jscolors.css", "csscolors", "umbracoCustom.css" };
cssFile = new string[] { "xmlcolors.css", "jscolors.css", "csscolors.css", "umbracoCustom.css" };
break;
}
@@ -221,9 +222,9 @@ namespace umbraco.uicontrols {
stylesheet: [" + string.Join(",",
cssFile
.Select(x => string.Format(@"""{0}""", IOHelper.ResolveUrl( SystemDirectories.Umbraco_client ) + @"/CodeMirror/css/" + x))
.Select(x => string.Format(@"""{0}""", IOHelper.ResolveUrl(SystemDirectories.Umbraco_client) + @"/CodeMirror/css/" + x))
.ToArray()) + @"],
path: """ + IOHelper.ResolveUrl( SystemDirectories.Umbraco_client) + @"/CodeMirror/js/"",
path: """ + IOHelper.ResolveUrl(SystemDirectories.Umbraco_client) + @"/CodeMirror/js/"",
content: textarea.value,
autoMatchParens: false,"
+ (string.IsNullOrEmpty(ClientSaveMethod) ? "" : @"saveFunction: " + ClientSaveMethod + ",") + @"
@@ -13,6 +13,7 @@ namespace umbraco.uicontrols.DatePicker
[ClientDependency(ClientDependencyType.Css, "DateTimePicker/datetimepicker.css", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "MaskedInput/jquery.maskedinput-1.3.min.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "ui/jqueryui.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "DateTimePicker/timepicker.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "DateTimePicker/umbDateTimePicker.js", "UmbracoClient")]
@@ -112,7 +113,9 @@ jQuery(document).ready(function() {
+ this.ShowTime.ToString().ToLower() + ",'"
+ ui.Text("choose") + " " + ui.Text("date") + "','"
+ ui.Text("noDate") + "','"
+ ui.Text("removeDate") + "') });";
+ ui.Text("removeDate") + "');"
+ "jQuery('#" + m_DateTextBox.ClientID + "').mask('"+ (this.ShowTime ? "9999-99-99 99:99" : "9999-99-99") +"');"
+ "});";
try
{

Some files were not shown because too many files have changed in this diff Show More