Compare commits

...

214 Commits

Author SHA1 Message Date
Sebastiaan Janssen 95d5263405 Bumps version to 7.11.2 and updates CDF 2018-09-20 08:35:28 +02:00
Anders Bjerner ad99d164c9 U4-11477 Here we go again
https://github.com/umbraco/Umbraco-CMS/pull/2720#issuecomment-400106496
2018-06-25 23:58:25 +02:00
Anders Bjerner ae3205c429 Fixes U4-11426 for files as well
The original fix from #2679 only fixes the bug for images, as it checks whether the `umbracoWidth` and `umbracoHeight` properties are present. With this PR, the bug is now fixed for both images and regular files.
2018-06-25 12:08:42 +02:00
Joshua Pease 10c71a7381 Set a initial $scope.model.value for true/false 2018-06-25 08:24:22 +02:00
Sebastiaan Janssen 9875c37cf2 Bumps version to 7.11.1 2018-06-21 10:48:25 +02:00
Sebastiaan Janssen 67e36a0d60 U4-11456 Package installation - Load usercontrol: file cannot be found: /umbraco/developer/Packages/installer.aspx 2018-06-21 10:38:04 +02:00
Sebastiaan Janssen bcca0528c0 U4-11462 Error when using Simple Injector - 'The Tree controller is missing the Umbraco.Web.Trees.TreeAttribute attribute' 2018-06-21 08:19:53 +02:00
Shannon Deminick 4f04692afa Merge pull request #2707 from umbraco/temp-U4-11341
U4-11341 Content node tree collapse on random nodes level 3 or lower …
2018-06-20 18:25:22 +10:00
Sebastiaan Janssen 9909b10edb Removes more unnecessary code from the tree syncing if we don't need to consider the start nodes 2018-06-20 09:26:09 +02:00
Sebastiaan Janssen 4e6c4d6f7f U4-11341 Content node tree collapse on random nodes level 3 or lower after upgrade to 7.10.4 2018-06-19 16:08:11 +02:00
Sebastiaan Janssen 6cbc3367b1 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2018-06-18 12:05:28 +02:00
Sebastiaan Janssen c961ffcef2 Merge pull request #2704 from andyneil/dev-v7
U4-11321 - Removed redundant autocomplete attribute
2018-06-18 10:00:59 +02:00
Sebastiaan Janssen f034fbccf9 Merge pull request #2701 from abryukhov/temp-U4-11430
U4-11430 - adds new UI localization keys (ru-RU) for v7.11
2018-06-18 09:58:03 +02:00
Andy Neil 65d9b3b99d U4-11321 - Remove unused "autocomplete" attribute 2018-06-17 16:03:02 +01:00
Alexander Bryukhov 77f0b4e093 U4-11430 - couple of typos 2018-06-16 16:25:16 +07:00
Alexander Bryukhov 59e291f961 U4-11430 - slightly better health check keys translation 2018-06-16 16:23:11 +07:00
Alexander Bryukhov 50e4825066 U4-11430 - adds new UI localization keys (ru-RU) for v7.11 2018-06-16 15:59:57 +07:00
Sebastiaan Janssen 4235963fce Fix configuration errors 2018-06-14 15:32:38 +02:00
Sebastiaan Janssen 7d2bbb64b1 Fix configuration errors 2018-06-14 15:22:22 +02:00
Sebastiaan Janssen 07ccdfb7af Removes hacky way to get the section name and replaces it with the normal way to get it 2018-06-14 12:01:29 +02:00
Sebastiaan Janssen 2022ca6d64 Merge pull request #2694 from dampee/feature/U4-11438
U4-11438 Add issuu.com oembed functionality
2018-06-14 10:29:19 +02:00
Shannon Deminick 7372fa1705 Merge pull request #2627 from efabioli/patch-1
U4-11329 - GetExternalAuthenticationOptions gets called when AuthType is Null in Umbraco.Web/editors/BackOfficeController.cs
2018-06-14 14:31:27 +10:00
Damiaan 9ec1d20d51 U4-11438 Add issuu.com oembed functionality + fixed typo's in EmbeddedMedia.config file 2018-06-13 22:20:11 +02:00
Ed Parry 0e4bcc96e7 U4-9367 Refined context menu for content in the recycle bin (#2687) 2018-06-13 21:38:03 +02:00
Sebastiaan Janssen 82c7bc45a7 Merge pull request #2640 from lars-erik/U4-7874
U4-7874 - Add events to content editor
2018-06-13 21:30:10 +02:00
Sebastiaan Janssen 10484a2240 Fix unit tests after moving the Dictionary tree 2018-06-13 21:16:44 +02:00
Enkel Media 8d41d106d0 Fixes #U4-11406 by setting the thread culture before rendering macro (#2666) 2018-06-13 21:06:58 +02:00
Sebastiaan Janssen 8e18778bc2 Merge pull request #2675 from bjarnef/dev-v7-U4-11301
Add id and guid on datatype pages
2018-06-13 21:04:19 +02:00
Sebastiaan Janssen 8068641120 Merge pull request #2679 from stephen47/temp-U4-11426
U4-11426 - Fixed bug with media picker not populating URL in RTE link editor when search is used.
2018-06-13 20:58:18 +02:00
Sebastiaan Janssen 388f9e3a1e Merge pull request #2685 from abryukhov/temp-U4-11430
U4-11430 - Backoffice UI localization update (ru-RU)
2018-06-13 20:48:55 +02:00
Adam Prendergast 51b77669cb U4-11437: Added 'Document Type Alias' title to appear on mouse hover … (#2692) 2018-06-13 20:46:45 +02:00
Garrit Petersen f04335ef7d cursor remians default when no alias is given to the umb-control-grou… (#2497) 2018-06-13 20:42:21 +02:00
Sebastiaan Janssen aca0249c0f NuGet install now creates the correct tree controller 2018-06-13 20:29:55 +02:00
Sebastiaan Janssen d66e951b68 Updating code style, removes obsolete files, now we can move the tree to the Translation section 2018-06-13 20:20:21 +02:00
Dave Woestenborghs 9c33f1b1c9 U4-5683 Migrate Dictionary tree & editor to angular (#2159) 2018-06-13 20:19:18 +02:00
Daniël Knippers 3520f2d1e4 Fix NullReferenceException when HttpContext is null
This method will throw a NullReferenceException in contexts without an HttpContext, like is the case in background threads. As HttpContext is only used to set an isDebug flag, it seems more sensible to not throw in cases without an HttpContext, but simply set isDebug to false instead. If this is not acceptable behavior, could we perhaps look at something other than HttpContext.Current.IsDebuggingEnabled to decide whether isDebug should be set?
2018-06-13 13:25:10 +02:00
Claus 2715d49630 Merge pull request #2498 from hemraker/temp-U4-10899
Fixes U4-10899: Template circular dependency
2018-06-12 13:04:23 +02:00
Alexander Bryukhov 78fe1015aa U4-11430 - Backoffice UI localization update (ru-RU) 2018-06-11 17:16:49 +07:00
Stephen Holder d43d432d2f U4-11426 - Fixed bug with media picker not populating URL in RTE link editor when search is used. 2018-06-08 20:35:20 +01:00
Bjarne Fyrstenborg 06ee6e3845 Add id and guid on datatype pages 2018-06-06 23:23:15 +02:00
Marc Goodson 0eceb3c7fc U4-11369 - Add list of content types where a composition content type is used to compositions dialog (#2668) 2018-06-06 22:35:10 +02:00
Chris Houston 5013c5f526 Fixes issue: U4-11416 - Better formatting for the video tiles in the developer section. (#2673) 2018-06-06 20:17:56 +02:00
Sebastiaan Janssen d07bd58deb Merge pull request #2672 from WojciechKmiecik/temp-U4-10936
fix for U4-10936 "Failed to read the 'rules' property from 'CSSStyleSheet'" when certain chrome extensions are enabled
2018-06-06 10:01:01 +02:00
Sebastiaan Janssen d8ba0d352e Merge pull request #2633 from maarten-kieft/dev-v7
Make base AnchestorOrSelf public
2018-06-06 09:58:55 +02:00
Wojciech Kmiecik faf9800235 fix U4-10936 when ceratin chrome extensions are enabled 2018-06-05 17:17:14 +02:00
Sebastiaan Janssen e789cb8875 Merge pull request #2671 from Mundairson/dev-v7-U4-8199
Refactor the extension method IsNullOrWhiteSpace() to use the native version
2018-06-05 14:30:18 +02:00
Sebastiaan Janssen f208fc65d0 Merge pull request #2639 from lars-erik/U4-11356
U4-11356 Events emitted from the grid on init, row added and item added
2018-06-05 14:18:14 +02:00
Mundairson e7c1d3dd2e Removed old version. 2018-06-05 12:25:37 +01:00
Mundairson 379ac8a3cb Refactored the extension method to call the native method. 2018-06-05 12:25:06 +01:00
Sebastiaan Janssen 8202dbcc5b Merge pull request #2644 from ssougnez/temp-U4-10956
Created an innerState variable in the isolated scope of "umb-button" …
2018-06-05 12:57:44 +02:00
Sebastiaan Janssen 8172789537 Merge pull request #2669 from dawoe/temp-U4-11412
U4-11412 only show buttons in umb-confirm when callback is defined
2018-06-05 12:39:17 +02:00
Sebastiaan Janssen 08dd74322a Merge pull request #2667 from BatJan/dev-v7
Use the umb-toggle directive for the "True/False" property editor
2018-06-05 12:37:08 +02:00
Mundairson 8953021784 Corrected the VersionCheckPeriod property's XML comment. 2018-06-05 10:58:45 +01:00
Sebastiaan Janssen da4e519e4b Merge pull request #2658 from PeteDuncanson/temp-U4-11395
U4-11395 - Add Gulp ImageMin to compress images in build process
2018-06-04 14:16:48 +02:00
Sebastiaan Janssen 42a6872685 Move image to the new location 2018-06-04 13:51:12 +02:00
Sebastiaan Janssen a8cf6e8426 Merge pull request #2651 from umbraco/temp-ic-2
Restructures contribution guidelines into multiple files to make them…
2018-06-04 13:43:06 +02:00
Dave Woestenborghs fe2ff696c5 U4-11412 documented umbConfirm directive 2018-06-04 09:06:25 +02:00
Sebastiaan Janssen 240c205765 Merge pull request #2649 from AndyFelton/temp-U4-11039
Conditional Upload button on Media Picker
2018-06-04 08:58:35 +02:00
Dave Woestenborghs 03019e9676 U4-11412 only show cancel and confirm button when a handler is attached 2018-06-04 08:52:48 +02:00
Dave Woestenborghs 697cc7a420 U4-11412 hide cancel button in umb-confirm when handler is not defined 2018-06-04 08:45:09 +02:00
Sebastiaan Janssen 8961f930e3 Merge pull request #2646 from AndersBrohus/U4-11367
U4-11367 - Show trashbin icon again
2018-06-04 08:03:30 +02:00
Sebastiaan Janssen 2d3ef8d311 Merge pull request #2642 from Mundairson/dev-v7-getting-started-text-fixes
Corrected spelling and grammar in the Getting Started tool tips for v7.
2018-06-04 07:58:36 +02:00
Shannon Deminick 02afb1e774 Merge pull request #2665 from umbraco/temp-U4-11338
fixes U4-11338 Language dropdown fails when invalid cultures are present
2018-06-04 14:07:01 +10:00
Jan Skovgaard 6188629da6 Convert the default boring checkbox to the shiny new and beautiful toggle based on the umb-toggle directive 2018-06-01 22:03:10 +02:00
Sebastiaan Janssen 2c04a02d62 Merge pull request #2662 from readingdancer/U4-11400
Updated references to mention May for CodeGarden in the installer
2018-06-01 15:09:07 +02:00
Claus ccc8868f68 fixes U4-11338 Language dropdown fails when invalid cultures are present 2018-06-01 13:06:13 +02:00
Chris Houston cde7f0fa18 Updated references to CodeGarden in the installer and the umbraco.config test file to mention May instead of June :) 2018-05-31 14:50:01 -04:00
Sebastiaan Janssen 867ccaf2b1 Small corrections 2018-05-31 15:26:12 +02:00
Peter Duncanson 3743fc1c29 Added Gulp Images to compress images as part of the front end build process 2018-05-31 13:37:24 +01:00
Sebastiaan Janssen d10aec9e68 Merge branch 'dev-v7' into temp-ic-2
# Conflicts:
#	docs/CONTRIBUTING_DETAILED.md
#	docs/README.md
2018-05-30 11:18:15 +02:00
Mundairson fefe5660ef Added merged files from dev-v7 2018-05-30 10:07:05 +01:00
Sebastiaan Janssen 5d978a62fd Small corrections 2018-05-30 10:19:21 +02:00
Shannon Deminick 49062d3ede Merge pull request #2625 from poornimanayar/U4-11159
Fixed typos in tours
2018-05-30 08:10:25 +02:00
Sebastiaan Janssen 7853245fe4 Small corrections 2018-05-29 17:33:06 +02:00
Sebastiaan Janssen fa88efbf5e Small corrections 2018-05-29 17:24:14 +02:00
Sebastiaan Janssen 6f6252b616 Restructures contribution guidelines into multiple files to make them easier to digest for new
contributors
ref: https://github.com/umbraco/issues-community/issues/2
2018-05-29 17:18:25 +02:00
Andy Felton 7947970817 Conditional Upload button on Media Picker
Made upload button only appear when media can be uploaded to the current folder. Also ensured acceptedMediatypes is always valid even in the root directory
2018-05-28 15:39:15 +01:00
Anders Brohus 76717eb720 Show trashbin icon again
After looking i found out that the problem was that the "position:relative;" was removed on the umb-group-builder__group class.
2018-05-25 19:53:06 +02:00
Seb cd0c9a39f3 Created an innerState variable in the isolated scope of "umb-button" directive in order to ensure not to create a "state" property in the directive isolated scope. 2018-05-23 18:01:17 +02:00
Sebastiaan Janssen 96ce2882a2 Merge pull request #2643 from abjerner/patch-38
Health Checks: the warning icon should be orange instead of yellow
2018-05-22 11:00:11 +02:00
Anders Bjerner 068ad19492 Health Checks: the warning icon should be orange instead of yellow
Both the yellow and orange colors used to be a bit darker, but when more colors were introduced in 7.10.x, the two colors were made a bit lighter. So now the yellow warning icon is hard to see on a white background, but the orange color now looks just right ;)
2018-05-22 10:44:43 +02:00
Mundairson 6fb4f8fc8b Corrected some spelling and grammar. 2018-05-22 01:10:41 +01:00
Lars-Erik Aabech e7fce9120e Added several events to content editor 2018-05-21 18:04:50 +02:00
Lars-Erik Aabech 76c924fbaa Events emitted from the grid on init, row added and item added w/DOM element and scope. 2018-05-21 17:06:12 +02:00
Sebastiaan Janssen 93b470f15c Merge pull request #2638 from rozzilla/patch-2
Update README img
2018-05-21 10:25:31 +02:00
Roberto Bianchi 1cef87ee34 Update README img 2018-05-21 10:20:44 +02:00
Maarten Kieft 8e7630cd9c Make Base AnchestorOrSelf function public
By making this function public, developers can use it to iterate over the tree on different property / function than the ones which are created. It makes umbraco easier to extend. Now we have to copy existing code in order to do this.
2018-05-17 12:09:15 +02:00
Shannon Deminick 8985d514ec cross link to v8 branch 2018-05-16 13:36:57 +02:00
Shannon Deminick 3c82315782 cross link to the v8 branch 2018-05-16 12:56:00 +02:00
Sebastiaan Janssen 58751577c6 Merge pull request #2622 from DanDiplo/temp-U4-11313
u4 11313 - ContainsAny() method in StringExtensions doesn't honour the StringComparison parameter
2018-05-15 13:07:21 +02:00
Sebastiaan Janssen debe0d811c Merge pull request #2628 from ragivi/patch-1
Update preview page
2018-05-15 13:00:57 +02:00
Sebastiaan Janssen 8d09243473 Merge pull request #2626 from DanDiplo/temp-U4-10706
U4-10706 - Fixes TypedMedia not working with UDI strings
2018-05-15 12:44:46 +02:00
ragivi 2b4cf7d185 Update preview page
In order to avoid indexing.
2018-05-14 14:48:01 +02:00
efabioli 9040b1a3cb NullReferenceException
Retrieving ExternalSignInAutoLinkOptions only if authType is not null.  
Issue found in version 7.9 too; not checked other versions.
2018-05-11 16:27:43 +02:00
Dan Booth 9a8f71dd81 Fixed issue where TypedMedia didn't work with UDI strings 2018-05-11 14:53:03 +01:00
Poornima Nayar d05819e125 Fixed typos in tours 2018-05-11 12:23:51 +01:00
Dan Booth 9c65ed92f1 Added string ContainsAny tests for the ContainsAny(haystack, needles, comparison) extension method 2018-05-10 14:29:00 +01:00
Dan Booth 3f35eca999 Fixed ContainsAny method so that it uses the passed in Comparison method (which enabled case-insensitive comparisons to work) 2018-05-10 14:28:16 +01:00
andyneil 4a86244924 Merge pull request #1 from umbraco/dev-v7
Latest master
2018-05-08 18:28:54 +01:00
Sebastiaan Janssen 324cd7e98f Adds a quick start to setup a gulp environment - when you have NPM in the path the pre-requisites get taken care of 2018-05-04 10:33:35 +02:00
Shannon 1a99d0e4d0 Merge remote-tracking branch 'origin/patch-v7' into dev-v7 2018-04-30 15:27:27 +10:00
Shannon Deminick da0fe5e5a3 Merge pull request #2602 from ProNotion/issues/U4-8516
Fixes U4-8516 Copied node now sets the current user as the creator of the new node.
2018-04-30 15:25:07 +10:00
Simon Dingley dbad0d261e Fixes U4-8516 Copied node now sets the current user as the creator of the new node. 2018-04-27 16:18:25 +01:00
Sebastiaan Janssen d30ec335b8 Merge branch 'patch-v7' into dev-v7 2018-04-20 11:05:46 +02:00
Sebastiaan Janssen e820d2a4aa Merge branch 'patch-7.9.6' into dev-v7 2018-04-20 11:05:37 +02:00
Sebastiaan Janssen 5aa490cbff Merge branch 'patch-7.8.3' into dev-v7 2018-04-20 11:04:51 +02:00
Sebastiaan Janssen f1a8da2876 Bumps version to 7.9.6 2018-04-20 11:02:29 +02:00
Sebastiaan Janssen 27f6560a00 U4-11253 New Chrome 66 trimStart function is overriding the Umbraco Core trimStart polyfill 2018-04-20 11:00:49 +02:00
Sebastiaan Janssen 7a181bd281 Bump version to 7.8.3 2018-04-20 10:59:13 +02:00
Sebastiaan Janssen 4a0cd87a38 U4-11253 New Chrome 66 trimStart function is overriding the Umbraco Core trimStart polyfill 2018-04-20 10:51:28 +02:00
Sebastiaan Janssen 861e5908a7 U4-11253 New Chrome 66 trimStart function is overriding the Umbraco Core trimStart polyfill 2018-04-20 10:35:21 +02:00
Claus ae5a5bd2c0 Merge pull request #2596 from umbraco/temp-U4-11146
Removes Package repository config setting and related unnecessary code
2018-04-20 10:23:16 +02:00
Robert 395575dbe4 Merge pull request #2597 from umbraco/temp-U4-11253
U4-11253 New Chrome 66 trimStart function is overriding the Umbraco C…
2018-04-20 09:39:15 +02:00
Sebastiaan Janssen 6d6be4e6a4 Fixes last failing test 2018-04-19 20:29:46 +02:00
Sebastiaan Janssen fbc9c6aed6 Fixes even more (hopefully all) unit tests 2018-04-19 20:06:34 +02:00
Sebastiaan Janssen 386dc1a14d U4-11253 New Chrome 66 trimStart function is overriding the Umbraco Core trimStart polyfill 2018-04-19 19:54:53 +02:00
Sebastiaan Janssen 8fc33f6aea Fix unit tests 2018-04-19 19:36:44 +02:00
Sebastiaan Janssen 6c8e39876f These changes shouldn't have been checked in 2018-04-19 19:36:32 +02:00
Sebastiaan Janssen bfca8c555e Removes Package repository config setting and related unnecessary code 2018-04-19 19:12:42 +02:00
Robert 9384cd0f27 Merge pull request #2574 from umbraco/temp-U4-11195
fixes U4-11195 Mapping complex properties slow down some queries
2018-04-19 12:22:12 +02:00
Robert 0262b4aa76 Changed ContentPropertyDto modifier back to override which rendered content with tags unable to be saved 2018-04-19 12:10:39 +02:00
Sebastiaan Janssen 96761efe4d Merge branch 'patch-v7' into dev-v7 2018-04-19 09:55:16 +02:00
Shannon 75fb070825 U4-11246 When user belongs to groups and none of them have browse access and one or more have a custom start node applied a YSOD occurs 2018-04-19 16:20:18 +10:00
Shannon Deminick 8a0f32e980 Merge pull request #2595 from umbraco/temp-U4-11208
U4-11208 Error : "An item with the same key has already been added." into "Umbraco.Core.Services.IdkMap.Populate" method
2018-04-19 15:27:00 +10:00
Sebastiaan Janssen f5163ed0c2 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2018-04-18 16:05:43 +02:00
Sebastiaan Janssen 694f3d71e2 Merge branch 'patch-v7' into dev-v7 2018-04-18 16:05:15 +02:00
Robert 15eb40aedb Removed code that populates content tree with duplicate start nodes. 2018-04-18 16:01:01 +02:00
Sebastiaan Janssen 49251271e9 Merge pull request #2591 from umbraco/temp-U4-10995
Removed code that populates content tree with duplicate start nodes.
2018-04-18 15:59:45 +02:00
Sebastiaan Janssen cc3e75dc63 U4-11208 Error : "An item with the same key has already been added." into "Umbraco.Core.Services.IdkMap.Populate" method 2018-04-18 15:14:16 +02:00
Sebastiaan Janssen eeaf17c857 Weird revert of a PR that was merged in before
(cherry picked from commit 94ed741dd5)
2018-04-18 12:18:44 +02:00
Dave Woestenborghs 21a8395142 U4-11216 Multiple Content Picker allows only one item when used as macro parameter (#2593)
U4-11216 set min and max number when used as parameter editor

(cherry picked from commit f25233ac2b)
2018-04-18 10:22:09 +02:00
Dave Woestenborghs f25233ac2b U4-11216 Multiple Content Picker allows only one item when used as macro parameter (#2593)
U4-11216 set min and max number when used as parameter editor
2018-04-18 10:21:12 +02:00
Sebastiaan Janssen 61cd59b237 Merge branch 'patch-v7' into dev-v7 2018-04-17 15:47:41 +02:00
Sebastiaan Janssen 7d171b1e95 Bumps version to 7.10.4 2018-04-17 15:46:39 +02:00
Sebastiaan Janssen d63061fade Merge pull request #2564 from leekelleher/U4-11184
U4-11184 - Nested Content PropertyValueEditor - return converted value, not update reference value
2018-04-17 15:33:14 +02:00
Sebastiaan Janssen 362261e879 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2018-04-17 15:16:46 +02:00
Sebastiaan Janssen af8c00d075 Merge remote-tracking branch 'origin/patch-7.10.3' into dev-v7 2018-04-17 15:16:21 +02:00
Sebastiaan Janssen 68b440e494 Merge remote-tracking branch 'origin/patch-7.9.5' into dev-v7 2018-04-17 15:15:44 +02:00
Sebastiaan Janssen 0c328ef30e Merge remote-tracking branch 'origin/patch-7.8.2' into dev-v7 2018-04-17 15:15:06 +02:00
Robert ef47e85741 Removed code that populates content tree with duplicate start nodes. 2018-04-17 15:07:59 +02:00
Claus 0c191a3ef7 updating to use includeProperties, fixing modifier keywords for methods, and passing includeProperties from list views. 2018-04-17 08:36:36 +02:00
Shannon Deminick 9ac96f24aa Merge pull request #2587 from dawoe/temp-U4-11150
U4-11150 added culture property of tour to the docs
2018-04-16 16:48:25 +10:00
Dave Woestenborghs eca5b6e4e6 U4-11150 added culture property of tour to the docs 2018-04-16 08:35:05 +02:00
Sebastiaan Janssen 2dd7c5210f Merge pull request #2523 from tomfulton/u4-11133
U4-11133 - Fix access check for Unpublish button
2018-04-15 22:48:16 +02:00
Sebastiaan Janssen 3a854688e0 Merge branch 'dawoe-temp-U4-11150' into dev-v7 2018-04-15 22:38:22 +02:00
Sebastiaan Janssen 1594adf3ed Makes code a bit more readable and uses ToList instead of ToArray 2018-04-15 22:38:09 +02:00
Sebastiaan Janssen 23fcb38d69 Merge branch 'temp-U4-11150' of https://github.com/dawoe/Umbraco-CMS into dawoe-temp-U4-11150 2018-04-15 22:15:36 +02:00
Sebastiaan Janssen 7571949ad0 Merge pull request #2586 from bjarnef/dev-v7-U4-11215
U4-11215 - Fix icons in member create dialog
2018-04-15 22:11:24 +02:00
Bjarne Fyrstenborg d45c3520d4 Format document in media create dialog 2018-04-15 21:42:35 +02:00
Bjarne Fyrstenborg b7c04575fa Document media type resource save as in member type resource 2018-04-15 21:42:04 +02:00
Bjarne Fyrstenborg 588f5a3789 Fix some wrong descriptions 2018-04-15 21:41:23 +02:00
Bjarne Fyrstenborg b535a45898 Respect icon set on member type - by default the icon is "icon-user" 2018-04-15 21:39:46 +02:00
Sebastiaan Janssen 1b56c55300 Merge pull request #2522 from tomfulton/u4-7757-client2
U4-7757 - Show notifications when Unpublishing event is canceled
2018-04-13 11:53:51 +02:00
Sebastiaan Janssen 29d9dcffb8 Manually applying PR: Three new healthchecks #1522 2018-04-12 18:38:00 +02:00
Sebastiaan Janssen b0f0a7afc4 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2018-04-12 18:01:43 +02:00
Sebastiaan Janssen 30f8885aa9 Merge branch 'u4-9983' of https://github.com/AndyButland/Umbraco-CMS into AndyButland-u4-9983
# Conflicts:
#	src/Umbraco.Web.UI/umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/zh.xml
#	src/Umbraco.Web/HealthCheck/Checks/Security/ClickJackingCheck.cs
#	src/Umbraco.Web/HealthCheck/Checks/Security/ExcessiveHeadersCheck.cs
#	src/Umbraco.Web/HealthCheck/Checks/Security/HttpsCheck.cs
2018-04-12 17:59:11 +02:00
Sebastiaan Janssen 94ed741dd5 Weird revert of a PR that was merged in before 2018-04-12 17:50:44 +02:00
Sebastiaan Janssen b6d5ac6a01 Update CONTRIBUTING.md 2018-04-12 17:20:12 +02:00
Sebastiaan Janssen 4664266b8d Bumps version to 7.10.3 2018-04-12 16:40:10 +02:00
Sebastiaan Janssen c61fd65463 Bumps version to 7.9.5 2018-04-12 16:38:22 +02:00
Sebastiaan Janssen 1e2598a3a3 Bumps version to 7.8.2 2018-04-12 16:36:41 +02:00
Sebastiaan Janssen 5003a55aca Cherry picked - Fix scope leaks caused by database messenger [U4-11207] #2580 2018-04-12 16:32:34 +02:00
Sebastiaan Janssen b5415844b8 Cherry picked - Fix scope leaks caused by database messenger [U4-11207] #2580 2018-04-12 16:30:55 +02:00
Sebastiaan Janssen 19241995e8 Cherry picked - Fix scope leaks caused by database messenger [U4-11207] #2580 2018-04-12 16:23:33 +02:00
Bjarne Fyrstenborg 828dbaedfb Indicate that a row is clickable and highlight with background color. (#1473) 2018-04-12 15:37:01 +02:00
Sebastiaan Janssen 52701f0056 Fix unit tests that were trying to "downgrade" from version 1 to version 2 2018-04-12 15:30:25 +02:00
Claus c802171f38 Merge pull request #2580 from umbraco/temp-u4-11207
Fix scope leaks caused by database messenger [U4-11207]
2018-04-12 14:43:03 +02:00
Claus 81c5c66e15 adding readonly. 2018-04-12 14:41:55 +02:00
Sebastiaan Janssen 79515cdae7 Merge branch 'martin-blackwell-U4-8927' into dev-v7 2018-04-12 14:36:21 +02:00
Sebastiaan Janssen 99ce7c0736 Throw error when "downgrading" to a higher version, make sure to give the results back in the correct order (newest version first, oldest last). 2018-04-12 14:35:34 +02:00
Claus d9b1598fa2 use scope when writing instructions. 2018-04-12 14:26:47 +02:00
Claus c630e5ef8e only warn if there's actually anything to warn about 2018-04-12 14:26:14 +02:00
Sebastiaan Janssen fe5896c85f Merge branch 'U4-8927' of https://github.com/martin-blackwell/Umbraco-CMS into martin-blackwell-U4-8927 2018-04-12 13:44:38 +02:00
Sebastiaan Janssen 28cbb0a517 Bumps version to 7.11.0 2018-04-12 13:41:56 +02:00
Sebastiaan Janssen 0597b43014 Merge branch 'patch-v7' into dev-v7 2018-04-12 13:39:09 +02:00
Sebastiaan Janssen a124d77670 Merge remote-tracking branch 'origin/patch-7.9.4' into dev-v7
# Conflicts:
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoVersion.cs
2018-04-12 13:38:53 +02:00
Stephan 1076b882fb U4-11207 - collect rogue/leaked NoScope instances 2018-04-12 11:56:56 +02:00
Stephan 4a47c5e129 U4-11207 - fix scope leaks caused by database messenger 2018-04-12 11:13:00 +02:00
mikkelhm 6d052aeeac Bump version to 7.9.4 2018-04-10 08:56:50 +02:00
Claus 5380b62504 fixes U4-11195 Mapping complex properties slow down some queries 2018-04-09 15:43:17 +02:00
Dave Woestenborghs 354505fde3 U4-11149 fixed error when creating new xslt file (#2540)
* U4-10659 added create task back for xslt files

* Add fix to UI.Release.xml as well
2018-04-09 14:47:09 +02:00
Dave Woestenborghs 9b33c8a0e2 U4-11149 fixed error when creating new xslt file (#2540)
* U4-10659 added create task back for xslt files

* Add fix to UI.Release.xml as well
2018-04-09 14:45:26 +02:00
Dave Woestenborghs 07fc6753f5 U4-11149 fixed error when creating new xslt file (#2540)
* U4-10659 added create task back for xslt files

* Add fix to UI.Release.xml as well
2018-04-09 14:04:02 +02:00
Sebastiaan Janssen 967178cb92 Manually applies U4-11155 fixed error when creating member groups #2545 2018-04-09 11:43:48 +02:00
Warren Buckley fe44494936 Merge pull request #2550 from dawoe/temp-U4-11161
U4-11161 fix for adding multiple items in a single content picker
2018-04-09 11:42:18 +02:00
Shannon Deminick 793c9470c2 Manually applies merge pull request #2556 from dawoe/temp-U4-11167
U4-11167 Fixes rare syncTree error
2018-04-09 11:39:07 +02:00
Sebastiaan Janssen 95d40049f5 Bumps version to 7.10.2 2018-04-09 08:30:39 +02:00
Sebastiaan Janssen f003c3602c Merge pull request #2545 from dawoe/temp-U4-11155
U4-11155 fixed error when creating member groups
2018-04-09 08:28:03 +02:00
Sebastiaan Janssen 862fdf27e4 Merge pull request #2545 from dawoe/temp-U4-11155
U4-11155 fixed error when creating member groups
2018-04-09 08:10:53 +02:00
Shannon 8499c01eac Merge remote-tracking branch 'origin/patch-v7' into dev-v7 2018-04-06 14:51:14 +10:00
Shannon Deminick e25d648f44 Merge pull request #2556 from dawoe/temp-U4-11167
U4-11167 Fixes rare syncTree error
2018-04-06 14:46:23 +10:00
leekelleher 7225ec29fe Nested Content - enabled support for property-editors:
- Umbraco.CheckBoxList
- Umbraco.DropDownMultiple
- Umbraco.MacroContainer
- Umbraco.RadioButtonList
- Umbraco.MultipleTextstring
2018-04-05 17:17:34 +01:00
leekelleher cf1069e0e1 NestedContentPropertyEditor - code tidy-up
A little tidy-up of these class method. I noticed we were calling `ToString()` twice in places,
and the `ConfigureForDisplay` prevalues are already available as a Dictionary, so there's no need for an additional `ToDictionary` allocation.
2018-04-05 17:16:34 +01:00
leekelleher 99ce88228c U4-11184 - Nested Content PropertyValueEditor - return converted value, not update reference value
ConvertDbToString

We were updating the `property.Value` reference, which was having adverse effects on the editor value.
In the majority of cases this wasn't an issue, but it did mean that any prevalue-ID-based editors (e.g. dropdown list) had problems.

I've removed the call to the base method, we don't need it - here's what it does...
https://github.com/umbraco/Umbraco-CMS/blob/release-7.4.0/src/Umbraco.Core/PropertyEditors/PropertyValueEditor.cs#L367

It attempts to convert the value to an XML-safe string, which is ultimately `ToString()` (if not null):
https://github.com/umbraco/Umbraco-CMS/blob/release-7.4.0/src/Umbraco.Core/ObjectExtensions.cs#L544

ConvertDbToEditor

Same as ConvertDbToString, we were updating the `property.Value` reference when we shouldn't be.
We should be returning the converted value, not updating the original reference value itself.

I've removed the call to the base method, we don't need it - it attempts to deserialize the JSON string that we've literally just serialized...
https://github.com/umbraco/Umbraco-CMS/blob/release-7.4.0/src/Umbraco.Core/PropertyEditors/PropertyValueEditor.cs#L283

So we can pass the List<object> value back, as this will be handled by Umbraco and handed by Angular.
2018-04-05 17:14:15 +01:00
Warren edb62b740b Merge branch 'patch-v7' into dev-v7 2018-04-05 10:42:41 +01:00
Warren Buckley 43e32e66b6 Merge pull request #2550 from dawoe/temp-U4-11161
U4-11161 fix for adding multiple items in a single content picker
2018-04-05 10:15:39 +01:00
Shannon 11d4189c8d Merge branch 'patch-v7' into dev-v7 2018-04-05 17:28:46 +10:00
Dave Woestenborghs 859cb6ce1a U4-11167 removed the time out..only check if the syncTree method exists 2018-04-04 09:44:29 +02:00
Warren ebbd05dc97 Adds in missing $scope dependency for Dynamic Dashboard Controller 2018-04-04 08:30:33 +01:00
Dave Woestenborghs 27b19a0a33 U4-11167 only wrap in time out when syncTree method is undefined 2018-04-03 07:37:37 +02:00
Dave Woestenborghs f6263aad5b U4-11167 wrap syncTree method to handle rare occasions where it is not defined yet 2018-03-31 15:09:30 +02:00
Dave Woestenborghs d1eb6b1aa8 U4-11161 don't show help text when it's not a multipicker 2018-03-28 17:07:56 +02:00
Dave Woestenborghs 458d023ff4 U4-11161 set min and max number in default config 2018-03-28 17:03:35 +02:00
Dave Woestenborghs cf871196f2 U4-11155 changed namespace back to previous value so creating member groups works again 2018-03-27 16:11:07 +02:00
Dave Woestenborghs 36d6b6a254 U4-11150 merged where statements in to one statement 2018-03-27 14:22:51 +02:00
Dave Woestenborghs 29bb86ea13 Filter tours based on current users culture 2018-03-23 16:37:13 +01:00
Dave Woestenborghs fa171e4553 Added culture property to Backoffice tour 2018-03-23 15:33:42 +01:00
Tom Fulton 0b63eb9430 U4-11133 - Adjust access check for Unpublish button
Require both Publish (assigned) and Unpublish (automatic, but could be removed during event) to show the button
2018-03-19 19:43:07 -06:00
Tom Fulton d7ddbfec35 U4-11133 - Fix access check for Unpublish button
The logic to show the Unpublish button was checking for "Publish" (U) permission rather than "Unpublish" (Z)
2018-03-19 19:30:51 -06:00
Tom Fulton d260a9dc88 U4-7757 - Show notifications when Unpublishing is canceled 2018-03-19 19:03:02 -06:00
Rune Hem Strand 20216df8cf Add check to avoid cicular template reference 2018-03-02 17:49:02 +01:00
AndyButland 6861453166 Added localised texts and renamed some to less specific names when used across checks 2017-06-04 14:35:37 +02:00
AndyButland 5f263ad851 Added check for X-Content-Type-Options and refactored existing HTTP header check to use common base class. 2017-06-04 14:34:37 +02:00
Martin Blackwell afc2363163 Resolution for U4-8927 2016-08-31 16:22:41 +01:00
200 changed files with 3639 additions and 5391 deletions
-80
View File
@@ -1,80 +0,0 @@
# Code of Conduct
## 1. Purpose
A primary goal of Umbraco CMS is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
We invite all those who participate in Umbraco CMS to help us create safe and positive experiences for everyone.
## 2. Open Source Citizenship
A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
## 3. Expected Behavior
The following behaviors are expected and requested of all community members:
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
## 4. Unacceptable Behavior
The following behaviors are considered harassment and are unacceptable within our community:
* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other peoples personally identifying information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someones consent before touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.
## 5. Consequences of Unacceptable Behavior
Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
Anyone asked to stop unacceptable behavior is expected to comply immediately.
If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
## 6. Reporting Guidelines
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. Please contact Sebastiaan Janssen - [sj@umbraco.dk](mailto:sj@umbraco.dk).
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
## 7. Addressing Grievances
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Umbraco with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
## 8. Scope
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venuesonline and in-personas well as in all one-on-one communications pertaining to community business.
This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
## 9. Contact info
Sebastiaan Janssen - [sj@umbraco.dk](mailto:sj@umbraco.dk)
## 10. License and attribution
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
+1 -1
View File
@@ -28,7 +28,7 @@
<dependency id="HtmlAgilityPack" version="[1.4.9.5, 2.0.0)" />
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
<dependency id="MySql.Data" version="[6.9.9, 7.0.0)" />
<dependency id="ClientDependency" version="[1.9.6, 2.0.0)" />
<dependency id="ClientDependency" version="[1.9.7, 2.0.0)" />
<dependency id="ClientDependency-Mvc5" version="[1.8.0.0, 2.0.0)" />
<dependency id="AutoMapper" version="[3.3.1, 4.0.0)" />
<dependency id="Newtonsoft.Json" version="[10.0.2, 11.0.0)" />
+1 -1
View File
@@ -46,7 +46,7 @@
<add application="settings" alias="scripts" title="Scripts" type="Umbraco.Web.Trees.ScriptTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4"
xdt:Locator="Match(application,alias)"
xdt:Transform="SetAttributes()" />
<add application="settings" alias="dictionary" title="Dictionary" type="umbraco.loadDictionary, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6"
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.DictionaryTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6"
xdt:Locator="Match(application,alias)"
xdt:Transform="SetAttributes()" />
<add alias="dictionary" application="settings"
@@ -5,4 +5,6 @@
</content>
<webservices xdt:Transform="Remove" />
<repositories xdt:Transform="Remove" />
</settings>
View File
+32
View File
@@ -0,0 +1,32 @@
# Code Of Conduct
Our informal code of conduct concentrates on the values we, as Umbraco HQ, have set for ourselves and for our community. We expect you to be a friend.
Instead of listing out all the exact "do's" and "don't's" we want to challenge you to think about our values and apply them:
If there's a need to talk to Umbraco HQ about anything, please make sure to send a mail to [Sebastiaan Janssen - sj@umbraco.dk](mailto:sj@umbraco.dk).
## Be a Friend
We welcome and thank you for registering at Our Umbraco. Find below the values that govern Umbraco and which you accept by using Our Umbraco.
## Trust
Assume positive intent and try to understand before being understood.
## Respect
Treat others as you would like to be treated.
This also goes for treating the HQ with respect. For example: dont promote products on [our.umbraco.org](https://our.umbraco.org) that directly compete with our commercial offerings which enables us to work for a sustainable Umbraco.
## Open
Be honest and straightforward. Tell it as it is. Share thoughts and knowledge and engage in collaboration.
## Hungry
Don't rest on your laurels and never accept the status quo. Contribute and give back to fellow Umbracians.
## Friendly
Dont judge upon mistakes made but rather upon the speed and quality with which mistakes are corrected. Friendly posts and contributions generate smiles and builds long lasting relationships.
+99
View File
@@ -0,0 +1,99 @@
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/blob/temp8/CONTRIBUTING.md) to go to the v8 branch_
# Contributing to Umbraco CMS
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing to Umbraco CMS.
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
Remember, we're a friendly bunch and are happy with whatever contribution you might provide. Below are guidelines for success that we've gathered over the years. If you choose to ignore them then we still love you 💖.
## Contributing code changes
This document gives you a quick overview on how to get started, we will link to in-depth documentation throughout if you need some more background info.
## Guidelines for contributions we welcome
Not all changes are wanted so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valueable time.
We have [documented what we consider small and large changes](CONTRIBUTION_GUIDELINES.md), make sure to talk to us before making large changes.
Remember, if an issue is in the `Up for grabs` list or you've asked for some feedback before you sent us a PR, your PR will not be closed as unwanted.
## How do I begin?
Great question! The short version goes like this:
* **Fork** - create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
![Fork the repository](img/forkrepository.png)
* **Clone** - when GitHub has created your fork, you can clone it in your favorite Git tool
![Clone the fork](img/clonefork.png)
* **Build** - build your fork of Umbraco locally as described in [building Umbraco from source code](BUILD.md)
* **Change** - make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](#questions)
* **Commit** - done? Yay! 🎉 It is recommended to create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-U4-12345`. This means it's a temporary branch for the particular issue you're working on, in this case `U4-12345`
* **Push** - great, now you can push the changes up to your fork on GitHub
* **Create pull request** - exciting! You're ready to show us your changes (or not quite ready, you just need some feedback to progress). GitHub has picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go.
![Create a pull request](img/createpullrequest.png)
### Further reading
At this point you might want to [read on about contributing in depth](CONTRIBUTING_DETAILED.md).
### Reviews
You've sent us your first contribution, congratulations! Now what?
The [pull request team](#the-pr-team) can now start reviewing your proposed changes and give you feedback on them. If it's not perfect, we'll either fix up what we need or we can request you to make some additional changes.
We have [a process in place which you can read all about](REVIEW_PROCESS.md). The very abbreviated version is:
- Your PR will get a reply within 48 hours
- An in-depth reply will be added within at most 2 weeks
- The PR will be either merged or rejected within at most 4 weeks
- Sometimes it is difficult to meet these timelines and we'll talk to you
## Styleguides
To be honest, we don't like rules very much. We trust you have the best of intentions and we encourage you to create working code. If it doesn't look perfect then we'll happily help clean it up.
That said, the Umbraco development team likes to follow the hints that ReSharper gives us (no problem if you don't have this installed) and we've added a `.editorconfig` file so that Visual Studio knows what to do with whitespace, line endings, etc.
## The PR team
The pull request team consists of a member of Umbraco HQ, [Sebastiaan](https://github.com/nul800sebastiaan), who gets assistance from the following community members
- [Anders Bjerner](https://github.com/abjerner)
- [Dave Woestenborghs](https://github.com/dawoe)
- [Emma Burstow](https://github.com/emmaburstow)
- [Kyle Weems](https://github.com/cssquirrel)
- [Poornima Nayar](https://github.com/poornimanayar)
These wonderful volunteers will provide you with a first reply to your PR, review and test out your changes and might ask more questions. After that they'll let Umbraco HQ know if everything seems okay.
## Questions?
You can get in touch with [the PR team](#the-pr-team) in multiple ways, we love open conversations and we are a friendly bunch. No question you have is stupid. Any questions you have usually helps out multiple people with the same question. Ask away:
- If there's an existing issue on the issue tracker then that's a good place to leave questions and discuss how to start or move forward
- Unsure where to start? Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"](https://our.umbraco.org/forum/contributing-to-umbraco-cms/) forum, the team monitors that one closely
- We're also [active in the Gitter chatroom](https://gitter.im/umbraco/Umbraco-CMS)
## Code of Conduct
This project and everyone participating in it is governed by the [our Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [Sebastiaan Janssen - sj@umbraco.dk](mailto:sj@umbraco.dk).
## Contributing to Umbraco, in depth
There are other ways to contribute, and there's a few more things that you might be wondering about. We will answer the [most common questions and ways to contribute in our detailed documentation](CONTRIBUTING_DETAILED.md).
## Credits
This contribution guide borrows heavily from the excellent work on [the Atom contribution guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md). A big [#h5yr](http://h5yr.com/) to them!
@@ -1,17 +1,11 @@
# Contributing to Umbraco CMS
# Contributing in detail
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
There's more than one way to contribute to Umbraco, there's some more suggestions below.
The following is a set of guidelines for contributing to Umbraco CMS.
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
Remember, we're a friendly bunch and are happy with whatever contribution you might provide. Below are guidelines for success that we've gathered over the years. If you choose to ignore them then we still love you 💖.
When contributing code to Umbraco there's plenty of things you'll want to know, skip down to [What should I know before I get started](#what-should-i-know-before-i-get-started) for the answers to your burning questions.
#### Table Of Contents
[Code of Conduct](#code-of-conduct)
[How Can I Contribute?](#how-can-i-contribute)
* [Reporting Bugs](#reporting-bugs)
* [Suggesting Enhancements](#suggesting-enhancements)
@@ -26,22 +20,12 @@ Remember, we're a friendly bunch and are happy with whatever contribution you mi
* [Building Umbraco from source code](#building-umbraco-from-source-code)
* [Keeping your Umbraco fork in sync with the main repository](#keeping-your-umbraco-fork-in-sync-with-the-main-repository)
[How do I even begin?](#how-do-i-even-begin)
[Problems?](#problems)
[Credits](#credits)
## Code of Conduct
This project and everyone participating in it is governed by the [our Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [Sebastiaan Janssen - sj@umbraco.dk](mailto:sj@umbraco.dk).
## How Can I Contribute?
### Reporting Bugs
This section guides you through submitting a bug report for Umbraco CMS. Following these guidelines helps maintainers and the community understand your report 📝, reproduce the behavior 💻 💻, and find related reports 🔎.
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](ISSUE_TEMPLATE.md), the information it asks for helps us resolve issues faster.
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](http://issues.umbraco.org/issues#newissue=61-30118), the information it asks for helps us resolve issues faster.
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
@@ -52,7 +36,7 @@ Before creating bug reports, please check [this list](#before-submitting-a-bug-r
* **Use the Google**. Whatever you're experiencing, Google it plus "Umbraco" - usually you can get some pretty good hints from the search results, including open issues and further troubleshooting hints.
* If you do find and existing issue has **and the issue is still open**, add a comment to the existing issue if you have additional information. If you have the same problem and no new info to add, just "star" the issue.
Explain the problem and include additional details to help maintainers reproduce the problem. The following is a long description which we've boiled down into a few very simple question in the issue tracker when you create a new issue. We're listing the following hints to indicate that the most successful reports usually have a lot of this ground covered:
Explain the problem and include additional details to help maintainers reproduce the problem. The following is a long description which we've boiled down into a few very simple questions in the issue tracker when you create a new issue. We're listing the following hints to indicate that the most successful reports usually have a lot of this ground covered:
* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining which steps you took in the backoffice to get to a certain undesireable result, e.g. you created a document type, inherting 3 levels deep, added a certain datatype, tried to save it and you got an error.
@@ -74,7 +58,7 @@ Include details about your configuration and environment:
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for Atom, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion 📝 and find related suggestions 🔎.
This section guides you through submitting an enhancement suggestion for Umbraco, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion 📝 and find related suggestions 🔎.
Most of the suggestions in the [reporting bugs](#reporting-bugs) section also count for suggesting enhancements.
@@ -100,6 +84,10 @@ The most successful pull requests usually look a like this:
Again, these are guidelines, not strict requirements.
## Making changes after the PR was opened
If you make the corrections we ask for in the same branch and push them to your fork again, the pull request automatically updates with the additional commit(s) so we can review it again. If all is well, we'll merge the code and your commits are forever part of Umbraco!
## Styleguides
To be honest, we don't like rules very much. We trust you have the best of intentions and we encourage you to create working code. If it doesn't look perfect then we'll happily help clean it up.
@@ -135,7 +123,7 @@ To find the general areas of something you're looking to fix or improve, have a
We like to use [Gitflow as much as possible](https://jeffkreeftmeijer.com/git-flow/), don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to something, usually `dev-v7`. Whatever the default is, that's where we'd like you to target your contributions.
![What branch do you want me to target?](tools/contributing/defaultbranch.png)
![What branch do you want me to target?](img/defaultbranch.png)
### Building Umbraco from source code
@@ -143,7 +131,7 @@ The easiest way to get started is to run `build.bat` which will build both the b
Alternatively, you can open `src\umbraco.sln` in Visual Studio 2017 ([the community edition is free](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15) for you to use to contribute to Open Source projects). In Visual Studio, find the Task Runner Explorer (in the View menu under Other Windows) and run the build task under the gulpfile.
![Gulp build in Visual Studio](tools/contributing/gulpbuild.png)
![Gulp build in Visual Studio](img/gulpbuild.png)
After this build completes, you should be able to hit `F5` in Visual Studio to build and run the project. A IISExpress webserver will start and the Umbraco installer will pop up in your browser, follow the directions there to get a working Umbraco install up and running.
@@ -168,40 +156,4 @@ git rebase upstream/dev-v7
In this command we're syncing with the `dev-v7` branch, but you can of course choose another one if needed.
(More info on how this works: [http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated](http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated))
## How do I even begin?
Great question! The short version goes like this:
* **Fork** - create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
![Fork the repository](tools/contributing/forkrepository.png)
* **Clone** - when GitHub has created your fork, you can clone it in your favorite Git tool
![Clone the fork](tools/contributing/clonefork.png)
* **Build** - build your fork of Umbraco locally as described in [building Umbraco from source code](#building-umbraco-from-source-code)
* **Change** - make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will happily give feedback
* **Commit** - done? Yay! 🎉 It is recommended to create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-U4-12345`. This means it's a temporary branch for the particular issue you're working on, in this case `U4-12345`
* **Push** - great, now you can push the changes up to your fork on GitHub
* **Create pull request** - exciting! You're ready to show us your changes (or not quite ready, you just need some feedback to progress). GitHub has picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go.
![Create a pull request](tools/contributing/createpullrequest.png)
The Umbraco development team can now start reviewing your proposed changes and give you feedback on them. If it's not perfect, we'll either fix up what we need or we can request you to make some additional changes.
If you make the corrections we ask for in the same branch and push them to your fork again, the pull request automatically updates with the additional commit(s) so we can review it again. If all is well, we'll merge the code and your commits are forever part of Umbraco!
Not all changes are wanted so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes at this and we'll be nice about it, thanking you for spending your valueable time.
Remember, if an issue is in the `Up for grabs` list or you've asked for some feedback before you send us a PR, your PR will not be closed as unwanted.
## Problems?
Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"](https://our.umbraco.org/forum/contributing-to-umbraco-cms/) forum, the team monitors that one closely!
## Credits
This contribution guide borrows heavily from the excellent work on [the Atom contribution guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md). A big [#h5yr](http://h5yr.com/) to them!
(More info on how this works: [http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated](http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated))
+33
View File
@@ -0,0 +1,33 @@
# Contributing to Umbraco CMS
When youre considering creating a pull request for Umbraco CMS, we will categorize them in two different sizes, small and large.
The process for both sizes is very similar, as [explained in the contribution document](CONTRIBUTING.md#how-do-i-begin).
## Small PRs
Bug fixes and small improvements - can be recognized by seeing a small number of changes and possibly a small number of new files.
Were usually able to handle small PRs pretty quickly. A community volunteer will do the initial review and flag it for Umbraco HQ as “community tested”. If everything looks good, it will be merged pretty quickly [as per the described process](REVIEW_PROCESS.md).
### Up for grabs
Umbraco HQ will regularly mark newly created issues on the issue tracker with the `Up for grabs` tag. This means that the proposed changes are wanted in Umbraco but the HQ does not have the time to make them at this time. These issues are usually small enough to fit in the "Small PRs" category and we encourage anyone to pick them up and help out.
If you do start working on something, make sure leave a small comment on the issue saying something like: "I'm working on this". That way other people stumbling upon the issue know they don't need to pick it up, someone already has.
## Large PRs
New features and large refactorings - can be recognized by seeing a large number of changes, plenty of new files, updates to package manager files (NuGets packages.config, NPMs packages.json, etc.).
We would love to follow the same process for larger PRs but this is not always possible due to time limitations and priorities that need to be aligned. We dont want to put up any barriers, but this document should set the correct expectations.
Please make sure to describe your idea in an issue, it helps to put in mockup screenshots or videos.
If the change makes sense for HQ to include in Umbraco CMS we will leave you some feedback on how wed like to see it being implemented.
If a larger pull request is encouraged by Umbraco HQ, the process will be similar to what is described in the [small PRs process](#small-prs) above, well get feedback to you within 14 days. Finalizing and merging the PR might take longer though as it will likely need to be picked up by the development team to make sure everything is in order. Well keep you posted on the progress.
### Pull request or package?
If it doesnt fit in CMS right now, we will likely encourage you to make it into a package instead. A package is a great way to check out popularity of a feature, learn how people use it, validate good usability and to fix bugs.
Eventually, a package could "graduate" to be included in the CMS.
+49 -47
View File
@@ -1,47 +1,49 @@
[![Build status](https://ci.appveyor.com/api/projects/status/6by6harxtxt0ocdx/branch/dev-v7?svg=true)](https://ci.appveyor.com/project/Umbraco/umbraco-cms-b2cri/branch/dev-v7)
Umbraco CMS
===========
The friendliest, most flexible and fastest growing ASP.NET CMS used by more than 443,000 websites worldwide: [https://umbraco.com](https://umbraco.com)
[![ScreenShot](vimeo.png)](https://vimeo.com/172382998/)
## Umbraco CMS
Umbraco is a free open source Content Management System built on the ASP.NET platform. Our mission is to help you deliver delightful digital experiences by making Umbraco friendly, simpler and social.
## Watch an introduction video
[![ScreenShot](http://umbraco.com/images/whatisumbraco.png)](https://umbraco.tv/videos/umbraco-v7/content-editor/basics/introduction/cms-explanation/)
## Umbraco - The Friendly CMS
For the first time on the Microsoft platform, there is a free user and developer friendly CMS that makes it quick and easy to create websites - or a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports ASP.NET MVC or Web Forms, including User and Custom Controls, out of the box.
Umbraco is not only loved by developers, but is a content editors dream. Enjoy intuitive editing tools, media management, responsive views and approval workflows to send your content live.
Used by more than 443,000 active websites including Carlsberg, Segway, Amazon and Heinz and **The Official ASP.NET and IIS.NET website from Microsoft** ([https://asp.net](https://asp.net) / [https://iis.net](https://iis.net)), you can be sure that the technology is proven, stable and scales. Backed by the team at Umbraco HQ, and supported by a dedicated community of over 220,000 craftspeople globally, you can trust that Umbraco is a safe choice and is here to stay.
To view more examples, please visit [https://umbraco.com/why-umbraco/#caseStudies](https://umbraco.com/why-umbraco/#caseStudies)
## Why Open Source?
As an Open Source platform, Umbraco is more than just a CMS. We are transparent with our roadmap for future versions, our incremental sprint planning notes are publicly accessible and community contributions and packages are available for all to use.
## Trying out Umbraco CMS
[Umbraco Cloud](https://umbraco.com) is the easiest and fastest way to use Umbraco yet with full support for all your custom .NET code and intergrations. You're up and running in less than a minute and your life will be made easier with automated upgrades and a built-in deployment engine. We offer a free 14 day trial, no credit card needed.
If you want to DIY you can [download Umbraco](https://our.umbraco.org/download) either as a ZIP file or via NuGet. It's the same version of Umbraco CMS that powers Umbraco Cloud, but you'll need to find a place to host yourself and handling deployments and upgrades is all down to you.
## Community
Our friendly community is available 24/7 at the community hub we call ["Our Umbraco"](https://our.umbraco.org). Our Umbraco feature forums for questions and answers, documentation, downloadable plugins for Umbraco and a rich collection of community resources.
## Contribute to Umbraco
Umbraco is contribution focused and community driven. If you want to contribute back to Umbraco please check out our [guide to contributing](CONTRIBUTING.md).
## Found a bug?
Another way you can contribute to Umbraco is by providing issue reports. For information on how to submit an issue report refer to our [online guide for reporting issues](https://our.umbraco.org/contribute/report-an-issue-or-request-a-feature).
To view existing issues, please visit [http://issues.umbraco.org](http://issues.umbraco.org).
[![Build status](https://ci.appveyor.com/api/projects/status/6by6harxtxt0ocdx/branch/dev-v7?svg=true)](https://ci.appveyor.com/project/Umbraco/umbraco-cms-b2cri/branch/dev-v7)
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/tree/temp8) to go to the v8 branch_
Umbraco CMS
===========
The friendliest, most flexible and fastest growing ASP.NET CMS used by more than 443,000 websites worldwide: [https://umbraco.com](https://umbraco.com)
[![ScreenShot](img/vimeo.png)](https://vimeo.com/172382998/)
## Umbraco CMS
Umbraco is a free open source Content Management System built on the ASP.NET platform. Our mission is to help you deliver delightful digital experiences by making Umbraco friendly, simpler and social.
## Watch an introduction video
[![ScreenShot](https://shop.umbraco.com/images/whatisumbraco.png)](https://umbraco.tv/videos/umbraco-v7/content-editor/basics/introduction/cms-explanation/)
## Umbraco - The Friendly CMS
For the first time on the Microsoft platform, there is a free user and developer friendly CMS that makes it quick and easy to create websites - or a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports ASP.NET MVC or Web Forms, including User and Custom Controls, out of the box.
Umbraco is not only loved by developers, but is a content editors dream. Enjoy intuitive editing tools, media management, responsive views and approval workflows to send your content live.
Used by more than 443,000 active websites including Carlsberg, Segway, Amazon and Heinz and **The Official ASP.NET and IIS.NET website from Microsoft** ([https://asp.net](https://asp.net) / [https://iis.net](https://iis.net)), you can be sure that the technology is proven, stable and scales. Backed by the team at Umbraco HQ, and supported by a dedicated community of over 220,000 craftspeople globally, you can trust that Umbraco is a safe choice and is here to stay.
To view more examples, please visit [https://umbraco.com/why-umbraco/#caseStudies](https://umbraco.com/why-umbraco/#caseStudies)
## Why Open Source?
As an Open Source platform, Umbraco is more than just a CMS. We are transparent with our roadmap for future versions, our incremental sprint planning notes are publicly accessible and community contributions and packages are available for all to use.
## Trying out Umbraco CMS
[Umbraco Cloud](https://umbraco.com) is the easiest and fastest way to use Umbraco yet with full support for all your custom .NET code and intergrations. You're up and running in less than a minute and your life will be made easier with automated upgrades and a built-in deployment engine. We offer a free 14 day trial, no credit card needed.
If you want to DIY you can [download Umbraco](https://our.umbraco.org/download) either as a ZIP file or via NuGet. It's the same version of Umbraco CMS that powers Umbraco Cloud, but you'll need to find a place to host yourself and handling deployments and upgrades is all down to you.
## Community
Our friendly community is available 24/7 at the community hub we call ["Our Umbraco"](https://our.umbraco.org). Our Umbraco feature forums for questions and answers, documentation, downloadable plugins for Umbraco and a rich collection of community resources.
## Contribute to Umbraco
Umbraco is contribution focused and community driven. If you want to contribute back to Umbraco please check out our [guide to contributing](CONTRIBUTING.md).
## Found a bug?
Another way you can contribute to Umbraco is by providing issue reports. For information on how to submit an issue report refer to our [online guide for reporting issues](https://our.umbraco.org/contribute/report-an-issue-or-request-a-feature).
To view existing issues, please visit [http://issues.umbraco.org](http://issues.umbraco.org).
+25
View File
@@ -0,0 +1,25 @@
# Review process
You're an awesome person and have sent us your contribution in the form of a pull request! It's now time to relax for a bit and wait for our response.
In order to set some expectations, here's what happens next.
## Review process
You will get an initial reply within 48 hours (workdays) to acknowledge that weve seen your PR and well pick it up as soon as we can.
You will get feedback within at most 14 days after opening the PR. Youll most likely get feedback sooner though. Then there are a few possible outcomes:
- Your proposed change is awesome! We merge it in and it will be included in the next minor release of Umbraco
- If the change is a high priority bug fix, we will cherry-pick it into the next patch release as well so that we can release it as soon as possible
- Your proposed change is awesome but needs a bit more work, well give you feedback on the changes wed like to see
- Your proposed change is awesome but.. not something were looking to include at this point. Well close your PR and the related issue (well be nice about it!)
## Are you still available?
We understand you have other things to do and can't just drop everything to help us out.
So if were asking for your help to improve the PR well wait for two weeks to give you a fair chance to make changes. Well ask for an update if we dont hear back from you after that time.
If we dont hear back from you for 4 weeks, well close the PR so that it doesnt just hang around forever. Youre very welcome to re-open it once you have some more time to spend on it.
There will be times that we really like your proposed changes and well finish the final improvements wed like to see ourselves. You still get the credits and your commits will live on in the git repository.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

+2 -2
View File
@@ -11,5 +11,5 @@ using System.Resources;
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("7.10.1")]
[assembly: AssemblyInformationalVersion("7.10.1")]
[assembly: AssemblyFileVersion("7.11.2")]
[assembly: AssemblyInformationalVersion("7.11.2")]
@@ -35,7 +35,7 @@ namespace Umbraco.Core.Configuration
private static Version _version;
private static readonly object Locker = new object();
//make this volatile so that we can ensure thread safety with a double check lock
private static volatile string _reservedUrlsCache;
private static volatile string _reservedUrlsCache;
private static string _reservedPathsCache;
private static HashSet<string> _reservedList = new HashSet<string>();
private static string _reservedPaths;
@@ -190,7 +190,7 @@ namespace Umbraco.Core.Configuration
/// This will return the MVC area that we will route all custom routes through like surface controllers, etc...
/// We will use the 'Path' (default ~/umbraco) to create it but since it cannot contain '/' and people may specify a path of ~/asdf/asdf/admin
/// we will convert the '/' to '-' and use that as the path. its a bit lame but will work.
///
///
/// We also make sure that the virtual directory (SystemDirectories.Root) is stripped off first, otherwise we'd end up with something
/// like "MyVirtualDirectory-Umbraco" instead of just "Umbraco".
/// </remarks>
@@ -205,7 +205,7 @@ namespace Umbraco.Core.Configuration
var path = Path;
if (path.StartsWith(SystemDirectories.Root)) // beware of TrimStart, see U4-2518
path = path.Substring(SystemDirectories.Root.Length);
return path.TrimStart('~').TrimStart('/').Replace('/', '-').Trim().ToLower();
return path.TrimStart('~').TrimStart('/').Replace('/', '-').Trim().ToLower();
}
}
@@ -312,7 +312,7 @@ namespace Umbraco.Core.Configuration
SetMembershipProvidersLegacyEncoding(UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider, value);
}
}
/// <summary>
/// Saves a setting into the configuration file.
/// </summary>
@@ -503,7 +503,7 @@ namespace Umbraco.Core.Configuration
}
/// <summary>
/// Returns a string value to determine if umbraco should skip version-checking.
/// Returns the number of days that should take place between version checks.
/// </summary>
/// <value>The version check period in days (0 = never).</value>
public static int VersionCheckPeriod
@@ -1,10 +0,0 @@
using System.Collections.Generic;
namespace Umbraco.Core.Configuration.UmbracoSettings
{
public interface IRepositoriesSection : IUmbracoConfigurationSection
{
IEnumerable<IRepository> Repositories { get; }
}
}
@@ -1,14 +0,0 @@
using System;
namespace Umbraco.Core.Configuration.UmbracoSettings
{
public interface IRepository
{
string Name { get; }
Guid Id { get; }
string RepositoryUrl { get; }
string WebServiceUrl { get; }
bool HasCustomWebServiceUrl { get; }
string RestApiUrl { get; }
}
}
@@ -24,9 +24,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
IScheduledTasksSection ScheduledTasks { get; }
IDistributedCallSection DistributedCall { get; }
IRepositoriesSection PackageRepositories { get; }
IProvidersSection Providers { get; }
[EditorBrowsable(EditorBrowsableState.Never)]
@@ -37,4 +35,4 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
IScriptingSection Scripting { get; }
}
}
}
@@ -1,36 +0,0 @@
using System.Collections.Generic;
using System.Configuration;
namespace Umbraco.Core.Configuration.UmbracoSettings
{
internal class RepositoriesCollection : ConfigurationElementCollection, IEnumerable<IRepository>
{
internal void Add(RepositoryElement item)
{
BaseAdd(item);
}
protected override ConfigurationElement CreateNewElement()
{
return new RepositoryElement();
}
protected override object GetElementKey(ConfigurationElement element)
{
return ((RepositoryElement)element).Id;
}
IEnumerator<IRepository> IEnumerable<IRepository>.GetEnumerator()
{
for (var i = 0; i < Count; i++)
{
yield return BaseGet(i) as IRepository;
}
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}
@@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
namespace Umbraco.Core.Configuration.UmbracoSettings
{
internal class RepositoriesElement : ConfigurationElement, IRepositoriesSection
{
[ConfigurationCollection(typeof(RepositoriesCollection), AddItemName = "repository")]
[ConfigurationProperty("", IsDefaultCollection = true)]
internal RepositoriesCollection Repositories
{
get { return (RepositoriesCollection) base[""]; }
set { base[""] = value; }
}
IEnumerable<IRepository> IRepositoriesSection.Repositories
{
get { return Repositories; }
}
}
}
@@ -1,19 +0,0 @@
using System;
using System.Linq;
namespace Umbraco.Core.Configuration.UmbracoSettings
{
public static class RepositoryConfigExtensions
{
//Our package repo
private static readonly Guid RepoGuid = new Guid("65194810-1f85-11dd-bd0b-0800200c9a66");
public static IRepository GetDefault(this IRepositoriesSection repos)
{
var found = repos.Repositories.FirstOrDefault(x => x.Id == RepoGuid);
if (found == null)
throw new InvalidOperationException("No default package repository found with id " + RepoGuid);
return found;
}
}
}
@@ -1,53 +0,0 @@
using System;
using System.Configuration;
namespace Umbraco.Core.Configuration.UmbracoSettings
{
internal class RepositoryElement : ConfigurationElement, IRepository
{
[ConfigurationProperty("name", IsRequired = true)]
public string Name
{
get { return (string)base["name"]; }
set { base["name"] = value; }
}
[ConfigurationProperty("guid", IsRequired = true)]
public Guid Id
{
get { return (Guid)base["guid"]; }
set { base["guid"] = value; }
}
[ConfigurationProperty("repositoryurl", DefaultValue = "http://packages.umbraco.org")]
public string RepositoryUrl
{
get { return (string)base["repositoryurl"]; }
set { base["repositoryurl"] = value; }
}
[ConfigurationProperty("webserviceurl", DefaultValue = "/umbraco/webservices/api/repository.asmx")]
public string WebServiceUrl
{
get { return (string)base["webserviceurl"]; }
set { base["webserviceurl"] = value; }
}
public bool HasCustomWebServiceUrl
{
get
{
var prop = Properties["webserviceurl"];
return (string) prop.DefaultValue != (string) this[prop];
}
}
[ConfigurationProperty("restapiurl", DefaultValue = "https://our.umbraco.org/webapi/packages/v1")]
public string RestApiUrl
{
get { return (string)base["restapiurl"]; }
set { base["restapiurl"] = value; }
}
}
}
@@ -67,50 +67,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
{
get { return (DistributedCallElement)this["distributedCall"]; }
}
private RepositoriesElement _defaultRepositories;
[ConfigurationProperty("repositories")]
internal RepositoriesElement PackageRepositories
{
get
{
if (_defaultRepositories != null)
{
return _defaultRepositories;
}
//here we need to check if this element is defined, if it is not then we'll setup the defaults
var prop = Properties["repositories"];
var repos = this[prop] as ConfigurationElement;
if (repos != null && repos.ElementInformation.IsPresent == false)
{
var collection = new RepositoriesCollection
{
new RepositoryElement() {Name = "Umbraco package Repository", Id = new Guid("65194810-1f85-11dd-bd0b-0800200c9a66")}
};
_defaultRepositories = new RepositoriesElement()
{
Repositories = collection
};
return _defaultRepositories;
}
//now we need to ensure there is *always* our umbraco repo! its hard coded in the codebase!
var reposElement = (RepositoriesElement)base["repositories"];
if (reposElement.Repositories.All(x => x.Id != new Guid("65194810-1f85-11dd-bd0b-0800200c9a66")))
{
reposElement.Repositories.Add(new RepositoryElement() { Name = "Umbraco package Repository", Id = new Guid("65194810-1f85-11dd-bd0b-0800200c9a66") });
}
return reposElement;
}
}
[ConfigurationProperty("providers")]
internal ProvidersElement Providers
{
@@ -185,11 +142,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
get { return DistributedCall; }
}
IRepositoriesSection IUmbracoSettingsSection.PackageRepositories
{
get { return PackageRepositories; }
}
IProvidersSection IUmbracoSettingsSection.Providers
{
get { return Providers; }
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("7.10.1");
private static readonly Version Version = new Version("7.11.2");
/// <summary>
/// Gets the current version of Umbraco.
+2 -2
View File
@@ -92,7 +92,7 @@
/// alias for the dictionary tree.
/// </summary>
public const string Dictionary = "dictionary";
public const string Stylesheets = "stylesheets";
/// <summary>
@@ -135,4 +135,4 @@
}
}
}
@@ -0,0 +1,15 @@
namespace Umbraco.Core
{
public static partial class Constants
{
/// <summary>
/// Defines the constants used for the Umbraco package repository
/// </summary>
public static class PackageRepository
{
public const string RestApiBaseUrl = "https://our.umbraco.org/webapi/packages/v1";
public const string DefaultRepositoryName = "Umbraco package Repository";
public const string DefaultRepositoryId = "65194810-1f85-11dd-bd0b-0800200c9a66";
}
}
}
@@ -166,17 +166,20 @@ namespace Umbraco.Core.Persistence.Migrations
var targetVersionToCompare = _targetVersion.GetVersion(3);
var currentVersionToCompare = _currentVersion.GetVersion(3);
if(currentVersionToCompare <= targetVersionToCompare)
throw new ArgumentException("When downgrading, make sure that the target version is lower than the current version.");
var migrations = (from migration in foundMigrations
let migrationAttributes = migration.GetType().GetCustomAttributes<MigrationAttribute>(false)
from migrationAttribute in migrationAttributes
where migrationAttribute != null
where
migrationAttribute.TargetVersion > currentVersionToCompare &&
migrationAttribute.TargetVersion <= targetVersionToCompare &&
migrationAttribute.TargetVersion > targetVersionToCompare &&
migrationAttribute.TargetVersion <= currentVersionToCompare &&
migrationAttribute.ProductName == _productName &&
//filter if the migration specifies a minimum current version for which to execute
(migrationAttribute.MinimumCurrentVersion == null || currentVersionToCompare >= migrationAttribute.MinimumCurrentVersion)
orderby migrationAttribute.TargetVersion, migrationAttribute.SortOrder descending
orderby migrationAttribute.TargetVersion descending, migrationAttribute.SortOrder descending
select migration).Distinct();
return migrations;
}
+7 -8
View File
@@ -402,7 +402,7 @@ namespace Umbraco.Core.Persistence
}
// Helper to handle named parameters from object properties
static Regex rxParams = new Regex(@"(?<!@)@\w+", RegexOptions.Compiled);
static readonly Regex rxParams = new Regex(@"(?<!@)@\w+", RegexOptions.Compiled);
public static string ProcessParams(string _sql, object[] args_src, List<object> args_dest)
{
return rxParams.Replace(_sql, m =>
@@ -545,7 +545,7 @@ namespace Umbraco.Core.Persistence
}
// Create a command
static Regex rxParamsPrefix = new Regex(@"(?<!@)@\w+", RegexOptions.Compiled);
static readonly Regex rxParamsPrefix = new Regex(@"(?<!@)@\w+", RegexOptions.Compiled);
public IDbCommand CreateCommand(IDbConnection connection, string sql, params object[] args)
{
// Perform named argument replacements
@@ -666,8 +666,8 @@ namespace Umbraco.Core.Persistence
return ExecuteScalar<T>(sql.SQL, sql.Arguments);
}
Regex rxSelect = new Regex(@"\A\s*(SELECT|EXECUTE|CALL)\s", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline);
Regex rxFrom = new Regex(@"\A\s*FROM\s", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline);
static readonly Regex rxSelect = new Regex(@"\A\s*(SELECT|EXECUTE|CALL)\s", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline);
static readonly Regex rxFrom = new Regex(@"\A\s*FROM\s", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline);
string AddSelectClause<T>(string sql)
{
if (sql.StartsWith(";"))
@@ -701,9 +701,9 @@ namespace Umbraco.Core.Persistence
return Fetch<T>(sql.SQL, sql.Arguments);
}
static Regex rxColumns = new Regex(@"\A\s*SELECT\s+((?:\((?>\((?<depth>)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|.)*?)(?<!,\s+)\bFROM\b", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled);
static Regex rxOrderBy = new Regex(@"\bORDER\s+BY\s+(?:\((?>\((?<depth>)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|[\w\(\)\.])+(?:\s+(?:ASC|DESC))?(?:\s*,\s*(?:\((?>\((?<depth>)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|[\w\(\)\.])+(?:\s+(?:ASC|DESC))?)*", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled);
static Regex rxDistinct = new Regex(@"\ADISTINCT\s", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled);
static readonly Regex rxColumns = new Regex(@"\A\s*SELECT\s+((?:\((?>\((?<depth>)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|.)*?)(?<!,\s+)\bFROM\b", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled);
static readonly Regex rxOrderBy = new Regex(@"\bORDER\s+BY\s+(?:\((?>\((?<depth>)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|[\w\(\)\.])+(?:\s+(?:ASC|DESC))?(?:\s*,\s*(?:\((?>\((?<depth>)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|[\w\(\)\.])+(?:\s+(?:ASC|DESC))?)*", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled);
static readonly Regex rxDistinct = new Regex(@"\ADISTINCT\s", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled);
public static bool SplitSqlForPaging(string sql, out string sqlCount, out string sqlSelectRemoved, out string sqlOrderBy)
{
sqlSelectRemoved = null;
@@ -2546,5 +2546,4 @@ namespace Umbraco.Core.Persistence
}
}
}
}
@@ -40,12 +40,13 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
//TODO: Change all singleton access to use ctor injection in v8!!!
//TODO: That would mean that property value converters would need to be request lifespan, hrm....
bool isDebug = HttpContext.Current != null && HttpContext.Current.IsDebuggingEnabled;
var gridConfig = UmbracoConfig.For.GridConfig(
ApplicationContext.Current.ProfilingLogger.Logger,
ApplicationContext.Current.ApplicationCache.RuntimeCache,
new DirectoryInfo(IOHelper.MapPath(SystemDirectories.AppPlugins)),
new DirectoryInfo(IOHelper.MapPath(SystemDirectories.Config)),
HttpContext.Current.IsDebuggingEnabled);
isDebug);
var sections = GetArray(obj, "sections");
foreach (var section in sections.Cast<JObject>())
@@ -112,4 +113,4 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
}
}
}
}
+3
View File
@@ -20,6 +20,7 @@ namespace Umbraco.Core.Scoping
public NoScope(ScopeProvider scopeProvider)
{
_scopeProvider = scopeProvider;
Timestamp = DateTime.Now;
#if DEBUG_SCOPES
_scopeProvider.RegisterScope(this);
#endif
@@ -28,6 +29,8 @@ namespace Umbraco.Core.Scoping
private readonly Guid _instanceId = Guid.NewGuid();
public Guid InstanceId { get { return _instanceId; } }
public DateTime Timestamp { get; }
/// <inheritdoc />
public bool CallContext { get { return false; } }
+1 -1
View File
@@ -374,7 +374,7 @@ namespace Umbraco.Core.Scoping
}
var parent = ParentScope;
_scopeProvider.AmbientScope = parent;
_scopeProvider.AmbientScope = parent; // might be null = this is how scopes are removed from context objects
#if DEBUG_SCOPES
_scopeProvider.Disposed(this);
+51 -6
View File
@@ -2,10 +2,12 @@
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Web;
using Umbraco.Core.Events;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence;
#if DEBUG_SCOPES
using System.Linq;
@@ -66,22 +68,38 @@ namespace Umbraco.Core.Scoping
// tests, any other things (see https://msdn.microsoft.com/en-us/library/dn458353(v=vs.110).aspx),
// but we don't want to make all of our objects serializable since they are *not* meant to be
// used in cross-AppDomain scenario anyways.
//
// in addition, whatever goes into the logical call context is serialized back and forth any
// time cross-AppDomain code executes, so if we put an "object" there, we'll can *another*
// "object" instance - and so we cannot use a random object as a key.
// time cross-AppDomain code executes, so if we put an "object" there, we'll get *another*
// "object" instance back - and so we cannot use a random object as a key.
//
// so what we do is: we register a guid in the call context, and we keep a table mapping those
// guids to the actual objects. the guid serializes back and forth without causing any issue,
// and we can retrieve the actual objects from the table.
// only issue: how are we supposed to clear the table? we can't, really. objects should take
// care of de-registering themselves from context.
// everything we use does, except the NoScope scope, which just stays there
//
// during tests, NoScope can to into call context... nothing much we can do about it
// so far, the only objects that go into this table are scopes (using ScopeItemKey) and
// scope contexts (using ContextItemKey).
private static readonly object StaticCallContextObjectsLock = new object();
private static readonly Dictionary<Guid, object> StaticCallContextObjects
= new Dictionary<Guid, object>();
// normal scopes and scope contexts take greate care removing themselves when disposed, so it
// is all safe. OTOH the NoScope *CANNOT* remove itself, this is by design, it *WILL* leak and
// there is little (nothing) we can do about it - NoScope exists for backward compatibility
// reasons and relying on it is greatly discouraged.
//
// however... we can *try* at protecting the app against memory leaks, by collecting NoScope
// instances that are too old. if anything actually *need* to retain a NoScope instance for
// a long time, it will break. but that's probably ok. so: the constants below define how
// long a NoScope instance can stay in the table before being removed, and how often we should
// collect the table - and collecting happens anytime SetCallContextObject is invoked
private static readonly TimeSpan StaticCallContextNoScopeLifeSpan = TimeSpan.FromMinutes(30);
private static readonly TimeSpan StaticCallContextCollectPeriod = TimeSpan.FromMinutes(4);
private static DateTime _staticCallContextLastCollect = DateTime.MinValue;
#if DEBUG_SCOPES
public Dictionary<Guid, object> CallContextObjects
{
@@ -156,6 +174,7 @@ namespace Umbraco.Core.Scoping
//Logging.LogHelper.Debug<ScopeProvider>("At:\r\n" + Head(Environment.StackTrace, 24));
#endif
StaticCallContextObjects.Remove(objectKey);
CollectStaticCallContextObjectsLocked();
}
}
else
@@ -171,11 +190,37 @@ namespace Umbraco.Core.Scoping
//Logging.LogHelper.Debug<ScopeProvider>("At:\r\n" + Head(Environment.StackTrace, 24));
#endif
StaticCallContextObjects.Add(objectKey, value);
CollectStaticCallContextObjectsLocked();
}
CallContext.LogicalSetData(key, objectKey);
}
}
private static void CollectStaticCallContextObjectsLocked()
{
// is it time to collect?
var now = DateTime.Now;
if (now - _staticCallContextLastCollect <= StaticCallContextCollectPeriod)
return;
// disable warning: this method is invoked from within a lock
// ReSharper disable InconsistentlySynchronizedField
var threshold = now.Add(-StaticCallContextNoScopeLifeSpan);
var guids = StaticCallContextObjects
.Where(x => x.Value is NoScope noScope && noScope.Timestamp < threshold)
.Select(x => x.Key)
.ToList();
if (guids.Count > 0)
{
LogHelper.Warn<ScopeProvider>($"Collected {guids.Count} NoScope instances from StaticCallContextObjects.");
foreach (var guid in guids)
StaticCallContextObjects.Remove(guid);
}
// ReSharper restore InconsistentlySynchronizedField
_staticCallContextLastCollect = now;
}
// this is for tests exclusively until we have a proper accessor in v8
internal static Func<IDictionary> HttpContextItemsGetter { get; set; }
+1 -1
View File
@@ -1375,7 +1375,7 @@ namespace Umbraco.Core.Services
{
DeleteBlueprintsOfTypes(new[] {contentTypeId}, userId);
}
/// <summary>
/// Saves a single <see cref="IContent"/> object
/// </summary>
@@ -109,6 +109,23 @@ namespace Umbraco.Core.Services
return new ContentTypeAvailableCompositionsResults(ancestors, result);
}
/// <summary>
/// Returns the list of content types the composition is used in
/// </summary>
/// <param name="allContentTypes"></param>
/// <param name="ctService"></param>
/// <param name="source"></param>
/// <returns></returns>
internal static IEnumerable<IContentTypeComposition> GetWhereCompositionIsUsedInContentTypes(this IContentTypeService ctService,
IContentTypeComposition source,
IContentTypeComposition[] allContentTypes)
{
var sourceId = source != null ? source.Id : 0;
// find which content types are using this composition
return allContentTypes.Where(x => x.ContentTypeComposition.Any(y => y.Id == sourceId)).ToArray();
}
private static IContentTypeComposition[] GetAncestors(IContentTypeComposition ctype, IContentTypeComposition[] allContentTypes)
{
@@ -162,4 +179,4 @@ namespace Umbraco.Core.Services
}
}
}
}
+8 -8
View File
@@ -16,10 +16,10 @@ namespace Umbraco.Core.Services
/// explicitly. These methods will replace the normal ones in IContentService in v8 and this will be removed.
/// </summary>
public interface IContentServiceOperations
{
//TODO: Remove this class in v8
//TODO: There's probably more that needs to be added like the EmptyRecycleBin, etc...
{
//TODO: Remove this class in v8
//TODO: There's probably more that needs to be added like the EmptyRecycleBin, etc...
/// <summary>
/// Saves a single <see cref="IContent"/> object
@@ -99,7 +99,7 @@ namespace Umbraco.Core.Services
IEnumerable<IContent> GetBlueprintsForContentTypes(params int[] documentTypeIds);
IContent GetBlueprintById(int id);
IContent GetBlueprintById(Guid id);
void SaveBlueprint(IContent content, int userId = 0);
void SaveBlueprint(IContent content, int userId = 0);
void DeleteBlueprint(IContent content, int userId = 0);
IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = 0);
void DeleteBlueprintsOfType(int contentTypeId, int userId = 0);
@@ -179,7 +179,7 @@ namespace Umbraco.Core.Services
/// <param name="contentTypeAlias">Alias of the <see cref="IContentType"/></param>
/// <param name="userId">Optional id of the user creating the content</param>
/// <returns><see cref="IContent"/></returns>
IContent CreateContent(string name, Guid parentId, string contentTypeAlias, int userId = 0);
IContent CreateContent(string name, Guid parentId, string contentTypeAlias, int userId = 0);
/// <summary>
/// Creates an <see cref="IContent"/> object using the alias of the <see cref="IContentType"/>
@@ -644,7 +644,7 @@ namespace Umbraco.Core.Services
/// <param name="userId"></param>
/// <param name="raiseEvents"></param>
/// <returns>True if sorting succeeded, otherwise False</returns>
bool Sort(IEnumerable<IContent> items, int userId = 0, bool raiseEvents = true);
bool Sort(IEnumerable<IContent> items, int userId = 0, bool raiseEvents = true);
/// <summary>
/// Sorts a collection of <see cref="IContent"/> objects by updating the SortOrder according
@@ -704,4 +704,4 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IContent"/></returns>
IContent CreateContentWithIdentity(string name, int parentId, string contentTypeAlias, int userId = 0);
}
}
}
+3 -2
View File
@@ -76,8 +76,9 @@ namespace Umbraco.Core.Services
_locker.EnterWriteLock();
foreach (var pair in pairs)
{
_id2Key.Add(pair.id, new TypedId<Guid>(pair.key, umbracoObjectType));
_key2Id.Add(pair.key, new TypedId<int>(pair.id, umbracoObjectType));
_id2Key[pair.id] = new TypedId<Guid>(pair.key, umbracoObjectType);
_key2Id[pair.key] = new TypedId<int>(pair.id, umbracoObjectType);
}
}
finally
@@ -89,13 +89,11 @@ namespace Umbraco.Core.Services
/// <returns></returns>
public string FetchPackageFile(Guid packageId, Version umbracoVersion, int userId)
{
var packageRepo = UmbracoConfig.For.UmbracoSettings().PackageRepositories.GetDefault();
using (var httpClient = new HttpClient())
using (var uow = _uowProvider.GetUnitOfWork())
{
//includeHidden = true because we don't care if it's hidden we want to get the file regardless
var url = string.Format("{0}/{1}?version={2}&includeHidden=true&asFile=true", packageRepo.RestApiUrl, packageId, umbracoVersion.ToString(3));
var url = string.Format("{0}/{1}?version={2}&includeHidden=true&asFile=true", Constants.PackageRepository.RestApiBaseUrl, packageId, umbracoVersion.ToString(3));
byte[] bytes;
try
{
@@ -124,7 +122,7 @@ namespace Umbraco.Core.Services
}
}
Audit(uow, AuditType.PackagerInstall, string.Format("Package {0} fetched from {1}", packageId, packageRepo.Id), userId, -1);
Audit(uow, AuditType.PackagerInstall, string.Format("Package {0} fetched from {1}", packageId, Constants.PackageRepository.DefaultRepositoryId), userId, -1);
return null;
}
}
+28 -19
View File
@@ -8,14 +8,12 @@ using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Xml;
using Newtonsoft.Json;
using Umbraco.Core.Configuration;
using System.Web.Security;
using Umbraco.Core.Strings;
using Newtonsoft.Json;
using Umbraco.Core.CodeAnnotations;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Strings;
namespace Umbraco.Core
{
@@ -121,8 +119,8 @@ namespace Umbraco.Core
//if the resolution was success, return it, otherwise just return the path, we've detected
// it's a path but maybe it's relative and resolution has failed, etc... in which case we're just
// returning what was given to us.
return resolvedUrlResult.Success
? resolvedUrlResult
return resolvedUrlResult.Success
? resolvedUrlResult
: Attempt.Succeed(input);
}
}
@@ -144,7 +142,7 @@ namespace Umbraco.Core
}
internal static readonly Regex Whitespace = new Regex(@"\s+", RegexOptions.Compiled);
internal static readonly string[] JsonEmpties = new [] { "[]", "{}" };
internal static readonly string[] JsonEmpties = new[] { "[]", "{}" };
internal static bool DetectIsEmptyJson(this string input)
{
return JsonEmpties.Contains(Whitespace.Replace(input, string.Empty));
@@ -472,13 +470,13 @@ namespace Umbraco.Core
return ch.ToString(CultureInfo.InvariantCulture) == ch.ToString(CultureInfo.InvariantCulture).ToUpperInvariant();
}
/// <summary>Is null or white space.</summary>
/// <param name="str">The str.</param>
/// <returns>The is null or white space.</returns>
public static bool IsNullOrWhiteSpace(this string str)
{
return (str == null) || (str.Trim().Length == 0);
}
/// <summary>Indicates whether a specified string is null, empty, or
/// consists only of white-space characters.</summary>
/// <param name="value">The value to check.</param>
/// <returns>Returns <see langword="true"/> if the value is null,
/// empty, or consists only of white-space characters, otherwise
/// returns <see langword="false"/>.</returns>
public static bool IsNullOrWhiteSpace(this string value) => string.IsNullOrWhiteSpace(value);
public static string IfNullOrWhiteSpace(this string str, string defaultValue)
{
@@ -1436,14 +1434,25 @@ namespace Umbraco.Core
return ReplaceMany(text, regexSpecialCharacters);
}
/// <summary>
/// Checks whether a string "haystack" contains within it any of the strings in the "needles" collection and returns true if it does or false if it doesn't
/// </summary>
/// <param name="haystack">The string to check</param>
/// <param name="needles">The collection of strings to check are contained within the first string</param>
/// <param name="comparison">The type of comparision to perform - defaults to <see cref="StringComparison.CurrentCulture"/></param>
/// <returns>True if any of the needles are contained with haystack; otherwise returns false</returns>
/// Added fix to ensure the comparison is used - see http://issues.umbraco.org/issue/U4-11313
public static bool ContainsAny(this string haystack, IEnumerable<string> needles, StringComparison comparison = StringComparison.CurrentCulture)
{
if (haystack == null) throw new ArgumentNullException("haystack");
if (string.IsNullOrEmpty(haystack) == false || needles.Any())
if (haystack == null)
throw new ArgumentNullException("haystack");
if (string.IsNullOrEmpty(haystack) || needles == null || !needles.Any())
{
return needles.Any(value => haystack.IndexOf(value) >= 0);
return false;
}
return false;
return needles.Any(value => haystack.IndexOf(value, comparison) >= 0);
}
public static bool CsvContains(this string csv, string value)
+5 -8
View File
@@ -45,8 +45,8 @@
<Reference Include="AutoMapper.Net4, Version=3.3.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll</HintPath>
</Reference>
<Reference Include="ClientDependency.Core, Version=1.9.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClientDependency.1.9.6\lib\net45\ClientDependency.Core.dll</HintPath>
<Reference Include="ClientDependency.Core, Version=1.9.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
@@ -281,8 +281,6 @@
<Compile Include="Configuration\UmbracoSettings\INotDynamicXmlDocument.cs" />
<Compile Include="Configuration\UmbracoSettings\IProvidersSection.cs" />
<Compile Include="Configuration\UmbracoSettings\IRazorStaticMapping.cs" />
<Compile Include="Configuration\UmbracoSettings\IRepositoriesSection.cs" />
<Compile Include="Configuration\UmbracoSettings\IRepository.cs" />
<Compile Include="Configuration\UmbracoSettings\IRequestHandlerSection.cs" />
<Compile Include="Configuration\UmbracoSettings\IScheduledTask.cs" />
<Compile Include="Configuration\UmbracoSettings\IScheduledTasksSection.cs" />
@@ -308,10 +306,6 @@
<Compile Include="Configuration\UmbracoSettings\RazorElement.cs" />
<Compile Include="Configuration\UmbracoSettings\RazorStaticMappingCollection.cs" />
<Compile Include="Configuration\UmbracoSettings\RazorStaticMappingElement.cs" />
<Compile Include="Configuration\UmbracoSettings\RepositoriesCollection.cs" />
<Compile Include="Configuration\UmbracoSettings\RepositoriesElement.cs" />
<Compile Include="Configuration\UmbracoSettings\RepositoryConfigExtensions.cs" />
<Compile Include="Configuration\UmbracoSettings\RepositoryElement.cs" />
<Compile Include="Configuration\UmbracoSettings\RequestHandlerElement.cs" />
<Compile Include="Configuration\UmbracoSettings\ScheduledTaskElement.cs" />
<Compile Include="Configuration\UmbracoSettings\ScheduledTasksCollection.cs" />
@@ -1606,6 +1600,9 @@
<Compile Include="Constants-Packaging.cs">
<DependentUpon>Constants.cs</DependentUpon>
</Compile>
<Compile Include="Constants-PackageRepository.cs">
<DependentUpon>Constants.cs</DependentUpon>
</Compile>
<Compile Include="Constants-ObjectTypes.cs">
<DependentUpon>Constants.cs</DependentUpon>
</Compile>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
<package id="ClientDependency" version="1.9.6" targetFramework="net45" />
<package id="ClientDependency" version="1.9.7" targetFramework="net45" />
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net45" />
<package id="ImageProcessor" version="2.5.6" targetFramework="net45" />
<package id="log4net" version="2.0.8" targetFramework="net45" />
@@ -1,23 +0,0 @@
using System;
using System.Linq;
using NUnit.Framework;
namespace Umbraco.Tests.Configurations.UmbracoSettings
{
[TestFixture]
public class PackageRepositoriesElementDefaultTests : PackageRepositoriesElementTests
{
protected override bool TestingDefaults
{
get { return true; }
}
[Test]
public override void Repositories()
{
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.Count() == 1);
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).Id == Guid.Parse("65194810-1f85-11dd-bd0b-0800200c9a66"));
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).Name == "Umbraco package Repository");
}
}
}
@@ -1,27 +0,0 @@
using System;
using System.Linq;
using NUnit.Framework;
namespace Umbraco.Tests.Configurations.UmbracoSettings
{
[TestFixture]
public class PackageRepositoriesElementTests : UmbracoSettingsTests
{
[Test]
public virtual void Repositories()
{
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.Count() == 2);
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).Id == Guid.Parse("65194810-1f85-11dd-bd0b-0800200c9a66"));
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).Name == "Umbraco package Repository");
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).HasCustomWebServiceUrl == false);
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).WebServiceUrl == "/umbraco/webservices/api/repository.asmx");
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).RepositoryUrl == "http://packages.umbraco.org");
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(1).Id == Guid.Parse("163245E0-CD22-44B6-841A-1B9B9D2E955F"));
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(1).Name == "Test Repo");
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(1).HasCustomWebServiceUrl == false);
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).WebServiceUrl == "/umbraco/webservices/api/repository.asmx");
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).RepositoryUrl == "http://packages.umbraco.org");
}
}
}
@@ -222,13 +222,6 @@
</servers>
</distributedCall>
<!-- Configuration for repositories -->
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
<repositories>
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
<repository name="Test Repo" guid="163245E0-CD22-44B6-841A-1B9B9D2E955F" />
</repositories>
<providers>
<users>
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
@@ -256,4 +249,4 @@
internalRedirectPreservesTemplate="false">
</web.routing>
</settings>
</settings>
@@ -60,9 +60,6 @@
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#DistributedCallsLoadbalancing -->
<distributedCall/>
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Repositories -->
<repositories/>
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Providers -->
<providers/>
@@ -72,4 +69,4 @@
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#WebRouting -->
<web.routing/>
</defaultSettings>
</defaultSettings>
@@ -32,7 +32,7 @@ namespace Umbraco.Tests.Persistence.Migrations
conn.Setup(x => x.BeginTransaction(It.IsAny<IsolationLevel>())).Returns(Mock.Of<IDbTransaction>());
var db = new Mock<Database>(conn.Object);
var runner1 = new MigrationRunner(Mock.Of<IMigrationEntryService>(), Mock.Of<ILogger>(), new SemVersion(1), new SemVersion(2), "Test1",
var runner1 = new MigrationRunner(Mock.Of<IMigrationEntryService>(), Mock.Of<ILogger>(), new SemVersion(2), new SemVersion(1), "Test1",
new IMigration[] { Mock.Of<IMigration>() });
var result1 = runner1.Execute(db.Object, DatabaseProviders.SqlServerCE, false);
Assert.AreEqual(1, changed1.CountExecuted);
@@ -52,13 +52,13 @@ namespace Umbraco.Tests.Persistence.Migrations
conn.Setup(x => x.BeginTransaction(It.IsAny<IsolationLevel>())).Returns(Mock.Of<IDbTransaction>());
var db = new Mock<Database>(conn.Object);
var runner1 = new MigrationRunner(Mock.Of<IMigrationEntryService>(), Mock.Of<ILogger>(), new SemVersion(1), new SemVersion(2), "Test1",
var runner1 = new MigrationRunner(Mock.Of<IMigrationEntryService>(), Mock.Of<ILogger>(), new SemVersion(2), new SemVersion(1), "Test1",
new IMigration[] { Mock.Of<IMigration>()});
var result1 = runner1.Execute(db.Object, DatabaseProviders.SqlServerCE, false);
Assert.AreEqual(1, changed1.CountExecuted);
Assert.AreEqual(0, changed2.CountExecuted);
var runner2 = new MigrationRunner(Mock.Of<IMigrationEntryService>(), Mock.Of<ILogger>(), new SemVersion(1), new SemVersion(2), "Test2",
var runner2 = new MigrationRunner(Mock.Of<IMigrationEntryService>(), Mock.Of<ILogger>(), new SemVersion(2), new SemVersion(1), "Test2",
new IMigration[] { Mock.Of<IMigration>() });
var result2 = runner2.Execute(db.Object, DatabaseProviders.SqlServerCE, false);
Assert.AreEqual(1, changed1.CountExecuted);
@@ -285,8 +285,7 @@ AnotherContentFinder
public void Resolves_Attributed_Trees()
{
var trees = _manager.ResolveAttributedTrees();
// commit 6c5e35ec2cbfa31be6790d1228e0c2faf5f55bc8 brings the count down to 14
Assert.AreEqual(6, trees.Count());
Assert.AreEqual(5, trees.Count());
}
[Test]
@@ -300,7 +299,7 @@ AnotherContentFinder
public void Resolves_Trees()
{
var trees = _manager.ResolveTrees();
Assert.AreEqual(35, trees.Count());
Assert.AreEqual(33, trees.Count());
}
[Test]
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using NUnit.Framework;
@@ -11,20 +12,20 @@ namespace Umbraco.Tests.Strings
[TestFixture]
public class StringExtensionsTests
{
[SetUp]
public void Setup()
{
[SetUp]
public void Setup()
{
ShortStringHelperResolver.Reset();
ShortStringHelperResolver.Current = new ShortStringHelperResolver(new MockShortStringHelper());
Resolution.Freeze();
}
Resolution.Freeze();
}
[TearDown]
public void TearDown()
{
ShortStringHelperResolver.Reset();
}
[TestCase("hello", "world", false)]
[TestCase("hello", "hello", true)]
[TestCase("hellohellohellohellohellohellohello", "hellohellohellohellohellohellohelloo", false)]
@@ -53,43 +54,43 @@ namespace Umbraco.Tests.Strings
[TestCase("hello.txt", "hello")]
[TestCase("this.is.a.Txt", "this.is.a")]
[TestCase("this.is.not.a. Txt", "this.is.not.a. Txt")]
[TestCase("not a file","not a file")]
[TestCase("not a file", "not a file")]
public void Strip_File_Extension(string input, string result)
{
var stripped = input.StripFileExtension();
Assert.AreEqual(stripped, result);
}
[TestCase("This is a string to encrypt")]
[TestCase("This is a string to encrypt\nThis is a second line")]
[TestCase(" White space is preserved ")]
[TestCase("\nWhite space is preserved\n")]
public void Encrypt_And_Decrypt(string input)
{
var encrypted = input.EncryptWithMachineKey();
var decrypted = encrypted.DecryptWithMachineKey();
Assert.AreNotEqual(input, encrypted);
Assert.AreEqual(input, decrypted);
}
[TestCase("This is a string to encrypt")]
[TestCase("This is a string to encrypt\nThis is a second line")]
[TestCase(" White space is preserved ")]
[TestCase("\nWhite space is preserved\n")]
public void Encrypt_And_Decrypt(string input)
{
var encrypted = input.EncryptWithMachineKey();
var decrypted = encrypted.DecryptWithMachineKey();
Assert.AreNotEqual(input, encrypted);
Assert.AreEqual(input, decrypted);
}
[Test()]
public void Encrypt_And_Decrypt_Long_Value()
{
// Generate a really long string
char[] chars = { 'a', 'b', 'c', '1', '2', '3', '\n' };
[Test()]
public void Encrypt_And_Decrypt_Long_Value()
{
// Generate a really long string
char[] chars = { 'a', 'b', 'c', '1', '2', '3', '\n' };
string valueToTest = string.Empty;
string valueToTest = string.Empty;
// Create a string 7035 chars long
for (int i = 0; i < 1005; i++)
for (int j = 0; j < chars.Length; j++)
valueToTest += chars[j].ToString();
// Create a string 7035 chars long
for (int i = 0; i < 1005; i++)
for (int j = 0; j < chars.Length; j++)
valueToTest += chars[j].ToString();
var encrypted = valueToTest.EncryptWithMachineKey();
var decrypted = encrypted.DecryptWithMachineKey();
Assert.AreNotEqual(valueToTest, encrypted);
Assert.AreEqual(valueToTest, decrypted);
}
var encrypted = valueToTest.EncryptWithMachineKey();
var decrypted = encrypted.DecryptWithMachineKey();
Assert.AreNotEqual(valueToTest, encrypted);
Assert.AreEqual(valueToTest, decrypted);
}
[TestCase("Hello this is my string", " string", "Hello this is my")]
[TestCase("Hello this is my string strung", " string", "Hello this is my string strung")]
@@ -147,6 +148,42 @@ namespace Umbraco.Tests.Strings
Assert.AreEqual(expected, output);
}
[TestCase("pineapple", new string[] { "banana", "apple", "blueberry", "strawberry" }, StringComparison.CurrentCulture, true)]
[TestCase("PINEAPPLE", new string[] { "banana", "apple", "blueberry", "strawberry" }, StringComparison.CurrentCulture, false)]
[TestCase("pineapple", new string[] { "banana", "Apple", "blueberry", "strawberry" }, StringComparison.CurrentCulture, false)]
[TestCase("pineapple", new string[] { "banana", "Apple", "blueberry", "strawberry" }, StringComparison.OrdinalIgnoreCase, true)]
[TestCase("pineapple", new string[] { "banana", "blueberry", "strawberry" }, StringComparison.OrdinalIgnoreCase, false)]
[TestCase("Strawberry unicorn pie", new string[] { "Berry" }, StringComparison.OrdinalIgnoreCase, true)]
[TestCase("empty pie", new string[0], StringComparison.OrdinalIgnoreCase, false)]
public void ContainsAny(string haystack, IEnumerable<string> needles, StringComparison comparison, bool expected)
{
bool output = haystack.ContainsAny(needles, comparison);
Assert.AreEqual(expected, output);
}
[TestCase("", true)]
[TestCase(" ", true)]
[TestCase("\r\n\r\n", true)]
[TestCase("\r\n", true)]
[TestCase(@"
Hello
", false)]
[TestCase(null, true)]
[TestCase("a", false)]
[TestCase("abc", false)]
[TestCase("abc ", false)]
[TestCase(" abc", false)]
[TestCase(" abc ", false)]
public void IsNullOrWhiteSpace(string value, bool expected)
{
// Act
bool result = value.IsNullOrWhiteSpace();
// Assert
Assert.AreEqual(expected, result);
}
// FORMAT STRINGS
// note: here we just ensure that the proper helper gets called properly
@@ -239,7 +276,7 @@ namespace Umbraco.Tests.Strings
[Test]
public void ReplaceManyByOneChar()
{
var output = "JUST-ANYTHING".ReplaceMany(new char[] {}, '*');
var output = "JUST-ANYTHING".ReplaceMany(new char[] { }, '*');
Assert.AreEqual("REPLACE-MANY-B::JUST-ANYTHING", output);
}
}
@@ -38,7 +38,6 @@ namespace Umbraco.Tests.TestHelpers
var logging = new Mock<ILoggingSection>();
var tasks = new Mock<IScheduledTasksSection>();
var distCall = new Mock<IDistributedCallSection>();
var repos = new Mock<IRepositoriesSection>();
var providers = new Mock<IProvidersSection>();
var routing = new Mock<IWebRoutingSection>();
@@ -53,7 +52,6 @@ namespace Umbraco.Tests.TestHelpers
settings.Setup(x => x.Logging).Returns(logging.Object);
settings.Setup(x => x.ScheduledTasks).Returns(tasks.Object);
settings.Setup(x => x.DistributedCall).Returns(distCall.Object);
settings.Setup(x => x.PackageRepositories).Returns(repos.Object);
settings.Setup(x => x.Providers).Returns(providers.Object);
settings.Setup(x => x.WebRouting).Returns(routing.Object);
@@ -5,7 +5,6 @@ using Umbraco.Web.UI;
using umbraco;
using umbraco.BusinessLogic;
using umbraco.interfaces;
using Umbraco.Web.umbraco.presentation.umbraco.create;
namespace Umbraco.Tests.UI
{
-2
View File
@@ -361,8 +361,6 @@
<Compile Include="Configurations\UmbracoSettings\DistributedCallElementTests.cs" />
<Compile Include="Configurations\UmbracoSettings\LoggingElementDefaultTests.cs" />
<Compile Include="Configurations\UmbracoSettings\LoggingElementTests.cs" />
<Compile Include="Configurations\UmbracoSettings\PackageRepositoriesElementDefaultTests.cs" />
<Compile Include="Configurations\UmbracoSettings\PackageRepositoriesElementTests.cs" />
<Compile Include="Configurations\UmbracoSettings\ProvidersElementDefaultTests.cs" />
<Compile Include="Configurations\UmbracoSettings\ProvidersElementTests.cs" />
<Compile Include="Configurations\UmbracoSettings\RequestHandlerElementDefaultTests.cs" />
@@ -429,9 +429,10 @@ Umbraco.</p>
<CWS_NewsEventsList id="1155" parentID="1139" level="2" writerID="0" creatorID="0" nodeType="1126" template="1112" sortOrder="3" createDate="2009-02-27T09:57:30" updateDate="2010-04-22T02:18:31" nodeName="News and Events" urlName="news-and-events" writerName="Administrator" creatorName="Administrator" path="-1,1139,1155" isDoc="">
<CWS_EventItem id="1156" parentID="1155" level="3" writerID="0" creatorID="0" nodeType="1122" template="1107" sortOrder="1" createDate="2009-02-27T10:00:53" updateDate="2010-04-22T02:18:31" nodeName="Codegarden 09" urlName="codegarden-09" writerName="Administrator" creatorName="Administrator" path="-1,1139,1155,1156" isDoc="">
<eventDate>2009-06-22T00:00:00</eventDate>
<bodyText><![CDATA[
<h3>Come join the annual umbraco developer conference in Wonderful
Copenhagen on June 22nd - 23rd. Two days for insights, eye-openers,
<bodyText>
<![CDATA[
<h3>Come join the annual Umbraco developer conference in Wonderful
Odense on May 22nd - 24th. Two days for insights, eye-openers,
great conversations and friendly people.</h3>
<p>The who's who of umbraco will be gathered and share their
@@ -441,8 +442,8 @@ huge industrial venue in central Copenhagen where we'll have one
huge room, three rooms for breakout sessions and a Caf&eacute; that
serves your taste of espresso.</p>
<p>Come join the annual umbraco developer conference in Wonderful
Copenhagen on June 22nd - 23rd. Two days for insights, eye-openers,
<p>Come join the annual Umbraco developer conference in Wonderful
Odense on May 22nd - 24th. Two days for insights, eye-openers,
great conversations and friendly people.</p>
<p>We've planned a program that fits both experienced umbraco users
@@ -613,4 +614,4 @@ www.yourcompany.co.uk]]></emailMessageToFriend>
<umbracoUrlAlias />
<umbracoRedirect>0</umbracoRedirect>
</CWS_Home>
</root>
</root>
+12
View File
@@ -7,6 +7,7 @@ var sort = require('gulp-sort');
var connect = require('gulp-connect');
var open = require('gulp-open');
var runSequence = require('run-sequence');
const imagemin = require('gulp-imagemin');
var _ = require('lodash');
var MergeStream = require('merge-stream');
@@ -206,6 +207,17 @@ gulp.task('dependencies', function () {
//css, fonts and image files
stream.add(
gulp.src(sources.globs.assets)
.pipe(imagemin([
imagemin.gifsicle({interlaced: true}),
imagemin.jpegtran({progressive: true}),
imagemin.optipng({optimizationLevel: 5}),
imagemin.svgo({
plugins: [
{removeViewBox: true},
{cleanupIDs: false}
]
})
]))
.pipe(gulp.dest(root + targets.assets))
);
@@ -84,27 +84,21 @@
};
}
if (!String.prototype.trimStart) {
/** trims the start of the string*/
String.prototype.trimStart = function (str) {
if (this.startsWith(str)) {
return this.substring(str.length);
}
return this;
};
}
if (!String.prototype.trimEnd) {
/** trims the start of the string*/
String.prototype.trimStart = function (str) {
if (this.startsWith(str)) {
return this.substring(str.length);
}
return this;
};
/** trims the end of the string*/
String.prototype.trimEnd = function (str) {
if (this.endsWith(str)) {
return this.substring(0, this.length - str.length);
}
return this;
};
}
/** trims the end of the string*/
String.prototype.trimEnd = function (str) {
if (this.endsWith(str)) {
return this.substring(0, this.length - str.length);
}
return this;
};
if (!String.prototype.utf8Encode) {
@@ -332,4 +326,4 @@
}
})();
})();
+1
View File
@@ -27,6 +27,7 @@
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-connect": "5.0.0",
"gulp-imagemin": "^4.1.0",
"gulp-less": "^3.5.0",
"gulp-ngdocs": "^0.3.0",
"gulp-open": "^2.1.0",
+23
View File
@@ -0,0 +1,23 @@
@ECHO OFF
ECHO.
ECHO.
ECHO This will only work when you have NPM available on the command line
ECHO Works great with NodeJS Portable - https://gareth.flowers/nodejs-portable/
ECHO.
ECHO.
set /P c=Are you sure you want to continue [Y/N]?
if /I "%c%" EQU "Y" goto :setupgulp
if /I "%c%" EQU "N" goto :eof
:setupgulp
call npm install
call npm -g install bower
call npm -g install gulp
call npm -g install gulp-cli
ECHO.
ECHO.
ECHO You should now be able to run: gulp build
ECHO.
ECHO.
@@ -25,6 +25,7 @@ The tour object consist of two parts - The overall tour configuration and a list
"group": "My Custom Group" // Used to group tours in the help drawer
"groupOrder": 200 // Control the order of tour groups
"allowDisable": // Adds a "Don't" show this tour again"-button to the intro step
"culture" : // From v7.11+. Specifies the culture of the tour (eg. en-US), if set the tour will only be shown to users with this culture set on their profile. If omitted or left empty the tour will be visible to all users
"requiredSections":["content", "media", "mySection"] // Sections that the tour will access while running, if the user does not have access to the required tour sections, the tour will not load.
"steps": [] // tour steps - see next example
}
@@ -67,97 +67,97 @@ Use this directive to render an umbraco button. The directive can be used to gen
@param {boolean=} disabled Set to <code>true</code> to disable the button.
**/
(function() {
'use strict';
(function () {
'use strict';
function ButtonDirective($timeout) {
function ButtonDirective($timeout) {
function link(scope, el, attr, ctrl) {
function link(scope, el, attr, ctrl) {
scope.style = null;
scope.style = null;
scope.innerState = "init";
function activate() {
function activate() {
scope.blockElement = false;
scope.blockElement = false;
if (!scope.state) {
scope.state = "init";
}
if (scope.buttonStyle) {
if (scope.buttonStyle) {
// make it possible to pass in multiple styles
if (scope.buttonStyle.startsWith("[") && scope.buttonStyle.endsWith("]")) {
// make it possible to pass in multiple styles
if(scope.buttonStyle.startsWith("[") && scope.buttonStyle.endsWith("]")) {
// when using an attr it will always be a string so we need to remove square brackets
// and turn it into and array
var withoutBrackets = scope.buttonStyle.replace(/[\[\]']+/g,'');
// split array by , + make sure to catch whitespaces
var array = withoutBrackets.split(/\s?,\s?/g);
angular.forEach(array, function(item){
scope.style = scope.style + " " + "btn-" + item;
if(item === "block") {
// when using an attr it will always be a string so we need to remove square brackets
// and turn it into and array
var withoutBrackets = scope.buttonStyle.replace(/[\[\]']+/g, '');
// split array by , + make sure to catch whitespaces
var array = withoutBrackets.split(/\s?,\s?/g);
angular.forEach(array, function (item) {
scope.style = scope.style + " " + "btn-" + item;
if (item === "block") {
scope.blockElement = true;
}
});
} else {
scope.style = "btn-" + scope.buttonStyle;
if (scope.buttonStyle === "block") {
scope.blockElement = true;
}
});
} else {
scope.style = "btn-" + scope.buttonStyle;
if(scope.buttonStyle === "block") {
scope.blockElement = true;
}
}
}
}
activate();
activate();
var unbindStateWatcher = scope.$watch('state', function (newValue, oldValue) {
if (newValue) {
scope.innerState = newValue;
}
var unbindStateWatcher = scope.$watch('state', function(newValue, oldValue) {
if (newValue === 'success' || newValue === 'error') {
$timeout(function () {
scope.innerState = 'init';
}, 2000);
}
if (newValue === 'success' || newValue === 'error') {
$timeout(function() {
scope.state = 'init';
}, 2000);
});
scope.$on('$destroy', function () {
unbindStateWatcher();
});
}
var directive = {
transclude: true,
restrict: 'E',
replace: true,
templateUrl: 'views/components/buttons/umb-button.html',
link: link,
scope: {
action: "&?",
href: "@?",
type: "@",
buttonStyle: "@?",
state: "=?",
shortcut: "@?",
shortcutWhenHidden: "@",
label: "@?",
labelKey: "@?",
icon: "@?",
disabled: "=",
size: "@?",
alias: "@?"
}
};
});
return directive;
scope.$on('$destroy', function() {
unbindStateWatcher();
});
}
}
var directive = {
transclude: true,
restrict: 'E',
replace: true,
templateUrl: 'views/components/buttons/umb-button.html',
link: link,
scope: {
action: "&?",
href: "@?",
type: "@",
buttonStyle: "@?",
state: "=?",
shortcut: "@?",
shortcutWhenHidden: "@",
label: "@?",
labelKey: "@?",
icon: "@?",
disabled: "=",
size: "@?",
alias: "@?"
}
};
return directive;
}
angular.module('umbraco.directives').directive('umbButton', ButtonDirective);
angular.module('umbraco.directives').directive('umbButton', ButtonDirective);
})();
@@ -77,6 +77,8 @@
resetLastListPageNumber($scope.content);
eventsService.emit("content.loaded", { content: $scope.content });
$scope.page.loading = false;
});
@@ -130,6 +132,8 @@
$scope.page.buttonGroupState = "busy";
eventsService.emit("content.saving", { content: $scope.content, action: args.action });
contentEditingHelper.contentEditorPerformSave({
statusMessage: args.statusMessage,
saveMethod: args.saveMethod,
@@ -144,6 +148,9 @@
$scope.page.buttonGroupState = "success";
deferred.resolve(data);
eventsService.emit("content.saved", { content: $scope.content, action: args.action });
}, function (err) {
//error
if (err) {
@@ -183,7 +190,9 @@
$scope.page.loading = false;
});
eventsService.emit("content.newReady", { content: $scope.content });
});
}
else {
@@ -198,6 +207,8 @@
$scope.page.buttonGroupState = "busy";
eventsService.emit("content.unpublishing", { content: $scope.content });
contentResource.unPublish($scope.content.id)
.then(function (data) {
@@ -215,7 +226,10 @@
$scope.page.buttonGroupState = "success";
eventsService.emit("content.unpublished", { content: $scope.content });
}, function(err) {
formHelper.showNotifications(err.data);
$scope.page.buttonGroupState = 'error';
});
}
@@ -140,37 +140,7 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat
//Filter the path for root node ids (we don't want to pass in -1 or 'init')
args.path = _.filter(args.path, function (item) { return (item !== "init" && item !== "-1"); });
//Once those are filtered we need to check if the current user has a special start node id,
// if they do, then we're going to trim the start of the array for anything found from that start node
// and previous so that the tree syncs properly. The tree syncs from the top down and if there are parts
// of the tree's path in there that don't actually exist in the dom/model then syncing will not work.
userService.getCurrentUser().then(function (userData) {
var startNodes = [];
for (var i = 0; i < userData.startContentIds; i++) {
startNodes.push(userData.startContentIds[i]);
}
for (var j = 0; j < userData.startMediaIds; j++) {
startNodes.push(userData.startMediaIds[j]);
}
_.each(startNodes, function (i) {
var found = _.find(args.path, function (p) {
return String(p) === String(i);
});
if (found) {
args.path = args.path.splice(_.indexOf(args.path, found));
}
});
loadPath(args.path, args.forceReload, args.activate);
});
loadPath(args.path, args.forceReload, args.activate);
return deferred.promise;
};
@@ -1,12 +1,51 @@
/**
* @ngdoc directive
* @name umbraco.directives.directive:umbConfirm
* @function
* @description
* A confirmation dialog
*
* @restrict E
*/
@ngdoc directive
@name umbraco.directives.directive:umbConfirm
@restrict E
@scope
@description
A confirmation dialog
<h3>Markup example</h3>
<pre>
<div ng-controller="My.Controller as vm">
<umb-confirm caption="Title" on-confirm="vm.onConfirm()" on-cancel="vm.onCancel()"></umb-confirm>
</div>
</pre>
<h3>Controller example</h3>
<pre>
(function () {
"use strict";
function Controller() {
var vm = this;
vm.onConfirm = function() {
alert('Confirm clicked');
};
vm.onCancel = function() {
alert('Cancel clicked');
}
}
angular.module("umbraco").controller("My.Controller", Controller);
})();
</pre>
@param {string} caption (<code>attribute</code>): The caption shown above the buttons
@param {callback} on-confirm (<code>attribute</code>): The call back when the "OK" button is clicked. If not set the button will not be shown
@param {callback} on-cancel (<code>atribute</code>): The call back when the "Cancel" button is clicked. If not set the button will not be shown
**/
function confirmDirective() {
return {
restrict: "E", // restrict to an element
@@ -18,7 +57,16 @@ function confirmDirective() {
caption: '@'
},
link: function (scope, element, attr, ctrl) {
scope.showCancel = false;
scope.showConfirm = false;
if (scope.onConfirm) {
scope.showConfirm = true;
}
if (scope.onCancel) {
scope.showCancel = true;
}
}
};
}
@@ -348,9 +348,10 @@
}
};
//select which resource methods to use, eg document Type or Media Type versions
var availableContentTypeResource = scope.contentType === "documentType" ? contentTypeResource.getAvailableCompositeContentTypes : mediaTypeResource.getAvailableCompositeContentTypes;
var countContentTypeResource = scope.contentType === "documentType" ? contentTypeResource.getCount : mediaTypeResource.getCount;
var whereUsedContentTypeResource = scope.contentType === "documentType" ? contentTypeResource.getWhereCompositionIsUsedInContentTypes : mediaTypeResource.getWhereCompositionIsUsedInContentTypes;
var countContentTypeResource = scope.contentType === "documentType" ? contentTypeResource.getCount : mediaTypeResource.getCount;
//get the currently assigned property type aliases - ensure we pass these to the server side filer
var propAliasesExisting = _.filter(_.flatten(_.map(scope.model.groups, function(g) {
@@ -363,7 +364,14 @@
$q.all([
//get available composite types
availableContentTypeResource(scope.model.id, [], propAliasesExisting).then(function (result) {
setupAvailableContentTypesModel(result);
setupAvailableContentTypesModel(result);
}),
//get where used document types
whereUsedContentTypeResource(scope.model.id).then(function (whereUsed) {
//pass to the dialog model the content type eg documentType or mediaType
scope.compositionsDialogModel.section = scope.contentType;
//pass the list of 'where used' document types
scope.compositionsDialogModel.whereCompositionUsed = whereUsed;
}),
//get content type count
countContentTypeResource().then(function(result) {
@@ -91,12 +91,16 @@
(function () {
'use strict';
function NodePreviewDirective() {
function NodePreviewDirective(userService) {
function link(scope, el, attr, ctrl) {
if (!scope.editLabelKey) {
scope.editLabelKey = "general_edit";
}
userService.getCurrentUser().then(function (u) {
var isAdmin = u.userGroups.indexOf('admin') !== -1;
scope.alias = (Umbraco.Sys.ServerVariables.isDebuggingEnabled === true || isAdmin) ? scope.alias : null;
});
}
var directive = {
@@ -106,6 +110,7 @@
scope: {
icon: "=?",
name: "=",
alias: "=?",
description: "=?",
permissions: "=?",
published: "=?",
@@ -57,7 +57,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
saveModel),
'Failed to save permissions');
},
getRecycleBin: function () {
return umbRequestHelper.resourcePromise(
@@ -424,7 +424,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
$http.get(
umbRequestHelper.getApiUrl(
"contentApiBaseUrl",
"GetEmpty",
"GetEmpty",
[{ blueprintId: blueprintId }, { parentId: parentId}])),
'Failed to retrieve blueprint for id ' + blueprintId);
},
@@ -488,6 +488,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
getChildren: function (parentId, options) {
var defaults = {
includeProperties: [],
pageSize: 0,
pageNumber: 0,
filter: '',
@@ -531,6 +532,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
"GetChildren",
{
id: parentId,
includeProperties: _.pluck(options.includeProperties, 'alias').join(","),
pageNumber: options.pageNumber,
pageSize: options.pageSize,
orderBy: options.orderBy,
@@ -580,7 +582,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
"contentApiBaseUrl",
"GetDetailedPermissions", { contentId: contentId })),
'Failed to retrieve permissions for content item ' + contentId);
},
},
getPermissions: function (nodeIds) {
return umbRequestHelper.resourcePromise(
@@ -741,11 +743,11 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
createBlueprintFromContent: function (contentId, name) {
return umbRequestHelper.resourcePromise(
$http.post(
$http.post(
umbRequestHelper.getApiUrl("contentApiBaseUrl", "CreateBlueprintFromContent", {
contentId: contentId, name: name
})
),
})
),
"Failed to create blueprint from content with id " + contentId
);
}
@@ -38,7 +38,37 @@ function contentTypeResource($q, $http, umbRequestHelper, umbDataFormatter) {
query),
'Failed to retrieve data for content type id ' + contentTypeId);
},
/**
* @ngdoc method
* @name umbraco.resources.contentTypeResource#getWhereCompositionIsUsedInContentTypes
* @methodOf umbraco.resources.contentTypeResource
*
* @description
* Returns a list of content types which use a specific composition with a given id
*
* ##usage
* <pre>
* contentTypeResource.getWhereCompositionIsUsedInContentTypes(1234)
* .then(function(contentTypeList) {
* console.log(contentTypeList);
* });
* </pre>
* @param {Int} contentTypeId id of the composition content type to retrieve the list of the content types where it has been used
* @returns {Promise} resourcePromise object.
*
*/
getWhereCompositionIsUsedInContentTypes: function (contentTypeId) {
var query = {
contentTypeId: contentTypeId
};
return umbRequestHelper.resourcePromise(
$http.post(
umbRequestHelper.getApiUrl(
"contentTypeApiBaseUrl",
"GetWhereCompositionIsUsedInContentTypes"),
query),
'Failed to retrieve data for content type id ' + contentTypeId);
},
/**
* @ngdoc method
@@ -0,0 +1,162 @@
/**
* @ngdoc service
* @name umbraco.resources.dictionaryResource
* @description Loads in data for dictionary items
**/
function dictionaryResource($q, $http, $location, umbRequestHelper, umbDataFormatter) {
/**
* @ngdoc method
* @name umbraco.resources.dictionaryResource#deleteById
* @methodOf umbraco.resources.dictionaryResource
*
* @description
* Deletes a dictionary item with a given id
*
* ##usage
* <pre>
* dictionaryResource.deleteById(1234)
* .then(function() {
* alert('its gone!');
* });
* </pre>
*
* @param {Int} id id of dictionary item to delete
* @returns {Promise} resourcePromise object.
*
**/
function deleteById(id) {
return umbRequestHelper.resourcePromise(
$http.post(
umbRequestHelper.getApiUrl(
"dictionaryApiBaseUrl",
"DeleteById",
[{ id: id }])),
"Failed to delete item " + id);
}
/**
* @ngdoc method
* @name umbraco.resources.dictionaryResource#create
* @methodOf umbraco.resources.dictionaryResource
*
* @description
* Creates a dictionary item with the gieven key and parent id
*
* ##usage
* <pre>
* dictionaryResource.create(1234,"Item key")
* .then(function() {
* alert('its created!');
* });
* </pre>
*
* @param {Int} parentid the parentid of the new dictionary item
* @param {String} key the key of the new dictionary item
* @returns {Promise} resourcePromise object.
*
**/
function create(parentid, key) {
return umbRequestHelper.resourcePromise(
$http.post(
umbRequestHelper.getApiUrl(
"dictionaryApiBaseUrl",
"Create",
{ parentId: parentid, key : key })),
"Failed to create item ");
}
/**
* @ngdoc method
* @name umbraco.resources.dictionaryResource#deleteById
* @methodOf umbraco.resources.dictionaryResource
*
* @description
* Gets a dictionary item with a given id
*
* ##usage
* <pre>
* dictionaryResource.getById(1234)
* .then(function() {
* alert('Found it!');
* });
* </pre>
*
* @param {Int} id id of dictionary item to get
* @returns {Promise} resourcePromise object.
*
**/
function getById(id) {
return umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"dictionaryApiBaseUrl",
"GetById",
[{ id: id }])),
"Failed to get item " + id);
}
/**
* @ngdoc method
* @name umbraco.resources.dictionaryResource#save
* @methodOf umbraco.resources.dictionaryResource
*
* @description
* Updates a dictionary
*
* @param {Object} dictionary dictionary object to update
* @param {Bool} nameIsDirty set to true if the name has been changed
* @returns {Promise} resourcePromise object.
*
*/
function save(dictionary, nameIsDirty) {
var saveModel = umbDataFormatter.formatDictionaryPostData(dictionary, nameIsDirty);
return umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("dictionaryApiBaseUrl", "PostSave"), saveModel),
"Failed to save data for dictionary id " + dictionary.id);
}
/**
* @ngdoc method
* @name umbraco.resources.dictionaryResource#getList
* @methodOf umbraco.resources.dictionaryResource
*
* @description
* Gets a list of all dictionary items
*
* ##usage
* <pre>
* dictionaryResource.getList()
* .then(function() {
* alert('Found it!');
* });
* </pre>
*
* @returns {Promise} resourcePromise object.
*
**/
function getList() {
return umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"dictionaryApiBaseUrl",
"getList")),
"Failed to get list");
}
var resource = {
deleteById: deleteById,
create: create,
getById: getById,
save: save,
getList : getList
};
return resource;
}
angular.module("umbraco.resources").factory("dictionaryResource", dictionaryResource);
@@ -38,7 +38,38 @@ function mediaTypeResource($q, $http, umbRequestHelper, umbDataFormatter) {
query),
'Failed to retrieve data for content type id ' + contentTypeId);
},
/**
* @ngdoc method
* @name umbraco.resources.mediaTypeResource#getWhereCompositionIsUsedInContentTypes
* @methodOf umbraco.resources.mediaTypeResource
*
* @description
* Returns a list of media types which use a specific composition with a given id
*
* ##usage
* <pre>
* mediaTypeResource.getWhereCompositionIsUsedInContentTypes(1234)
* .then(function(mediaTypeList) {
* console.log(mediaTypeList);
* });
* </pre>
* @param {Int} contentTypeId id of the composition content type to retrieve the list of the media types where it has been used
* @returns {Promise} resourcePromise object.
*
*/
getWhereCompositionIsUsedInContentTypes: function (contentTypeId) {
var query = {
contentTypeId: contentTypeId
};
return umbRequestHelper.resourcePromise(
$http.post(
umbRequestHelper.getApiUrl(
"mediaTypeApiBaseUrl",
"GetWhereCompositionIsUsedInContentTypes"),
query),
'Failed to retrieve data for content type id ' + contentTypeId);
},
/**
* @ngdoc method
* @name umbraco.resources.mediaTypeResource#getAllowedTypes
@@ -122,6 +153,18 @@ function mediaTypeResource($q, $http, umbRequestHelper, umbDataFormatter) {
'Failed to delete content type contaier');
},
/**
* @ngdoc method
* @name umbraco.resources.mediaTypeResource#save
* @methodOf umbraco.resources.mediaTypeResource
*
* @description
* Saves or update a media type
*
* @param {Object} content data type object to create/update
* @returns {Promise} resourcePromise object.
*
*/
save: function (contentType) {
var saveModel = umbDataFormatter.formatContentTypePostData(contentType);
@@ -86,8 +86,8 @@ function memberTypeResource($q, $http, umbRequestHelper, umbDataFormatter) {
/**
* @ngdoc method
* @name umbraco.resources.contentTypeResource#save
* @methodOf umbraco.resources.contentTypeResource
* @name umbraco.resources.memberTypeResource#save
* @methodOf umbraco.resources.memberTypeResource
*
* @description
* Saves or update a member type
@@ -243,10 +243,11 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
}
//if we are not creating, then we should add unpublish too,
// if we are not creating, then we should add unpublish too,
// so long as it's already published and if the user has access to publish
// and the user has access to unpublish (may have been removed via Event)
if (!args.create) {
if (args.content.publishDate && _.contains(args.content.allowedActions, "U")) {
if (args.content.publishDate && _.contains(args.content.allowedActions, "U") && _.contains(args.content.allowedActions, "Z")) {
buttons.subButtons.push(createButtonDefinition("Z"));
}
}
@@ -166,7 +166,13 @@ function iconHelper($q, $timeout) {
var c = ".icon-";
for (var i = document.styleSheets.length - 1; i >= 0; i--) {
var classes = document.styleSheets[i].rules || document.styleSheets[i].cssRules;
var classes = null;
try {
classes = document.styleSheets[i].rules || document.styleSheets[i].cssRules;
} catch (e) {
console.warn("Can't read the css rules of: " + document.styleSheets[i].href, e);
continue;
}
if (classes !== null) {
for(var x=0;x<classes.length;x++) {
@@ -224,4 +230,4 @@ function iconHelper($q, $timeout) {
}
};
}
angular.module('umbraco.services').factory('iconHelper', iconHelper);
angular.module('umbraco.services').factory('iconHelper', iconHelper);
@@ -288,9 +288,12 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
throw "args.tree cannot be null";
}
if (mainTreeEventHandler) {
//returns a promise
return mainTreeEventHandler.syncTree(args);
if (mainTreeEventHandler) {
if (mainTreeEventHandler.syncTree) {
//returns a promise,
return mainTreeEventHandler.syncTree(args);
}
}
//couldn't sync
@@ -99,6 +99,28 @@
return saveModel;
},
/** formats the display model used to display the dictionary to the model used to save the dictionary */
formatDictionaryPostData : function(dictionary, nameIsDirty) {
var saveModel = {
parentId: dictionary.parentId,
id: dictionary.id,
name: dictionary.name,
nameIsDirty: nameIsDirty,
translations: [],
key : dictionary.key
};
for(var i = 0; i < dictionary.translations.length; i++) {
saveModel.translations.push({
isoCode: dictionary.translations[i].isoCode,
languageId: dictionary.translations[i].languageId,
translation: dictionary.translations[i].translation
});
}
return saveModel;
},
/** formats the display model used to display the user to the model used to save the user */
formatUserPostData: function (displayModel) {
@@ -29,9 +29,9 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
"There's a pretty big chance, you've visited a website powered by Umbraco today",
"'Umbraco-spotting' is the game of spotting big brands running Umbraco",
"At least 4 people have the Umbraco logo tattooed on them",
"'Umbraco' is the danish name for an allen key",
"'Umbraco' is the Danish name for an allen key",
"Umbraco has been around since 2005, that's a looong time in IT",
"More than 600 people from all over the world meet each year in Denmark in June for our annual conference <a target='_blank' href='https://umbra.co/codegarden'>CodeGarden</a>",
"More than 600 people from all over the world meet each year in Denmark in May for our annual conference <a target='_blank' href='https://umbra.co/codegarden'>CodeGarden</a>",
"While you are installing Umbraco someone else on the other side of the planet is probably doing it too",
"You can extend Umbraco without modifying the source code using either JavaScript or C#",
"Umbraco has been installed in more than 198 countries"
@@ -32,7 +32,6 @@
ng-pattern="passwordPattern"
autocorrect="off"
autocapitalize="off"
autocomplete="off"
required
ng-model="installer.current.model.password" id="password" />
<small class="inline-help">At least {{installer.current.model.minCharLength}} characters long</small>
@@ -176,6 +176,7 @@
@import "hacks.less";
@import "healthcheck.less";
@import "getstarted.less";
// cleanup properties.less when it is done
@import "properties.less";
@@ -8,7 +8,7 @@
// Sortabel
// Sortable
// -------------------------
// sortable-helper
@@ -127,6 +127,16 @@
position: relative;
margin-bottom: 40px;
padding-top: 10px;
&:hover {
background-color: @grayLighter;
}
&[ng-click],
&[data-ng-click],
&[x-ng-click] {
cursor: pointer;
}
}
.umb-grid .row-tools a {
@@ -431,7 +441,7 @@
background-color: @gray-10;
.umb-row-title-bar {
cursor: default;
cursor: inherit;
}
.umb-row-title {
@@ -13,6 +13,7 @@
border-radius: 0 10px 10px 10px;
padding: 10px 10px 5px 10px;
box-sizing: border-box;
position:relative;
}
.umb-group-builder__group.-active {
@@ -0,0 +1,88 @@
.umb-getstarted {
display: flex;
flex-wrap: wrap;
margin-left: -10px;
margin-right: -10px;
}
.umb-getstartedcards {
display: flex;
flex-wrap: wrap;
margin: 0 auto;
max-width: 100%;
@media (min-width: 500px) {
margin: 0 -10px;
}
}
.umb-getstartedcard {
width: 100%;
padding: 0.5em;
text-align: center;
display: flex;
align-items: center;
border: 1px solid #d8d7d9;
background-color: #fff;
margin: 0 0 0.5em;
@media (min-width: 500px) {
display: block;
align-items: unset;
padding: 1em 1em 0 1em;
margin: 0 10px 20px;
width: auto;
flex-basis: 35%;
max-width: 35%;
}
@media (min-width: 768px) {
width: auto;
flex-basis: 14%;
max-width: 14%;
}
@media (min-width: 1930px) {
width: auto;
flex-basis: 7%;
max-width: 7%;
}
}
.umb-getstartedcard img {
height: 3em;
max-width: 100%;
@media (min-width: 500px) {
height: auto;
}
}
.umb-getstartedcards {
margin: 0 auto;
max-width: 100%;
}
.umb-getstartedbody {
font-weight: bold;
margin: 0.5em;
@media (min-width: 500px) {
padding: 10px;
margin: auto;
}
}
.umb-getstartedbody p {
margin: 0;
@media (min-width: 500px) {
margin: inherit;
}
}
.umb-getstartedcard:hover {
border: 1px solid @turquoise;
cursor: pointer;
}
@@ -182,6 +182,14 @@ h5.-black {
margin-left: 0;
}
label[for=""] {
cursor: default;
}
label:not([for]) {
cursor: default;
}
/* CONTROL VALIDATION */
.umb-control-required {
color: @controlRequiredColor;
@@ -22,7 +22,7 @@
<localize key="user_newPassword">New password</localize>
<small style="font-size: 13px;">{{invitedUserPasswordModel.passwordPolicyText}}</small>
</label>
<input type="password" ng-model="invitedUserPasswordModel.password" name="password" class="-full-width-input" umb-auto-focus required val-server-field="value" autocomplete="off" ng-minlength="{{invitedUserPasswordModel.passwordPolicies.minPasswordLength}}" />
<input type="password" ng-model="invitedUserPasswordModel.password" name="password" class="-full-width-input" umb-auto-focus required val-server-field="value" ng-minlength="{{invitedUserPasswordModel.passwordPolicies.minPasswordLength}}" />
<span class="help-inline" val-msg-for="password" val-toggle-msg="required"><localize key="user_passwordIsBlank">Your new password cannot be blank!</localize></span>
<span class="help-inline" val-msg-for="password" val-toggle-msg="minlength">Minimum {{invitedUserPasswordModel.passwordPolicies.minPasswordLength}} characters</span>
<span class="help-inline" val-msg-for="password" val-toggle-msg="valServerField"></span>
@@ -30,7 +30,7 @@
<div class="control-group" ng-class="{error: setPasswordForm.confirmPassword.$invalid}">
<label><localize key="user_confirmNewPassword">Confirm new password</localize></label>
<input type="password" ng-model="invitedUserPasswordModel.confirmPassword" name="confirmPassword" class="-full-width-input" required val-compare="password" autocomplete="off" />
<input type="password" ng-model="invitedUserPasswordModel.confirmPassword" name="confirmPassword" class="-full-width-input" required val-compare="password" />
<span class="help-inline" val-msg-for="confirmPassword" val-toggle-msg="required"><localize key="general_required">Required</localize></span>
<span class="help-inline" val-msg-for="confirmPassword" val-toggle-msg="valCompare"><localize key="user_passwordMismatch">The confirmed password doesn't match the new password!</localize></span>
</div>
@@ -150,7 +150,7 @@
<div class="control-group" ng-class="{error: loginForm.password.$invalid}">
<label><localize key="general_password">Password</localize></label>
<div class="password-toggle">
<input type="password" ng-model="password" name="password" class="-full-width-input" localize="placeholder" placeholder="@placeholders_password" autocomplete="off" /><a ng-click="togglePassword()">Toggle</a>
<input type="password" ng-model="password" name="password" class="-full-width-input" localize="placeholder" placeholder="@placeholders_password" /><a ng-click="togglePassword()">Toggle</a>
</div>
</div>
@@ -1,17 +1,23 @@
(function() {
"use strict";
function CompositionsOverlay($scope) {
function CompositionsOverlay($scope,$location) {
var vm = this;
vm.isSelected = isSelected;
vm.openContentType = openContentType;
function isSelected(alias) {
if($scope.model.contentType.compositeContentTypes.indexOf(alias) !== -1) {
return true;
}
}
function openContentType(contentType, section) {
var url = (section === "documentType" ? "/settings/documenttypes/edit/" : "/settings/mediaTypes/edit/") + contentType.id;
$location.path(url);
}
}
angular.module("umbraco").controller("Umbraco.Overlays.CompositionsOverlay", CompositionsOverlay);
@@ -22,11 +22,16 @@
position="center">
<localize key="contentTypeEditor_noAvailableCompositions"></localize>
</umb-empty-state>
<umb-empty-state ng-if="model.availableCompositeContentTypes.length === 0 && model.totalContentTypes > 1"
position="center">
<umb-empty-state ng-if="model.availableCompositeContentTypes.length === 0 && model.totalContentTypes > 1">
<localize key="contentTypeEditor_compositionInUse"></localize>
</umb-empty-state>
<div ng-if="model.availableCompositeContentTypes.length === 0 && model.totalContentTypes > 1 && model.whereCompositionUsed.length > 0">
<h5><localize key="contentTypeEditor_compositionUsageHeading"></localize></h5>
<p><localize key="contentTypeEditor_compositionUsageSpecification"></localize></p>
<ul class="umb-checkbox-list">
<li class="umb-checkbox-list__item" ng-repeat="contentTypeEntity in model.whereCompositionUsed"><a ng-click="vm.openContentType(contentTypeEntity.contentType, model.section)"><i class="{{contentTypeEntity.contentType.icon}}"></i>&nbsp;{{contentTypeEntity.contentType.name}}</a></li>
</ul>
</div>
<ul class="umb-checkbox-list">
<li class="umb-checkbox-list__item"
ng-repeat="compositeContentType in model.availableCompositeContentTypes | filter:searchTerm"
@@ -50,4 +55,4 @@
</li>
</ul>
</div>
</div>
@@ -154,14 +154,15 @@ angular.module("umbraco")
});
});
mediaTypeHelper.getAllowedImagetypes(folder.id)
.then(function(types) {
$scope.acceptedMediatypes = types;
});
} else {
$scope.path = [];
}
mediaTypeHelper.getAllowedImagetypes(folder.id)
.then(function (types) {
$scope.acceptedMediatypes = types;
});
$scope.lockedFolder = folder.id === -1 && $scope.model.startNodeIsVirtual;
$scope.currentFolder = folder;
@@ -317,20 +318,25 @@ angular.module("umbraco")
mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true);
mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false);
// set properties to match a media object
if (mediaItem.metaData &&
mediaItem.metaData.umbracoWidth &&
mediaItem.metaData.umbracoHeight) {
mediaItem.properties = [
{
mediaItem.properties = [];
if (mediaItem.metaData) {
if (mediaItem.metaData.umbracoWidth && mediaItem.metaData.umbracoHeight) {
mediaItem.properties.push({
alias: "umbracoWidth",
value: mediaItem.metaData.umbracoWidth.Value
},
{
});
mediaItem.properties.push({
alias: "umbracoHeight",
value: mediaItem.metaData.umbracoHeight.Value
}
];
});
}
if (mediaItem.metaData.umbracoFile) {
mediaItem.properties.push({
alias: "umbracoFile",
editor: mediaItem.metaData.umbracoFile.PropertyEditorAlias,
value: mediaItem.metaData.umbracoFile.Value
});
}
}
});
// update images
@@ -385,4 +391,4 @@ angular.module("umbraco")
onInit();
});
});
@@ -27,7 +27,8 @@
<umb-button type="button"
label-key="general_upload"
action="upload()"
disabled="lockedFolder">
disabled="lockedFolder"
ng-if="acceptedMediatypes.length > 0">
</umb-button>
</div>
@@ -1,15 +1,15 @@
<div class="umb-button" ng-class="{'umb-button--block': blockElement}" data-element="{{ alias ? 'button-' + alias : '' }}">
<div class="icon-check umb-button__success" ng-class="{'-hidden': state !== 'success', '-white': style}"></div>
<div class="icon-check umb-button__success" ng-class="{'-hidden': innerState !== 'success', '-white': style}"></div>
<div class="icon-delete umb-button__error" ng-class="{'-hidden': state !== 'error', '-white': style}"></div>
<div class="icon-delete umb-button__error" ng-class="{'-hidden': innerState !== 'error', '-white': style}"></div>
<div class="umb-button__progress" ng-class="{'-hidden': state !== 'busy', '-white': style}"></div>
<div class="umb-button__progress" ng-class="{'-hidden': innerState !== 'busy', '-white': style}"></div>
<div ng-if="state !== 'init'" class="umb-button__overlay"></div>
<div ng-if="innerState !== 'init'" class="umb-button__overlay"></div>
<a ng-if="type === 'link'" href="{{href}}" class="btn umb-button__button {{style}} umb-button--{{size}}" ng-click="action(model)" hotkey="{{shortcut}}" hotkey-when-hidden="{{shortcutWhenHidden}}">
<span class="umb-button__content" ng-class="{'-hidden': state !== 'init'}">
<span class="umb-button__content" ng-class="{'-hidden': innerState !== 'init'}">
<i ng-if="icon" class="{{icon}} umb-button__icon"></i>
<localize ng-if="labelKey" key="{{labelKey}}">{{label}}</localize>
<span ng-if="!labelKey">{{label}}</span>
@@ -17,7 +17,7 @@
</a>
<button ng-if="type === 'button'" type="button" class="btn umb-button__button {{style}} umb-button--{{size}}" ng-click="action(model)" hotkey="{{shortcut}}" hotkey-when-hidden="{{shortcutWhenHidden}}" ng-disabled="disabled">
<span class="umb-button__content" ng-class="{'-hidden': state !== 'init'}">
<span class="umb-button__content" ng-class="{'-hidden': innerState !== 'init'}">
<i ng-if="icon" class="{{icon}} umb-button__icon"></i>
<localize ng-if="labelKey" key="{{labelKey}}">{{label}}</localize>
<span ng-if="!labelKey">{{label}}</span>
@@ -25,7 +25,7 @@
</button>
<button ng-if="type === 'submit'" type="submit" class="btn umb-button__button {{style}} umb-button--{{size}}" hotkey="{{shortcut}}" hotkey-when-hidden="{{shortcutWhenHidden}}" ng-disabled="disabled">
<span class="umb-button__content" ng-class="{'-hidden': state !== 'init'}">
<span class="umb-button__content" ng-class="{'-hidden': innerState !== 'init'}">
<i ng-if="icon" class="{{icon}} umb-button__icon"></i>
<localize ng-if="labelKey" key="{{labelKey}}">{{label}}</localize>
<span ng-if="!labelKey">{{label}}</span>
@@ -180,6 +180,7 @@
<umb-node-preview style="max-width: 100%; margin-bottom: 0;"
icon="documentType.icon"
name="documentType.name"
alias="documentType.alias"
allow-open="allowOpen"
on-open="openDocumentType(documentType)">
</umb-node-preview>
@@ -11,4 +11,4 @@
<div class="controls controls-row" ng-transclude></div>
</div>
</div>
</div>
</div>
@@ -3,8 +3,8 @@
<div class="umb-pane btn-toolbar umb-btn-toolbar">
<div class="control-group umb-control-group">
<a href class="btn btn-link" ng-click="onCancel()"><localize key="general_cancel">Cancel</localize></a>
<a href class="btn btn-primary" ng-click="onConfirm()"><localize key="general_ok">Ok</localize></a>
<a ng-if="showCancel" href class="btn btn-link" ng-click="onCancel()"><localize key="general_cancel">Cancel</localize></a>
<a ng-if="showConfirm" href class="btn btn-primary" ng-click="onConfirm()"><localize key="general_ok">Ok</localize></a>
</div>
</div>
</div>
</div>
@@ -2,7 +2,7 @@
<i ng-if="icon" class="umb-node-preview__icon {{ icon }}"></i>
<div class="umb-node-preview__content">
<div class="umb-node-preview__name">{{ name }}</div>
<div class="umb-node-preview__name" ng-attr-title="{{alias}}">{{ name }}</div>
<div class="umb-node-preview__description" ng-if="description">{{ description }}</div>
<div class="umb-user-group-preview__permission" ng-if="permissions">
@@ -28,8 +28,7 @@
class="input-block-level umb-textstring textstring"
required
val-server-field="oldPassword"
no-dirty-check
autocomplete="off" />
no-dirty-check />
<span class="help-inline" val-msg-for="oldPassword" val-toggle-msg="required">Required</span>
<span class="help-inline" val-msg-for="oldPassword" val-toggle-msg="valServerField"></span>
</umb-control-group>
@@ -40,8 +39,7 @@
required
val-server-field="password"
ng-minlength="{{$parent.config.minPasswordLength}}"
no-dirty-check
autocomplete="off" />
no-dirty-check />
<span class="help-inline" val-msg-for="password" val-toggle-msg="required">Required</span>
<span class="help-inline" val-msg-for="password" val-toggle-msg="minlength">Minimum {{$parent.config.minPasswordLength}} characters</span>
<span class="help-inline" val-msg-for="password" val-toggle-msg="valServerField"></span>
@@ -51,8 +49,7 @@
<input type="password" name="confirmpassword" ng-model="$parent.passwordValues.confirm"
class="input-block-level umb-textstring textstring"
val-compare="password"
no-dirty-check
autocomplete="off" />
no-dirty-check />
<span class="help-inline" val-msg-for="confirmpassword" val-toggle-msg="valCompare">
<localize key="user_passwordMismatch">The confirmed password doesn't match the new password!</localize>
@@ -1,18 +1,15 @@
<h3>Hours of Umbraco training videos are only a click away</h3>
<p>Want to master Umbraco? Spend a couple of minutes learning some best practices by watching one of these videos about using Umbraco, then visit <a class="btn-link -underline" href="http://umbraco.tv" target="_blank">umbraco.tv</a> for even more Umbraco videos.</p>
<div class="row-fluid"
ng-init="init('http://umbraco.tv/videos/developer/chapterrss?sort=no')"
ng-controller="Umbraco.Dashboard.StartupVideosController">
<ul class="thumbnails" >
<li class="span2" ng-repeat="video in videos">
<a class="btn-link" target="_blank" href="{{video.link}}" title="{{video.title}}">
<div class="thumbnail" style="margin-right: 20px; padding: 20px;">
<img ng-src="{{video.thumbnail}}" alt="{{video.title}}">
<div style="font-weight: bold; text-align: center; margin: 20px 0 0;">{{video.title}}</div>
</div>
</a>
</li>
</ul>
</div>
<h3>Hours of Umbraco training videos are only a click away</h3>
<p>Want to master Umbraco? Spend a couple of minutes learning some best practices by watching one of these videos about using Umbraco, then visit <a class="btn-link -underline" href="http://umbraco.tv" target="_blank">umbraco.tv</a> for even more Umbraco videos.</p>
<div ng-init="init('http://umbraco.tv/videos/developer/chapterrss?sort=no')"
ng-controller="Umbraco.Dashboard.StartupVideosController">
<div class="umb-getstartedcards">
<a class="umb-getstartedcard" ng-repeat="video in videos" href="{{video.link}}" title="{{video.title}}" target="_blank" rel="noopener">
<img ng-src="{{video.thumbnail}}" alt="{{video.title}}">
<div class="umb-getstartedbody">
<p>{{video.title}}</p>
</div>
</a>
</div>
</div>
@@ -31,7 +31,7 @@
</div>
<div class="umb-healthcheck-message" ng-if="group.totalWarning > 0">
<i class="icon-alert color-yellow"></i>
<i class="icon-alert color-orange"></i>
{{ group.totalWarning }}
</div>
@@ -50,8 +50,9 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
$scope.preValues = [];
if ($routeParams.create) {
$scope.page.loading = true;
$scope.showIdentifier = false;
//we are creating so get an empty data type item
dataTypeResource.getScaffold($routeParams.id)
@@ -77,6 +78,8 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
$scope.page.loading = true;
$scope.showIdentifier = true;
//we are editing so get the content item from the server
dataTypeResource.getById($routeParams.id)
.then(function(data) {
@@ -21,28 +21,31 @@
<umb-editor-container class="form-horizontal">
<umb-property property="properties.selectedEditor">
<div>
<select name="selectedEditor"
ng-model="content.selectedEditor"
required
ng-options="e.alias as e.name for e in content.availableEditors"></select>
<span class="help-inline" val-msg-for="selectedEditor" val-toggle-msg="required"><localize key="general_required">Required</localize></span>
</div>
<umb-control-group label="Id" ng-if="showIdentifier">
<div>{{content.id}}</div>
<small>{{content.key}}</small>
</umb-control-group>
</umb-property>
<umb-property property="properties.selectedEditor">
<div>
<select name="selectedEditor"
ng-model="content.selectedEditor"
required
ng-options="e.alias as e.name for e in content.availableEditors"></select>
<span class="help-inline" val-msg-for="selectedEditor" val-toggle-msg="required"><localize key="general_required">Required</localize></span>
</div>
<umb-property property="properties.selectedEditorId">
<div>{{content.selectedEditor}}</div>
</umb-property>
</umb-property>
<umb-property property="properties.selectedEditorId">
<div>{{content.selectedEditor}}</div>
</umb-property>
<umb-property
property="preValue"
ng-repeat="preValue in preValues">
<umb-property property="preValue"
ng-repeat="preValue in preValues">
<umb-editor model="preValue" is-pre-value="true"></umb-editor>
</umb-property>
<umb-editor model="preValue" is-pre-value="true"></umb-editor>
</umb-property>
</umb-editor-container>
@@ -0,0 +1,19 @@
<div ng-controller="Umbraco.Editors.Dictionary.CreateController as vm">
<div class="umb-pane">
<h5><localize key="create_createUnder">Create an item under</localize> {{currentNode.name}}</h5>
</div>
<div class="umb-pane">
<form name="createDictionaryForm"
ng-submit="vm.createItem()"
val-form-manager>
<umb-control-group label="Enter a item-name" hide-label="true">
<input type="text" name="itemKey" ng-model="vm.itemKey" class="umb-textstring textstring input-block-level" required />
</umb-control-group>
<button type="submit" class="btn btn-primary"><localize key="general_create">Create</localize></button>
</form>
</div>
</div>
@@ -0,0 +1,12 @@
<div class="umb-dialog umb-pane" ng-controller="Umbraco.Editors.Dictionary.DeleteController as vm" >
<div class="umb-dialog-body" auto-scale="90">
<p class="umb-abstract">
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong> ?
</p>
<umb-confirm on-confirm="vm.performDelete" on-cancel="vm.cancel">
</umb-confirm>
</div>
</div>

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