Compare commits

...

216 Commits

Author SHA1 Message Date
Sebastiaan Janssen b60aa3031c Post.cshtml shouldn't be there 2014-04-08 12:03:55 +02:00
Sebastiaan Janssen 2a0e3d803f Merge branch '7.1.1' of https://github.com/umbraco/Umbraco-CMS into 7.1.1 2014-04-08 11:37:50 +02:00
Sebastiaan Janssen 670a67225a Upgrade to Json.Net 6.0.2 2014-04-08 11:37:40 +02:00
perploug 0bedf09f48 Fixes: U4-4609 v7.1 Media Picker datatype only allows selection of images not PDFs 2014-04-08 11:34:42 +02:00
perploug 41ad18deef Removes autocomplete from installer password field 2014-04-08 11:07:23 +02:00
perploug 4745be4765 Fixes missing listview icons 2014-04-08 11:07:02 +02:00
perploug 13891bb033 Merge branch '7.1.1' of https://github.com/umbraco/Umbraco-CMS into 7.1.1 2014-04-07 16:08:45 +02:00
perploug a2efd7ab53 Fixes: U4-4619 Make sure installer pings stats 2014-04-07 16:08:34 +02:00
Sebastiaan Janssen 3c204da150 Spelling error 2014-04-07 16:05:21 +02:00
Sebastiaan Janssen ab7371e146 Bump version number 2014-04-07 14:29:59 +02:00
Sebastiaan Janssen 0f5c79afbc Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.1 2014-04-07 13:02:56 +02:00
Sebastiaan Janssen 4a516f7da9 Manually applying PR #347 2014-04-07 13:01:43 +02:00
Sebastiaan Janssen fcb080658d Reverting 221bfa5f3d so that views are found in partials again
Tested creating/editing members with custom properties in combination with our snippets and
that seems to work fine now, so not sure what this was supposed to fix.
Fixes U4-4604 Surface Controller functionality changed in 7.1 breaking site
2014-04-07 12:16:45 +02:00
perploug 08d74e3320 Tiny tweak more 2014-04-03 14:01:25 +02:00
perploug 98fd75b55d Updating user screen on the installer 2014-04-03 13:52:18 +02:00
perploug e7da70e076 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-04-03 11:52:01 +02:00
perploug 200cec0e23 Hardcodes starterkit guid into the installer
This way we can change it remotely to another package instead of relying
on just getting the first guid in the collection of kits
2014-04-03 11:51:51 +02:00
perploug 807778a737 Fixes: U4-4592 U7.1 - You can trigger a lot "Unsaved changes" bars 2014-04-03 11:50:50 +02:00
Sebastiaan Janssen 66d61c9d20 One more ImageProcessor update 2014-04-03 11:29:13 +02:00
Sebastiaan Janssen ecae5a856a Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0
Conflicts:
	src/Umbraco.Core/Services/IRelationService.cs
	src/Umbraco.Web/Models/PublishedProperty.cs
	src/Umbraco.Web/PublishedCache/MemberPublishedContent.cs
2014-04-03 11:13:13 +02:00
Sebastiaan Janssen bf8add4f8d Manually picked up PR #343 2014-04-03 11:10:43 +02:00
perploug 256fa3385a Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-04-03 09:31:47 +02:00
perploug ebaa46b2fc Fixes: U4-4212 Insert Image in RTE not resizing image 2014-04-03 09:31:32 +02:00
Sebastiaan Janssen e207185d51 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-04-03 09:30:12 +02:00
Sebastiaan Janssen 5efc45a7dd Bump version number 2014-04-03 09:29:52 +02:00
Sebastiaan Janssen c3fc27565d Update version of ImageProcessor and refer to NuGet in the csproj instead of the bin (!) 2014-04-03 09:26:51 +02:00
Sebastiaan Janssen 0af3f9dce0 Fixes U4-4278 Multiple RadioButtonList on one Document
Manually applying pull request as it's a bit faster to copy&paste instead of resolve merge conflicts
2014-04-03 08:55:19 +02:00
perploug 426b02b08a Sets zoom throttle to 100 instead of 300
To limit the number of re-calculations, but still keep it somewhat
fluent
2014-04-03 00:41:27 +02:00
perploug a4e23ef82b Missing files in last commit 2014-04-03 00:40:36 +02:00
perploug d0c6c4aafa Fixes: U4-4332 MediaPicker - Typealias is hardcode several places 2014-04-03 00:37:59 +02:00
perploug 3ea7e6fb8a Partially fixes: U4-4479 Cropper preview in backoffice is a bit off from the actual crop
Makes the cropper card UI reset on save, ensuring changes populate
2014-04-02 23:04:37 +02:00
Stephan 9940b78a57 U4-4575 - fix 8371105 2014-04-02 17:00:24 +02:00
Stephan 8371105c10 U4-4575 - property converters use wrong source value 2014-04-02 16:00:46 +02:00
perploug d4b0f3c570 Resizing safeguards to ensure we only return positive 2014-04-02 14:21:40 +02:00
perploug 29416320d2 Fixes failing macrospec tests
doooh, it referenced marcoParamsDictionary - instead of
macroParamsDictionary - whats up with that Marco guy?
2014-04-02 13:43:03 +02:00
perploug d11eb485e1 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-04-02 13:19:41 +02:00
perploug 300bd3bed4 Fixes: U4-4558 U7 Macro Parameter Editors needs some love!
Adds some config to the media picker and fixes thumbnail issues
2014-04-02 13:19:26 +02:00
Sebastiaan Janssen 3ca5443350 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-04-02 12:02:29 +02:00
Sebastiaan Janssen f6d56f51d4 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0
Conflicts:
	src/Umbraco.Core/Services/IRelationService.cs
	src/Umbraco.Web/Controllers/UmbRegisterController.cs
2014-04-02 12:01:55 +02:00
Sebastiaan Janssen 53c0bd6938 Fixes: Password is not saved when using the Register snippet 2014-04-02 11:59:16 +02:00
perploug 174aa9f4ad Fixes: U4-4581 Hotkey - Click on disabled element 2014-04-02 11:51:56 +02:00
Sebastiaan Janssen a768fe5bb3 Ports behaviour from membershiphelper from v7 to 6 to make them the same 2014-04-02 11:42:48 +02:00
Sebastiaan Janssen d9c66cd4b3 Adds AddRelation and missing events in RelationService from v7 into v6 2014-04-02 11:41:59 +02:00
Stephan 6d3e8e1f6d U4-4559 - tests 2014-04-02 11:40:05 +02:00
Stephan b6185b847f U4-4575 - property converters use wrong source value 2014-04-02 11:39:53 +02:00
perploug c8877d0a2c Fixes failing dropdown prop editor tests 2014-04-02 11:35:23 +02:00
perploug 891810b045 Adds newsletter to installer
With the good ol' V6 installer code, ahhh the smell of code patina
2014-04-02 11:20:35 +02:00
Sebastiaan Janssen 77d910b6b6 We don't really need to scream greetings to people who try to use the member picker 2014-04-01 19:14:42 +02:00
Sebastiaan Janssen 47044b3a77 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-04-01 16:46:43 +02:00
Sebastiaan Janssen 5b693f9310 Adds ability to add/remove a single role to/from a single member, which is much nicer than having to instantiate arrays 2014-04-01 16:43:11 +02:00
Sebastiaan Janssen 40ebc1295c Fixes error thrown when saving password and actually using the Umbraco membership provider 2014-04-01 15:30:42 +02:00
Sebastiaan Janssen b769b224c2 Fixes error thrown when saving password and actually using the Umbraco membership provider 2014-04-01 15:29:16 +02:00
Sebastiaan Janssen 89efe40f41 Merge remote-tracking branch 'origin/6.2.0' into 7.1.0 2014-04-01 14:27:47 +02:00
Sebastiaan Janssen 51660d918c Assembly redirect seems to help a lot installing NuGet pkg, should finally be able to close U4-4510 nuget targets file creates an invalid path in the property group 2014-04-01 14:22:13 +02:00
Sebastiaan Janssen ea7b053106 Merge pull request #340 from leekelleher/U4-4550
Fixes: U4-4550 Media Picker preview with transparent images
2014-04-01 13:06:58 +02:00
Sebastiaan Janssen 3e17201ce7 Merge remote-tracking branch 'origin/6.2.0' into 7.1.0 2014-04-01 11:59:26 +02:00
Sebastiaan Janssen 1f03983628 Clean up belle/build folder when building with build.bat to make sure it's pristine 2014-04-01 11:54:25 +02:00
Sebastiaan Janssen 15aa6fc4b8 Fixed U4-4576 7.0.4 : InternalMemberSearcher config incorrectly uses 'enableLeadingWildcards', should be 'enableLeadingWildcard' 2014-04-01 11:53:56 +02:00
Sebastiaan Janssen 41e8a9ef2d Fixed U4-4576 7.0.4 : InternalMemberSearcher config incorrectly uses 'enableLeadingWildcards', should be 'enableLeadingWildcard' 2014-04-01 11:51:51 +02:00
perploug a492976a32 Fixes: U4-4557 Color Picker - default is black, but it can't be added without choosing another color first
Sets color to be black by default, so will be added if you click add
without setting anything, so its consistent with the default swatch
2014-04-01 10:08:50 +02:00
perploug 88e09f9077 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-04-01 10:02:23 +02:00
perploug 65a1709bd3 Fixes: U4-4537 Macro Textbox parameter in RTE Encoding issue 2014-04-01 10:02:10 +02:00
Sebastiaan Janssen 6478a8424a Fixes test, additional Tag mapper requires count to be updated 2014-04-01 09:11:07 +02:00
leekelleher 55ade4e491 Replaced solid/semi-transparent background, with a checkered background image. 2014-03-31 22:45:35 +01:00
Stephan a767aa9f3a Merge pull request #342 from kipusoep/7.1.0
Changed $('#form1') usage to $('form')
2014-03-31 18:19:29 +02:00
Sebastiaan Janssen 50321e5936 Merge pull request #336 from bjarnef/7.1.0_-_U4-4026
Fix for U4-4026 Inline styling affect header text
2014-03-31 17:32:50 +02:00
perploug 1321702d19 Fixes: U4-3649 Bottom button bar gradient overlaps last field
Temp fix, as we will likely refactor or editor directives before
building more core editors
2014-03-31 13:24:30 +02:00
perploug 005ff2f830 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-03-31 13:17:27 +02:00
perploug dff3fde840 Fixes: U4-4553 7.1 Template drop down has values but is blank
patches the it on the clientside for now, longerterm solution is to have
templates being returned as prevalues, but will leave that to shannon as
there could be other things accidentally being poked doing that.
2014-03-31 13:17:15 +02:00
Sebastiaan Janssen 44504ff6af Fixes summary for the TagMapper 2014-03-31 12:59:28 +02:00
Sebastiaan Janssen 25d3389759 Merge pull request #341 from robertjf/7.1.0
Fixes #U4-4544 Issue: TagService.GetAllTags(group) throws Exception in MappingResolver
2014-03-31 12:57:51 +02:00
Robert Foster 3f97c74712 removed commented out code 2014-03-31 22:00:54 +11:00
perploug 1152b61fb0 7.1 login greetings update 2014-03-31 12:43:05 +02:00
perploug b1842de045 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-03-31 12:37:26 +02:00
perploug 750a2862ee Fixes: U4-4562 Images and markdown editor 2014-03-31 12:37:08 +02:00
perploug 7632075df4 Fixes: U4-4536 Tree points to wrong views after install 2014-03-31 12:29:44 +02:00
perploug aa75cd4ea8 Fixes: U4-4549 Related Links "New Window" checkbox has css "display: none" 2014-03-31 12:28:56 +02:00
Sebastiaan Janssen 06827bd7a5 Merge pull request #338 from vnbaaij/7.1.0
Solution for  U4-4548
2014-03-31 11:57:13 +02:00
Stefan Kip 9a82ab7d4a Changed $('#form1') usage to $('form')
I'm having an issue with v6.1.6 where the form's id is 'aspnetForm' instead of 'form1', I don't know why.
Using $('form') is much safer than using $('#form1').
2014-03-31 09:56:16 +02:00
Robert Foster b1037d1936 Added a TagMapper class to resolve ITag back to TagDto. 2014-03-30 19:07:35 +11:00
leekelleher ccdc3a1eab Fixes: U4-4550 Media Picker preview with transparent images 2014-03-28 16:59:34 +00:00
Vincent Baaij a47387fec0 Solution for U4-4548 2014-03-28 16:03:51 +01:00
perploug c29d08c915 Fixes: U4-4489 7.1 RC, warn about changes partially overlays breadcrumb 2014-03-28 11:00:29 +01:00
perploug b8f796eb2c Fixes: U4-4532 Unable to insert Image in TinyMCE when Image property 'umbracoFile' is changed from type 'Upload' to the new 'Image Cropper' 2014-03-28 10:39:24 +01:00
Shannon b9088c9ac0 fixes build 2014-03-28 08:51:25 +11:00
Shannon 7a8f8ac0fe Merge remote-tracking branch 'origin/6.2.0' into 7.1.0 2014-03-28 08:31:52 +11:00
Shannon 49cf0f98ce U4-1752 - Add GetPreValueAsString(id) method to the @Umbraco helper 2014-03-28 08:31:21 +11:00
Shandem 22ffa86e18 Merge pull request #301 from Jeavon/U4-1752
U4-1752 - Add GetPreValueAsString(id) method to the @Umbraco helper
2014-03-28 08:21:32 +11:00
perploug c4e2d98138 U4-4532 Unable to insert Image in TinyMCE when Image property 'umbracoFile' is changed from type 'Upload' to the new 'Image Cropper'
Replaces the old media api with the resolveFile helper methods
2014-03-27 02:46:32 -07:00
Shannon c01211c62d Merge remote-tracking branch 'origin/6.2.0' into 7.1.0
Conflicts:
	src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
2014-03-27 17:28:46 +11:00
Shannon d8a3e00440 Fixes: U4-2843 Copying Document Type when Selecting Master Doesn't Work (Master ignored), U4-3552 Copy nested document type is failing 2014-03-27 17:26:55 +11:00
Shannon 264c537b50 Fixes: U4-4530 Edit Profile Snippet: Check for null before loop 2014-03-27 16:52:43 +11:00
Shannon f26c61d736 renames file 2014-03-27 16:43:34 +11:00
Shannon 43f647fd94 Fixes U4-4531 dialogService.macroPicker callback wrong property name 2014-03-27 16:43:20 +11:00
Shannon cc0bcc2d59 Fixes unit tests 2014-03-27 16:27:57 +11:00
Shannon 1b23540b87 Merge remote-tracking branch 'origin/6.2.0' into 7.1.0
Conflicts:
	src/Umbraco.Web/Cache/DistributedCache.cs
2014-03-27 16:12:37 +11:00
Shannon c309e18f13 Fixes: U4-459 Public Access permissions not set on distributed servers 2014-03-27 16:11:34 +11:00
Shannon dec60885b4 Fixes more thread safety issues with Access.cs 2014-03-27 15:50:56 +11:00
Shannon eee09ec45b Completes: U4-459 Public Access permissions not set on distributed servers 2014-03-27 14:43:07 +11:00
Shannon b4daab2856 started fixing: U4-459 Public Access permissions not set on distributed servers but have commented that code out for now because it will cause problem in some LB scenarios. 2014-03-27 14:28:45 +11:00
Shannon fdfbad254d Fixes some very badly handled threading issues with the Access (public access) class 2014-03-27 14:28:12 +11:00
bjarnef 0c6e766030 Fix for U4-4026 Inline styling affect header text
Inline styling on container affect header text and dropdown with
text-align:center on language in settings section.
2014-03-27 02:42:21 +01:00
Shannon 7444363cef adds another null check to the other TranslateItem method 2014-03-27 08:13:05 +11:00
Shandem a82097b92b Merge pull request #334 from Jeavon/U4-4527
Fix for U4-4527 U7 - Creating initial Folder in media section causes exc...
2014-03-27 08:05:56 +11:00
Jeavon Leopold 07934161a4 Fix for U4-4527 U7 - Creating initial Folder in media section causes exception 2014-03-26 10:07:20 +00:00
Shandem 9194030a9a Merge pull request #333 from Nicholas-Westby/7.1.0
Replaced "retreive" with "retrieve".
2014-03-26 17:45:03 +11:00
Shannon 1cbaace777 Merge remote-tracking branch 'origin/6.2.0' into 7.1.0
Conflicts:
	build/Build.proj
	build/NuSpecs/UmbracoCms.Core.nuspec
	build/NuSpecs/build/UmbracoCms.targets
	build/NuSpecs/tools/install.ps1
	src/Umbraco.Web.UI/umbraco_client/Editors/EditScript.js
2014-03-26 15:06:03 +11:00
Nicholas-Westby ef5052324b Replaced "retreive" with "retrieve". 2014-03-25 20:49:52 -07:00
Nicholas-Westby 204a8d813c Replaced "retreive" with "retrieve". 2014-03-25 20:48:05 -07:00
Nicholas-Westby 8009cb3892 Replaced "retreive" with "retrieve". 2014-03-25 20:46:23 -07:00
Nicholas-Westby 284d168cd7 Replaced "retreive" with "retrieve". 2014-03-25 20:45:28 -07:00
Nicholas-Westby fdd025aefd Replaced "retreive" with "retrieve". 2014-03-25 20:44:47 -07:00
Nicholas-Westby e36d4768e1 Replaced "retreive" with "retrieve". 2014-03-25 20:44:08 -07:00
Nicholas-Westby df2047e8f8 Replaced "retreive" with "retrieve". 2014-03-25 20:43:32 -07:00
Nicholas-Westby d9280d5238 Replaced "retreive" with "retrieve". 2014-03-25 20:42:29 -07:00
Nicholas-Westby 388249f500 Replaced "retreive" with "retrieve". 2014-03-25 20:41:32 -07:00
Nicholas-Westby a08b75592e Replaced "retreive" with "retrieve". 2014-03-25 20:40:44 -07:00
Nicholas-Westby 38ea6dfbfe Replaced "retreive" with "retrieve". 2014-03-25 20:39:45 -07:00
Nicholas-Westby 39ccde221a Replaced "retreive" with "retrieve". 2014-03-25 20:38:58 -07:00
Nicholas-Westby 17b6366ea3 Replaced "retreive" with "retrieve". 2014-03-25 20:37:20 -07:00
Nicholas-Westby 3d6a608b12 Replaced "retreive" with "retrieve". 2014-03-25 20:36:46 -07:00
Nicholas-Westby 851f58df9c Replaced "retreive" with "retrieve". 2014-03-25 20:35:36 -07:00
Nicholas-Westby 0ff0cc6366 Replaced "retreive" with "retrieve". 2014-03-25 20:34:44 -07:00
Nicholas-Westby 08004ecc68 Replaced "retreive" with "retrieve". 2014-03-25 20:33:59 -07:00
Nicholas-Westby 4a2544d0e6 Replaced "retreive" with "retrieve". 2014-03-25 20:32:39 -07:00
Nicholas-Westby bace1cce74 Replaced "retreive" with "retrieve". 2014-03-25 20:31:31 -07:00
Nicholas-Westby acc88e25d8 Replaced "retreive" with "retrieve". 2014-03-25 20:30:17 -07:00
Nicholas-Westby 2a1a16d478 Replaced "retreive" with "retrieve". 2014-03-25 20:28:47 -07:00
Nicholas-Westby a5afb8ed19 Replaced "retreive" with "retrieve". 2014-03-25 20:27:57 -07:00
Nicholas-Westby d02678e05c Replaced "retreive" with "retrieve". 2014-03-25 20:26:58 -07:00
Nicholas-Westby 9e0bbd3c99 Replaced "retreive" with "retrieve". 2014-03-25 20:26:06 -07:00
Nicholas-Westby 539efcc669 Replaced "retreive" with "retrieve". 2014-03-25 20:25:24 -07:00
Nicholas-Westby d0d9d85151 Replaced "retreive" with "retrieve". 2014-03-25 20:24:27 -07:00
Nicholas-Westby ffa307613c Replaced "retreive" with "retrieve". 2014-03-25 20:23:36 -07:00
Nicholas-Westby 19ea6d6005 Replaced "retreive" with "retrieve". 2014-03-25 20:22:34 -07:00
Nicholas-Westby 155b1737d3 Replaced "retreive" with "retrieve". 2014-03-25 20:20:51 -07:00
Nicholas-Westby b66253f33e Replaced "retreive" with "retrieve". 2014-03-25 20:19:50 -07:00
Nicholas-Westby bcbadfe648 Replaced "retreive" with "retrieve". 2014-03-25 20:19:12 -07:00
Nicholas-Westby 3325b06873 Replaced "retreive" with "retrieve". 2014-03-25 20:18:30 -07:00
Nicholas-Westby 852914bf6b Replaced "retreive" with "retrieve". 2014-03-25 20:17:55 -07:00
Nicholas-Westby 3e14807370 Replaced "retreive" with "retrieve". 2014-03-25 20:17:18 -07:00
Nicholas-Westby e44cb6708d Replaced "retreive" with "retrieve". 2014-03-25 20:16:31 -07:00
Nicholas-Westby fd43b27d00 Replaced "retreive" with "retrieve". 2014-03-25 20:15:34 -07:00
Nicholas-Westby 524f113611 Replaced "retreive" with "retrieve". 2014-03-25 20:14:54 -07:00
Nicholas-Westby 04dcf50218 Replaced "retreive" with "retrieve". 2014-03-25 20:14:23 -07:00
Nicholas-Westby 2b497deaa3 Replaced "retreive" with "retrieve". 2014-03-25 20:13:30 -07:00
Nicholas-Westby dbe2f8ea37 Replaced "retreive" with "retrieve". 2014-03-25 20:12:50 -07:00
Nicholas-Westby 7dc0239ad1 Replaced "retreive" with "retrieve". 2014-03-25 20:11:46 -07:00
Nicholas-Westby 72fdc5f472 Replaced "retreive" with "retrieve". 2014-03-25 20:10:34 -07:00
Shannon cde3c42cec Fixes: U4-4455 Javascript error with single quotes in literals
Conflicts:
	src/Umbraco.Web.UI/umbraco_client/Editors/EditScript.js
2014-03-26 13:34:26 +11:00
Shannon 10b544abb9 Fixes: U4-4455 Javascript error with single quotes in literals 2014-03-26 13:31:15 +11:00
Shannon 88aecdf672 fixes U4-4517 Color picker not showing colors 2014-03-26 13:07:07 +11:00
Shannon ad95736eaa Fixes issues relating to adding ability to sort pre-values, had to update all property editors that use the shared sortable pre-values, ensure the list items are an array and then sorted. 2014-03-26 13:01:53 +11:00
Shannon 34a21a78a0 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-03-26 11:23:58 +11:00
Shannon 1e01c2669f fixes missing semi-colon 2014-03-26 11:23:48 +11:00
Shandem d3a7389b89 Fixes file name casing 2014-03-26 11:21:31 +11:00
Shandem bc8b6c4bea Fixes file name casing 2014-03-26 11:21:08 +11:00
Shandem 3953a48a3b Merge pull request #332 from arknu/7.1_U4-3744
U4-3744: Make it possible to make individual selections while still selecting the entire text on first click
2014-03-26 11:08:50 +11:00
Shannon 2f44e94bd0 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-03-26 11:00:46 +11:00
Shannon 5eeb8d7df6 Fixes: U4-4520 Issue: MultipleTextStringValueConverter returns an empty string array due to mismatched XML value format 2014-03-26 11:00:32 +11:00
arknu 231f23cc6e Cleaned up the code a bit 2014-03-25 22:26:05 +01:00
Sebastiaan Janssen 3235678d29 U4-4510 nuget targets file creates an invalid path in the property group
That should fix this one properly now
2014-03-25 20:40:44 +01:00
Sebastiaan Janssen f13ddddc16 U4-4510 nuget targets file creates an invalid path in the property group
That should fix this one properly now
2014-03-25 20:39:46 +01:00
arknu 490c346fcf U4-3744: Make it possible to make individual selections while still selecting the entire text on first click 2014-03-25 19:34:19 +01:00
Shannon 8f1d8419a0 Merge remote-tracking branch 'origin/6.2.0' into 7.1.0
Conflicts:
	build/NuSpecs/build/net40/UmbracoCms.targets
	build/NuSpecs/build/net45/UmbracoCms.targets
	build/NuSpecs/build/net451/UmbracoCms.targets
	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
2014-03-25 15:47:57 +11:00
Shannon be8320bb4b fixes some compatibility issues with PR for sortable pre-vals 2014-03-25 14:14:09 +11:00
Shannon 1d4b6178e5 Merge branch 'wip-u4-3951' of https://github.com/AndyButland/Umbraco-CMS into AndyButland-wip-u4-3951
Conflicts:
	src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.html
2014-03-25 13:31:21 +11:00
Shannon 3427f596e3 fixes up a few notes. 2014-03-25 13:07:16 +11:00
Shannon c31ea7409f Merge branch 'fix-u4-3839' of https://github.com/lars-erik/Umbraco-CMS into lars-erik-fix-u4-3839 2014-03-25 12:47:26 +11:00
Shannon f88e60bcb5 Fixes: U4-3481 Adding Scripting Files and Partial View Macro File with the same name and 'create macro' selected fails. 2014-03-25 12:16:27 +11:00
Shannon c81919e269 Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-03-25 11:45:57 +11:00
Shannon c936aaa517 Fixes: U4-3845 v7.0.0 keepUserLoggedIn issue 2014-03-25 11:45:38 +11:00
Shandem b8f88e0459 Merge pull request #330 from Jeavon/7.1.0-ImageCropper-JeavonWIP
7.1.0 image cropper - removal of lots of duplicated code, fixes for various param options and some further unit tests
2014-03-25 10:47:09 +11:00
Shannon 1628ac917c Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0 2014-03-25 10:45:14 +11:00
Shannon ab586a49ce Fixes: U4-4508 Save causes content to vanish in IE 2014-03-25 10:44:55 +11:00
Jeavon Leopold ff2ee540e2 Fixing the CacheBusting on GetCropUrl as it was totally random which meant the server cache was creating a new cache file for every request. Now changed it to use item updateDate.ToFileTimeUtc as the cache busting value so it will change only when the item is updated in Umbraco. 2014-03-24 19:27:00 +00:00
Jeavon Leopold b450299d45 GetCropUrl - moved propertyAlias and cropAlias to after width and height so that GetCropUrl(100,100,"myProperty") is possible and renamed useFocalPoint to preferFocalPoint 2014-03-24 18:37:15 +00:00
Jeavon Leopold 0ebe535922 ImageCropDataSet - a little bit of Stylecop 2014-03-24 17:58:12 +00:00
Jeavon Leopold f5f8fe7b42 GetCropUrl - Stylecop and an additional test 2014-03-24 17:51:52 +00:00
Jeavon Leopold f51a66b728 GetCropUrl - further code duplication removal and 2 new unit tests 2014-03-24 16:32:50 +00:00
Sebastiaan Janssen f8a7b453c7 Sync the en and en_us translations 2014-03-24 17:26:04 +01:00
Sebastiaan Janssen 89235f707c Sync the en and en_us translations 2014-03-24 17:25:31 +01:00
Jeavon Leopold 550166c41b Removing HasPropertyAndValueAndCrop method as it's no longer needed 2014-03-24 15:49:04 +00:00
Jeavon Leopold 40be3957f6 GetCropUrl - ensuring that GetCropUrl(width,height) works and also adding the useFocalPoint parameter 2014-03-24 15:44:04 +00:00
Sebastiaan Janssen 6ccce4d914 U4-4515 GenericProperty.ascx.cs references non-existent lblAlias control, causing YSOD of death when editing certain document types
Whoops, missed some references
2014-03-24 16:01:47 +01:00
Sebastiaan Janssen 14ea374b24 Also removing stray semicolons here for U4-4510 nuget targets file creates an invalid path in the property group 2014-03-24 15:44:09 +01:00
Sebastiaan Janssen 4d49268c47 U4-4515 GenericProperty.ascx.cs references non-existent lblAlias control, causing YSOD of death when editing certain document types
Codebehind file somehow got out of sync
2014-03-24 15:16:57 +01:00
Sebastiaan Janssen a569796adb Removes stray semicolons from the nuget targets files 2014-03-24 14:00:12 +01:00
Jeavon Leopold 59de0613f5 GetCropUrl - Removing duplicate code 2014-03-24 11:43:55 +00:00
Sebastiaan Janssen 8391c32886 Fix whitespace 2014-03-24 09:34:48 +01:00
Sebastiaan Janssen bf2efd30e9 U4-4073 Audit Trail is missing from action menu
Removed the icons for now as they are missing and should be new style icons anyway
2014-03-24 09:34:47 +01:00
Shannon 187373132f Completes: U4-4154 convert existing property data from XML to JSON during upgrade v6 - 7 2014-03-24 18:44:18 +11:00
Shannon 79584a9cf9 Fixes thread safety issue with RichTextPreValueController 2014-03-24 16:32:42 +11:00
Shannon 96fa8c7dc9 Publicizes a few things, including the fix for U4-3981 Make Umbraco.Web.WebApi.Filters.UmbracoApplicationAuthorizeAttribute public 2014-03-24 15:41:46 +11:00
Shannon 5e43ddc13c Fixes: U4-4502 Umbraco7.0.4 media picker shows uploaded images minus 1 2014-03-24 13:43:20 +11:00
Shannon 98f76a989f Adds better error handling for the media picker - we were not detecting image types before and were getting loads of server errors. Fixes up some method return calls 2014-03-24 12:38:49 +11:00
Shannon 2e8993adb8 Merge remote-tracking branch 'origin/6.2.0' into 7.1.0
Conflicts:
	build/NuSpecs/build/net40/UmbracoCms.targets
	build/NuSpecs/build/net45/UmbracoCms.targets
	build/NuSpecs/build/net451/UmbracoCms.targets
	build/NuSpecs/tools/Readme.txt
	build/NuSpecs/tools/install.ps1
	src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMember.aspx.cs
2014-03-24 11:31:52 +11:00
Shannon 81600f0f3c Merge branch 'patch-2' of https://github.com/designagencytom/Umbraco-CMS into designagencytom-patch-2
Conflicts:
	src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMember.aspx.cs
2014-03-24 11:18:11 +11:00
Shannon 74ccd79408 Merge branch 'patch-1' of https://github.com/designagencytom/Umbraco-CMS into designagencytom-patch-1 2014-03-24 11:13:07 +11:00
Shandem 3e0a754dc0 Merge pull request #328 from arjanpot/7.1.0
CropUrl should be formatted with InvariantCulture.
2014-03-24 11:04:59 +11:00
Sebastiaan Janssen 006a89e136 U4-4498 Doc & Media Type, Server Error when upgrade, 7.0.4 to 7.1.0 RC via Nuget
Have to copy in the Umbraco and Umbraco_Client folder during NuGet updates as well.
2014-03-23 16:10:58 +01:00
Sebastiaan Janssen 29dbbee173 Imageprocessor config files are no longer required and shouldn't ship with Umbraco 2014-03-23 15:02:54 +01:00
arjanpot cd31637371 CropUrl should be formatted with InvariantCulture. 2014-03-22 11:22:01 +01:00
perploug ab70c98d4c Ensures the config is cleared properly every time 2014-03-20 09:41:30 -07:00
Sebastiaan Janssen 424ff02734 Forgot a few includes, fixed! 2014-03-20 17:29:16 +01:00
Sebastiaan Janssen 80bd8d962b Make sure the App_Plugins folder is there 2014-03-20 16:58:35 +01:00
Sebastiaan Janssen 956364decd v7 NuGet changes also apply to v6 2014-03-20 16:02:24 +01:00
designagencytom 6133e8f8c2 Update loadMemberGroups.cs
Sort the roles alphabetically to make it easier to manage the list when it becomes very large.
2014-03-20 13:02:25 +00:00
Jeavon Leopold b048ae4d36 U4-1752 - Add GetPreValueAsString(id) method to the @Umbraco helper 2014-02-21 10:17:29 +00:00
Lars-Erik Aabech 6eeb9d6af4 Forgot document type on general properties tab 2014-01-07 18:53:47 +01:00
Lars-Erik Aabech cbefabb724 Changed TabsAndPropertyResolver's translation mechanism to use CultureDictionaryFactory. Also added translation to ContentTypeController.GetAllowedChildren. Localization "complete" and working for content editing. 2014-01-07 17:44:01 +01:00
Lars-Erik Aabech f7f6cc64ce More or less fixes content localization. Must do more tests and fix create dialog. Only tested manually on my box. 2014-01-07 16:43:03 +01:00
Lars-Erik Aabech 1408e4f64e DictionaryRepository now excludes translations with missing language. Should've committed a test to prove that TabsAndPropertiesResolver.TranslateTab uncommented fails, but can't find a nice existing fixture, so just debugging to see if it works now. 2014-01-07 16:15:59 +01:00
Lars-Erik Aabech 0a68d2f4ee Language repo now returns null for non-existing ids, making Get_WhenIdDoesntExist_ReturnsNull pass. 2014-01-07 16:03:26 +01:00
Lars-Erik Aabech 11a4a0436d Proves LanguageRepository lines 37-38 to be useless, but probably intended 2014-01-07 15:55:49 +01:00
Lars-Erik Aabech 2583800b2c Proves dictionary repository fails to get when weird 0 languageid dictionary item exists. 2014-01-07 15:53:17 +01:00
205 changed files with 2562 additions and 1551 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
@ECHO OFF
SET release=7.1.0
SET comment=RC
SET release=7.1.1
SET comment=
SET version=%release%
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
@@ -12,6 +12,9 @@ ECHO Installing the Microsoft.Bcl.Build package before anything else, otherwise
SET nuGetFolder=%CD%\..\src\packages\
..\src\.nuget\NuGet.exe install ..\src\Umbraco.Web.UI\packages.config -OutputDirectory %nuGetFolder%
ECHO Removing the belle build folder to make sure everything is clean as a whistle
RD ..\src\Umbraco.Web.UI.Client\build /Q /S
ECHO Performing MSBuild and producing Umbraco binaries zip files
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment%
@@ -30,6 +33,7 @@ echo This file is only here so that the containing folder will be included in th
ECHO Adding Web.config transform files to the NuGet package
ren .\_BuildOutput\WebApp\MacroScripts\Web.config Web.config.transform
ren .\_BuildOutput\WebApp\Views\Web.config Web.config.transform
ren .\_BuildOutput\WebApp\Xslt\Web.config Web.config.transform
ECHO Packing the NuGet release files
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
+11 -1
View File
@@ -310,7 +310,12 @@
</Target>
<Target Name="SetVersionNumber" Condition="'$(BUILD_RELEASE)'!=''">
<!-- Match & replace 3 and 4 digit version numbers and -beta (if it's there) -->
<PropertyGroup>
<NewVersion>$(BUILD_RELEASE)</NewVersion>
<NewVersion Condition="'$(BUILD_COMMENT)'!=''">$(BUILD_RELEASE)-$(BUILD_COMMENT)</NewVersion>
</PropertyGroup>
<!-- Match & replace 3 and 4 digit version numbers and -beta (if it's there) -->
<FileUpdate
Files="..\src\Umbraco.Core\Configuration\UmbracoVersion.cs"
Regex="(\d+)\.(\d+)\.(\d+)(.(\d+))?"
@@ -319,5 +324,10 @@
<FileUpdate Files="..\src\Umbraco.Core\Configuration\UmbracoVersion.cs"
Regex="CurrentComment { get { return &quot;([a-zA-Z]+)?&quot;"
ReplacementText="CurrentComment { get { return &quot;$(BUILD_COMMENT)&quot;"/>
<XmlPoke XmlInputPath=".\NuSpecs\build\UmbracoCms.targets"
Namespaces="&lt;Namespace Prefix='x' Uri='http://schemas.microsoft.com/developer/msbuild/2003' /&gt;"
Query="//x:UmbracoVersion"
Value="$(NewVersion)" />
</Target>
</Project>
+5 -5
View File
@@ -26,12 +26,12 @@
<dependency id="SharpZipLib" version="[0.86.0, 1.0.0)" />
<dependency id="MySql.Data" version="[6.6.5]" />
<dependency id="xmlrpcnet" version="[2.5.0, 3.0.0)" />
<dependency id="ClientDependency" version="[1.7.0, 2.0.0)" />
<dependency id="ClientDependency-Mvc" version="[1.7.0, 2.0.0)" />
<dependency id="ClientDependency" version="[1.7.1.2, 2.0.0)" />
<dependency id="ClientDependency-Mvc" version="[1.7.0.4, 2.0.0)" />
<dependency id="AutoMapper" version="[3.0.0, 4.0.0)" />
<dependency id="Newtonsoft.Json" version="[4.5.11, 5.0.0)" />
<dependency id="ImageProcessor" version="[1.8.6.1, 2.0.0)" />
<dependency id="ImageProcessor.Web" version="[3.2.0, 4.0.0)" />
<dependency id="Newtonsoft.Json" version="[6.0.2, 7.0.0)" />
<dependency id="ImageProcessor" version="[1.8.7, 2.0.0)" />
<dependency id="ImageProcessor.Web" version="[3.2.1, 4.0.0)" />
</dependencies>
</metadata>
<files>
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
</Project>
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UmbracoVersion>7.1.1</UmbracoVersion>
</PropertyGroup>
<Target Name="CopyUmbracoFilesToWebRoot" BeforeTargets="AfterBuild">
<PropertyGroup>
<UmbracoFilesFolder>..\packages\UmbracoCms.$(UmbracoVersion)\UmbracoFiles\</UmbracoFilesFolder>
</PropertyGroup>
<ItemGroup>
<UmbracoFiles Include="$(UmbracoFilesFolder)**\*" />
</ItemGroup>
<Copy SourceFiles="%(UmbracoFiles.FullPath)" DestinationFiles="%(RecursiveDir)%(Filename)%(Extension)" Condition="!Exists('%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="AddUmbracoFilesToOutput">
<!-- With help from: http://blog.samstephens.co.nz/2010-10-18/msbuild-including-extra-files-multiple-builds/ -->
<ItemGroup>
<CustomFilesToInclude Include=".\App_Browsers\**\*">
<Dir>App_Browsers</Dir>
</CustomFilesToInclude>
<CustomFilesToInclude Include=".\App_Code\**\*">
<Dir>App_Code</Dir>
</CustomFilesToInclude>
<CustomFilesToInclude Include=".\App_Plugins\**\*">
<Dir>App_Plugins</Dir>
</CustomFilesToInclude>
<CustomFilesToInclude Include=".\bin\amd64\**\*">
<Dir>bin\amd64</Dir>
</CustomFilesToInclude>
<CustomFilesToInclude Include=".\bin\x86\**\*">
<Dir>bin\x86</Dir>
</CustomFilesToInclude>
<CustomFilesToInclude Include=".\Config\Splashes\**\*">
<Dir>Config\Splashes</Dir>
</CustomFilesToInclude>
<CustomFilesToInclude Include=".\umbraco\**\*">
<Dir>umbraco</Dir>
</CustomFilesToInclude>
<CustomFilesToInclude Include=".\umbraco_client\**\*">
<Dir>umbraco_client</Dir>
</CustomFilesToInclude>
<CustomFilesToInclude Include=".\Global.asax">
<Dir>.</Dir>
</CustomFilesToInclude>
<FilesForPackagingFromProject Include="@(CustomFilesToInclude)">
<DestinationRelativePath>%(CustomFilesToInclude.Dir)\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyUmbracoFilesToWebRoot" BeforeTargets="AfterBuild">
<ItemGroup>
<AppBrowsersFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\App_Browsers\**\*" />
<AppPluginsFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\App_Plugins\**\*" />
<SplashesFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\Config\Splashes\**\*;" />
<SqlCeBinFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\bin\**\*;" />
<UmbracoFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\umbraco\**\*;" />
<UmbracoClientFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\umbraco_client\**\*;" />
</ItemGroup>
<Copy SourceFiles="%(AppBrowsersFiles.FullPath)"
DestinationFiles="App_Browsers\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('App_Browsers\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(AppPluginsFiles.FullPath)"
DestinationFiles="App_Plugins\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('App_Plugins\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(SplashesFiles.FullPath)"
DestinationFiles="Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(SqlCeBinFiles.FullPath)"
DestinationFiles="bin\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('bin\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(UmbracoFiles.FullPath)"
DestinationFiles="umbraco\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('umbraco\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(UmbracoClientFiles.FullPath)"
DestinationFiles="umbraco_client\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('umbraco_client\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="AddUmbracoFilesToOutput">
<ItemGroup>
<AppBrowsersFiles Include=".\App_Browsers\**\*" />
<AppCodeFiles Include=".\App_Code\**\*" />
<AppPluginsFiles Include=".\App_Plugins\**\*" />
<GlobalAsaxFile Include=".\Global.asax;" />
<SqlCeAmd64Files Include=".\bin\amd64\**\*" />
<SqlCeX86Files Include=".\bin\x86\**\*" />
<SplashesFiles Include=".\Config\Splashes\**\*;" />
<UmbracoFiles Include=".\umbraco\**\*;" />
<UmbracoClientFiles Include=".\umbraco_client\**\*;" />
<FilesForPackagingFromProject Include="%(AppBrowsersFiles.Identity)">
<DestinationRelativePath>App_Browsers\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppCodeFiles.Identity)">
<DestinationRelativePath>App_Code\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppPluginsFiles.Identity)">
<DestinationRelativePath>App_Plugins\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(GlobalAsaxFile.Identity)">
<DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SqlCeAmd64Files.Identity)">
<DestinationRelativePath>bin\amd64\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SqlCeX86Files.Identity)">
<DestinationRelativePath>bin\x86\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SplashesFiles.Identity)">
<DestinationRelativePath>Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoFiles.Identity)">
<DestinationRelativePath>umbraco\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoClientFiles.Identity)">
<DestinationRelativePath>umbraco_client\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
</Project>
@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyUmbracoFilesToWebRoot" BeforeTargets="AfterBuild">
<ItemGroup>
<AppBrowsersFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\App_Browsers\**\*" />
<AppPluginsFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\App_Plugins\**\*" />
<SplashesFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\Config\Splashes\**\*;" />
<SqlCeBinFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\bin\**\*;" />
<UmbracoFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\umbraco\**\*;" />
<UmbracoClientFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\umbraco_client\**\*;" />
</ItemGroup>
<Copy SourceFiles="%(AppBrowsersFiles.FullPath)"
DestinationFiles="App_Browsers\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('App_Browsers\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(AppPluginsFiles.FullPath)"
DestinationFiles="App_Plugins\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('App_Plugins\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(SplashesFiles.FullPath)"
DestinationFiles="Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(SqlCeBinFiles.FullPath)"
DestinationFiles="bin\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('bin\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(UmbracoFiles.FullPath)"
DestinationFiles="umbraco\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('umbraco\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(UmbracoClientFiles.FullPath)"
DestinationFiles="umbraco_client\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('umbraco_client\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="AddUmbracoFilesToOutput">
<ItemGroup>
<AppBrowsersFiles Include=".\App_Browsers\**\*" />
<AppCodeFiles Include=".\App_Code\**\*" />
<AppPluginsFiles Include=".\App_Plugins\**\*" />
<GlobalAsaxFile Include=".\Global.asax;" />
<SqlCeAmd64Files Include=".\bin\amd64\**\*" />
<SqlCeX86Files Include=".\bin\x86\**\*" />
<SplashesFiles Include=".\Config\Splashes\**\*;" />
<UmbracoFiles Include=".\umbraco\**\*;" />
<UmbracoClientFiles Include=".\umbraco_client\**\*;" />
<FilesForPackagingFromProject Include="%(AppBrowsersFiles.Identity)">
<DestinationRelativePath>App_Browsers\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppCodeFiles.Identity)">
<DestinationRelativePath>App_Code\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppPluginsFiles.Identity)">
<DestinationRelativePath>App_Plugins\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(GlobalAsaxFile.Identity)">
<DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SqlCeAmd64Files.Identity)">
<DestinationRelativePath>bin\amd64\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SqlCeX86Files.Identity)">
<DestinationRelativePath>bin\x86\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SplashesFiles.Identity)">
<DestinationRelativePath>Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoFiles.Identity)">
<DestinationRelativePath>umbraco\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoClientFiles.Identity)">
<DestinationRelativePath>umbraco_client\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
</Project>
@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyUmbracoFilesToWebRoot" BeforeTargets="AfterBuild">
<ItemGroup>
<AppBrowsersFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\App_Browsers\**\*" />
<AppPluginsFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\App_Plugins\**\*" />
<SplashesFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\Config\Splashes\**\*;" />
<SqlCeBinFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\bin\**\*;" />
<UmbracoFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\umbraco\**\*;" />
<UmbracoClientFiles Include="..\packages\UmbracoCms.7.1.0-RC\UmbracoFiles\umbraco_client\**\*;" />
</ItemGroup>
<Copy SourceFiles="%(AppBrowsersFiles.FullPath)"
DestinationFiles="App_Browsers\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('App_Browsers\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(AppPluginsFiles.FullPath)"
DestinationFiles="App_Plugins\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('App_Plugins\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(SplashesFiles.FullPath)"
DestinationFiles="Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(SqlCeBinFiles.FullPath)"
DestinationFiles="bin\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('bin\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(UmbracoFiles.FullPath)"
DestinationFiles="umbraco\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('umbraco\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="%(UmbracoClientFiles.FullPath)"
DestinationFiles="umbraco_client\%(RecursiveDir)%(Filename)%(Extension)"
Condition="!Exists('umbraco_client\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="AddUmbracoFilesToOutput">
<ItemGroup>
<AppBrowsersFiles Include=".\App_Browsers\**\*" />
<AppCodeFiles Include=".\App_Code\**\*" />
<AppPluginsFiles Include=".\App_Plugins\**\*" />
<GlobalAsaxFile Include=".\Global.asax;" />
<SqlCeAmd64Files Include=".\bin\amd64\**\*" />
<SqlCeX86Files Include=".\bin\x86\**\*" />
<SplashesFiles Include=".\Config\Splashes\**\*;" />
<UmbracoFiles Include=".\umbraco\**\*;" />
<UmbracoClientFiles Include=".\umbraco_client\**\*;" />
<FilesForPackagingFromProject Include="%(AppBrowsersFiles.Identity)">
<DestinationRelativePath>App_Browsers\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppCodeFiles.Identity)">
<DestinationRelativePath>App_Code\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppPluginsFiles.Identity)">
<DestinationRelativePath>App_Plugins\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(GlobalAsaxFile.Identity)">
<DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SqlCeAmd64Files.Identity)">
<DestinationRelativePath>bin\amd64\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SqlCeX86Files.Identity)">
<DestinationRelativePath>bin\x86\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(SplashesFiles.Identity)">
<DestinationRelativePath>Config\Splashes\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoFiles.Identity)">
<DestinationRelativePath>umbraco\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoClientFiles.Identity)">
<DestinationRelativePath>umbraco_client\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
+7 -2
View File
@@ -2,10 +2,15 @@ A note about running Umbraco from Visual Studio.
When upgrading your website using NuGet you should answer "No" to the questions to overwrite the Web.config
file (and config files in the config folder).
We will overwrite Web.config anyway but we keep a backup in the App_Data\ConfigBackup folder. There you'll
We will overwrite Web.config anyway but we keep a backup in the App_Data\NuGetBackup folder. There you'll
find a folder with the current date and time in which the backup has been placed. Make sure to merge the
new file with the old backup files before you proceed.
Only the web.config will be overwritten by default to ensure that it has the necessary settings from the current release.
The web.config will be overwritten by default to ensure that it has the necessary settings from the current release.
We've also overwritten all the files in the Umbraco and Umbraco_Client folder, these have also been backed up in
App_Data\NuGetBackup. We didn't overwrite the UI.xml file nor did we remove any files or folders that you or a package
might have added. Only the existing files were overwritten. If you customized anything then make sure to do a compare
and merge with the NuGetBackup folder.
The config files found in the config folder will usually not be changed for patch releases, so they can usually be skipped,
but the web.config will have to have its previous "umbracoConfigurationStatus"-appsetting and "umbracoDbDSN" connection string
+21 -4
View File
@@ -1,8 +1,8 @@
param($rootPath, $toolsPath, $package, $project)
if ($project) {
$dateTime = Get-Date -Format yyyyMMdd-HHmmss
$backupPath = Join-Path (Split-Path $project.FullName -Parent) "\App_Data\ConfigBackup\$dateTime"
if ($project) {
$dateTime = Get-Date -Format yyyyMMdd-HHmmss
$backupPath = Join-Path (Split-Path $project.FullName -Parent) "\App_Data\NuGetBackup\$dateTime"
# Create backup folder if it doesn't exist yet
New-Item -ItemType Directory -Force -Path $backupPath
@@ -15,7 +15,24 @@ if ($project) {
# Copy Web.config from package to project folder
$umbracoFilesPath = Join-Path $rootPath "UmbracoFiles\Web.config"
Copy-Item $umbracoFilesPath $projectDestinationPath -Force
# Copy umbraco and umbraco_files from package to project folder
# This is only done when these folders already exist because we
# only want to do this for upgrades
$umbracoFolder = Join-Path $projectDestinationPath "Umbraco\"
if(Test-Path $umbracoFolder) {
$umbracoFolderSource = Join-Path $rootPath "UmbracoFiles\Umbraco"
Copy-Item $umbracoFolder $backupPath -Force
robocopy $umbracoFolderSource $umbracoFolder /e /xf UI.xml
}
$umbracoClientFolder = Join-Path $projectDestinationPath "Umbraco_Client"
if(Test-Path $umbracoClientFolder) {
$umbracoClientFolderSource = Join-Path $rootPath "UmbracoFiles\Umbraco_Client"
Copy-Item $umbracoClientFolder $backupPath -Force
robocopy $umbracoFolderSource $umbracoClientFolder /e
}
# Open readme.txt file
$DTE.ItemOperations.OpenFile($toolsPath + '\Readme.txt')
}
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("7.1.0");
private static readonly Version Version = new Version("7.1.1");
/// <summary>
/// Gets the current version of Umbraco.
@@ -23,7 +23,7 @@ namespace Umbraco.Core.Configuration
/// Gets the version comment (like beta or RC).
/// </summary>
/// <value>The version comment.</value>
public static string CurrentComment { get { return "RC"; } }
public static string CurrentComment { get { return ""; } }
// Get the version of the umbraco.dll by looking at a class in that dll
// Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx
+14 -2
View File
@@ -5,10 +5,17 @@
/// </summary>
public class PreValue
{
public PreValue(int id, string value, int sortOrder)
{
Id = id;
Value = value;
SortOrder = sortOrder;
}
public PreValue(int id, string value)
{
Value = value;
Id = id;
Id = id;
Value = value;
}
public PreValue(string value)
@@ -25,5 +32,10 @@
/// The database id for the pre-value field value
/// </summary>
public int Id { get; private set; }
/// <summary>
/// The sort order stored for the pre-value field value
/// </summary>
public int SortOrder { get; private set; }
}
}
@@ -0,0 +1,43 @@
using System.Collections.Concurrent;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Rdbms;
namespace Umbraco.Core.Persistence.Mappers
{
/// <summary>
/// Represents a <see cref="Tag"/> to DTO mapper used to translate the properties of the public api
/// implementation to that of the database's DTO as sql: [tableName].[columnName].
/// </summary>
[MapperFor(typeof(Tag))]
[MapperFor(typeof(ITag))]
public sealed class TagMapper : BaseMapper
{
private static readonly ConcurrentDictionary<string, DtoMapModel> PropertyInfoCacheInstance = new ConcurrentDictionary<string, DtoMapModel>();
//NOTE: its an internal class but the ctor must be public since we're using Activator.CreateInstance to create it
// otherwise that would fail because there is no public constructor.
public TagMapper()
{
BuildMap();
}
#region Overrides of BaseMapper
internal override ConcurrentDictionary<string, DtoMapModel> PropertyInfoCache
{
get { return PropertyInfoCacheInstance; }
}
internal override void BuildMap()
{
if (PropertyInfoCache.IsEmpty)
{
CacheMap<Tag, TagDto>(src => src.Id, dto => dto.Id);
CacheMap<Tag, TagDto>(src => src.Text, dto => dto.Tag);
CacheMap<Tag, TagDto>(src => src.Group, dto => dto.Group);
}
}
#endregion
}
}
@@ -7,6 +7,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Xml;
using System.Xml.Linq;
using Newtonsoft.Json;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
@@ -32,48 +33,71 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
var propertyData =
database.Fetch<PropertyDataDto>(
"WHERE propertyTypeId in (SELECT id from cmsPropertyType where dataTypeID IN (@dataTypeIds))", new { dataTypeIds = dataTypeIds });
if (!propertyData.Any()) return string.Empty;
var nodesIdsWithProperty = propertyData.Select(x => x.NodeId).Distinct();
var cmsContentXmlEntries = database.Fetch<ContentXmlDto>(
"WHERE nodeId in (@nodeIds)", new { nodeIds = nodesIdsWithProperty });
var propertyTypeIds = propertyData.Select(x => x.PropertyTypeId).Distinct();
var propertyTypes = database.Fetch<PropertyTypeDto>(
"WHERE id in (@propertyTypeIds)", new { propertyTypeIds = propertyTypeIds });
foreach (var data in propertyData)
{
if (!string.IsNullOrEmpty(data.Text))
if (string.IsNullOrEmpty(data.Text) == false)
{
//var cs = ApplicationContext.Current.Services.ContentService;
//fetch the current data (that's in xml format)
var xml = new XmlDocument();
xml.LoadXml(data.Text);
if (xml != null)
var links = new List<ExpandoObject>();
//loop all the stored links
foreach (XmlNode node in xml.DocumentElement.ChildNodes)
{
var links = new List<ExpandoObject>();
var title = node.Attributes["title"].Value;
var type = node.Attributes["type"].Value;
var newwindow = node.Attributes["newwindow"].Value.Equals("1") ? true : false;
var lnk = node.Attributes["link"].Value;
//loop all the stored links
foreach (XmlNode node in xml.DocumentElement.ChildNodes)
{
var title = node.Attributes["title"].Value;
var type = node.Attributes["type"].Value;
var newwindow = node.Attributes["newwindow"].Value.Equals("1") ? true : false;
var lnk = node.Attributes["link"].Value;
//create the links in the format the new prop editor expects it to be
var link = new ExpandoObject() as IDictionary<string, Object>;
link.Add("title", title);
link.Add("caption", title);
link.Add("link", lnk);
link.Add("newWindow", newwindow);
link.Add("type", type.Equals("internal") ? "internal" : "external");
link.Add("internal", type.Equals("internal") ? lnk : null);
//create the links in the format the new prop editor expects it to be
var link = new ExpandoObject() as IDictionary<string, Object>;
link.Add("title", title);
link.Add("caption", title);
link.Add("link", lnk);
link.Add("newWindow", newwindow);
link.Add("type", type.Equals("internal") ? "internal" : "external");
link.Add("internal", type.Equals("internal") ? lnk : null);
link.Add("edit", false);
link.Add("isInternal", type.Equals("internal"));
link.Add("edit", false);
link.Add("isInternal", type.Equals("internal"));
links.Add((ExpandoObject)link);
}
//store the serialized data
data.Text = JsonConvert.SerializeObject(links);
database.Update(data);
links.Add((ExpandoObject)link);
}
//store the serialized data
data.Text = JsonConvert.SerializeObject(links);
database.Update(data);
//now we need to update the cmsContentXml table
var propertyType = propertyTypes.SingleOrDefault(x => x.Id == data.PropertyTypeId);
if (propertyType != null)
{
var xmlItem = cmsContentXmlEntries.SingleOrDefault(x => x.NodeId == data.NodeId);
if (xmlItem != null)
{
var x = XElement.Parse(xmlItem.Xml);
var prop = x.Element(propertyType.Alias);
if (prop != null)
{
prop.ReplaceAll(new XCData(data.Text));
database.Update(xmlItem);
}
}
}
}
}
}
@@ -433,7 +433,7 @@ namespace Umbraco.Core.Persistence.Repositories
}
else
{
//In order to update the ContentVersion we need to retreive its primary key id
//In order to update the ContentVersion we need to retrieve its primary key id
var contentVerDto = Database.SingleOrDefault<ContentVersionDto>("WHERE VersionId = @Version", new { Version = entity.Version });
contentVersionDto.Id = contentVerDto.Id;
@@ -638,4 +638,4 @@ namespace Umbraco.Core.Persistence.Repositories
return currentName;
}
}
}
}
@@ -50,6 +50,8 @@ namespace Umbraco.Core.Persistence.Repositories
foreach (var textDto in dto.LanguageTextDtos)
{
var language = _languageRepository.Get(textDto.LanguageId);
if (language == null)
continue;
var translationFactory = new DictionaryTranslationFactory(dto.UniqueId, language);
list.Add(translationFactory.BuildEntity(textDto));
}
@@ -33,7 +33,7 @@ namespace Umbraco.Core.Persistence.Repositories
var sql = GetBaseQuery(false);
sql.Where(GetBaseWhereClause(), new { Id = id });
var languageDto = Database.First<LanguageDto>(sql);
var languageDto = Database.FirstOrDefault<LanguageDto>(sql);
if (languageDto == null)
return null;
@@ -299,7 +299,7 @@ namespace Umbraco.Core.Persistence.Repositories
Database.Update(newContentDto);
}
//In order to update the ContentVersion we need to retreive its primary key id
//In order to update the ContentVersion we need to retrieve its primary key id
var contentVerDto = Database.SingleOrDefault<ContentVersionDto>("WHERE VersionId = @Version", new { Version = entity.Version });
dto.Id = contentVerDto.Id;
//Updates the current version - cmsContentVersion
@@ -403,4 +403,4 @@ namespace Umbraco.Core.Persistence.Repositories
return currentName;
}
}
}
}
@@ -310,7 +310,7 @@ namespace Umbraco.Core.Persistence.Repositories
Database.Update(newContentDto);
}
//In order to update the ContentVersion we need to retreive its primary key id
//In order to update the ContentVersion we need to retrieve its primary key id
var contentVerDto = Database.SingleOrDefault<ContentVersionDto>("WHERE VersionId = @Version", new { Version = entity.Version });
dto.ContentVersionDto.Id = contentVerDto.Id;
//Updates the current version - cmsContentVersion
@@ -646,4 +646,4 @@ namespace Umbraco.Core.Persistence.Repositories
return entities;
}
}
}
}
@@ -31,6 +31,10 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
var sourceString = source.ToString();
if (string.IsNullOrWhiteSpace(sourceString)) return Enumerable.Empty<string>();
//SD: I have no idea why this logic is here, I'm pretty sure we've never saved the multiple txt string
// as xml in the database, it's always been new line delimited. Will ask Stephen about this.
// In the meantime, we'll do this xml check, see if it parses and if not just continue with
// splitting by newline
var values = new List<string>();
var pos = sourceString.IndexOf("<value>", StringComparison.Ordinal);
while (pos >= 0)
@@ -41,6 +45,13 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
values.Add(value);
pos = sourceString.IndexOf("<value>", pos, StringComparison.Ordinal);
}
// Fall back on normal behaviour
if (values.Any() == false)
{
return sourceString.Split(Environment.NewLine.ToCharArray());
}
return values.ToArray();
}
+1 -1
View File
@@ -138,7 +138,7 @@ namespace Umbraco.Core.Services
using (var uow = _uowProvider.GetUnitOfWork())
{
var dtos = uow.Database.Fetch<DataTypePreValueDto>("WHERE datatypeNodeId = @Id", new { Id = id });
var list = dtos.Select(x => new Tuple<PreValue, string, int>(new PreValue(x.Id, x.Value), x.Alias, x.SortOrder)).ToList();
var list = dtos.Select(x => new Tuple<PreValue, string, int>(new PreValue(x.Id, x.Value, x.SortOrder), x.Alias, x.SortOrder)).ToList();
return PreValueConverter.ConvertToPreValuesCollection(list);
}
+2 -2
View File
@@ -193,7 +193,7 @@ namespace Umbraco.Core.Services
/// <summary>
/// Gets an <see cref="IMedia"/> object from the path stored in the 'umbracoFile' property.
/// </summary>
/// <param name="mediaPath">Path of the media item to retreive (for example: /media/1024/koala_403x328.jpg)</param>
/// <param name="mediaPath">Path of the media item to retrieve (for example: /media/1024/koala_403x328.jpg)</param>
/// <returns><see cref="IMedia"/></returns>
IMedia GetMediaByPath(string mediaPath);
@@ -272,4 +272,4 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IMedia"/></returns>
IMedia CreateMediaWithIdentity(string name, int parentId, string mediaTypeAlias, int userId = 0);
}
}
}
@@ -14,9 +14,13 @@ namespace Umbraco.Core.Services
IEnumerable<T> GetMembersInRole(string roleName);
IEnumerable<T> FindMembersInRole(string roleName, string usernameToMatch, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith);
bool DeleteRole(string roleName, bool throwIfBeingUsed);
void AssignRole(string username, string roleName);
void AssignRoles(string[] usernames, string[] roleNames);
void DissociateRole(string username, string roleName);
void DissociateRoles(string[] usernames, string[] roleNames);
void AssignRole(int memberId, string roleName);
void AssignRoles(int[] memberIds, string[] roleNames);
void DissociateRole(int memberId, string roleName);
void DissociateRoles(int[] memberIds, string[] roleNames);
}
}
@@ -63,6 +63,21 @@ namespace Umbraco.Core.Services
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
IEnumerable<IRelation> GetByParentId(int id);
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their parent entity
/// </summary>
/// <param name="parent">Parent Entity to retrieve relations for</param>
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent);
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their parent entity
/// </summary>
/// <param name="parent">Parent Entity to retrieve relations for</param>
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent, string relationTypeAlias);
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their child Id
/// </summary>
@@ -70,6 +85,21 @@ namespace Umbraco.Core.Services
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
IEnumerable<IRelation> GetByChildId(int id);
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their child Entity
/// </summary>
/// <param name="child">Child Entity to retrieve relations for</param>
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
IEnumerable<IRelation> GetByChild(IUmbracoEntity child);
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their child Entity
/// </summary>
/// <param name="child">Child Entity to retrieve relations for</param>
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
IEnumerable<IRelation> GetByChild(IUmbracoEntity child, string relationTypeAlias);
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their child or parent Id.
/// Using this method will get you all relations regards of it being a child or parent relation.
@@ -190,6 +220,23 @@ namespace Umbraco.Core.Services
/// <returns>Returns <c>True</c> if any relations exists with the given Ids, otherwise <c>False</c></returns>
bool AreRelated(int parentId, int childId);
/// <summary>
/// Checks whether two items are related
/// </summary>
/// <param name="parent">Parent entity</param>
/// <param name="child">Child entity</param>
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child);
/// <summary>
/// Checks whether two items are related
/// </summary>
/// <param name="parent">Parent entity</param>
/// <param name="child">Child entity</param>
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
/// <summary>
/// Saves a <see cref="Relation"/>
/// </summary>
+2 -2
View File
@@ -451,7 +451,7 @@ namespace Umbraco.Core.Services
/// <summary>
/// Gets an <see cref="IMedia"/> object from the path stored in the 'umbracoFile' property.
/// </summary>
/// <param name="mediaPath">Path of the media item to retreive (for example: /media/1024/koala_403x328.jpg)</param>
/// <param name="mediaPath">Path of the media item to retrieve (for example: /media/1024/koala_403x328.jpg)</param>
/// <returns><see cref="IMedia"/></returns>
public IMedia GetMediaByPath(string mediaPath)
{
@@ -1109,4 +1109,4 @@ namespace Umbraco.Core.Services
public static event TypedEventHandler<IMediaService, RecycleBinEventArgs> EmptiedRecycleBin;
#endregion
}
}
}
+32 -10
View File
@@ -109,18 +109,21 @@ namespace Umbraco.Core.Services
{
provider.ChangePassword(member.Username, "", password);
}
else
{
throw new NotSupportedException("When using a non-Umbraco membership provider you must change the member password by using the MembershipProvider.ChangePassword method");
}
//go re-fetch the member and update the properties that may have changed
var result = GetByUsername(member.Username);
if (result != null)
{
//should never be null but it could have been deleted by another thread.
member.RawPasswordValue = result.RawPasswordValue;
member.LastPasswordChangeDate = result.LastPasswordChangeDate;
member.UpdateDate = member.UpdateDate;
}
throw new NotSupportedException("When using a non-Umbraco membership provider you must change the member password by using the MembershipProvider.ChangePassword method");
//should never be null but it could have been deleted by another thread.
if (result == null)
return;
member.RawPasswordValue = result.RawPasswordValue;
member.LastPasswordChangeDate = result.LastPasswordChangeDate;
member.UpdateDate = member.UpdateDate;
}
/// <summary>
@@ -959,6 +962,10 @@ namespace Umbraco.Core.Services
}
}
}
public void AssignRole(string username, string roleName)
{
AssignRoles(new[] { username }, new[] { roleName });
}
public void AssignRoles(string[] usernames, string[] roleNames)
{
@@ -969,6 +976,11 @@ namespace Umbraco.Core.Services
}
}
public void DissociateRole(string username, string roleName)
{
DissociateRoles(new[] { username }, new[] { roleName });
}
public void DissociateRoles(string[] usernames, string[] roleNames)
{
var uow = _uowProvider.GetUnitOfWork();
@@ -977,6 +989,11 @@ namespace Umbraco.Core.Services
repository.DissociateRoles(usernames, roleNames);
}
}
public void AssignRole(int memberId, string roleName)
{
AssignRoles(new[] { memberId }, new[] { roleName });
}
public void AssignRoles(int[] memberIds, string[] roleNames)
{
@@ -987,6 +1004,11 @@ namespace Umbraco.Core.Services
}
}
public void DissociateRole(int memberId, string roleName)
{
DissociateRoles(new[] { memberId }, new[] { roleName });
}
public void DissociateRoles(int[] memberIds, string[] roleNames)
{
var uow = _uowProvider.GetUnitOfWork();
@@ -1023,7 +1045,7 @@ namespace Umbraco.Core.Services
}
/// <summary>
/// Rebuilds all xml content in the cmsContentXml table for all media
/// Rebuilds all xml content in the cmsContentXml table for all members
/// </summary>
/// <param name="memberTypeIds">
/// Only rebuild the xml structures for the content type ids passed in, if none then rebuilds the structures
+66 -1
View File
@@ -128,6 +128,27 @@ namespace Umbraco.Core.Services
}
}
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their parent entity
/// </summary>
/// <param name="parent">Parent Entity to retrieve relations for</param>
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
public IEnumerable<IRelation> GetByParent(IUmbracoEntity parent)
{
return GetByParentId(parent.Id);
}
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their parent entity
/// </summary>
/// <param name="parent">Parent Entity to retrieve relations for</param>
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
public IEnumerable<IRelation> GetByParent(IUmbracoEntity parent, string relationTypeAlias)
{
return GetByParent(parent).Where(relation => relation.RelationType.Alias == relationTypeAlias);
}
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their child Id
/// </summary>
@@ -142,6 +163,27 @@ namespace Umbraco.Core.Services
}
}
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their child Entity
/// </summary>
/// <param name="child">Child Entity to retrieve relations for</param>
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
public IEnumerable<IRelation> GetByChild(IUmbracoEntity child)
{
return GetByChildId(child.Id);
}
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their child Entity
/// </summary>
/// <param name="child">Child Entity to retrieve relations for</param>
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
public IEnumerable<IRelation> GetByChild(IUmbracoEntity child, string relationTypeAlias)
{
return GetByChild(child).Where(relation => relation.RelationType.Alias == relationTypeAlias);
}
/// <summary>
/// Gets a list of <see cref="Relation"/> objects by their child or parent Id.
/// Using this method will get you all relations regards of it being a child or parent relation.
@@ -422,7 +464,7 @@ namespace Umbraco.Core.Services
public bool AreRelated(int parentId, int childId, string relationTypeAlias)
{
var relType = GetRelationTypeByAlias(relationTypeAlias);
if(relType == null)
if (relType == null)
return false;
return AreRelated(parentId, childId, relType);
@@ -445,6 +487,29 @@ namespace Umbraco.Core.Services
}
}
/// <summary>
/// Checks whether two items are related
/// </summary>
/// <param name="parent">Parent entity</param>
/// <param name="child">Child entity</param>
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
public bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child)
{
return AreRelated(parent.Id, child.Id);
}
/// <summary>
/// Checks whether two items are related
/// </summary>
/// <param name="parent">Parent entity</param>
/// <param name="child">Child entity</param>
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
public bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias)
{
return AreRelated(parent.Id, child.Id, relationTypeAlias);
}
/// <summary>
/// Saves a <see cref="Relation"/>
+1 -1
View File
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Sync
/// <summary>
/// An interface exposing a server address to use for server syncing
/// </summary>
internal interface IServerAddress
public interface IServerAddress
{
string ServerAddress { get; }
}
+1 -1
View File
@@ -7,7 +7,7 @@ namespace Umbraco.Core.Sync
/// <summary>
/// Defines a server messenger for server sync and distrubuted cache
/// </summary>
internal interface IServerMessenger
public interface IServerMessenger
{
/// <summary>
+1 -1
View File
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Sync
/// <summary>
/// An interface to expose a list of server registrations for server syncing
/// </summary>
internal interface IServerRegistrar
public interface IServerRegistrar
{
IEnumerable<IServerAddress> Registrations { get; }
}
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Sync
/// <summary>
/// A resolver to return the currently registered IServerMessenger object
/// </summary>
internal class ServerMessengerResolver : SingleObjectResolverBase<ServerMessengerResolver, IServerMessenger>
public sealed class ServerMessengerResolver : SingleObjectResolverBase<ServerMessengerResolver, IServerMessenger>
{
internal ServerMessengerResolver(IServerMessenger factory)
: base(factory)
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Sync
/// <summary>
/// The resolver to return the currently registered IServerRegistrar object
/// </summary>
internal class ServerRegistrarResolver : SingleObjectResolverBase<ServerRegistrarResolver, IServerRegistrar>
public sealed class ServerRegistrarResolver : SingleObjectResolverBase<ServerRegistrarResolver, IServerRegistrar>
{
internal ServerRegistrarResolver(IServerRegistrar factory)
+2 -1
View File
@@ -64,7 +64,7 @@
</Reference>
<Reference Include="Newtonsoft.Json">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
@@ -364,6 +364,7 @@
<Compile Include="Persistence\EntityNotFoundException.cs" />
<Compile Include="Persistence\Factories\MemberGroupFactory.cs" />
<Compile Include="Persistence\Mappers\MemberGroupMapper.cs" />
<Compile Include="Persistence\Mappers\TagMapper.cs" />
<Compile Include="Persistence\Migrations\DataLossException.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenOneZero\AssignMissingPrimaryForMySqlKeys.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSixTwoZero\AssignMissingPrimaryForMySqlKeys.cs" />
+1 -1
View File
@@ -10,7 +10,7 @@
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
<package id="MiniProfiler" version="2.1.0" targetFramework="net40" />
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.2" targetFramework="net45" />
<package id="MySql.Data" version="6.6.5" targetFramework="net40" />
<package id="SqlServerCE" version="4.0.0.0" targetFramework="net40" />
</packages>
+8
View File
@@ -120,6 +120,14 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
@@ -4,12 +4,15 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using Moq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Core.Dictionary;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using Umbraco.Tests.TestHelpers;
using Umbraco.Tests.TestHelpers.Entities;
using Umbraco.Web.Dictionary;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Mapping;
using umbraco;
@@ -21,6 +24,14 @@ namespace Umbraco.Tests.Models.Mapping
[TestFixture]
public class ContentWebModelMappingTests : BaseDatabaseFactoryTest
{
protected override void FreezeResolution()
{
CultureDictionaryFactoryResolver.Current = new CultureDictionaryFactoryResolver(
Mock.Of<ICultureDictionaryFactory>());
base.FreezeResolution();
}
[PropertyEditor("Test.Test", "Test", "~/Test.html")]
public class TestPropertyEditor : PropertyEditor
{
@@ -67,6 +67,38 @@ namespace Umbraco.Tests.Persistence.Repositories
}
[Test]
public void Get_Ignores_Item_WhenLanguageMissing()
{
// Arrange
var language = ServiceContext.LocalizationService.GetLanguageByCultureCode("en-US");
var itemMissingLanguage = new DictionaryItem("I have invalid language");
var translations = new List<IDictionaryTranslation>
{
new DictionaryTranslation(new Language("") { Id = 0 }, ""),
new DictionaryTranslation(language, "I have language")
};
itemMissingLanguage.Translations = translations;
ServiceContext.LocalizationService.Save(itemMissingLanguage);//Id 3?
var provider = new PetaPocoUnitOfWorkProvider();
var unitOfWork = provider.GetUnitOfWork();
LanguageRepository languageRepository;
using (var repository = CreateRepository(unitOfWork, out languageRepository))
{
// Act
var dictionaryItem = repository.Get(3);
// Assert
Assert.That(dictionaryItem, Is.Not.Null);
Assert.That(dictionaryItem.ItemKey, Is.EqualTo("I have invalid language"));
Assert.That(dictionaryItem.Translations.Any(), Is.True);
Assert.That(dictionaryItem.Translations.Any(x => x == null), Is.False);
Assert.That(dictionaryItem.Translations.First().Value, Is.EqualTo("I have language"));
Assert.That(dictionaryItem.Translations.Count(), Is.EqualTo(1));
}
}
[Test]
public void Can_Perform_GetAll_On_DictionaryRepository()
{
@@ -60,6 +60,22 @@ namespace Umbraco.Tests.Persistence.Repositories
}
}
[Test]
public void Get_WhenIdDoesntExist_ReturnsNull()
{
// Arrange
var provider = new PetaPocoUnitOfWorkProvider();
var unitOfWork = provider.GetUnitOfWork();
using (var repository = CreateRepository(unitOfWork))
{
// Act
var language = repository.Get(0);
// Assert
Assert.That(language, Is.Null);
}
}
[Test]
public void Can_Perform_GetAll_On_LanguageRepository()
{
+1 -1
View File
@@ -271,7 +271,7 @@ namespace Umbraco.Tests
public void Resolves_Assigned_Mappers()
{
var foundTypes1 = PluginManager.Current.ResolveAssignedMapperTypes();
Assert.AreEqual(21, foundTypes1.Count());
Assert.AreEqual(22, foundTypes1.Count());
}
[Test]
@@ -9,15 +9,36 @@ namespace Umbraco.Tests.PropertyEditors
[TestFixture]
public class ImageCropperTest
{
private const string cropperJson = "{\"focalPoint\": {\"left\": 0.96,\"top\": 0.80827067669172936},\"src\": \"/media/1005/img_0671.jpg\",\"crops\": [{\"alias\":\"thumb\",\"width\": 100,\"height\": 100,\"coordinates\": {\"x1\": 0.58729977382575338,\"y1\": 0.055768992440203169,\"x2\": 0,\"y2\": 0.32457553600198386}}]}";
private const string mediaPath = "/media/1005/img_0671.jpg";
[Test]
public void GetCropUrl_Test()
public void GetCropUrl_CropAliasTest()
{
var cropperJson =
"{\"src\": \"/media/1001/img_0671.jpg\",\"crops\": [{\"alias\": \"Thumb\",\"width\": 100,\"height\": 100,\"coordinates\": {\"x1\": 0.36664230810213955,\"y1\": 0.25767203967761981,\"x2\": 0.48805391012476662,\"y2\": 0.54858958462492169}}],\"focalPoint\": {\"left\": 0.8075,\"top\": 0.8666666666666667}}";
var urlString = mediaPath.GetCropUrl(imageCropperValue: cropperJson, cropAlias: "Thumb", useCropDimensions: true);
Assert.AreEqual(mediaPath + "?crop=0.58729977382575338,0.055768992440203169,0,0.32457553600198386&cropmode=percentage&width=100&height=100", urlString);
}
var urlString = "/media/1001/img_0671.jpg".GetCropUrl(imageCropperValue:cropperJson, cropAlias:"Thumb", width:100, height:100);
[Test]
public void GetCropUrl_WidthHeightTest()
{
var urlString = mediaPath.GetCropUrl(imageCropperValue: cropperJson, width: 200, height: 300);
Assert.AreEqual(mediaPath + "?center=0.80827067669172936,0.96&mode=crop&width=200&height=300", urlString);
}
Assert.AreEqual(urlString, "/media/1001/img_0671.jpg?crop=0.36664230810213955,0.25767203967761981,0.48805391012476662,0.54858958462492169&cropmode=percentage&width=100&height=100");
[Test]
public void GetCropUrl_FocalPointTest()
{
var urlString = mediaPath.GetCropUrl(imageCropperValue: cropperJson, cropAlias: "thumb", preferFocalPoint: true, useCropDimensions: true);
Assert.AreEqual(mediaPath + "?center=0.80827067669172936,0.96&mode=crop&width=100&height=100", urlString);
}
[Test]
public void GetCropUrlFurtherOptionsTest()
{
var urlString = mediaPath.GetCropUrl(imageCropperValue: cropperJson, width: 200, height: 300, furtherOptions: "&filter=comic&roundedcorners=radius-26|bgcolor-fff");
Assert.AreEqual(mediaPath + "?center=0.80827067669172936,0.96&mode=crop&width=200&height=300&filter=comic&roundedcorners=radius-26|bgcolor-fff", urlString);
}
}
@@ -1,114 +1,114 @@
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Services;
using Umbraco.Web.PropertyEditors;
namespace Umbraco.Tests.PropertyEditors
{
/// <summary>
/// Tests for the base classes of ValueEditors and PreValueEditors that are used for Property Editors that edit
/// multiple values such as the drop down list, check box list, color picker, etc....
/// </summary>
[TestFixture]
public class MultiValuePropertyEditorTests
{
//TODO: Test the other formatting methods for the drop down classes
[Test]
public void DropDownMultipleValueEditor_With_Keys_Format_Data_For_Cache()
{
var dataTypeServiceMock = new Mock<IDataTypeService>();
var dataTypeService = dataTypeServiceMock.Object;
var editor = new PublishValuesMultipleValueEditor(true, dataTypeService, new PropertyValueEditor());
var prop = new Property(1, Guid.NewGuid(),
new PropertyType(new DataTypeDefinition(1, "Test.TestEditor")),
"1234,4567,8910");
var result = editor.ConvertDbToString(prop, prop.PropertyType, new Mock<IDataTypeService>().Object);
Assert.AreEqual("1234,4567,8910", result);
}
[Test]
public void DropDownMultipleValueEditor_No_Keys_Format_Data_For_Cache()
{
var dataTypeServiceMock = new Mock<IDataTypeService>();
dataTypeServiceMock
.Setup(x => x.GetPreValuesCollectionByDataTypeId(It.IsAny<int>()))
.Returns(new PreValueCollection(new Dictionary<string, PreValue>
{
{"key0", new PreValue(4567, "Value 1")},
{"key1", new PreValue(1234, "Value 2")},
{"key2", new PreValue(8910, "Value 3")}
}));
var dataTypeService = dataTypeServiceMock.Object;
var editor = new PublishValuesMultipleValueEditor(false, dataTypeService, new PropertyValueEditor());
var prop = new Property(1, Guid.NewGuid(),
new PropertyType(new DataTypeDefinition(1, "Test.TestEditor")),
"1234,4567,8910");
var result = editor.ConvertDbToString(prop, prop.PropertyType, new Mock<IDataTypeService>().Object);
Assert.AreEqual("Value 1,Value 2,Value 3", result);
}
[Test]
public void DropDownValueEditor_Format_Data_For_Cache()
{
var dataTypeServiceMock = new Mock<IDataTypeService>();
dataTypeServiceMock
.Setup(x => x.GetPreValuesCollectionByDataTypeId(It.IsAny<int>()))
.Returns(new PreValueCollection(new Dictionary<string, PreValue>
{
{"key0", new PreValue(10, "Value 1")},
{"key1", new PreValue(1234, "Value 2")},
{"key2", new PreValue(11, "Value 3")}
}));
var dataTypeService = dataTypeServiceMock.Object;
var editor = new PublishValueValueEditor(dataTypeService, new PropertyValueEditor());
var prop = new Property(1, Guid.NewGuid(),
new PropertyType(new DataTypeDefinition(1, "Test.TestEditor")),
"1234");
var result = editor.ConvertDbToString(prop, prop.PropertyType, new Mock<IDataTypeService>().Object);
Assert.AreEqual("Value 2", result);
}
[Test]
public void DropDownPreValueEditor_Format_Data_For_Editor()
{
var defaultVals = new Dictionary<string, object>();
var persisted = new PreValueCollection(new Dictionary<string, PreValue>
{
{"item1", new PreValue(1, "Item 1")},
{"item2", new PreValue(2, "Item 2")},
{"item3", new PreValue(3, "Item 3")}
});
var editor = new ValueListPreValueEditor();
var result = editor.ConvertDbToEditor(defaultVals, persisted);
Assert.AreEqual(1, result.Count);
Assert.IsTrue(result.ContainsKey("items"));
var items = result["items"] as IDictionary<int, string>;
Assert.IsNotNull(items);
Assert.AreEqual("Item 1", items[1]);
Assert.AreEqual("Item 2", items[2]);
Assert.AreEqual("Item 3", items[3]);
}
}
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Services;
using Umbraco.Web.PropertyEditors;
namespace Umbraco.Tests.PropertyEditors
{
/// <summary>
/// Tests for the base classes of ValueEditors and PreValueEditors that are used for Property Editors that edit
/// multiple values such as the drop down list, check box list, color picker, etc....
/// </summary>
[TestFixture]
public class MultiValuePropertyEditorTests
{
//TODO: Test the other formatting methods for the drop down classes
[Test]
public void DropDownMultipleValueEditor_With_Keys_Format_Data_For_Cache()
{
var dataTypeServiceMock = new Mock<IDataTypeService>();
var dataTypeService = dataTypeServiceMock.Object;
var editor = new PublishValuesMultipleValueEditor(true, dataTypeService, new PropertyValueEditor());
var prop = new Property(1, Guid.NewGuid(),
new PropertyType(new DataTypeDefinition(1, "Test.TestEditor")),
"1234,4567,8910");
var result = editor.ConvertDbToString(prop, prop.PropertyType, new Mock<IDataTypeService>().Object);
Assert.AreEqual("1234,4567,8910", result);
}
[Test]
public void DropDownMultipleValueEditor_No_Keys_Format_Data_For_Cache()
{
var dataTypeServiceMock = new Mock<IDataTypeService>();
dataTypeServiceMock
.Setup(x => x.GetPreValuesCollectionByDataTypeId(It.IsAny<int>()))
.Returns(new PreValueCollection(new Dictionary<string, PreValue>
{
{"key0", new PreValue(4567, "Value 1")},
{"key1", new PreValue(1234, "Value 2")},
{"key2", new PreValue(8910, "Value 3")}
}));
var dataTypeService = dataTypeServiceMock.Object;
var editor = new PublishValuesMultipleValueEditor(false, dataTypeService, new PropertyValueEditor());
var prop = new Property(1, Guid.NewGuid(),
new PropertyType(new DataTypeDefinition(1, "Test.TestEditor")),
"1234,4567,8910");
var result = editor.ConvertDbToString(prop, prop.PropertyType, new Mock<IDataTypeService>().Object);
Assert.AreEqual("Value 1,Value 2,Value 3", result);
}
[Test]
public void DropDownValueEditor_Format_Data_For_Cache()
{
var dataTypeServiceMock = new Mock<IDataTypeService>();
dataTypeServiceMock
.Setup(x => x.GetPreValuesCollectionByDataTypeId(It.IsAny<int>()))
.Returns(new PreValueCollection(new Dictionary<string, PreValue>
{
{"key0", new PreValue(10, "Value 1")},
{"key1", new PreValue(1234, "Value 2")},
{"key2", new PreValue(11, "Value 3")}
}));
var dataTypeService = dataTypeServiceMock.Object;
var editor = new PublishValueValueEditor(dataTypeService, new PropertyValueEditor());
var prop = new Property(1, Guid.NewGuid(),
new PropertyType(new DataTypeDefinition(1, "Test.TestEditor")),
"1234");
var result = editor.ConvertDbToString(prop, prop.PropertyType, new Mock<IDataTypeService>().Object);
Assert.AreEqual("Value 2", result);
}
[Test]
public void DropDownPreValueEditor_Format_Data_For_Editor()
{
var defaultVals = new Dictionary<string, object>();
var persisted = new PreValueCollection(new Dictionary<string, PreValue>
{
{"item1", new PreValue(1, "Item 1")},
{"item2", new PreValue(2, "Item 2")},
{"item3", new PreValue(3, "Item 3")}
});
var editor = new ValueListPreValueEditor();
var result = editor.ConvertDbToEditor(defaultVals, persisted);
Assert.AreEqual(1, result.Count);
Assert.IsTrue(result.ContainsKey("items"));
var items = result["items"] as IDictionary<int, IDictionary<string, object>>;
Assert.IsNotNull(items);
Assert.AreEqual("Item 1", items[1]["value"]);
Assert.AreEqual("Item 2", items[2]["value"]);
Assert.AreEqual("Item 3", items[3]["value"]);
}
}
}
@@ -72,7 +72,16 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsTrue(ddoc.HasProperty(Constants.Conventions.Content.UrlAlias));
}
/// <summary>
[Test]
public void U4_4559()
{
var doc = GetDynamicNode(1174);
var result = doc.AncestorOrSelf(1);
Assert.IsNotNull(result);
Assert.AreEqual(1046, result.Id);
}
/// <summary>
/// Test class to mimic UmbracoHelper when returning docs
/// </summary>
public class TestHelper
@@ -508,6 +508,15 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual(1173, result.Id);
}
[Test]
public void U4_4559()
{
var doc = GetNode(1174);
var result = doc.AncestorOrSelf(1);
Assert.IsNotNull(result);
Assert.AreEqual(1046, result.Id);
}
[Test]
public void Ancestors_Or_Self()
{
@@ -32,7 +32,7 @@ namespace Umbraco.Tests.Routing
}
/// <summary>
/// This checks that when we retreive a NiceUrl for multiple items that there are no issues with cache overlap
/// This checks that when we retrieve a NiceUrl for multiple items that there are no issues with cache overlap
/// and that they are all cached correctly.
/// </summary>
[Test]
@@ -182,4 +182,4 @@ namespace Umbraco.Tests.Routing
Assert.AreEqual("#", routingContext.UrlProvider.GetUrl(999999));
}
}
}
}
+3 -3
View File
@@ -84,9 +84,9 @@
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<Reference Include="Newtonsoft.Json">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -283,7 +283,7 @@
<Compile Include="PropertyEditors\ImageCropperTest.cs" />
<Compile Include="PublishedContent\PublishedContentExtensionTests.cs" />
<Compile Include="PropertyEditors\ColorListValidatorTest.cs" />
<Compile Include="PropertyEditors\DropDownPropertyPreValueEditorTests.cs" />
<Compile Include="PropertyEditors\MultiValuePropertyEditorTests.cs" />
<Compile Include="PropertyEditors\EnsureUniqueValuesValidatorTest.cs" />
<Compile Include="PropertyEditors\LegacyPropertyEditorIdToAliasConverterTests.cs" />
<Compile Include="PropertyEditors\PropertyEditorValueEditorTests.cs" />
+1 -1
View File
@@ -19,7 +19,7 @@
<package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.2" targetFramework="net45" />
<package id="NUnit" version="2.6.2" targetFramework="net40" />
<package id="Selenium.WebDriver" version="2.32.0" targetFramework="net40" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net40" />
@@ -125,7 +125,7 @@ loadMenu: function (node) {
return umbRequestHelper.resourcePromise(
$http.get(getTreeMenuUrl(node)),
&quot;Failed to retreive data for a node&#39;s menu &quot; + node.id);
&quot;Failed to retrieve data for a node&#39;s menu &quot; + node.id);
}</code></pre>
<p>HTTP error handling is performed automatically inside of the <code>umbRequestHelper.resourcePromise</code> and inside of Umbraco&#39;s response interceptors.</p>
<h2>Consuming Umbraco resources</h2>
@@ -23,7 +23,7 @@ Here's an example of the usage in an Umbraco resource. This example is the metho
return umbRequestHelper.resourcePromise(
$http.get(getTreeMenuUrl(node)),
"Failed to retreive data for a node's menu " + node.id);
"Failed to retrieve data for a node's menu " + node.id);
}
HTTP error handling is performed automatically inside of the `umbRequestHelper.resourcePromise` and inside of Umbraco's response interceptors.
@@ -105,4 +105,4 @@ The good news is, this is very simple to do, example:
});
}
The next thing that is important to note is that **you don't have to do anything** if you don't want to do anything with the error but still want the error bubbled up to your promises handlers. So for example, if you are expecting the handler of this promise to handle the error and display something in the UI, just leave out the function(err) callback which would look exactly the same as the example for 'Transforming result data'
The next thing that is important to note is that **you don't have to do anything** if you don't want to do anything with the error but still want the error bubbled up to your promises handlers. So for example, if you are expecting the handler of this promise to handle the error and display something in the UI, just leave out the function(err) callback which would look exactly the same as the example for 'Transforming result data'
@@ -92,4 +92,7 @@ td.mce-item-selected, th.mce-item-selected {
-webkit-background-size: 18px;
background-size: 18px;
background-position-x: 99%;
}
}
/* TINYMCE IMAGE RESIZING LIMITS */
#mceResizeHandlen, #mceResizeHandles, #mceResizeHandlee, #mceResizeHandlew{display: none !important; visibility: hidden !important;}
Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

@@ -14,6 +14,8 @@ angular.module("umbraco.directives.html")
templateUrl: 'views/directives/html/umb-photo-folder.html',
link: function(scope, element, attrs, ngModel) {
var lastWatch = null;
ngModel.$render = function() {
if (ngModel.$modelValue) {
@@ -22,9 +24,10 @@ angular.module("umbraco.directives.html")
scope.clickHandler = scope.$eval(element.attr('on-click'));
//todo: this doesn't do anything
var imagesOnly = element.attr('imagesOnly');
var imagesOnly = element.attr('images-only') === "true";
var margin = element.attr('border') ? parseInt(element.attr('border'), 10) : 5;
var startingIndex = element.attr('baseline') ? parseInt(element.attr('baseline'), 10) : 0;
var minWidth = element.attr('min-width') ? parseInt(element.attr('min-width'), 10) : 420;
@@ -34,14 +37,22 @@ angular.module("umbraco.directives.html")
var fixedRowWidth = Math.max(element.width(), minWidth);
scope.containerStyle = { width: fixedRowWidth + "px" };
scope.rows = umbPhotoFolderHelper.buildGrid(photos, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin);
scope.rows = umbPhotoFolderHelper.buildGrid(photos, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin, imagesOnly);
if (attrs.filterBy) {
scope.$watch(attrs.filterBy, function(newVal, oldVal) {
//we track the watches that we create, we don't want to create multiple, so clear it
// if it already exists before creating another.
if (lastWatch) {
lastWatch();
}
//TODO: Need to debounce this so it doesn't filter too often!
lastWatch = scope.$watch(attrs.filterBy, function (newVal, oldVal) {
if (newVal && newVal !== oldVal) {
var p = $filter('filter')(photos, newVal, false);
scope.baseline = 0;
var m = umbPhotoFolderHelper.buildGrid(p, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin);
var m = umbPhotoFolderHelper.buildGrid(p, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin, imagesOnly);
scope.rows = m;
}
});
@@ -106,7 +106,6 @@ angular.module("umbraco.directives")
//when loading an image without any crop info, we center and fit it
var resizeImageToEditor = function(){
//returns size fitting the cropper
var size = cropperHelper.calculateAspectRatioFit(
scope.dimensions.image.width,
@@ -185,15 +184,22 @@ angular.module("umbraco.directives")
top = constraints.top.min;
}
scope.dimensions.image.left = left;
scope.dimensions.image.top = top;
if(scope.dimensions.image.left !== left){
scope.dimensions.image.left = left;
}
if(scope.dimensions.image.top !== top){
scope.dimensions.image.top = top;
}
};
//sets scope.crop to the recalculated % based crop
var calculateCropBox = function(){
scope.crop = cropperHelper.pixelsToCoordinates(scope.dimensions.image, scope.dimensions.cropper.width, scope.dimensions.cropper.height, scope.dimensions.margin);
};
//Drag and drop positioning, using jquery ui draggable
var onStartDragPosition, top, left;
$overlay.draggable({
@@ -204,6 +210,9 @@ angular.module("umbraco.directives")
},
stop: function(event, ui){
scope.$apply(function(){
//make sure that every validates one more time...
validatePosition(ui.position.left, ui.position.top);
calculateCropBox();
scope.dimensions.image.rnd = Math.random();
});
@@ -227,8 +236,6 @@ angular.module("umbraco.directives")
//sets constaints for the cropper
setConstraints();
scope.loaded = true;
};
@@ -243,11 +250,16 @@ angular.module("umbraco.directives")
}
});
var throttledResizing = _.throttle(function(){
resizeImageToScale(scope.dimensions.scale.current);
calculateCropBox();
}, 100);
//happens when we change the scale
scope.$watch("dimensions.scale.current", function(){
if(scope.loaded){
resizeImageToScale(scope.dimensions.scale.current);
calculateCropBox();
throttledResizing();
}
});
@@ -16,7 +16,8 @@ angular.module("umbraco.directives")
keyboardService.bind(keyCombo, function() {
var element = $(el);
if(element.is("a,button,input[type='button'],input[type='submit']")){
if(element.is("a,button,input[type='button'],input[type='submit']") && !element.is(':disabled') ){
element.click();
}else{
element.focus();
@@ -1,8 +0,0 @@
angular.module("umbraco.directives")
.directive('selectOnFocus', function () {
return function (scope, el, attrs) {
$(el).bind("click", function(){
this.select();
});
};
});
@@ -0,0 +1,19 @@
angular.module("umbraco.directives")
.directive('selectOnFocus', function () {
return function (scope, el, attrs) {
$(el).bind("click", function () {
var editmode = $(el).data("editmode");
//If editmode is true a click is handled like a normal click
if (!editmode) {
//Initial click, select entire text
this.select();
//Set the edit mode so subsequent clicks work normally
$(el).data("editmode", true);
}
}).
bind("blur", function () {
//Reset on focus lost
$(el).data("editmode", false);
});
};
});
@@ -59,21 +59,25 @@ function valFormManager(serverValidationManager, $rootScope, $log, $timeout, not
//if we wish to turn of the unsaved changes confirmation msg
//this is the place to do it
var locationEvent = $rootScope.$on('$locationChangeStart', function(event, url){
var locationEvent = $rootScope.$on('$locationChangeStart', function (event, nextLocation, currentLocation) {
if (!formCtrl.$dirty) {
return;
}
var path = url.split("#")[1];
if(path.indexOf("%253") || path.indexOf("%252")){
path = decodeURIComponent(path);
var path = nextLocation.split("#")[1];
if (path) {
if (path.indexOf("%253") || path.indexOf("%252")) {
path = decodeURIComponent(path);
}
if(!notificationsService.hasView()){
var msg = { view: "confirmroutechange", args: { path: path, listener: locationEvent } };
notificationsService.add(msg);
}
event.preventDefault();
}
var msg = {view: "confirmroutechange", args: {path: path, listener: locationEvent}};
notificationsService.add(msg);
event.preventDefault();
return;
});
scope.$on('$destroy', function() {
@@ -288,7 +288,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
"contentApiBaseUrl",
"GetById",
[{ id: id }])),
'Failed to retreive data for content id ' + id);
'Failed to retrieve data for content id ' + id);
},
/**
@@ -325,7 +325,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
"contentApiBaseUrl",
"GetByIds",
idQuery)),
'Failed to retreive data for content with multiple ids');
'Failed to retrieve data for content with multiple ids');
},
@@ -369,7 +369,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
"contentApiBaseUrl",
"GetEmpty",
[{ contentTypeAlias: alias }, { parentId: parentId }])),
'Failed to retreive data for empty content item type ' + alias);
'Failed to retrieve data for empty content item type ' + alias);
},
/**
@@ -465,7 +465,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
{ orderDirection: options.orderDirection },
{ filter: options.filter }
])),
'Failed to retreive children for content item ' + parentId);
'Failed to retrieve children for content item ' + parentId);
},
/**
@@ -67,9 +67,9 @@ function contentTypeResource($q, $http, umbRequestHelper) {
"contentTypeApiBaseUrl",
"GetAllowedChildren",
[{ contentId: contentId }])),
'Failed to retreive data for content id ' + contentId);
'Failed to retrieve data for content id ' + contentId);
}
};
}
angular.module('umbraco.resources').factory('contentTypeResource', contentTypeResource);
angular.module('umbraco.resources').factory('contentTypeResource', contentTypeResource);
@@ -45,7 +45,7 @@ function currentUserResource($q, $http, umbRequestHelper) {
umbRequestHelper.getApiUrl(
"currentUserApiBaseUrl",
"GetMembershipProviderConfig")),
'Failed to retreive membership provider config');
'Failed to retrieve membership provider config');
},
};
}
@@ -40,7 +40,7 @@ function dataTypeResource($q, $http, umbDataFormatter, umbRequestHelper) {
"dataTypeApiBaseUrl",
"GetPreValues",
[{ editorAlias: editorAlias }, { dataTypeId: dataTypeId }])),
'Failed to retreive pre values for editor alias ' + editorAlias);
'Failed to retrieve pre values for editor alias ' + editorAlias);
},
/**
@@ -71,7 +71,7 @@ function dataTypeResource($q, $http, umbDataFormatter, umbRequestHelper) {
"dataTypeApiBaseUrl",
"GetById",
[{ id: id }])),
'Failed to retreive data for data type id ' + id);
'Failed to retrieve data for data type id ' + id);
},
getAll: function () {
@@ -96,7 +96,7 @@ function entityResource($q, $http, umbRequestHelper) {
"entityApiBaseUrl",
"GetById",
[{ id: id}, {type: type }])),
'Failed to retreive entity data for id ' + id);
'Failed to retrieve entity data for id ' + id);
},
getByQuery: function (query, nodeContextId, type) {
@@ -106,7 +106,7 @@ function entityResource($q, $http, umbRequestHelper) {
"entityApiBaseUrl",
"GetByQuery",
[{query: query},{ nodeContextId: nodeContextId}, {type: type }])),
'Failed to retreive entity data for query ' + query);
'Failed to retrieve entity data for query ' + query);
},
/**
@@ -37,7 +37,7 @@ function logResource($q, $http, umbRequestHelper) {
"logApiBaseUrl",
"GetEntityLog",
[{ id: id }])),
'Failed to retreive user data for id ' + id);
'Failed to retrieve user data for id ' + id);
},
/**
@@ -68,7 +68,7 @@ function logResource($q, $http, umbRequestHelper) {
"logApiBaseUrl",
"GetCurrentUserLog",
[{ logtype: type, sinceDate: since }])),
'Failed to retreive user data for id ' + id);
'Failed to retrieve user data for id ' + id);
},
/**
@@ -27,7 +27,7 @@ function macroResource($q, $http, umbRequestHelper) {
"macroApiBaseUrl",
"GetMacroParameters",
[{ macroId: macroId }])),
'Failed to retreive macro parameters for macro with id ' + macroId);
'Failed to retrieve macro parameters for macro with id ' + macroId);
},
/**
@@ -75,7 +75,7 @@ function macroResource($q, $http, umbRequestHelper) {
"macroApiBaseUrl",
"GetMacroResultAsHtmlForEditor",
query)),
'Failed to retreive macro result for macro with alias ' + macroAlias);
'Failed to retrieve macro result for macro with alias ' + macroAlias);
}
};
@@ -137,7 +137,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
"mediaApiBaseUrl",
"GetById",
[{ id: id }])),
'Failed to retreive data for media id ' + id);
'Failed to retrieve data for media id ' + id);
},
/**
@@ -204,7 +204,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
"mediaApiBaseUrl",
"GetByIds",
idQuery)),
'Failed to retreive data for media ids ' + ids);
'Failed to retrieve data for media ids ' + ids);
},
/**
@@ -247,7 +247,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
"mediaApiBaseUrl",
"GetEmpty",
[{ contentTypeAlias: alias }, { parentId: parentId }])),
'Failed to retreive data for empty media item type ' + alias);
'Failed to retrieve data for empty media item type ' + alias);
},
@@ -258,7 +258,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
umbRequestHelper.getApiUrl(
"mediaApiBaseUrl",
"GetRootMedia")),
'Failed to retreive data for root media');
'Failed to retrieve data for root media');
},
@@ -326,7 +326,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
{ orderDirection: options.orderDirection },
{ filter: options.filter }
])),
'Failed to retreive children for media item ' + parentId);
'Failed to retrieve children for media item ' + parentId);
},
/**
@@ -34,9 +34,9 @@ function mediaTypeResource($q, $http, umbRequestHelper) {
"mediaTypeApiBaseUrl",
"GetAllowedChildren",
[{ contentId: mediaId }])),
'Failed to retreive data for media id ' + mediaId);
'Failed to retrieve data for media id ' + mediaId);
}
};
}
angular.module('umbraco.resources').factory('mediaTypeResource', mediaTypeResource);
angular.module('umbraco.resources').factory('mediaTypeResource', mediaTypeResource);
@@ -53,7 +53,7 @@ function memberResource($q, $http, umbDataFormatter, umbRequestHelper) {
"memberApiBaseUrl",
"GetByKey",
[{ key: key }])),
'Failed to retreive data for member id ' + key);
'Failed to retrieve data for member id ' + key);
},
/**
@@ -125,7 +125,7 @@ function memberResource($q, $http, umbDataFormatter, umbRequestHelper) {
"memberApiBaseUrl",
"GetEmpty",
[{ contentTypeAlias: alias }])),
'Failed to retreive data for empty member item type ' + alias);
'Failed to retrieve data for empty member item type ' + alias);
}
else {
return umbRequestHelper.resourcePromise(
@@ -15,9 +15,9 @@ function memberTypeResource($q, $http, umbRequestHelper) {
umbRequestHelper.getApiUrl(
"memberTypeApiBaseUrl",
"GetAllTypes")),
'Failed to retreive data for member types id');
'Failed to retrieve data for member types id');
}
};
}
angular.module('umbraco.resources').factory('memberTypeResource', memberTypeResource);
angular.module('umbraco.resources').factory('memberTypeResource', memberTypeResource);
@@ -20,7 +20,7 @@ function sectionResource($q, $http, umbRequestHelper) {
umbRequestHelper.getApiUrl(
"sectionApiBaseUrl",
"GetSections")),
'Failed to retreive data for sections');
'Failed to retrieve data for sections');
}
};
@@ -35,7 +35,7 @@ function stylesheetResource($q, $http, umbRequestHelper) {
umbRequestHelper.getApiUrl(
"stylesheetApiBaseUrl",
"GetAll")),
'Failed to retreive stylesheets ');
'Failed to retrieve stylesheets ');
},
/**
@@ -64,7 +64,7 @@ function stylesheetResource($q, $http, umbRequestHelper) {
"stylesheetApiBaseUrl",
"GetRules",
[{ id: id }])),
'Failed to retreive stylesheets ');
'Failed to retrieve stylesheets ');
},
/**
@@ -29,7 +29,7 @@ function treeResource($q, $http, umbRequestHelper) {
return umbRequestHelper.resourcePromise(
$http.get(getTreeMenuUrl(node)),
"Failed to retreive data for a node's menu " + node.id);
"Failed to retrieve data for a node's menu " + node.id);
},
/** Loads in the data to display the nodes for an application */
@@ -60,7 +60,7 @@ function treeResource($q, $http, umbRequestHelper) {
"treeApplicationApiBaseUrl",
"GetApplicationTrees",
query)),
'Failed to retreive data for application tree ' + options.section);
'Failed to retrieve data for application tree ' + options.section);
},
/** Loads in the data to display the child nodes for a given node */
@@ -77,4 +77,4 @@ function treeResource($q, $http, umbRequestHelper) {
};
}
angular.module('umbraco.resources').factory('treeResource', treeResource);
angular.module('umbraco.resources').factory('treeResource', treeResource);
@@ -22,7 +22,7 @@ function cropperHelper(umbRequestHelper, $http) {
"imageCropperApiBaseUrl",
"GetConfiguration",
[{ mediaTypeAlias: mediaTypeAlias}])),
'Failed to retreive tinymce configuration');
'Failed to retrieve tinymce configuration');
},
@@ -85,9 +85,7 @@ function cropperHelper(umbRequestHelper, $http) {
return style;
},
//returns a ng-style object with top,left,width,height pixel measurements
//expects {left,right,top,bottom} - {width,height}, {width,height}, int
//offset is just to push the image position a number of pixels from top,left
coordinatesToPixels : function(coordinates, originalSize, offset){
var coordinates_px = {
@@ -116,6 +114,12 @@ function cropperHelper(umbRequestHelper, $http) {
crop.x2 = x2_px / image.width;
crop.y2 = y2_px / image.height;
_.forEach(crop, function(coord){
if(coord < 0){
coord = 0;
}
});
return crop;
},
@@ -164,4 +168,4 @@ function cropperHelper(umbRequestHelper, $http) {
return service;
}
angular.module('umbraco.services').factory('cropperHelper', cropperHelper);
angular.module('umbraco.services').factory('cropperHelper', cropperHelper);
@@ -28,10 +28,10 @@ function macroService() {
var paramMatch;
var returnVal = {
macroAlias: alias,
marcoParamsDictionary: {}
macroParamsDictionary: {}
};
while (paramMatch = paramExpression.exec(paramsChunk)) {
returnVal.marcoParamsDictionary[paramMatch[1]] = paramMatch[2];
returnVal.macroParamsDictionary[paramMatch[1]] = paramMatch[2];
}
return returnVal;
},
@@ -53,9 +53,9 @@ function macroService() {
var macroString = '<?UMBRACO_MACRO macroAlias=\"' + args.macroAlias + "\" ";
if (args.marcoParamsDictionary) {
if (args.macroParamsDictionary) {
_.each(args.marcoParamsDictionary, function (val, key) {
_.each(args.macroParamsDictionary, function (val, key) {
//check for null
val = val ? val : "";
//need to detect if the val is a string or an object
@@ -96,9 +96,9 @@ function macroService() {
var macroString = '<umbraco:Macro ';
if (args.marcoParamsDictionary) {
if (args.macroParamsDictionary) {
_.each(args.marcoParamsDictionary, function (val, key) {
_.each(args.macroParamsDictionary, function (val, key) {
var keyVal = key + "=\"" + (val ? val : "") + "\" ";
macroString += keyVal;
});
@@ -127,11 +127,11 @@ function macroService() {
var hasParams = false;
var paramString;
if (args.marcoParamsDictionary) {
if (args.macroParamsDictionary) {
paramString = ", new {";
_.each(args.marcoParamsDictionary, function(val, key) {
_.each(args.macroParamsDictionary, function(val, key) {
hasParams = true;
@@ -162,6 +162,36 @@ function mediaHelper(umbRequestHelper) {
return result;
},
/*jshint loopfunc: true */
hasFilePropertyType : function(mediaItem){
function _iterateProps(props){
var result = false;
for(var resolver in _mediaFileResolvers) {
var property = _.find(props, function(property){ return property.editor === resolver; });
if(property){
result = true;
break;
}
}
return result;
}
//we either have properties raw on the object, or spread out on tabs
var result = false;
if(mediaItem.properties){
result = _iterateProps(mediaItem.properties);
}else if(mediaItem.tabs){
for(var tab in mediaItem.tabs) {
if(mediaItem.tabs[tab].properties){
result = _iterateProps(mediaItem.tabs[tab].properties);
if(result){
break;
}
}
}
}
return result;
},
/**
* @ngdoc function
@@ -219,6 +249,11 @@ function mediaHelper(umbRequestHelper) {
*/
getThumbnailFromPath: function (imagePath) {
//If the path is not an image we cannot get a thumb
if (!this.detectIfImageByExtension(imagePath)) {
return null;
}
//get the proxy url for big thumbnails (this ensures one is always generated)
var thumbnailUrl = umbRequestHelper.getApiUrl(
"imagesApiBaseUrl",
@@ -25,6 +25,18 @@ angular.module('umbraco.services')
.factory('notificationsService', function ($rootScope, $timeout, angularHelper) {
var nArray = [];
function setViewPath(view){
if(view.indexOf('/') < 0)
{
view = "views/common/notifications/" + view;
}
if(view.indexOf('.html') < 0)
{
view = view + ".html";
}
return view;
}
var service = {
@@ -50,16 +62,7 @@ angular.module('umbraco.services')
angularHelper.safeApply($rootScope, function () {
if(item.view){
if(item.view.indexOf('/') < 0)
{
item.view = "views/common/notifications/" + item.view;
}
if(item.view.indexOf('.html') < 0)
{
item.view = item.view + ".html";
}
item.view = setViewPath(item.view);
item.sticky = true;
item.type = "form";
item.headline = null;
@@ -100,6 +103,14 @@ angular.module('umbraco.services')
},
hasView : function(view){
if(!view){
return _.find(nArray, function(notification){ return notification.view;});
}else{
view = setViewPath(view).toLowerCase();
return _.find(nArray, function(notification){ return notification.view.toLowerCase() === view;});
}
},
addView: function(view, args){
var item = {
args: args,
@@ -24,7 +24,7 @@ function tinyMceService(dialogService, $log, imageHelper, $http, $timeout, macro
umbRequestHelper.getApiUrl(
"rteApiBaseUrl",
"GetConfiguration")),
'Failed to retreive tinymce configuration');
'Failed to retrieve tinymce configuration');
},
/**
@@ -102,10 +102,11 @@ function tinyMceService(dialogService, $log, imageHelper, $http, $timeout, macro
dialogService.mediaPicker({
currentTarget: currentTarget,
onlyImages: true,
showDetails: true,
scope: $scope, callback: function (img) {
if (img) {
var imagePropVal = imageHelper.getImagePropertyValue({ imageModel: img, scope: $scope });
var data = {
alt: img.name,
src: (img.url) ? img.url : "nothing.jpg",
@@ -120,11 +121,16 @@ function tinyMceService(dialogService, $log, imageHelper, $http, $timeout, macro
var size = editor.dom.getSize(imgElm);
var newSize = imageHelper.scaleToMaxSize(500, size.w, size.h);
var s = "width: " + newSize.width + "px; height:" + newSize.height + "px;";
editor.dom.setAttrib(imgElm, 'style', s);
editor.dom.setAttrib(imgElm, 'rel', newSize.width + "," + newSize.height);
editor.dom.setAttrib(imgElm, 'id', null);
if(img.url){
var src = img.url + "?width=" + newSize.width + "&height=" + newSize.height;
editor.dom.setAttrib(imgElm, 'data-mce-src', src);
}
}, 500);
}
}
@@ -250,7 +256,7 @@ function tinyMceService(dialogService, $log, imageHelper, $http, $timeout, macro
//need to wrap in safe apply since this might be occuring outside of angular
angularHelper.safeApply($scope, function() {
macroResource.getMacroResultAsHtmlForEditor(macroData.macroAlias, contentId, macroData.marcoParamsDictionary)
macroResource.getMacroResultAsHtmlForEditor(macroData.macroAlias, contentId, macroData.macroParamsDictionary)
.then(function (htmlResult) {
$macroDiv.removeClass("loading");
@@ -520,4 +526,4 @@ function tinyMceService(dialogService, $log, imageHelper, $http, $timeout, macro
};
}
angular.module('umbraco.services').factory('tinyMceService', tinyMceService);
angular.module('umbraco.services').factory('tinyMceService', tinyMceService);
@@ -61,7 +61,9 @@ angular.module('umbraco.services')
there are no more seconds remaining.
*/
function countdownUserTimeout() {
$timeout(function() {
$timeout(function () {
if (currentUser) {
//countdown by 2 seconds since that is how long our timer is for.
currentUser.remainingAuthSeconds -= 2;
@@ -70,18 +72,24 @@ angular.module('umbraco.services')
if (currentUser.remainingAuthSeconds > 30) {
//we need to check when the last time the timeout was set from the server, if
// it has been more than 30 seconds then we'll manually go and retreive it from the
// it has been more than 30 seconds then we'll manually go and retrieve it from the
// server - this helps to keep our local countdown in check with the true timeout.
if (lastServerTimeoutSet != null) {
var now = new Date();
var seconds = (now.getTime() - lastServerTimeoutSet.getTime()) / 1000;
if (seconds > 30) {
//first we'll set the lastServerTimeoutSet to null - this is so we don't get back in to this loop while we
// wait for a response from the server otherwise we'll be making double/triple/etc... calls while we wait.
lastServerTimeoutSet = null;
//now go get it from the server
authResource.getRemainingTimeoutSeconds().then(function(result) {
setUserTimeoutInternal(result);
//NOTE: the safeApply because our timeout is set to not run digests (performance reasons)
angularHelper.safeApply($rootScope, function() {
authResource.getRemainingTimeoutSeconds().then(function (result) {
setUserTimeoutInternal(result);
});
});
}
}
@@ -91,10 +99,10 @@ angular.module('umbraco.services')
}
else {
//we are either timed out or very close to timing out so we need to show the login dialog.
//NOTE: the safeApply because our timeout is set to not run digests (performance reasons)
//we are either timed out or very close to timing out so we need to show the login dialog.
if (Umbraco.Sys.ServerVariables.umbracoSettings.keepUserLoggedIn !== true) {
angularHelper.safeApply($rootScope, function() {
//NOTE: the safeApply because our timeout is set to not run digests (performance reasons)
angularHelper.safeApply($rootScope, function () {
userAuthExpired();
});
}
@@ -105,9 +113,13 @@ angular.module('umbraco.services')
//first we'll set the lastServerTimeoutSet to null - this is so we don't get back in to this loop while we
// wait for a response from the server otherwise we'll be making double/triple/etc... calls while we wait.
lastServerTimeoutSet = null;
//now go get it from the server
authResource.getRemainingTimeoutSeconds().then(function (result) {
setUserTimeoutInternal(result);
//NOTE: the safeApply because our timeout is set to not run digests (performance reasons)
angularHelper.safeApply($rootScope, function() {
authResource.getRemainingTimeoutSeconds().then(function (result) {
setUserTimeoutInternal(result);
});
});
}
@@ -23,14 +23,14 @@ angular.module('umbraco.services').factory('packageHelper', packageHelper);
function umbPhotoFolderHelper($compile, $log, $timeout, $filter, imageHelper, mediaHelper, umbRequestHelper) {
return {
/** sets the image's url - will check if it is a folder or a real image */
setImageUrl: function(img) {
//get the image property (if one exists)
img.thumbnail = mediaHelper.resolveFile(img, true);
img.image = mediaHelper.resolveFile(img, false);
/** sets the image's url, thumbnail and if its a folder */
setImageData: function(img) {
img.isFolder = !mediaHelper.hasFilePropertyType(img);
if (!img.thumbnail){
img.thumbnail = "none";
if(!img.isFolder){
img.thumbnail = mediaHelper.resolveFile(img, true);
img.image = mediaHelper.resolveFile(img, false);
}
},
@@ -198,7 +198,7 @@ function umbPhotoFolderHelper($compile, $log, $timeout, $filter, imageHelper, me
//in this case, a single image will not fit into the row so we need to crop/center
// width the full width and the min display height
if (imgs.length > 1 && imageRowHeight.imgCount === 1) {
if (imageRowHeight.imgCount === 1) {
sizes.push({
width: targetWidth,
//ensure that the height is rounded
@@ -252,15 +252,22 @@ function umbPhotoFolderHelper($compile, $log, $timeout, $filter, imageHelper, me
},
/** Creates the image grid with calculated widths/heights for images to fill the grid nicely */
buildGrid: function(images, maxRowWidth, maxRowHeight, startingIndex, minDisplayHeight, idealImgPerRow, margin) {
buildGrid: function(images, maxRowWidth, maxRowHeight, startingIndex, minDisplayHeight, idealImgPerRow, margin,imagesOnly) {
var rows = [];
var imagesProcessed = 0;
//first fill in all of the original image sizes and URLs
for (var i = startingIndex; i < images.length; i++) {
this.setImageUrl(images[i]);
this.setOriginalSize(images[i], maxRowHeight);
var item = images[i];
this.setImageData(item);
this.setOriginalSize(item, maxRowHeight);
if(imagesOnly && !item.isFolder && !item.thumbnail){
images.splice(i, 1);
i--;
}
}
while ((imagesProcessed + startingIndex) < images.length) {
@@ -390,7 +397,7 @@ function updateChecker($http, umbRequestHelper) {
umbRequestHelper.getApiUrl(
"updateCheckApiBaseUrl",
"GetCheck")),
'Failed to retreive update status');
'Failed to retrieve update status');
}
};
}
@@ -93,7 +93,7 @@
<label class="checkbox" for="integratedAuth">
<input type="checkbox" name="integratedAuth"
placeholder="umbraco-cms"
ng-model="installer.current.model.integratedAuth" /> Use intergrated authentication</label>
ng-model="installer.current.model.integratedAuth" /> Use integrated authentication</label>
</div>
</div>
</div>
@@ -1,6 +1,8 @@
angular.module("umbraco.install").controller("Umbraco.Install.UserController", function($scope, installerService) {
$scope.passwordPattern = /.*/;
$scope.installer.current.model.subscribeToNewsLetter = true;
if ($scope.installer.current.model.minNonAlphaNumericLength > 0) {
var exp = "";
for (var i = 0; i < $scope.installer.current.model.minNonAlphaNumericLength; i++) {
@@ -27,18 +27,31 @@
<div class="control-group">
<label class="control-label" for="password">Password</label>
<div class="controls">
<input type="password" name="installer.current.model.password"
<!-- why isn't this masked: http://www.nngroup.com/articles/stop-password-masking/ -->
<input type="text" name="installer.current.model.password"
ng-minlength="{{installer.current.model.minCharLength}}"
ng-pattern="passwordPattern"
autocorrect="off"
autocapitalize="off"
required
ng-model="installer.current.model.password" />
<small class="inline-help">At least {{installer.current.model.minCharLength}} characters long</small>
<small ng-if="installer.current.model.minNonAlphaNumericLength > 0" class="inline-help">
At least {{installer.current.model.minNonAlphaNumericLength}} symbol{{installer.current.model.minNonAlphaNumericLength > 1 ? 's' : ''}}
</small>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox" for="subscribeToNewsLetter">
<input type="checkbox" name="subscribeToNewsLetter"
ng-model="installer.current.model.subscribeToNewsLetter" /> Keep me updated on Umbraco Versions, Security Bulletins and Community News</label>
</div>
</div>
<div class="control-group" ng-class="{disabled:myForm.$invalid}">
<div class="controls">
+1 -1
View File
@@ -156,7 +156,7 @@ body {
#speechbubble {
z-index: 1000;
position: absolute;
bottom: 20px;
bottom: 40px;
left: 0;
right: 0;
border-bottom: none;
@@ -87,7 +87,8 @@
}
.umb-listview .selected i.icon, .umb-listview tr:hover i.icon{display: none}
.umb-listview .selected input[type="checkbox"], .umb-listview tr:hover input[type="checkbox"]{display: inline-block;}
.umb-listview .selected input[type="checkbox"],
.umb-listview tr:hover input[type="checkbox"]{display: inline-block !important;}
.umb-listview .inactive{color: @grayLight;}
.umb-listview .selected td{font-weight: bold;}
@@ -120,7 +121,7 @@
font-weight: 400
}
.table-striped tbody > tr:nth-child(even) > td, .table-striped tbody > tr:nth-child(even) > th {
.umb-listview .table-striped tbody > tr:nth-child(even) > td, .umb-listview .table-striped tbody > tr:nth-child(even) > th {
background-color: @grayLighter
}
@@ -167,18 +168,22 @@
/* TEMP */
.table-striped tbody td {
.umb-listview .table-striped tbody td {
position: relative
}
.table-striped tbody input[type="checkbox"] {
.umb-listview .table-striped thead input[type="checkbox"] {
margin-left: 7px;
}
.umb-listview .table-striped tbody input[type="checkbox"] {
display: none;
top: 10px;
left:10px;
margin-left: 7px;
z-index: 5;
}
.table-striped tbody i {
.umb-listview .table-striped tbody i {
display: block;
top: 10px;
left:6px;
@@ -189,7 +194,7 @@
height: 20px;
}
.table-striped tbody > tr:nth-child(even) > td i, .table-striped tbody > tr:nth-child(even) > th i{
.umb-listview .table-striped tbody > tr:nth-child(even) > td i, .umb-listview .table-striped tbody > tr:nth-child(even) > th i{
background-color: @grayLighter
}
@@ -187,6 +187,7 @@ ul.color-picker li a {
max-height:100%;
margin:auto;
display:block;
background-image: url(../img/checkered-background.png);
}
.umb-sortable-thumbnails li img.noScale{
@@ -303,6 +304,10 @@ ul.color-picker li a {
line-height: 120px
}
.umb-folderbrowser .selector-overlay{
display: none !important;
}
.umb-upload-drop-zone .info, .umb-upload-button-big{
display: block;
padding: 20px;
@@ -342,6 +347,8 @@ ul.color-picker li a {
position: relative;
}
.umb-photo-folder .picrow div, .umb-photo-preview{
margin: 0px;
padding: 0px;
@@ -391,11 +398,11 @@ ul.color-picker li a {
.umb-photo-folder .umb-non-thumbnail i{
color: @grayLight;
font-size: 70px;
line-height: 80px;
font-size: 50px;
line-height: 60px;
display: block;
margin: auto;
padding-top: 25%;
padding-top: 20px;
}
.umb-photo-folder .selected{
@@ -25,13 +25,14 @@ function InsertMacroController($scope, entityResource, macroResource, umbPropEdi
$scope.macroParams = data;
//fill in the data if we are editing this macro
if ($scope.dialogData && $scope.dialogData.macroData && $scope.dialogData.macroData.marcoParamsDictionary) {
_.each($scope.dialogData.macroData.marcoParamsDictionary, function (val, key) {
if ($scope.dialogData && $scope.dialogData.macroData && $scope.dialogData.macroData.macroParamsDictionary) {
_.each($scope.dialogData.macroData.macroParamsDictionary, function (val, key) {
var prop = _.find($scope.macroParams, function (item) {
return item.alias == key;
});
if (prop) {
prop.value = val;
//we need to unescape values as they have most likely been escaped while inserted
prop.value = _.unescape(val);
}
});
@@ -58,16 +59,16 @@ function InsertMacroController($scope, entityResource, macroResource, umbPropEdi
//get the syntax based on the rendering engine
var syntax;
if ($scope.dialogData.renderingEngine && $scope.dialogData.renderingEngine === "WebForms") {
syntax = macroService.generateWebFormsSyntax({ macroAlias: macroAlias, marcoParamsDictionary: paramDictionary });
syntax = macroService.generateWebFormsSyntax({ macroAlias: macroAlias, macroParamsDictionary: paramDictionary });
}
else if ($scope.dialogData.renderingEngine && $scope.dialogData.renderingEngine === "Mvc") {
syntax = macroService.generateMvcSyntax({ macroAlias: macroAlias, marcoParamsDictionary: paramDictionary });
syntax = macroService.generateMvcSyntax({ macroAlias: macroAlias, macroParamsDictionary: paramDictionary });
}
else {
syntax = macroService.generateMacroSyntax({ macroAlias: macroAlias, marcoParamsDictionary: paramDictionary });
syntax = macroService.generateMacroSyntax({ macroAlias: macroAlias, macroParamsDictionary: paramDictionary });
}
$scope.submit({ syntax: syntax, macroAlias: macroAlias, marcoParamsDictionary: paramDictionary });
$scope.submit({ syntax: syntax, macroAlias: macroAlias, macroParamsDictionary: paramDictionary });
}
$scope.macros = [];
@@ -9,7 +9,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
if(dialogOptions.currentTarget){
$scope.target = dialogOptions.currentTarget;
//if we a node ID, we fetch the current node to build the form data
//if we have a node ID, we fetch the current node to build the form data
if($scope.target.id){
if(!$scope.target.path) {
@@ -30,7 +30,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
dialogService.mediaPicker({callback: function(media){
$scope.target.id = undefined;
$scope.target.name = media.name;
$scope.target.url = mediaHelper.getMediaPropertyValue({mediaModel: media});
$scope.target.url = mediaHelper.resolveFile(media);
}});
};
@@ -4,7 +4,9 @@ angular.module("umbraco")
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, eventsService, treeService, $cookies) {
var dialogOptions = $scope.$parent.dialogOptions;
$scope.onlyImages = dialogOptions.onlyImages;
$scope.showDetails = dialogOptions.showDetails;
$scope.multiPicker = (dialogOptions.multiPicker && dialogOptions.multiPicker !== "0") ? true : false;
$scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
@@ -65,19 +67,8 @@ angular.module("umbraco")
//mediaResource.rootMedia()
mediaResource.getChildren(folder.id)
.then(function(data) {
$scope.images = [];
$scope.searchTerm = "";
if(data.items){
$scope.images = data.items;
}
if($scope.onlyImages){
$scope.images = _.reject($scope.images, function(item) {
return item.contentTypeAlias.toLowerCase() !== "folder" && item.thumbnail === "";
});
}
$scope.images = data.items ? data.items : [];
});
$scope.options.formData.currentFolder = folder.id;
@@ -91,17 +82,20 @@ angular.module("umbraco")
$scope.clickHandler = function(image, ev, select) {
ev.preventDefault();
if (image.contentTypeAlias.toLowerCase() == 'folder' && !select) {
if (image.isFolder && !select) {
$scope.gotoFolder(image);
}else{
eventsService.emit("dialogs.mediaPicker.select", image);
//we have 3 options add to collection (if multi) show details, or submit it right back to the callback
if ($scope.multiPicker) {
$scope.select(image);
image.cssclass = ($scope.dialogData.selection.indexOf(image) > -1) ? "selected" : "";
}else {
}else if($scope.showDetails) {
$scope.target= image;
$scope.target.url = mediaHelper.resolveFile(image); // getMediaPropertyValue({mediaModel: image});
$scope.target.url = mediaHelper.resolveFile(image);
}else{
$scope.submit(image);
}
}
};
@@ -114,29 +108,7 @@ angular.module("umbraco")
$scope.target = undefined;
};
$scope.selectFolder= function(folder) {
if ($scope.multiPicker) {
$scope.select(folder);
}
else {
$scope.submit(folder);
}
};
$scope.selectMediaItem = function(image) {
if (image.contentTypeAlias.toLowerCase() == 'folder') {
$scope.gotoFolder(image);
}else{
eventsService.emit("dialogs.mediaPicker.select", image);
if ($scope.multiPicker) {
$scope.select(image);
}
else {
$scope.submit(image);
}
}
};
//default root item
if(!$scope.target){
@@ -100,14 +100,14 @@ data-file-upload="options" data-file-upload-progress="" data-ng-class="{'fileupl
<div class="umb-panel-body with-footer">
<div style="height: 10px; margin: 10px 0px 10px 0px" class="umb-loader"
ng-hide="active() == 0"></div>
<umb-photo-folder
min-height="75"
min-height="105"
min-width="150"
max-height="250"
ideal-items-per-row="3"
on-click="clickHandler"
ng-model="images"
images-only="{{onlyImages}}"
filter-by="searchTerm"/>
</div>
@@ -132,7 +132,7 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, appS
// from the server so that we can load in the actions menu.
umbRequestHelper.resourcePromise(
$http.get(content.treeNodeUrl),
'Failed to retreive data for child node ' + content.id).then(function(node) {
'Failed to retrieve data for child node ' + content.id).then(function(node) {
$scope.currentNode = node;
});
}
@@ -59,7 +59,7 @@
<!-- sub buttons -->
<ul class="dropdown-menu bottom-up" role="menu" aria-labelledby="dLabel" ng-if="subButtons.length > 0">
<li ng-repeat="btn in subButtons">
<a href="#" ng-click="performAction(btn)" ng-disabled="true" prevent-default>
<a href="#" ng-click="performAction(btn)" prevent-default>
<localize key="{{btn.labelKey}}">{{btn.labelKey}}</localize>
</a>
</li>
@@ -13,7 +13,7 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
$scope.currentSection = appState.getSectionState("currentSection");
$scope.currentNode = null; //the editors affiliated node
//method used to configure the pre-values when we retreive them from the server
//method used to configure the pre-values when we retrieve them from the server
function createPreValueProps(preVals) {
$scope.preValues = [];
for (var i = 0; i < preVals.length; i++) {
@@ -141,4 +141,4 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
}
angular.module("umbraco").controller("Umbraco.Editors.DataType.EditController", DataTypeEditController);
angular.module("umbraco").controller("Umbraco.Editors.DataType.EditController", DataTypeEditController);
@@ -15,18 +15,16 @@
<div class="span5">
<div class="btn-toolbar pull-right umb-btn-toolbar">
<umb-options-menu ng-show="currentNode"
current-node="currentNode"
current-section="{{currentSection}}">
</umb-options-menu>
</div>
</div>
</umb-header>
<div class="umb-panel-body umb-scrollable row-fluid">
<div class="tab-content form-horizontal">
<div class="tab-content form-horizontal" style="padding-bottom: 90px">
<div class="umb-pane">
<umb-property property="properties.selectedEditor">
@@ -7,21 +7,20 @@
<a href="#media/media/edit/{{img.id}}"
ng-click="clickHandler(img, $event, false)"
ng-switch="img.thumbnail"
title="{{img.name}}">
<div ng-style="img.style" class="umb-non-thumbnail" ng-switch-when="none">
<div ng-style="img.style" class="umb-non-thumbnail" ng-if="!img.thumbnail">
<i class="icon large {{img.icon}}"></i>
{{img.name}}
</div>
<div ng-switch-default class="umb-photo" ng-style="img.thumbStyle" alt="{{img.name}}"></div>
<div ng-if="img.thumbnail" class="umb-photo" ng-style="img.thumbStyle" alt="{{img.name}}"></div>
</a>
<a href ng-click="clickHandler(img, $event, true)" ng-show="img.contentTypeAlias === 'Folder'" class="selector-overlay">
<a href ng-click="clickHandler(img, $event, true)"
ng-if="img.isFolder" class="selector-overlay">
<localize key="buttons_select">Select</localize>
</a>
</div>
</div>
</div>
@@ -12,7 +12,7 @@
type="range"
min="{{dimensions.scale.min}}"
max="{{dimensions.scale.max}}"
step="0.01"
step="0.001"
ng-model="dimensions.scale.current" />
<i class="icon-picture" style="font-size: 22px"></i>
</div>
@@ -27,7 +27,7 @@ function mediaEditController($scope, $routeParams, appState, mediaResource, enti
// from the server so that we can load in the actions menu.
umbRequestHelper.resourcePromise(
$http.get(content.treeNodeUrl),
'Failed to retreive data for child node ' + content.id).then(function (node) {
'Failed to retrieve data for child node ' + content.id).then(function (node) {
$scope.currentNode = node;
});
}
@@ -110,4 +110,4 @@ function mediaEditController($scope, $routeParams, appState, mediaResource, enti
}
angular.module("umbraco")
.controller("Umbraco.Editors.Media.EditController", mediaEditController);
.controller("Umbraco.Editors.Media.EditController", mediaEditController);
@@ -7,20 +7,25 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.MultiValuesControl
$scope.hasError = false;
if (!angular.isArray($scope.model.value)) {
//make an array from the dictionary
var items = [];
for (var i in $scope.model.value) {
items.push({
value: $scope.model.value[i],
items.push({
value: $scope.model.value[i].value,
sortOrder: $scope.model.value[i].sortOrder,
id: i
});
}
//ensure the items are sorted by the provided sort order
items.sort(function (a, b) { return (a.sortOrder > b.sortOrder) ? 1 : ((b.sortOrder > a.sortOrder) ? -1 : 0); });
//now make the editor model the array
$scope.model.value = items;
}
$scope.remove = function(item, evt) {
evt.preventDefault();
$scope.model.value = _.reject($scope.model.value, function (x) {
@@ -30,7 +35,6 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.MultiValuesControl
};
$scope.add = function (evt) {
evt.preventDefault();
@@ -47,4 +51,36 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.MultiValuesControl
$scope.hasError = true;
};
$scope.sortableOptions = {
axis: 'y',
containment: 'parent',
cursor: 'move',
items: '> div.control-group',
tolerance: 'pointer',
update: function (e, ui) {
// Get the new and old index for the moved element (using the text as the identifier, so
// we'd have a problem if two prevalues were the same, but that would be unlikely)
var newIndex = ui.item.index();
var movedPrevalueText = $('input[type="text"]', ui.item).val();
var originalIndex = getElementIndexByPrevalueText(movedPrevalueText);
// Move the element in the model
if (originalIndex > -1) {
var movedElement = $scope.model.value[originalIndex];
$scope.model.value.splice(originalIndex, 1);
$scope.model.value.splice(newIndex, 0, movedElement);
}
}
};
function getElementIndexByPrevalueText(value) {
for (var i = 0; i < $scope.model.value.length; i++) {
if ($scope.model.value[i].value === value) {
return i;
}
}
return -1;
}
});
@@ -3,10 +3,11 @@
<input name="newItem" type="text" ng-model="newItem" val-highlight="hasError" />
<button class="btn btn-small" ng-click="add($event)">Add</button>
</div>
<div class="control-group" ng-repeat="item in model.value">
<input type="text" ng-model="item.value" val-server="item_{{$index}}" required />
<button class="btn btn-small btn-danger" ng-click="remove(item, $event)">Remove</button>
<div ui-sortable="sortableOptions">
<div class="control-group" ng-repeat="item in model.value">
<i class="icon icon-navigation handle"></i>
<input type="text" ng-model="item.value" val-server="item_{{$index}}" required />
<button class="btn btn-small btn-danger" ng-click="remove(item, $event)">Remove</button>
</div>
</div>
</div>
@@ -18,7 +18,7 @@
<span class="help-inline" val-msg-for="resetPassword" val-toggle-msg="valServer"></span>
</umb-control-group>
<!-- we need to show the old pass field when the provider cannot retreive the password -->
<!-- we need to show the old pass field when the provider cannot retrieve the password -->
<umb-control-group alias="oldPassword" label="Old password" ng-show="$parent.showOldPass()">
<input type="text" name="oldPassword" ng-model="$parent.model.value.oldPassword"
class="input-large umb-textstring textstring"
@@ -50,4 +50,4 @@
<a href="" ng-click="cancelChange()" ng-show="showCancelBtn()" class="btn btn-small">Cancel</a>
</div>
</div>
</div>
</div>

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