Compare commits

...

226 Commits

Author SHA1 Message Date
Sebastiaan Janssen 2c4403f892 Fixes image that was missing from the build 2015-11-26 13:08:59 +01:00
Shannon fd66f08520 Fixes setting auth cookie during install, removes some try/catch/swallow with some error messaging, converts some String -> string and == false updates. 2015-11-26 13:07:22 +01:00
Shannon 8e50f4968f Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-11-26 12:02:17 +01:00
Shannon 9acbe09449 fixes the tmh dynamic local version, the bower version the build server runs has an issue! 2015-11-26 12:02:08 +01:00
Sebastiaan Janssen 4baaafd006 Also remove change password dashboard from nuget package 2015-11-26 11:57:37 +01:00
Shannon 3f7293304d removes password change dashboard from release 2015-11-26 11:55:42 +01:00
Shannon f62581bd38 reverts more of the caps lock 2015-11-26 11:39:49 +01:00
Shannon 9782e3711e Revert "Update bower.json with ngCapsLock"
This reverts commit f0e1460550.

Conflicts:
	src/Umbraco.Web.UI.Client/bower.json
2015-11-26 10:54:43 +01:00
Shannon 1f4ba9cfdc ignores file that shouldn't be there 2015-11-26 10:36:15 +01:00
Shannon ba4f0cc6a4 remove file that shouldn't be checked in 2015-11-26 10:35:28 +01:00
Shannon fc84821e8b fixes U4-6340 Partial view macro with parameters not working in RTE - to use a Model to post with the same Action name 2015-11-26 10:32:43 +01:00
Shannon Deminick 0fcf0b505a Merge pull request #922 from engern/U4-6340
Fixes U4-6340 : Partial view macro with parameters not working in RTE and Grid (backend)
2015-11-26 09:54:24 +01:00
Shannon d300146cf6 trips content/media names, makes sure that the content type editor when rendering template names html encodes the names. 2015-11-25 20:44:53 +01:00
Shannon c8482b9f59 Revert "Merge pull request #875 from Phosworks/U4-7312"
This reverts commit 14265fc964, reversing
changes made to 18c3345e47.

Conflicts:
	src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js
	src/Umbraco.Web/Editors/ImagesController.cs
2015-11-25 20:27:58 +01:00
Shannon b7795e19ef Changes bigthumbnail pr to not cache per second, just minute 2015-11-25 20:21:24 +01:00
Shannon c97617f5b5 Fixes: U4-7461 xss vulnerability in content type editor 2015-11-25 20:15:28 +01:00
Shannon Deminick 14265fc964 Merge pull request #875 from Phosworks/U4-7312
Changed web api GetBigThumbnail to image processor
2015-11-25 19:52:14 +01:00
Shannon 18c3345e47 Fixes U4-7459 XSRF protection bypass - ensures tokens are checked for the non-editor api controllers 2015-11-25 19:39:24 +01:00
Shannon 924a016ffe Fixes U4-7457 Server side request forgery (xsrf) in feedproxy.aspx 2015-11-25 18:05:57 +01:00
Claus a02b41e9d2 Merge pull request #927 from umbraco/temp-U4-7307
U4-7307 Windows Authentication prompts for Windows login after Umbrac…
2015-11-25 15:22:36 +01:00
Shannon 068c4a0b16 Fixes PR for U4-7362 Add message to login screen if Caps Lock is on 2015-11-25 11:22:12 +01:00
Shannon Deminick f7d28d769a Merge pull request #886 from bjarnef/dev-v7-U4-7362
Add message to login screen if Caps Lock is on
2015-11-25 11:01:47 +01:00
Claus 9a07e206d8 Merge pull request #874 from andydale1982/U4-7323_(#871)‏
U4 7323 (#871)‏
2015-11-25 10:51:41 +01:00
Shannon Deminick 0edb71f4aa Merge pull request #917 from bjarnef/dev-v7-move-umb-version-in-dialog
Move Umbraco version label to header in user dialog
2015-11-25 10:51:36 +01:00
Shannon Deminick b376207ef6 Merge pull request #868 from opelpanfan/UKFest-U4-7324
U4-7324 Member Picker search results doesn't show correct icons
2015-11-25 10:33:59 +01:00
Shannon 6d0aa824ad U4-7307 Windows Authentication prompts for Windows login after Umbraco login 2015-11-24 16:31:18 +01:00
Claus 89afacf161 Merge pull request #915 from umbraco/temp-U4-7380
U4-7380 Backoffice timeouts after 7.3.1  upgrade
2015-11-24 11:35:01 +01:00
Claus 0fa6940bb6 Merge branch 'arknu-U4-6657-mediapicker' into dev-v7 2015-11-24 10:37:11 +01:00
Claus 1353b0a592 Reordering flex properties - recess module crashes with out of memory exception if they are in the other order. 2015-11-24 10:35:54 +01:00
Claus 617fec171f Merge branch 'U4-6657-mediapicker' of git://github.com/arknu/Umbraco-CMS into arknu-U4-6657-mediapicker 2015-11-24 10:33:04 +01:00
Claus 2c63866cb3 Merge pull request #909 from umbraco/U4-7270-1
Creates an IAsyncRenderMvcController which can be used instead of IRe…
2015-11-24 10:09:45 +01:00
Sebastiaan Janssen 18d3aa9ee2 Merge pull request #926 from kiasyn/patch-1
Remove unnecessary ToLowerInvariant call from PreviewMode
2015-11-23 22:17:07 +01:00
kiasyn f83c966e55 Remove unnecessary ToLowerInvariant call from PreviewMode
Text was being set lowercase and then injected with the preview badge markup. This meant that things such as script tags were being lowercased, breaking the javascript.
2015-11-24 10:02:14 +13:00
Tommy Enger de41a1f1ca Clean up the code
DRY
2015-11-23 16:29:09 +01:00
Tommy Enger c9f57c6ce3 Split Get and Post
Split Get and Post into 2 separate methods to maintain backwards
compability
2015-11-23 15:52:36 +01:00
engern 54ab26e2ed Simplifying thge code even further
Realized that we don't need to convert the exisitng dictionary to a new
dictionary.
2015-11-21 14:00:58 +01:00
engern 31dc1b2cdb Fixes U46340 2015-11-21 13:20:13 +01:00
Claus d4b9a711c6 Merge pull request #919 from umbraco/temp-U4-4641
Fixes: U4-4641 Feature Request:  template and code editors should have insert Section, Define section buttons
2015-11-20 13:41:50 +01:00
Claus 9521742254 Fixes to MultiNodePicker when using media. 2015-11-20 13:17:28 +01:00
Claus 9fee3f5873 Merge pull request #918 from umbraco/temp-U4-5764
Related to: U4-5764 - adding in Open button on content/media picker
2015-11-20 12:09:21 +01:00
Claus cb10578e19 Merge branch 'Nicholas-Westby-feature/U4-5764-node-picker-info' into temp-U4-5764 2015-11-20 11:52:25 +01:00
Claus cdc4435f2d Merge branch 'feature/U4-5764-node-picker-info' of git://github.com/Nicholas-Westby/Umbraco-CMS into Nicholas-Westby-feature/U4-5764-node-picker-info 2015-11-20 11:47:48 +01:00
bjarnef a885840b9f Move Umbraco version label to header in user dialog 2015-11-19 21:55:54 +01:00
bjarnef 62173cef58 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-19 21:12:24 +01:00
Shannon Deminick e5b0a4d98c Merge pull request #854 from Spijkerboer/UKFest-U4-7322
Uk fest u4 7322
2015-11-19 19:26:53 +01:00
Shannon Deminick 9479d63cba Merge pull request #899 from Acentrage/U4-7219
Fixes U4-7219
2015-11-19 19:24:24 +01:00
Shannon 4c544acb42 fixes links so that working with vdirs works too. 2015-11-19 19:21:55 +01:00
Shannon Deminick c7c5f481f1 Merge pull request #879 from danieland/U4-4794--nodebug
U4 4794  nodebug
2015-11-19 19:10:35 +01:00
Shannon 5e8e62cbf7 missing csproj save 2015-11-19 18:29:11 +01:00
Shannon 555b520a0c Cleans up the usages of auth cookies. OWIN is in charge of auth cookies but because we have Webforms, WebApi, MVC and OWIN, they all like to deal with cookies differently. OWIN should still be solely in charge of the auth cookies, so the auth extensions are cleaned up, the renewal now works by queuing the renewal and we have custom middleware detect if a force renewal has been queued and we renew the auth cookie there. Have obsoleted a few methods that should not be used that write auth tickets directly (this is purely for backwards compat with webforms). All of these changes now ensure that the auth cookie is renewed consistently between Webforms, WebApi, MVC and OWIN. Some changes also include ensuring that OWIN is used to sign out. 2015-11-19 18:12:21 +01:00
Simon Busborg 8053db32b6 code comments 2015-11-19 15:40:38 +01:00
Sebastiaan Janssen 3e2d59e526 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-11-19 14:43:45 +01:00
Sebastiaan Janssen 9d3e967c2a Ignore test that keeps crapping out on build server 2015-11-19 14:43:35 +01:00
Shannon 71ec09486d Reverts the 'fix' from U4-7118 since it is incorrect. Updates the sliding expiration of the cookie/ticket when the user is supposed to be always logged in to 30 minutes in case the timeout is actually set very low in config. 2015-11-19 14:17:06 +01:00
Claus 8dadc92aa8 Fixed migration causing issues when upgrading from a site pre-migrations-table to version 7.3.2. 2015-11-19 12:01:46 +01:00
Shannon f472f5d950 Ensures that OWIN signout method is called - this ensures that any auth middleware configured for the current user is called for sign out. Updates our cookie middleware provider to also ensure that our custom cookies are cleared when signing out with OWIN. 2015-11-19 11:57:24 +01:00
Simon Busborg 775a6f80ea Added comments to support the changes 2015-11-19 11:47:49 +01:00
Simon Busborg 5bf8b8ecba Used less function 'fade' instead of random color 2015-11-19 11:44:33 +01:00
Simon Busborg 397ef32665 Added hover & active state to input-label--small 2015-11-19 11:40:29 +01:00
Simon Busborg 2634e33f51 Used @fontSizeLarge variable to determine font-size for panel-dialog--header 2015-11-19 11:27:56 +01:00
Simon Busborg 6e27caa547 Added comments and notes 2015-11-19 11:11:09 +01:00
Simon Busborg 9c027dcdbc some ui love for the panel dialogs 2015-11-19 10:32:17 +01:00
bjarnef f3876b86dc Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-19 00:38:32 +01:00
Shannon Deminick 58c3dfac1c Merge pull request #913 from Nicholas-Westby/feature/u4-7425-forms-constant-comment
Fixed typo for "forms": http://issues.umbraco.org/issue/U4-7425
2015-11-19 00:34:54 +01:00
Nicholas-Westby dcf59d2b17 Fixed typo for "forms": http://issues.umbraco.org/issue/U4-7425 2015-11-18 14:29:10 -08:00
bjarnef 71099514cb Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-18 22:00:33 +01:00
Sebastiaan Janssen 887111318f Update install facts 2015-11-18 20:35:36 +01:00
Sebastiaan Janssen bf9755b27c Don't end response so people can actually hook into PostRequestHandlerExecute 2015-11-18 19:41:20 +01:00
Sebastiaan Janssen aca181b32e U4-7410 Version issue with MySql.Data after upgrade to 7.3.1.
#U4-7410 Fixed
2015-11-18 19:39:10 +01:00
Shannon Deminick 886347e763 Merge pull request #912 from lars-erik/fix-u4-7268
Support generic CultureInfo as language culture
2015-11-18 18:26:09 +01:00
Shannon Deminick 9fa606e065 Merge pull request #907 from umbraco/temp-U4-7414
U4-7414 Deleted tab's properties should become generic properties
2015-11-18 17:01:02 +01:00
Shannon e40ac44afd updates test to reflect the instructions to replicate the original issue U4-7414 2015-11-18 17:00:27 +01:00
Shannon 48603fb840 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-11-18 16:07:10 +01:00
Shannon f824439180 Merge branch 'UKFest-U4-4792' of https://github.com/opelpanfan/Umbraco-CMS into opelpanfan-UKFest-U4-4792
Conflicts:
	src/Umbraco.Core/Services/ContentService.cs
2015-11-18 16:07:01 +01:00
Shannon Deminick b3616c9f8c Merge pull request #911 from umbraco/temp-U4-4792
Fixes: U4-4792 Ancestors() on IContent throws "Object reference not set to an instance of an object."
2015-11-18 16:04:22 +01:00
Shannon 48383f2e7a updaes null check and ensures the path isn't pre-set in the withidentity overload 2015-11-18 16:04:01 +01:00
Shannon cb98385242 updates content/media service methods - null checks for parent IContent, dosn't use Parent() syntactic sugar methods, removes path creation in the WithIdentity methods. 2015-11-18 15:52:32 +01:00
Shannon 916bad82df Ensures that the RenderActionInvoker isn't doing anything special so that MVC takes care of everything regarding async vs non-async and any controller descriptor/action descriptor lookups and cache. Creates a RenderIndexActionSelectorAttribute - this is used to decorate the underlying RenderMvcController.Index action. MVC will call into this method to check if the MethodInfo is valid, we then do a quick comparison of types, if the current type is the same as the reflected type, this means that the Index action has been overridden or there is no custom controller... lets use it. If the types don't match we'll do a simple reflected lookup to check if the reflected controller type (current controller) has more than one index action, if so, it means that a custom controller is in play and it has a custom index action... so we won't use the base class action and then it's up to MVC to find any other matching Index action based on the current request parameters. Added some tests for this too. 2015-11-18 14:59:29 +01:00
Claus 29ec8cb2d3 Merge pull request #857 from gerwinbouwhuis/UKFest-U4-5581
Uk fest u4 5581
2015-11-18 14:32:52 +01:00
Lars-Erik Aabech 04900337c7 Support generic CultureInfo as language culture 2015-11-18 14:13:32 +01:00
Claus 1433685160 MediaService assigns Path when creating media objects. 2015-11-18 09:26:45 +01:00
Stephan c5994ed54a Fix previous commit 2015-11-17 17:25:01 +01:00
Shannon 9fd80d791a Creates an IAsyncRenderMvcController which can be used instead of IRenderMvcController if developers want access to an async Index action. 2015-11-17 17:05:00 +01:00
Stephan f5f9cb676c Fix CultureInfo leak in UmbracoApplicationBase too. 2015-11-17 16:54:24 +01:00
Claus 04e2d2370a Fixes: U4-4792 Ancestors() on IContent throws "Object reference not set to an instance of an object." 2015-11-17 16:49:01 +01:00
Stephan 8d00d931b0 U4-7414 Deleted tab's properties should become generic properties 2015-11-17 16:36:57 +01:00
Shannon Deminick 2998ad8cea Merge pull request #873 from AffinityID/u4-7352
U4-7352 Fixed exception logging in UmbracoDatabase.
2015-11-17 16:21:18 +01:00
Shannon Deminick 46c15ef28f Merge pull request #877 from cheeseytoastie/UKFest-7341
Ukfest 7341
2015-11-17 16:19:35 +01:00
Claus 2b369a57d8 Merge pull request #864 from andycyberian/UKFest-U4-6980
Uk fest u4 6980
2015-11-17 14:25:38 +01:00
Claus c37a6bb928 Merge pull request #870 from JJCLane/UKFest-U4-6094
Adds a check to include users in the send to translation list that ha…
2015-11-17 13:48:01 +01:00
Claus 6e53291877 Fixed up a few things. 2015-11-17 13:42:00 +01:00
Claus bb78f756c7 Merge branch 'Jeavon-U4-4641' into temp-U4-4641 2015-11-17 12:47:18 +01:00
Claus ffb0de4050 Merge branch 'U4-4641' of git://github.com/Jeavon/Umbraco-CMS into Jeavon-U4-4641 2015-11-17 12:46:24 +01:00
Claus 0fecad9867 Merge pull request #906 from umbraco/temp-U4-6515
Fixes: U4-6515 Media picker does not set $dirty
2015-11-17 11:51:58 +01:00
Claus 3045068d68 Fixes: U4-6515 Media picker does not set $dirty
Included fix for member picker.
2015-11-17 10:59:21 +01:00
Claus 37a6668313 Merge branch 'U4-6515' of git://github.com/deepak4u/Umbraco-CMS into deepak4u-U4-6515 2015-11-17 10:50:07 +01:00
Sebastiaan Janssen 36814d746f Merge pull request #905 from GertyEngrie/dev-v7
U4-7297 - fixes <hr/>-button in tinymce
2015-11-17 10:34:37 +01:00
Claus a72f6edb6b Merge pull request #846 from OptimisticCoder/UKFest-U4-6732
U4-6732 - Added message on back office, when JS is disabled.
2015-11-17 10:23:06 +01:00
Sebastiaan Janssen e01cbcd405 Fix failing upgrade due to old dll being in bin folder 2015-11-17 09:24:22 +01:00
Claus 012ed6cf16 Merge pull request #862 from dampee/u4-7314
U4-7314 Change name of "Textbox Multiple" to "TextArea"
2015-11-17 08:57:49 +01:00
Gerty Engrie eb3ff12916 U4-7297 - fixes <hr/>-button 2015-11-17 00:35:10 +01:00
Claus 1ebff69358 Merge pull request #904 from umbraco/temp-U4-7393
Fixes: U4-7393 Actions menu placed behind publish button on mobile phone
2015-11-16 16:02:00 +01:00
Claus 5435c44ea9 Using a lower z-index to fix the issue at hand. 2015-11-16 16:00:43 +01:00
Claus 76fa477c35 Merge branch 'U4-7393' of git://github.com/Acentrage/Umbraco-CMS into Acentrage-U4-7393 2015-11-16 15:55:04 +01:00
Claus 1f6f36d8c8 Updated unit test after adding in TaskTypeMapper. 2015-11-16 15:53:58 +01:00
Claus Jensen c46ac11125 Merge pull request #849 from mzajkowski/UKFest-U4-6282
U4-6282  Add note to Register Partial Macro
2015-11-16 15:37:47 +01:00
Claus 73d5a3f993 Merge branch 'opelpanfan-UKFest-U4-6511' into dev-v7 2015-11-16 15:31:29 +01:00
Claus Jensen 5a99a6903d Merge pull request #888 from umbraco/temp-U4-7353
Fixes: U4-7353 OAuth providers for the back office require more flexi…
2015-11-13 14:47:11 +01:00
Shannon Deminick 775639da41 Merge pull request #848 from Khinrot/UKFest-U4-5560
Fixing "U4-5560 White space issue in content tree"
2015-11-13 14:06:40 +01:00
Shannon Deminick 2375ede161 Merge pull request #867 from jbreuer/U4-4028
U4-4028 Don't load the full images, but server side resized.
2015-11-13 13:41:53 +01:00
Shannon Deminick fcd00599da Merge pull request #858 from tompipe/U4-1959
Fixes U4-1959
2015-11-13 13:40:26 +01:00
Shannon d3f5090150 Fixes up a couple of missing path updates and incorrect icon resolution and fixed another issue with webservice path reference 2015-11-13 13:38:30 +01:00
Shannon 6a7faf457b Merge branch 'dev-uk-U4-1117' of https://github.com/JeffreyPerplex/Umbraco-CMS into JeffreyPerplex-dev-uk-U4-1117 2015-11-13 11:35:29 +01:00
Shannon ec247d2b27 ensures the migration table's seed is higher than 1 (have put it to 100). 2015-11-13 11:31:59 +01:00
Shannon f32479bb10 bumps version 2015-11-13 11:26:31 +01:00
Shannon Deminick 371269436f Merge pull request #891 from umbraco/temp-U4-7128
Fixes: U4-7128 Send to Translation gives YSOD
2015-11-13 10:23:41 +01:00
Claus ef13e4112f Merge branch 'UKFest-U4-6511' of git://github.com/opelpanfan/Umbraco-CMS into opelpanfan-UKFest-U4-6511 2015-11-12 16:40:01 +01:00
Claus Jensen ce5b6861bb Merge pull request #855 from ryanmcdonough/UKFest-U4-5617
UKFest-U4-5617 RTE now respects CSS Directory AppSetting.
2015-11-12 16:35:27 +01:00
Acentrage eaf64d1814 Increased timeout from 200 to 1000 ms so you can actually type something and added support for manually submit with enter without waiting for the timer. 2015-11-12 15:33:49 +01:00
Acentrage 6bf1ecdb11 Fixes U4-7393
Safe to use both for mobile and desktop.
2015-11-12 15:17:27 +01:00
Claus Jensen fdd0ff2c23 Merge pull request #897 from umbraco/temp-U4-7070
Fixes: U4-7070 UX - Mediapicker autofocus when creating a folder
2015-11-12 15:14:19 +01:00
Claus bade8e42ba Fixes to media picker when creating new folders.
Changed to ngShow to ensure input field hides when blur event is hit.
Clearing and switching visibility of input field on successful submit.
Fixed up focus directive to use $timeout. The focus event can trigger before the element is rendered by angular so its safer to have a timeout ensure it is done at the end of the digest cycle - using $timeout instead of setTimeout ensures it is handled by angular at the right time.
2015-11-12 15:12:59 +01:00
Claus cfdf2768e6 Merge branch 'UKFest-U4-7070' of git://github.com/JJCLane/Umbraco-CMS into JJCLane-UKFest-U4-7070 2015-11-12 14:05:10 +01:00
Claus Jensen c3ca006f14 Merge pull request #896 from umbraco/temp-U4-3774
Fixes: U4-3774 Change password UX
2015-11-12 13:36:36 +01:00
Claus 6c47c8f792 Added danish translation. 2015-11-12 13:36:13 +01:00
Claus 63160e2e2d Removing the Change Password tab from Content section. 2015-11-12 13:31:03 +01:00
Claus edc58fe8a5 Merge branch 'dev-uk-U4-3774' of git://github.com/JeffreyPerplex/Umbraco-CMS into JeffreyPerplex-dev-uk-U4-3774 2015-11-12 11:23:36 +01:00
Claus Jensen 23632dc0c3 Merge pull request #856 from tompipe/U7-6928
Fixes U4-6928 - Persist Creator ID of member
2015-11-12 11:07:57 +01:00
Claus Jensen d739b9fb31 Merge pull request #894 from umbraco/temp-U4-6167
Fixes: U4-6167 MNTP: show path of selected node
2015-11-12 10:58:24 +01:00
Claus 2ae4ede258 Showing path when hovering nodes should be configurable on the content picker. 2015-11-12 10:55:00 +01:00
Claus cacd08b57c Merge branch 'tompipe-U4-6167' into temp-U4-6167 2015-11-11 17:21:51 +01:00
Claus 4eddfb4cf5 Merge branch 'U4-6167' of git://github.com/tompipe/Umbraco-CMS into tompipe-U4-6167 2015-11-11 17:13:40 +01:00
Claus f2b3d7c041 Removed commented out line. 2015-11-11 12:07:45 +01:00
Claus 5d97a94dcb Fixed to use alias instead of hardcoded id.
Added mapper for TaskType.
2015-11-11 12:02:12 +01:00
Claus de6e7dd28d Merge branch 'U4-7128' of git://github.com/tompipe/Umbraco-CMS into tompipe-U4-7128 2015-11-11 11:14:38 +01:00
Claus Jensen 420c029bf7 Merge pull request #859 from Khinrot/UKFest-U4-6426
Fixing "U4-6426 CTRL click should open in a new window"
2015-11-11 11:12:22 +01:00
Claus 61441dd436 Fixes: U4-7370 Upgrading from 7.3.1 to 7.4 fails
cherrypicked from 7.4.0 branch.
Added migration for 7.3.2, ensuring the identity on the table is correct. It failed due to rows initially being inserted with identity disabled and therefore the seed of the table was zero even when the table had data.
2015-11-10 12:15:44 +01:00
bjarnef 5c24867925 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-09 23:52:27 +01:00
Wincent 0409cbe613 Changed ImageController.GetBigThumbnail to redirect
Changed thumbnail paths to include rnd equal to UpdateDate
2015-11-09 21:41:25 +01:00
Shannon bbbea99ced removes redundant null check. 2015-11-09 10:56:07 +01:00
Shannon 3d213342bf Fixes: U4-7353 OAuth providers for the back office require more flexibility with Challenge Results 2015-11-09 10:42:15 +01:00
Sebastiaan Janssen 48fdb75d96 Improves clean scripts for Claus 2015-11-09 09:25:59 +01:00
Sebastiaan Janssen a97094458d U4-7356 <siteMap><providers> element can only be added once, when using nuget update-packge
U4-7356 Fixed
2015-11-09 09:25:58 +01:00
Nicholas-Westby f81353af0b Amended last commit for detailed node info (so it plays nice when picking media): http://issues.umbraco.org/issue/U4-5764
Also added node path to title of "Open" button (so it shows the full path on hover).
More consistent quoting (namely, using apostrophes rather than double quotes).
2015-11-08 17:16:17 -08:00
bjarnef f0e1460550 Update bower.json with ngCapsLock 2015-11-09 00:34:34 +01:00
bjarnef d15c09ad2a Localize "Caps Lock is on" 2015-11-09 00:06:16 +01:00
Nicholas-Westby 5813202892 Finished implementation of detailed node info (added breadcrumb to content dialog): http://issues.umbraco.org/issue/U4-5764
Also moved the breadcrumb into a directive since it was used in multiple places.
2015-11-07 23:51:07 -08:00
bjarnef 82f6b6a66d Add ngCapsLock 2015-11-07 23:53:35 +01:00
bjarnef eec6ee79aa Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-07 00:25:49 +01:00
Nicholas-Westby 5ed4f262cd Partial implementation of detailed node info (changed button text to "Open" and styled a bit): http://issues.umbraco.org/issue/U4-5764 2015-11-04 22:25:37 -08:00
Nicholas-Westby e5d7f6fd04 Partial implementation of detailed node info (show node in "view" is clicked): http://issues.umbraco.org/issue/U4-5764 2015-11-03 22:39:36 -08:00
Daniel a9ad0ae8eb removed the debug check 2015-11-02 23:34:33 +01:00
Daniel Andreasen 9cd64a9061 Merge pull request #2 from umbraco/dev-v7
merge from umbraco/
2015-11-02 22:41:44 +01:00
Steve Morgan 839c0d011b Added ConfigureAwait(false)
ConfigureAwait(false) is recommended on async calls?
http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html
Credit: @dampeebe
2015-11-02 10:26:25 +00:00
Nicholas-Westby 15c9aadcdc Partial implementation of detailed node info: http://issues.umbraco.org/issue/U4-5764 2015-11-01 22:43:27 -08:00
Wincent 36a1c0a9e0 Changed web api GetBigThumbnail to image processor in mediahelper.service.js and fileupload.controller.js 2015-10-31 16:31:19 +01:00
Stephan 30f0c96052 Fix AsyncLock finalizer throwing exceptions 2015-10-31 12:47:04 +01:00
Stephan cfab30a1ef Fix thread CultureInfo issue breaking PetaPoco 2015-10-31 12:47:03 +01:00
Stephan 1dd0086eb5 Revert "strange/crazy peta poco fix for cultures"
This reverts commit 0d29e1438c.
2015-10-31 12:47:02 +01:00
andydale1982 a7f06ebc56 Typo Correction 2015-10-30 10:38:05 +00:00
Andrey Shchekin 9498bc4bfd U4-7352 Fixed exception logging in UmbracoDatabase. 2015-10-30 11:24:18 +13:00
Jeavon Leopold 38b13bf6ce Basic implementation for U4-4641 2015-10-29 17:18:40 +00:00
Jeavon Leopold c8cb5b26b0 Basic implementation for U4-4641 Feature Request: template and code editors should have insert Section, Define section buttons 2015-10-29 17:14:45 +00:00
andydale1982 5749f80a7f Added instructions to manually install node_modules. 2015-10-29 17:10:39 +00:00
Jordan Lane 5d9a935621 Adds a check to include users in the send to translation list that have the translate permission for current page
http://issues.umbraco.org/issue/U4-6094#
2015-10-29 16:50:00 +00:00
Tom Pipe 1ff4fe26dd Fixes YSOD after send to translation 2015-10-29 16:43:54 +00:00
Benas Brazdziunas bd69820028 Member Picker search results doesn't show correct icons 2015-10-29 16:29:33 +00:00
Jeroen Breuer 3c9953979a U4-4028 Don't load the full images, but server side resized. 2015-10-29 17:00:23 +01:00
andydale1982 2f6189ae24 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-29 15:55:49 +00:00
deepak4u 5ff329778d fix for issue u4-6515 2015-10-29 15:53:11 +00:00
Andy Rose befb2b4d2f U4-6980: Fixing merge issue 2015-10-29 15:32:03 +00:00
Andy Rose f4ae45d8f2 U4-6980: Adding supporting unit tests for changes to the template repository 2015-10-29 15:29:23 +00:00
Andy Rose 7b73ed1796 U4-6980: Adding supporting unit tests for changes to the template repository 2015-10-29 15:29:22 +00:00
Andy Rose 0eacbcb7cb U4-6980: Only assume a masterpage template if a MVC hasn't already been created 2015-10-29 15:29:20 +00:00
Jeffrey Schoemaker f871de61d5 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:28:12 +01:00
Jeffrey Schoemaker e02693e46b U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:27:33 +01:00
Jeffrey Schoemaker db62d14b1a U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:27:05 +01:00
Jeffrey Schoemaker c096ab9e54 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:26:31 +01:00
Jeffrey Schoemaker ada5a031b4 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:26:06 +01:00
Jeffrey Schoemaker 9c8b9f8bb4 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:25:41 +01:00
Jeffrey Schoemaker a4bd3abfbe U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:25:15 +01:00
Jeffrey Schoemaker a8a768a50f U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:24:41 +01:00
Jeffrey Schoemaker 62b99ffc59 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:24:16 +01:00
Jeffrey Schoemaker 6b0c94948e U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:23:30 +01:00
Jeffrey Schoemaker 25f049e167 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:22:39 +01:00
Jeffrey Schoemaker f7979fa19d U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:22:05 +01:00
Jeffrey Schoemaker 6fd1784337 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:21:25 +01:00
Jeffrey Schoemaker a7bb8e0d00 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:20:17 +01:00
Jeffrey Schoemaker ed4a9f84f0 U4-1117 - Fixed any errors when renaming /umbraco to something else
We removed the ~/umbraco from the reserved path settings key. We could'nt find the location where the same setting is set in the web.config.
The variable is no longer needed as the "umbracoPath" value is automatically inserted into the reserved path setting.
2015-10-29 16:18:14 +01:00
Jeffrey Schoemaker 4796827f02 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 15:05:24 +01:00
Andy Rose c6f7ece764 Merge branch 'UKFest-U4-6980' of https://github.com/andycyberian/Umbraco-CMS into UKFest-U4-6980 2015-10-29 14:00:46 +00:00
Andy Rose e86aaefaaf U4-6980: Only assume a masterpage template if a MVC hasn't already been created 2015-10-29 13:59:09 +00:00
Andy Rose 97e9cd4be0 U4-6980: Only assume a masterpage template if a MVC hasn't already been created 2015-10-29 13:54:12 +00:00
Asbjørn Riis-Knudsen 63af822bad U4-6657: Use flexbox for mediapicker search field and upload button to allow button to scale for different translations 2015-10-29 14:52:18 +01:00
Tom Pipe b65f653c91 Fixes U4-1959 2015-10-29 13:08:37 +00:00
Damiaan 3b404a2f76 U4-7314 Change name of "Textbox Multiple" to "Large textbox" or "Textarea" 2015-10-29 13:54:16 +01:00
Tom Pipe e9567e7adc Fixes U4-6928 - Persist Creator ID of member 2015-10-29 12:52:36 +00:00
gerwin.bouwhuis 697daab4d7 change :get the correct alternative recursive field 2015-10-29 13:50:30 +01:00
Alejandro Ocampo 6c29ad854c Fixing "U4-6426 CTRL click should open in a new window" 2015-10-29 12:48:40 +00:00
gerwin.bouwhuis 93d89535aa undo 2015-10-29 13:32:50 +01:00
gerwin.bouwhuis eb093ca4a6 change : find the correct alternative recursive field 2015-10-29 13:23:43 +01:00
ryanmcdonough 1040f234dc Update grid.rte.directive.js 2015-10-29 12:09:29 +00:00
ryanmcdonough 3f835fe19c RTE now respects CSS Directory AppSetting.
Fixes #U4-5617
2015-10-29 12:00:43 +00:00
Dennis Spijkerboer bf43ce3281 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into UKFest-U4-7322 2015-10-29 12:57:27 +01:00
Dennis Spijkerboer c37ba0dc8a Checked if the trimmed value starts and ends with brackets. If so, use the trimmed value. 2015-10-29 12:56:07 +01:00
Jeffrey Schoemaker 7b5ad9a5c6 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:44:30 +01:00
Steve Morgan f0afa701bc Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-29 11:38:03 +00:00
Jeffrey Schoemaker 71dc1110d8 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:38:00 +01:00
Jeffrey Schoemaker 4de4eb9cc8 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:34:05 +01:00
Jeffrey Schoemaker 308d5ba344 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:32:57 +01:00
Tom Pipe 74dac71e8a Fixes U4-6167 - Show path of selected node 2015-10-29 11:31:53 +00:00
Jeffrey Schoemaker 64518774c6 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:29:24 +01:00
Jeffrey Schoemaker f65b0df3e2 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:28:23 +01:00
Jeffrey Schoemaker 5cfe9e85f8 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:27:32 +01:00
Jeffrey Schoemaker 61044b6018 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:23:47 +01:00
Jeffrey Schoemaker 00fc5a5bb2 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:22:20 +01:00
Alejandro Ocampo 3f23865e0a Fixing "U4-5560 White space issue in content tree" 2015-10-29 11:06:31 +00:00
Marcin Zajkowski aac208c0e8 U4-6282 Add note to Register Partial Macro 2015-10-29 10:53:29 +00:00
Benas Brazdziunas f8e101ec13 U4-6511 make MNTP icon clickable 2015-10-29 10:43:04 +00:00
OptimisticCoder 23fcc1ac55 Added message on back office, when JS is disabled.
" JAVASCRIPT IS DISABLED. PLEASE ENABLE TO CONTINUE!"
2015-10-29 10:28:49 +00:00
Jordan Lane 6356531207 Focus new folder input automatically
http://issues.umbraco.org/issue/U4-7070
2015-10-29 10:22:34 +00:00
andydale1982 e9ef9b9d75 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-29 09:54:19 +00:00
Jeffrey Schoemaker dba7bcf60a Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-27 15:21:07 +01:00
bjarnef 1584530615 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-25 18:40:45 +01:00
bjarnef 100ca5caa6 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-25 18:29:13 +01:00
bjarnef 0288d6ec89 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-20 22:28:50 +02:00
173 changed files with 2116 additions and 847 deletions
+1
View File
@@ -131,3 +131,4 @@ src/*.boltdata/
src/umbraco.sln.ide/*
build/UmbracoCms.*/
src/.vs/
src/Umbraco.Web.UI/umbraco/js/install.loader.js
+1 -1
View File
@@ -26,7 +26,7 @@
<dependency id="HtmlAgilityPack" version="[1.4.9, 2.0.0)" />
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
<dependency id="SharpZipLib" version="[0.86.0, 1.0.0)" />
<dependency id="MySql.Data" version="[6.9.7, 7.0.0)" />
<dependency id="MySql.Data" version="[6.9.8, 7.0.0)" />
<dependency id="xmlrpcnet" version="[2.5.0, 3.0.0)" />
<dependency id="ClientDependency" version="[1.8.4, 2.0.0)" />
<dependency id="ClientDependency-Mvc5" version="[1.8.0, 2.0.0)" />
@@ -62,13 +62,6 @@
views/dashboard/default/startupdashboardintro.html
</control>
</tab>
<tab caption="Change password" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
<tab caption="Change Password" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
<tab caption="Change Password" xdt:Transform="Insert">
<control showOnce="false" addPanel="false" panelCaption="">
views/dashboard/ChangePassword.html
</control>
</tab>
<tab caption="Last Edits" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
</section>
+7 -3
View File
@@ -48,9 +48,9 @@
<system.web xdt:Transform="InsertIfMissing" />
<system.web>
<siteMap xdt:Transform="Remove" />
<siteMap xdt:Transform="Insert">
<providers xdt:Transform="Insert">
<remove name="MySqlSiteMapProvider" xdt:Transform="Insert" />
<siteMap xdt:Transform="InsertIfMissing">
<providers xdt:Transform="InsertIfMissing">
<remove name="MySqlSiteMapProvider" xdt:Transform="InsertIfMissing" />
</providers>
</siteMap>
<httpRuntime xdt:Transform="InsertIfMissing" />
@@ -81,6 +81,10 @@
</compilation>
<compilation>
<assemblies>
<remove assembly="System.Web.Http" xdt:Locator="Match(assembly)" xdt:Transform="Remove" />
<remove assembly="System.Net.Http" xdt:Locator="Match(assembly)" xdt:Transform="Remove" />
</assemblies>
<assemblies>
<remove assembly="System.Web.Http" xdt:Locator="Match(assembly)" xdt:Transform="InsertBefore(/configuration/system.web/compilation/assemblies/add)" />
<remove assembly="System.Net.Http" xdt:Locator="Match(assembly)" xdt:Transform="InsertBefore(/configuration/system.web/compilation/assemblies/add)" />
+1
View File
@@ -63,6 +63,7 @@ if ($project) {
if(Test-Path $umbracoBinFolder\MiniProfiler.dll) { Remove-Item $umbracoBinFolder\MiniProfiler.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\MySql.Data.dll) { Remove-Item $umbracoBinFolder\MySql.Data.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\Newtonsoft.Json.dll) { Remove-Item $umbracoBinFolder\Newtonsoft.Json.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Web.Helpers.dll) { Remove-Item $umbracoBinFolder\System.Web.Helpers.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Net.Http.Formatting.dll) { Remove-Item $umbracoBinFolder\System.Net.Http.Formatting.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Web.Http.dll) { Remove-Item $umbracoBinFolder\System.Web.Http.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Web.Http.WebHost.dll) { Remove-Item $umbracoBinFolder\System.Web.Http.WebHost.dll -Force -Confirm:$false }
+3 -4
View File
@@ -45,9 +45,6 @@ del ..\src\Umbraco.Web.UI\UserControls\*.*
echo Removing masterpage files
del ..\src\Umbraco.Web.UI\masterpages\*.*
echo Removing view files
del ..\src\Umbraco.Web.UI\Views\*.*
echo Removing razor files
del ..\src\Umbraco.Web.UI\macroScripts\*.*
@@ -104,7 +101,9 @@ echo Removing user control files
FOR %%A IN (..\src\Umbraco.Web.UI\usercontrols\*.*) DO DEL %%A
echo Removing view files
FOR %%A IN (..\src\Umbraco.Web.UI\Views\*.*) DO DEL %%A
ATTRIB +H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
FOR %%A IN (..\src\Umbraco.Web.UI\Views\) DO DEL /Q /S *.cshtml -H
ATTRIB -H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
echo Removing razor files
FOR %%A IN (..\src\Umbraco.Web.UI\macroScripts\*.*) DO DEL %%A
+6 -4
View File
@@ -54,9 +54,6 @@ del ..\src\Umbraco.Web.UI\UserControls\*.*
echo Removing masterpage files
del ..\src\Umbraco.Web.UI\masterpages\*.*
echo Removing view files
del ..\src\Umbraco.Web.UI\Views\*.*
echo Removing razor files
del ..\src\Umbraco.Web.UI\macroScripts\*.*
@@ -122,7 +119,9 @@ echo Removing user control files
FOR %%A IN (..\src\Umbraco.Web.UI\usercontrols\*.*) DO DEL %%A
echo Removing view files
FOR %%A IN (..\src\Umbraco.Web.UI\Views\*.*) DO DEL %%A
ATTRIB +H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
FOR %%A IN (..\src\Umbraco.Web.UI\Views\) DO DEL /Q /S *.cshtml -H
ATTRIB -H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
echo Removing razor files
FOR %%A IN (..\src\Umbraco.Web.UI\macroScripts\*.*) DO DEL %%A
@@ -151,6 +150,9 @@ rmdir "..\src\Umbraco.Web.UI\usercontrols\umbracoContour\" /S /Q
echo Start with a clean web.config
copy ..\src\Umbraco.Web.UI\web.Template.config ..\src\Umbraco.Web.UI\web.config /Y
echo Start with a clean web.config
copy ..\src\Umbraco.Web.UI\web.Template.config ..\src\Umbraco.Web.UI\web.config /Y
echo "Umbraco install reverted to clean install"
pause
exit
+1 -1
View File
@@ -1,2 +1,2 @@
# Usage: on line 2 put the release version, on line 3 put the version comment (example: beta)
7.3.1
7.3.2
+1 -1
View File
@@ -11,7 +11,7 @@ namespace Umbraco.Core
/// <summary>
/// A resolver to return all IAction objects
/// </summary>
internal sealed class ActionsResolver : LazyManyObjectsResolverBase<ActionsResolver, IAction>
public sealed class ActionsResolver : LazyManyObjectsResolverBase<ActionsResolver, IAction>
{
/// <summary>
/// Constructor
+8 -2
View File
@@ -283,7 +283,12 @@ namespace Umbraco.Core
{
var configStatus = ConfigurationStatus;
var currentVersion = UmbracoVersion.GetSemanticVersion();
var ok = configStatus == currentVersion;
var ok =
//we are not configured if this is null
string.IsNullOrWhiteSpace(configStatus) == false
//they must match
&& configStatus == currentVersion;
if (ok)
{
@@ -308,8 +313,9 @@ namespace Umbraco.Core
return ok;
}
catch
catch (Exception ex)
{
LogHelper.Error<ApplicationContext>("Error determining if application is configured, returning false", ex);
return false;
}
+28 -10
View File
@@ -1,5 +1,6 @@
using System;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
@@ -117,38 +118,55 @@ namespace Umbraco.Core
private class NamedSemaphoreReleaser : CriticalFinalizerObject, IDisposable
{
private readonly Semaphore _semaphore;
private GCHandle _handle;
internal NamedSemaphoreReleaser(Semaphore semaphore)
{
_semaphore = semaphore;
_handle = GCHandle.Alloc(_semaphore);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
GC.SuppressFinalize(this); // finalize will not run
}
private void Dispose(bool disposing)
{
// critical
_handle.Free();
_semaphore.Release();
_semaphore.Dispose();
}
// we WANT to release the semaphore because it's a system object
// ie a critical non-managed resource - so we inherit from CriticalFinalizerObject
// which means that the finalizer "should" run in all situations
// we WANT to release the semaphore because it's a system object, ie a critical
// non-managed resource - and if it is not released then noone else can acquire
// the lock - so we inherit from CriticalFinalizerObject which means that the
// finalizer "should" run in all situations - there is always a chance that it
// does not run and the semaphore remains "acquired" but then chances are the
// whole process (w3wp.exe...) is going down, at which point the semaphore will
// be destroyed by Windows.
// however... that can fail with System.ObjectDisposedException because the
// underlying handle was closed... because we cannot guarantee that the semaphore
// is not gone already... unless we get a GCHandle = GCHandle.Alloc(_semaphore);
// which should keep it around and then we free the handle?
// however, the semaphore is a managed object, and so when the finalizer runs it
// might have been finalized already, and then we get a, ObjectDisposedException
// in the finalizer - which is bad.
// so... I'm not sure this is safe really...
// in order to prevent this we do two things
// - use a GCHandler to ensure the semaphore is still there when the finalizer
// runs, so we can actually release it
// - wrap the finalizer code in a try...catch to make sure it never throws
~NamedSemaphoreReleaser()
{
Dispose(false);
try
{
Dispose(false);
}
catch
{
// we do NOT want the finalizer to throw - never ever
}
}
}
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("7.3.1");
private static readonly Version Version = new Version("7.3.2");
/// <summary>
/// Gets the current version of Umbraco.
+1 -1
View File
@@ -43,7 +43,7 @@
public const string Users = "users";
/// <summary>
/// Application alias for the users section.
/// Application alias for the forms section.
/// </summary>
public const string Forms = "forms";
}
@@ -310,13 +310,13 @@ namespace Umbraco.Core
public const string TextboxAlias = "Umbraco.Textbox";
/// <summary>
/// Guid for the Textbox multiple datatype.
/// Guid for the Textarea datatype.
/// </summary>
[Obsolete("GUIDs are no longer used to reference Property Editors, use the Alias constant instead. This will be removed in future versions")]
public const string TextboxMultiple = "67DB8357-EF57-493E-91AC-936D305E0F2A";
/// <summary>
/// Alias for the Textbox multiple datatype.
/// Alias for the Textarea datatype.
/// </summary>
public const string TextboxMultipleAlias = "Umbraco.TextboxMultiple";
+6 -1
View File
@@ -1,4 +1,7 @@
namespace Umbraco.Core
using System;
using System.ComponentModel;
namespace Umbraco.Core
{
public static partial class Constants
{
@@ -15,6 +18,8 @@
/// <summary>
/// The auth cookie name
/// </summary>
[Obsolete("DO NOT USE THIS, USE ISecuritySection.AuthCookieName, this will be removed in future versions")]
[EditorBrowsable(EditorBrowsableState.Never)]
public const string AuthCookieName = "UMB_UCONTEXT";
}
+1 -1
View File
@@ -154,7 +154,7 @@ namespace Umbraco.Core.IO
{
get
{
return IOHelper.ReturnPath("umbracoWebservicesPath", "~/umbraco/webservices");
return IOHelper.ReturnPath("umbracoWebservicesPath", Umbraco.EnsureEndsWith("/") + "webservices");
}
}
@@ -533,6 +533,18 @@ namespace Umbraco.Core.Models
/// <param name="propertyGroupName">Name of the <see cref="PropertyGroup"/> to remove</param>
public void RemovePropertyGroup(string propertyGroupName)
{
// if no group exists with that name, do nothing
var group = PropertyGroups[propertyGroupName];
if (group == null) return;
// re-assign the group's properties to no group
foreach (var property in group.PropertyTypes)
{
property.PropertyGroupId = new Lazy<int>(() => 0);
_propertyTypes.Add(property);
}
// actually remove the group
PropertyGroups.RemoveItem(propertyGroupName);
OnPropertyChanged(PropertyGroupCollectionSelector);
}
@@ -4,6 +4,7 @@ using AutoMapper;
using Umbraco.Core.Models.Mapping;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Security;
namespace Umbraco.Core.Models.Identity
{
@@ -24,6 +25,18 @@ namespace Umbraco.Core.Models.Identity
.ForMember(user => user.UserTypeAlias, expression => expression.MapFrom(user => user.UserType.Alias))
.ForMember(user => user.AccessFailedCount, expression => expression.MapFrom(user => user.FailedPasswordAttempts))
.ForMember(user => user.AllowedSections, expression => expression.MapFrom(user => user.AllowedSections.ToArray()));
config.CreateMap<BackOfficeIdentityUser, UserData>()
.ConstructUsing((BackOfficeIdentityUser user) => new UserData(Guid.NewGuid().ToString("N"))) //this is the 'session id'
.ForMember(detail => detail.Id, opt => opt.MapFrom(user => user.Id))
.ForMember(detail => detail.AllowedApplications, opt => opt.MapFrom(user => user.AllowedSections))
.ForMember(detail => detail.RealName, opt => opt.MapFrom(user => user.Name))
.ForMember(detail => detail.Roles, opt => opt.MapFrom(user => new[] { user.UserTypeAlias }))
.ForMember(detail => detail.StartContentNode, opt => opt.MapFrom(user => user.StartContentId))
.ForMember(detail => detail.StartMediaNode, opt => opt.MapFrom(user => user.StartMediaId))
.ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.UserName))
.ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.Culture))
.ForMember(detail => detail.SessionId, opt => opt.MapFrom(user => user.SecurityStamp.IsNullOrWhiteSpace() ? Guid.NewGuid().ToString("N") : user.SecurityStamp));
}
private string GetPasswordHash(string storedPass)
+1 -1
View File
@@ -64,7 +64,7 @@ namespace Umbraco.Core.Models
[IgnoreDataMember]
public CultureInfo CultureInfo
{
get { return CultureInfo.CreateSpecificCulture(IsoCode); }
get { return CultureInfo.GetCultureInfo(IsoCode); }
}
}
}
@@ -11,7 +11,7 @@ namespace Umbraco.Core.Models.Rdbms
internal class MigrationDto
{
[Column("id")]
[PrimaryKeyColumn(AutoIncrement = true)]
[PrimaryKeyColumn(AutoIncrement = true, IdentitySeed = 100)]
public int Id { get; set; }
[Column("name")]
@@ -2,6 +2,7 @@
using System.Globalization;
using System.Linq;
using System.Threading;
using Umbraco.Core.Models.Identity;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Services;
@@ -0,0 +1,38 @@
using System.Collections.Concurrent;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Rdbms;
namespace Umbraco.Core.Persistence.Mappers
{
/// <summary>
/// Represents a <see cref="TaskType"/> to DTO mapper used to translate the properties of the public api
/// implementation to that of the database's DTO as sql: [tableName].[columnName].
/// </summary>
[MapperFor(typeof(TaskType))]
public sealed class TaskTypeMapper : BaseMapper
{
private static readonly ConcurrentDictionary<string, DtoMapModel> PropertyInfoCacheInstance = new ConcurrentDictionary<string, DtoMapModel>();
//NOTE: its an internal class but the ctor must be public since we're using Activator.CreateInstance to create it
// otherwise that would fail because there is no public constructor.
public TaskTypeMapper()
{
BuildMap();
}
#region Overrides of BaseMapper
internal override ConcurrentDictionary<string, DtoMapModel> PropertyInfoCache
{
get { return PropertyInfoCacheInstance; }
}
internal override void BuildMap()
{
CacheMap<TaskType, TaskTypeDto>(src => src.Id, dto => dto.Id);
CacheMap<TaskType, TaskTypeDto>(src => src.Alias, dto => dto.Alias);
}
#endregion
}
}
@@ -108,7 +108,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.MediaRecycleBin), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -92, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-92", SortOrder = 35, UniqueId = new Guid("f0bc4bfb-b499-40d6-ba86-058885a5178c"), Text = "Label", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -90, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-90", SortOrder = 34, UniqueId = new Guid("84c6b441-31df-4ffe-b67e-67d5bc3ae65a"), Text = "Upload", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = new Guid("c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"), Text = "Textbox multiple", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = new Guid("c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"), Text = "Textarea", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -88, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-88", SortOrder = 32, UniqueId = new Guid("0cc0eba1-9960-42c9-bf9b-60e150b429ae"), Text = "Textstring", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -87, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-87", SortOrder = 4, UniqueId = new Guid("ca90c950-0aff-4e72-b976-a30b1ac57dad"), Text = "Richtext editor", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = new Guid("2e6d3631-066e-44b8-aec4-96f09099b2b5"), Text = "Numeric", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
@@ -0,0 +1,50 @@
using System.Collections.Generic;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeTwo
{
/// <summary>
/// This reinserts all migrations in the migrations table to account for initial rows inserted
/// on creation without identity enabled.
/// </summary>
[Migration("7.3.2", 0, GlobalSettings.UmbracoMigrationName)]
public class EnsureMigrationsTableIdentityIsCorrect : MigrationBase
{
public EnsureMigrationsTableIdentityIsCorrect(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger)
{
}
public override void Up()
{
// Due to the delayed execution of migrations, we have to wrap this code in Execute.Code to ensure the previous
// migration steps (esp. creating the migrations table) have completed before trying to fetch migrations from
// this table.
List<MigrationDto> migrations = null;
Execute.Code(db =>
{
migrations = Context.Database.Fetch<MigrationDto>(new Sql().Select("*").From<MigrationDto>(SqlSyntax));
return string.Empty;
});
Delete.FromTable("umbracoMigration").AllRows();
Execute.Code(database =>
{
if (migrations != null)
{
foreach (var migration in migrations)
{
database.Insert("umbracoMigration", "id", true,
new {name = migration.Name, createDate = migration.CreateDate, version = migration.Version});
}
}
return string.Empty;
});
}
public override void Down()
{
}
}
}
+2 -49
View File
@@ -20,12 +20,10 @@ using System.Text;
using System.Configuration;
using System.Data.Common;
using System.Data;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Reflection.Emit;
using System.Linq.Expressions;
using System.Threading;
namespace Umbraco.Core.Persistence
{
@@ -1804,53 +1802,8 @@ namespace Umbraco.Core.Persistence
return ObjectCache;
}
//static readonly ObjectCache ObjectCache = new MemoryCache("NPoco");
private static readonly ObjectCache ObjectCache;
// this should probably happen somewhere else...f
private static void FixCurrentCulture()
{
// get the current culture
var currentCulture = CultureInfo.CurrentCulture;
// at the top of any culture should be the invariant culture - find it
var invariantCulture = currentCulture;
while (invariantCulture.Equals(CultureInfo.InvariantCulture) == false)
invariantCulture = invariantCulture.Parent;
// now that invariant culture should be the same object as CultureInfo.InvariantCulture
// yet for some weird reason, sometimes it is not - and this breaks eg MemoryCache,
// because it ends up in PerformanceCounterLib.IsCustomCategory which does:
//
// CultureInfo culture = CultureInfo.CurrentCulture;
// while (culture != CultureInfo.InvariantCulture)
// {
// library = GetPerformanceCounterLib(machine, culture);
// if (library.IsCustomCategory(category))
// return true;
// culture = culture.Parent;
// }
//
// ie a reference comparisons = enters an endless loop and hangs everything.
if (ReferenceEquals(invariantCulture, CultureInfo.InvariantCulture))
return;
// so if it is not the same object, replace the culture by the "fixed" version of
// itself - this prevents MemoryCache from dying - but it is an ugly workaround and
// does not explain why we would have different CultureInfo objects
var fixedCulture = CultureInfo.GetCultureInfo(currentCulture.Name);
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = fixedCulture;
}
static ManagedCache()
{
FixCurrentCulture();
ObjectCache = new MemoryCache("NPoco");
}
static readonly ObjectCache ObjectCache = new MemoryCache("NPoco");
}
public class PocoData
@@ -297,7 +297,7 @@ namespace Umbraco.Core.Persistence.Repositories
//If there's a GetAll zero count cache, ensure it is cleared
RuntimeCache.ClearCacheItem(GetCacheTypeKey<TEntity>());
}
catch (Exception)
catch (Exception ex)
{
//if an exception is thrown we need to remove the entry from cache, this is ONLY a work around because of the way
// that we cache entities: http://issues.umbraco.org/issue/U4-4259
@@ -682,14 +682,16 @@ namespace Umbraco.Core.Persistence.Repositories
public RenderingEngine DetermineTemplateRenderingEngine(ITemplate template)
{
var engine = _templateConfig.DefaultRenderingEngine;
if (template.Content.IsNullOrWhiteSpace() == false && MasterPageHelper.IsMasterPageSyntax(template.Content))
var viewHelper = new ViewHelper(_viewsFileSystem);
if (!viewHelper.ViewExists(template))
{
//there is a design but its definitely a webforms design
return RenderingEngine.WebForms;
if (template.Content.IsNullOrWhiteSpace() == false && MasterPageHelper.IsMasterPageSyntax(template.Content))
{
//there is a design but its definitely a webforms design and we haven't got a MVC view already for it
return RenderingEngine.WebForms;
}
}
var viewHelper = new ViewHelper(_viewsFileSystem);
var masterPageHelper = new MasterPageHelper(_masterpagesFileSystem);
switch (engine)
@@ -117,7 +117,7 @@ namespace Umbraco.Core.Persistence
public override void OnException(Exception x)
{
_logger.Info<UmbracoDatabase>(x.StackTrace);
_logger.Error<UmbracoDatabase>("Database exception occurred", x);
base.OnException(x);
}
@@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
@@ -15,7 +16,6 @@ using Microsoft.Owin;
using Newtonsoft.Json;
using Umbraco.Core.Configuration;
using Umbraco.Core.Models.Membership;
using Microsoft.Owin;
using Umbraco.Core.Logging;
namespace Umbraco.Core.Security
@@ -157,9 +157,6 @@ namespace Umbraco.Core.Security
return new HttpContextWrapper(http).GetCurrentIdentity(authenticateRequestIfNotFound);
}
/// <summary>
/// This clears the forms authentication cookie
/// </summary>
public static void UmbracoLogout(this HttpContextBase http)
{
if (http == null) throw new ArgumentNullException("http");
@@ -170,6 +167,8 @@ namespace Umbraco.Core.Security
/// This clears the forms authentication cookie for webapi since cookies are handled differently
/// </summary>
/// <param name="response"></param>
[Obsolete("Use OWIN IAuthenticationManager.SignOut instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void UmbracoLogoutWebApi(this HttpResponseMessage response)
{
if (response == null) throw new ArgumentNullException("response");
@@ -195,11 +194,8 @@ namespace Umbraco.Core.Security
response.Headers.AddCookies(new[] { authCookie, prevCookie, extLoginCookie });
}
/// <summary>
/// This adds the forms authentication cookie for webapi since cookies are handled differently
/// </summary>
/// <param name="response"></param>
/// <param name="user"></param>
[Obsolete("Use WebSecurity.SetPrincipalForRequest")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static FormsAuthenticationTicket UmbracoLoginWebApi(this HttpResponseMessage response, IUser user)
{
if (response == null) throw new ArgumentNullException("response");
@@ -250,26 +246,29 @@ namespace Umbraco.Core.Security
if (http == null) throw new ArgumentNullException("http");
new HttpContextWrapper(http).UmbracoLogout();
}
/// <summary>
/// Renews the Umbraco authentication ticket
/// This will force ticket renewal in the OWIN pipeline
/// </summary>
/// <param name="http"></param>
/// <returns></returns>
public static bool RenewUmbracoAuthTicket(this HttpContextBase http)
{
if (http == null) throw new ArgumentNullException("http");
return RenewAuthTicket(http,
UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName,
UmbracoConfig.For.UmbracoSettings().Security.AuthCookieDomain,
//Umbraco has always persisted it's original cookie for 1 day so we'll keep it that way
1440);
http.Items["umbraco-force-auth"] = true;
return true;
}
/// <summary>
/// This will force ticket renewal in the OWIN pipeline
/// </summary>
/// <param name="http"></param>
/// <returns></returns>
internal static bool RenewUmbracoAuthTicket(this HttpContext http)
{
if (http == null) throw new ArgumentNullException("http");
return new HttpContextWrapper(http).RenewUmbracoAuthTicket();
http.Items["umbraco-force-auth"] = true;
return true;
}
/// <summary>
@@ -390,8 +389,7 @@ namespace Umbraco.Core.Security
//ensure there's def an expired cookie
http.Response.Cookies.Add(new HttpCookie(c) { Expires = DateTime.Now.AddYears(-1) });
}
}
}
}
private static FormsAuthenticationTicket GetAuthTicket(this HttpContextBase http, string cookieName)
@@ -432,51 +430,6 @@ namespace Umbraco.Core.Security
return FormsAuthentication.Decrypt(formsCookie);
}
/// <summary>
/// Renews the forms authentication ticket & cookie
/// </summary>
/// <param name="http"></param>
/// <param name="cookieName"></param>
/// <param name="cookieDomain"></param>
/// <param name="minutesPersisted"></param>
/// <returns>true if there was a ticket to renew otherwise false if there was no ticket</returns>
private static bool RenewAuthTicket(this HttpContextBase http, string cookieName, string cookieDomain, int minutesPersisted)
{
if (http == null) throw new ArgumentNullException("http");
//get the ticket
var ticket = GetAuthTicket(http, cookieName);
//renew the ticket
var renewed = FormsAuthentication.RenewTicketIfOld(ticket);
if (renewed == null)
{
return false;
}
//get the request cookie to get it's expiry date,
//NOTE: this will never be null becaues we already do this
// check in teh GetAuthTicket.
var formsCookie = http.Request.Cookies[cookieName];
//encrypt it
var hash = FormsAuthentication.Encrypt(renewed);
//write it to the response
var cookie = new HttpCookie(cookieName, hash)
{
Expires = DateTime.Now.AddMinutes(minutesPersisted),
Domain = cookieDomain
};
if (GlobalSettings.UseSSL)
cookie.Secure = true;
//ensure http only, this should only be able to be accessed via the server
cookie.HttpOnly = true;
//rewrite the cooke
http.Response.Cookies.Set(cookie);
return true;
}
/// <summary>
/// Creates a custom FormsAuthentication ticket with the data specified
/// </summary>
@@ -1,12 +1,38 @@
using System;
using System.Globalization;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.Security
{
public class BackOfficeCookieAuthenticationProvider : CookieAuthenticationProvider
{
public override void ResponseSignOut(CookieResponseSignOutContext context)
{
base.ResponseSignOut(context);
//Make sure the definitely all of these cookies are cleared when signing out with cookies
context.Response.Cookies.Append(UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName, "", new CookieOptions
{
Expires = DateTime.Now.AddYears(-1),
Path = "/"
});
context.Response.Cookies.Append(Constants.Web.PreviewCookieName, "", new CookieOptions
{
Expires = DateTime.Now.AddYears(-1),
Path = "/"
});
context.Response.Cookies.Append(Constants.Security.BackOfficeExternalCookieName, "", new CookieOptions
{
Expires = DateTime.Now.AddYears(-1),
Path = "/"
});
}
/// <summary>
/// Ensures that the culture is set correctly for the current back office user
/// </summary>
@@ -53,6 +53,11 @@ namespace Umbraco.Core.Security
switch (result)
{
case SignInStatus.Success:
_logger.WriteCore(TraceEventType.Information, 0,
string.Format(
"User: {0} logged in from IP address {1}",
userName,
_request.RemoteIpAddress), null, null);
break;
case SignInStatus.LockedOut:
_logger.WriteCore(TraceEventType.Information, 0,
+9 -1
View File
@@ -152,6 +152,9 @@ namespace Umbraco.Core.Services
{
var contentType = FindContentTypeByAlias(contentTypeAlias);
var content = new Content(name, parentId, contentType);
var parent = GetById(content.ParentId);
content.Path = string.Concat(parent.IfNotNull(x => x.Path, content.ParentId.ToString()), ",", content.Id);
if (Creating.IsRaisedEventCancelled(new NewEventArgs<IContent>(content, contentTypeAlias, parentId), this))
{
@@ -190,8 +193,11 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IContent"/></returns>
public IContent CreateContent(string name, IContent parent, string contentTypeAlias, int userId = 0)
{
if (parent == null) throw new ArgumentNullException("parent");
var contentType = FindContentTypeByAlias(contentTypeAlias);
var content = new Content(name, parent, contentType);
content.Path = string.Concat(parent.Path, ",", content.Id);
if (Creating.IsRaisedEventCancelled(new NewEventArgs<IContent>(content, contentTypeAlias, parent), this))
{
@@ -225,7 +231,7 @@ namespace Umbraco.Core.Services
public IContent CreateContentWithIdentity(string name, int parentId, string contentTypeAlias, int userId = 0)
{
var contentType = FindContentTypeByAlias(contentTypeAlias);
var content = new Content(name, parentId, contentType);
var content = new Content(name, parentId, contentType);
//NOTE: I really hate the notion of these Creating/Created events - they are so inconsistent, I've only just found
// out that in these 'WithIdentity' methods, the Saving/Saved events were not fired, wtf. Anyways, they're added now.
@@ -276,6 +282,8 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IContent"/></returns>
public IContent CreateContentWithIdentity(string name, IContent parent, string contentTypeAlias, int userId = 0)
{
if (parent == null) throw new ArgumentNullException("parent");
var contentType = FindContentTypeByAlias(contentTypeAlias);
var content = new Content(name, parent, contentType);
@@ -100,6 +100,8 @@ namespace Umbraco.Core.Services
xml.Add(new XAttribute("loginName", member.Username));
xml.Add(new XAttribute("email", member.Email));
xml.Add(new XAttribute("icon", member.ContentType.Icon));
return xml;
}
@@ -63,6 +63,8 @@ namespace Umbraco.Core.Services
{
var mediaType = FindMediaTypeByAlias(mediaTypeAlias);
var media = new Models.Media(name, parentId, mediaType);
var parent = GetById(media.ParentId);
media.Path = string.Concat(parent.IfNotNull(x => x.Path, media.ParentId.ToString()), ",", media.Id);
if (Creating.IsRaisedEventCancelled(new NewEventArgs<IMedia>(media, mediaTypeAlias, parentId), this))
{
@@ -95,8 +97,12 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IMedia"/></returns>
public IMedia CreateMedia(string name, IMedia parent, string mediaTypeAlias, int userId = 0)
{
if (parent == null) throw new ArgumentNullException("parent");
var mediaType = FindMediaTypeByAlias(mediaTypeAlias);
var media = new Models.Media(name, parent, mediaType);
media.Path = string.Concat(parent.Path, ",", media.Id);
if (Creating.IsRaisedEventCancelled(new NewEventArgs<IMedia>(media, mediaTypeAlias, parent), this))
{
media.WasCancelled = true;
@@ -184,6 +190,8 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IMedia"/></returns>
public IMedia CreateMediaWithIdentity(string name, IMedia parent, string mediaTypeAlias, int userId = 0)
{
if (parent == null) throw new ArgumentNullException("parent");
var mediaType = FindMediaTypeByAlias(mediaTypeAlias);
var media = new Models.Media(name, parent, mediaType);
+51
View File
@@ -0,0 +1,51 @@
using System.Globalization;
using System.Threading;
namespace Umbraco.Core
{
static class ThreadExtensions
{
public static void SanitizeThreadCulture(this Thread thread)
{
// get the current culture
var currentCulture = CultureInfo.CurrentCulture;
// at the top of any culture should be the invariant culture - find it
// doing an .Equals comparison ensure that we *will* find it and not loop
// endlessly
var invariantCulture = currentCulture;
while (invariantCulture.Equals(CultureInfo.InvariantCulture) == false)
invariantCulture = invariantCulture.Parent;
// now that invariant culture should be the same object as CultureInfo.InvariantCulture
// yet for some reasons, sometimes it is not - and this breaks anything that loops on
// culture.Parent until a reference equality to CultureInfo.InvariantCulture. See, for
// example, the following code in PerformanceCounterLib.IsCustomCategory:
//
// CultureInfo culture = CultureInfo.CurrentCulture;
// while (culture != CultureInfo.InvariantCulture)
// {
// library = GetPerformanceCounterLib(machine, culture);
// if (library.IsCustomCategory(category))
// return true;
// culture = culture.Parent;
// }
//
// The reference comparisons never succeeds, hence the loop never ends, and the
// application hangs.
//
// granted, that comparison should probably be a .Equals comparison, but who knows
// how many times the framework assumes that it can do a reference comparison? So,
// better fix the cultures.
if (ReferenceEquals(invariantCulture, CultureInfo.InvariantCulture))
return;
// if we do not have equality, fix cultures by replacing them with a culture with
// the same name, but obtained here and now, with a proper invariant top culture
thread.CurrentCulture = CultureInfo.GetCultureInfo(thread.CurrentCulture.Name);
thread.CurrentUICulture = CultureInfo.GetCultureInfo(thread.CurrentUICulture.Name);
}
}
}
+4 -1
View File
@@ -86,7 +86,7 @@
</Reference>
<Reference Include="MySql.Data">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\MySql.Data.6.9.7\lib\net45\MySql.Data.dll</HintPath>
<HintPath>..\packages\MySql.Data.6.9.8\lib\net45\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -404,6 +404,8 @@
<Compile Include="Persistence\Mappers\AccessMapper.cs" />
<Compile Include="Persistence\Mappers\DomainMapper.cs" />
<Compile Include="Persistence\Mappers\MigrationEntryMapper.cs" />
<Compile Include="Persistence\Mappers\TaskTypeMapper.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeTwo\EnsureMigrationsTableIdentityIsCorrect.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeZero\AddExternalLoginsTable.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeZero\AddForeignKeysForLanguageAndDictionaryTables.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeZero\AddServerRegistrationColumnsAndLock.cs" />
@@ -1278,6 +1280,7 @@
<Compile Include="Sync\ApplicationUrlHelper.cs" />
<Compile Include="Sync\RefreshMethodType.cs" />
<Compile Include="Sync\ServerMessengerBase.cs" />
<Compile Include="ThreadExtensions.cs" />
<Compile Include="TopologicalSorter.cs" />
<Compile Include="Strings\DefaultUrlSegmentProvider.cs" />
<Compile Include="Strings\IUrlSegmentProvider.cs" />
@@ -2,6 +2,7 @@
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Web;
using System.Web.Hosting;
using log4net;
@@ -64,6 +65,7 @@ namespace Umbraco.Core
/// <param name="e"></param>
protected void Application_Start(object sender, EventArgs e)
{
Thread.CurrentThread.SanitizeThreadCulture();
StartApplication(sender, e);
}
+1 -1
View File
@@ -14,7 +14,7 @@
<package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net45" />
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
<package id="MySql.Data" version="6.9.7" targetFramework="net45" />
<package id="MySql.Data" version="6.9.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="semver" version="1.1.2" targetFramework="net45" />
+2 -2
View File
@@ -56,7 +56,7 @@
<appSettings>
<add key="umbracoConfigurationStatus" value="6.0.0" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoReservedPaths" value="~/install/" />
<add key="umbracoPath" value="~/umbraco" />
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
<add key="umbracoUseDirectoryUrls" value="false" />
@@ -203,4 +203,4 @@
</assemblyBinding>
</runtime>
</configuration>
</configuration>
@@ -28,7 +28,7 @@
</control>
</tab>
<tab caption="Examine Management">
<control>/umbraco/dashboard/ExamineManagement.ascx</control>
<control>dashboard/ExamineManagement.ascx</control>
</tab>
</section>
@@ -85,7 +85,7 @@
</control>
</tab>
<tab caption="Last Edits">
<control addPanel="true" MaxRecords="30">/umbraco/dashboard/latestEdits.ascx</control>
<control addPanel="true" MaxRecords="30">dashboard/latestEdits.ascx</control>
</tab>
<tab caption="Change Password">
<control addPanel="true">
@@ -104,11 +104,11 @@
views/dashboard/members/membersdashboardintro.html
</control>
<control showOnce="true" addPanel="true" panelCaption="">
/umbraco/members/membersearch.ascx
members/membersearch.ascx
</control>
<control showOnce="true" addPanel="true" panelCaption="">
views/dashboard/members/membersdashboardvideos.html
</control>
</tab>
</section>
</dashBoard>
</dashBoard>
@@ -173,7 +173,8 @@ namespace Umbraco.Tests.Logging
Console.WriteLine("Flushed {0} events during shutdown", numberLoggedAfterClose - numberLoggedBeforeClose);
}
[Test, Explicit("Long-running")]
[NUnit.Framework.Ignore("Keeps failing very randomly")]
[Test]
public void WillShutdownIfBufferCannotBeFlushedFastEnough()
{
const int testSize = 250;
@@ -482,7 +482,7 @@ ALTER TABLE umbracoUser2NodePermission ADD CONSTRAINT PK_umbracoUser2NodePermiss
INSERT INTO umbracoNode (id, trashed, parentID, nodeUser, level, path, sortOrder, uniqueID, text, nodeObjectType, createDate) VALUES
(-92, 0, -1, 0, 11, '-1,-92', 37, 'f0bc4bfb-b499-40d6-ba86-058885a5178c', 'Label', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-90, 0, -1, 0, 11, '-1,-90', 35, '84c6b441-31df-4ffe-b67e-67d5bc3ae65a', 'Upload', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-89, 0, -1, 0, 11, '-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', 'Textbox multiple', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-89, 0, -1, 0, 11, '-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', 'Textarea', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-88, 0, -1, 0, 11, '-1,-88', 33, '0cc0eba1-9960-42c9-bf9b-60e150b429ae', 'Textstring', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-87, 0, -1, 0, 11, '-1,-87', 32, 'ca90c950-0aff-4e72-b976-a30b1ac57dad', 'Richtext editor', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-51, 0, -1, 0, 11, '-1,-51', 4, '2e6d3631-066e-44b8-aec4-96f09099b2b5', 'Numeric', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
@@ -624,7 +624,7 @@ ALTER TABLE [umbracoNode] DROP CONSTRAINT [FK_umbracoNode_umbracoNode]
SET IDENTITY_INSERT [umbracoNode] ON
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-92, 0, -1, 0, 11, N'-1,-92', 37, 'f0bc4bfb-b499-40d6-ba86-058885a5178c', N'Label', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-90, 0, -1, 0, 11, N'-1,-90', 35, '84c6b441-31df-4ffe-b67e-67d5bc3ae65a', N'Upload', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-89, 0, -1, 0, 11, N'-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', N'Textbox multiple', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-89, 0, -1, 0, 11, N'-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', N'Textarea', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-88, 0, -1, 0, 11, N'-1,-88', 33, '0cc0eba1-9960-42c9-bf9b-60e150b429ae', N'Textstring', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-87, 0, -1, 0, 11, N'-1,-87', 32, 'ca90c950-0aff-4e72-b976-a30b1ac57dad', N'Richtext editor', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-51, 0, -1, 0, 11, N'-1,-51', 4, '2e6d3631-066e-44b8-aec4-96f09099b2b5', N'Numeric', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
@@ -0,0 +1,173 @@
using System;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Moq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.Logging;
using Umbraco.Core.Profiling;
using Umbraco.Web;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
using Umbraco.Web.Routing;
using Umbraco.Web.Security;
namespace Umbraco.Tests.Mvc
{
[TestFixture]
public class RenderIndexActionSelectorAttributeTests
{
private MethodInfo GetRenderMvcControllerIndexMethodFromCurrentType(Type currType)
{
return currType.GetMethods().Single(x =>
{
if (x.Name != "Index") return false;
if (x.ReturnParameter == null || x.ReturnParameter.ParameterType != typeof (ActionResult)) return false;
var p = x.GetParameters();
if (p.Length != 1) return false;
if (p[0].ParameterType != typeof (RenderModel)) return false;
return true;
});
}
[Test]
public void Matches_Default_Index()
{
var attr = new RenderIndexActionSelectorAttribute();
var req = new RequestContext();
var appCtx = new ApplicationContext(
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
var umbCtx = UmbracoContext.EnsureContext(
Mock.Of<HttpContextBase>(),
appCtx,
new Mock<WebSecurity>(null, null).Object,
Mock.Of<IUmbracoSettingsSection>(),
Enumerable.Empty<IUrlProvider>(),
true);
var ctrl = new MatchesDefaultIndexController(umbCtx);
var controllerCtx = new ControllerContext(req, ctrl);
var result = attr.IsValidForRequest(controllerCtx,
GetRenderMvcControllerIndexMethodFromCurrentType(ctrl.GetType()));
Assert.IsTrue(result);
}
[Test]
public void Matches_Overriden_Index()
{
var attr = new RenderIndexActionSelectorAttribute();
var req = new RequestContext();
var appCtx = new ApplicationContext(
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
var umbCtx = UmbracoContext.EnsureContext(
Mock.Of<HttpContextBase>(),
appCtx,
new Mock<WebSecurity>(null, null).Object,
Mock.Of<IUmbracoSettingsSection>(),
Enumerable.Empty<IUrlProvider>(),
true);
var ctrl = new MatchesOverriddenIndexController(umbCtx);
var controllerCtx = new ControllerContext(req, ctrl);
var result = attr.IsValidForRequest(controllerCtx,
GetRenderMvcControllerIndexMethodFromCurrentType(ctrl.GetType()));
Assert.IsTrue(result);
}
[Test]
public void Matches_Custom_Index()
{
var attr = new RenderIndexActionSelectorAttribute();
var req = new RequestContext();
var appCtx = new ApplicationContext(
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
var umbCtx = UmbracoContext.EnsureContext(
Mock.Of<HttpContextBase>(),
appCtx,
new Mock<WebSecurity>(null, null).Object,
Mock.Of<IUmbracoSettingsSection>(),
Enumerable.Empty<IUrlProvider>(),
true);
var ctrl = new MatchesCustomIndexController(umbCtx);
var controllerCtx = new ControllerContext(req, ctrl);
var result = attr.IsValidForRequest(controllerCtx,
GetRenderMvcControllerIndexMethodFromCurrentType(ctrl.GetType()));
Assert.IsFalse(result);
}
[Test]
public void Matches_Async_Index_Same_Signature()
{
var attr = new RenderIndexActionSelectorAttribute();
var req = new RequestContext();
var appCtx = new ApplicationContext(
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
var umbCtx = UmbracoContext.EnsureContext(
Mock.Of<HttpContextBase>(),
appCtx,
new Mock<WebSecurity>(null, null).Object,
Mock.Of<IUmbracoSettingsSection>(),
Enumerable.Empty<IUrlProvider>(),
true);
var ctrl = new MatchesAsyncIndexController(umbCtx);
var controllerCtx = new ControllerContext(req, ctrl);
var result = attr.IsValidForRequest(controllerCtx,
GetRenderMvcControllerIndexMethodFromCurrentType(ctrl.GetType()));
Assert.IsFalse(result);
}
public class MatchesDefaultIndexController : RenderMvcController
{
public MatchesDefaultIndexController(UmbracoContext umbracoContext) : base(umbracoContext)
{
}
}
public class MatchesOverriddenIndexController : RenderMvcController
{
public MatchesOverriddenIndexController(UmbracoContext umbracoContext) : base(umbracoContext)
{
}
public override ActionResult Index(RenderModel model)
{
return base.Index(model);
}
}
public class MatchesCustomIndexController : RenderMvcController
{
public MatchesCustomIndexController(UmbracoContext umbracoContext) : base(umbracoContext)
{
}
public ActionResult Index(RenderModel model, int page)
{
return base.Index(model);
}
}
public class MatchesAsyncIndexController : RenderMvcController
{
public MatchesAsyncIndexController(UmbracoContext umbracoContext) : base(umbracoContext)
{
}
public new async Task<ActionResult> Index(RenderModel model)
{
return await Task.FromResult(base.Index(model));
}
}
}
}
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Web.Mvc;
using NUnit.Framework;
@@ -268,7 +268,7 @@ namespace Umbraco.Tests.Plugins
public void Resolves_Assigned_Mappers()
{
var foundTypes1 = _manager.ResolveAssignedMapperTypes();
Assert.AreEqual(27, foundTypes1.Count());
Assert.AreEqual(28, foundTypes1.Count());
}
[Test]
@@ -141,6 +141,20 @@ namespace Umbraco.Tests.Services
Assert.AreEqual(20, contentService.CountDescendants(parent.Id));
}
[Test]
public void GetAncestors_Returns_Empty_List_When_Path_Is_Null()
{
// Arrange
var contentService = ServiceContext.ContentService;
// Act
var current = new Mock<IContent>();
var res = contentService.GetAncestors(current.Object);
// Assert
Assert.IsEmpty(res);
}
[Test]
public void Tags_For_Entity_Are_Not_Exposed_Via_Tag_Api_When_Content_Is_Recycled()
{
@@ -1168,6 +1168,8 @@ namespace Umbraco.Tests.Services
{
var service = ServiceContext.ContentTypeService;
var basePage = (IContentType)MockedContentTypes.CreateBasicContentType();
basePage.AddPropertyGroup("Content");
basePage.AddPropertyGroup("Meta");
service.Save(basePage);
var authorPropertyType = new PropertyType(Constants.PropertyEditors.TextboxAlias, DataTypeDatabaseType.Ntext, "author")
@@ -1179,6 +1181,16 @@ namespace Umbraco.Tests.Services
DataTypeDefinitionId = -88
};
var authorAdded = basePage.AddPropertyType(authorPropertyType, "Content");
var titlePropertyType = new PropertyType(Constants.PropertyEditors.TextboxAlias, DataTypeDatabaseType.Ntext, "title")
{
Name = "Title",
Description = "",
Mandatory = false,
SortOrder = 1,
DataTypeDefinitionId = -88
};
var titleAdded = basePage.AddPropertyType(authorPropertyType, "Meta");
service.Save(basePage);
basePage = service.GetContentType(basePage.Id);
@@ -0,0 +1,109 @@
using Moq;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Umbraco.Core;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence.Repositories;
using Umbraco.Core.Persistence.SqlSyntax;
using Umbraco.Core.Persistence.UnitOfWork;
namespace Umbraco.Tests.Templates
{
[TestFixture]
public class TemplateRepositoryTests
{
private readonly Mock<IDatabaseUnitOfWork> _unitOfWorkMock = new Mock<IDatabaseUnitOfWork>();
private readonly Mock<CacheHelper> _cacheMock = new Mock<CacheHelper>();
private TemplateRepository _templateRepository;
private readonly Mock<IFileSystem> _viewFileSystemMock = new Mock<IFileSystem>();
private readonly Mock<IFileSystem> _masterpageFileSystemMock = new Mock<IFileSystem>();
private readonly Mock<ITemplatesSection> _templateConfigMock = new Mock<Core.Configuration.UmbracoSettings.ITemplatesSection>();
[SetUp]
public void Setup()
{
var loggerMock = new Mock<ILogger>();
var sqlSyntaxMock = new Mock<ISqlSyntaxProvider>();
_templateRepository = new TemplateRepository(_unitOfWorkMock.Object, _cacheMock.Object, loggerMock.Object, sqlSyntaxMock.Object, _masterpageFileSystemMock.Object, _viewFileSystemMock.Object, _templateConfigMock.Object);
}
[Test]
public void DetermineTemplateRenderingEngine_Returns_MVC_When_ViewFile_Exists_And_Content_Has_Webform_Markup()
{
// Project in MVC mode
_templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc);
// Template has masterpage content
var templateMock = new Mock<ITemplate>();
templateMock.Setup(x => x.Alias).Returns("Something");
templateMock.Setup(x => x.Content).Returns("<asp:Content />");
// but MVC View already exists
_viewFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(true);
var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object);
Assert.AreEqual(RenderingEngine.Mvc, res);
}
[Test]
public void DetermineTemplateRenderingEngine_Returns_WebForms_When_ViewFile_Doesnt_Exist_And_Content_Has_Webform_Markup()
{
// Project in MVC mode
_templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc);
// Template has masterpage content
var templateMock = new Mock<ITemplate>();
templateMock.Setup(x => x.Alias).Returns("Something");
templateMock.Setup(x => x.Content).Returns("<asp:Content />");
// MVC View doesn't exist
_viewFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(false);
var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object);
Assert.AreEqual(RenderingEngine.WebForms, res);
}
[Test]
public void DetermineTemplateRenderingEngine_Returns_WebForms_When_MasterPage_Exists_And_In_Mvc_Mode()
{
// Project in MVC mode
_templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc);
var templateMock = new Mock<ITemplate>();
templateMock.Setup(x => x.Alias).Returns("Something");
// but masterpage already exists
_viewFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(false);
_masterpageFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(true);
var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object);
Assert.AreEqual(RenderingEngine.WebForms, res);
}
[Test]
public void DetermineTemplateRenderingEngine_Returns_Mvc_When_ViewPage_Exists_And_In_Webforms_Mode()
{
// Project in WebForms mode
_templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.WebForms);
var templateMock = new Mock<ITemplate>();
templateMock.Setup(x => x.Alias).Returns("Something");
// but MVC View already exists
_viewFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(true);
_masterpageFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(false);
var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object);
Assert.AreEqual(RenderingEngine.Mvc, res);
}
}
}
@@ -8,6 +8,7 @@ using System.Web;
using System.Web.Routing;
using Moq;
using Umbraco.Core;
using Umbraco.Core.Configuration;
namespace Umbraco.Tests.TestHelpers
{
@@ -60,7 +61,7 @@ namespace Umbraco.Tests.TestHelpers
//Cookie collection
var cookieCollection = new HttpCookieCollection();
cookieCollection.Add(new HttpCookie(Constants.Web.AuthCookieName, "FBA996E7-D6BE-489B-B199-2B0F3D2DD826"));
cookieCollection.Add(new HttpCookie("UMB_UCONTEXT", "FBA996E7-D6BE-489B-B199-2B0F3D2DD826"));
//Request
var requestMock = new Mock<HttpRequestBase>();
+2
View File
@@ -180,6 +180,7 @@
<Compile Include="Logging\AsyncRollingFileAppenderTest.cs" />
<Compile Include="Logging\DebugAppender.cs" />
<Compile Include="Logging\ParallelForwarderTest.cs" />
<Compile Include="Mvc\RenderIndexActionSelectorAttributeTests.cs" />
<Compile Include="Persistence\Repositories\AuditRepositoryTest.cs" />
<Compile Include="Persistence\Repositories\DomainRepositoryTest.cs" />
<Compile Include="Persistence\Repositories\PartialViewRepositoryTests.cs" />
@@ -361,6 +362,7 @@
<Compile Include="Services\MacroServiceTests.cs" />
<Compile Include="Services\UserServiceTests.cs" />
<Compile Include="Manifest\ManifestParserTests.cs" />
<Compile Include="Templates\TemplateRepositoryTests.cs" />
<Compile Include="TestHelpers\BaseSeleniumTest.cs" />
<Compile Include="Integration\InstallPackage.cs" />
<Compile Include="CoreXml\NavigableNavigatorTests.cs" />
+1 -1
View File
@@ -23,7 +23,7 @@
"jquery": "2.0.3",
"jquery-file-upload": "~9.4.0",
"jquery-ui": "1.10.3",
"angular-dynamic-locale": "~0.1.27",
"angular-dynamic-locale": "0.1.27",
"tinymce": "~4.1.10",
"codemirror": "~5.3.0"
}
@@ -24,7 +24,7 @@ var app = angular.module("Umbraco.canvasdesigner", ['colorpicker', 'ui.slider',
];
$scope.previewDevice = $scope.devices[0];
var apiController = "/Umbraco/Api/Canvasdesigner/";
var apiController = "../Api/Canvasdesigner/";
/*****************************************************************************/
/* Preview devices */
@@ -40,7 +40,7 @@ var app = angular.module("Umbraco.canvasdesigner", ['colorpicker', 'ui.slider',
/*****************************************************************************/
$scope.exitPreview = function () {
window.top.location.href = "/umbraco/endPreview.aspx?redir=%2f" + $scope.pageId;
window.top.location.href = "../endPreview.aspx?redir=%2f" + $scope.pageId;
};
/*****************************************************************************/
@@ -2,9 +2,9 @@
<html lang="en">
<head>
<title>Umbraco Canvas Designer</title>
<link href="/Umbraco/assets/css/canvasdesigner.css" type="text/css" rel="stylesheet" />
<link href="/Umbraco/lib/spectrum/spectrum.css" type="text/css" rel="stylesheet" />
<link href="/Umbraco/lib/jquery-ui/jquery-ui-1.10.4.custom.min.css" type="text/css" rel="stylesheet" />
<link href="../assets/css/canvasdesigner.css" type="text/css" rel="stylesheet" />
<link href="../lib/spectrum/spectrum.css" type="text/css" rel="stylesheet" />
<link href="../lib/jquery-ui/jquery-ui-1.10.4.custom.min.css" type="text/css" rel="stylesheet" />
</head>
<body id="canvasdesignerPanel" ng-mouseover="outlinePositionHide()" ng-class="{ leftOpen: (showStyleEditor || showPalettePicker) && !showDevicesPreview }" ng-controller="Umbraco.canvasdesignerController">
@@ -20,7 +20,7 @@
<div class="fix-left-menu selected">
<div class="avatar">
<img ng-src="/umbraco/assets/img/application/logo.png">
<img ng-src="../assets/img/application/logo.png">
</div>
<ul class="sections" ng-class="{selected: showDevicesPreview}">
@@ -125,7 +125,7 @@
<div class="canvasdesigner-panel-container" ng-show="categoriesVisibility[category] === true">
<div class="canvasdesigner-panel-property" ng-repeat="item in configItem.editors" ng-show="item.category == category">
<h5>{{item.name}} <i class="icon icon-help-alt"></i></h5>
<div ng-include="'/Umbraco/preview/editors/' + item.type + '.html'"></div>
<div ng-include="'../preview/editors/' + item.type + '.html'"></div>
</div>
</div>
</div>
@@ -154,8 +154,8 @@
<p>Styles saved and published</p>
</div>
<script src="/umbraco/lib/rgrove-lazyload/lazyload.js"></script>
<script src="/umbraco/js/canvasdesigner.loader.js"></script>
<script src="../lib/rgrove-lazyload/lazyload.js"></script>
<script src="../js/canvasdesigner.loader.js"></script>
</body>
@@ -56,7 +56,7 @@ angular.module("umbraco.directives")
if(scope.configuration && scope.configuration.stylesheets){
angular.forEach(scope.configuration.stylesheets, function(stylesheet, key){
stylesheets.push("/css/" + stylesheet + ".css");
stylesheets.push(Umbraco.Sys.ServerVariables.umbracoSettings.cssPath + "/" + stylesheet + ".css");
await.push(stylesheetResource.getRulesByName(stylesheet).then(function (rules) {
angular.forEach(rules, function (rule) {
var r = {};
@@ -94,14 +94,24 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
navigationService.showHelpDialog();
};
scope.sectionClick = function (section) {
scope.sectionClick = function (event, section) {
if (event.ctrlKey ||
event.shiftKey ||
event.metaKey || // apple
(event.button && event.button === 1) // middle click, >IE9 + everyone else
) {
return;
}
if (navigationService.userDialog) {
navigationService.userDialog.close();
}
if (navigationService.helpDialog) {
navigationService.helpDialog.close();
}
navigationService.hideSearch();
navigationService.showTree(section.alias);
$location.path("/" + section.alias);
@@ -38,9 +38,9 @@ angular.module("umbraco.directives")
'<div ng-class="getNodeCssClass(node)" ng-swipe-right="options(node, $event)" >' +
//NOTE: This ins element is used to display the search icon if the node is a container/listview and the tree is currently in dialog
//'<ins ng-if="tree.enablelistviewsearch && node.metaData.isContainer" class="umb-tree-node-search icon-search" ng-click="searchNode(node, $event)" alt="searchAltText"></ins>' +
'<ins ng-class="{\'icon-navigation-right\': !node.expanded, \'icon-navigation-down\': node.expanded}" ng-click="load(node)"></ins>' +
'<i class="icon umb-tree-icon sprTree"></i>' +
'<a ng-click="select(node, $event)"></a>' +
'<ins ng-class="{\'icon-navigation-right\': !node.expanded, \'icon-navigation-down\': node.expanded}" ng-click="load(node)">&nbsp;</ins>' +
'<i class="icon umb-tree-icon sprTree" ng-click="select(node, $event)"></i>' +
'<a href="#/{{node.routePath}}" ng-click="select(node, $event)"></a>' +
//NOTE: These are the 'option' elipses
'<a class="umb-options" ng-click="options(node, $event)"><i></i><i></i><i></i></a>' +
'<div ng-show="node.loading" class="l"><div></div></div>' +
@@ -148,8 +148,17 @@ angular.module("umbraco.directives")
and emits it as a treeNodeSelect element if there is a callback object
defined on the tree
*/
scope.select = function(n, ev) {
scope.select = function (n, ev) {
if (ev.ctrlKey ||
ev.shiftKey ||
ev.metaKey || // apple
(ev.button && ev.button === 1) // middle click, >IE9 + everyone else
) {
return;
}
emitEvent("treeNodeSelect", { element: element, tree: scope.tree, node: n, event: ev });
ev.preventDefault();
};
/**
@@ -1,5 +1,5 @@
/**
* @description Utillity directives for key and field events
* @description Utility directives for key and field events
**/
angular.module('umbraco.directives')
@@ -4,7 +4,9 @@ angular.module("umbraco.directives").directive('focusWhen', function ($timeout)
link: function (scope, elm, attrs, ctrl) {
attrs.$observe("focusWhen", function (newValue) {
if (newValue === "true") {
elm.focus();
$timeout(function() {
elm.focus();
});
}
});
}
@@ -36,7 +36,7 @@ function macroResource($q, $http, umbRequestHelper) {
* @methodOf umbraco.resources.macroResource
*
* @description
* Gets the result of a macro as html to display in the rich text editor
* Gets the result of a macro as html to display in the rich text editor or in the Grid
*
* @param {int} macroId The macro id to get parameters for
* @param {int} pageId The current page id
@@ -45,39 +45,17 @@ function macroResource($q, $http, umbRequestHelper) {
*/
getMacroResultAsHtmlForEditor: function (macroAlias, pageId, macroParamDictionary) {
//need to format the query string for the custom dictionary
var query = "macroAlias=" + macroAlias + "&pageId=" + pageId;
if (macroParamDictionary) {
var counter = 0;
_.each(macroParamDictionary, function (val, key) {
//check for null
val = val ? val : "";
//need to detect if the val is a string or an object
if (!angular.isString(val)) {
//if it's not a string we'll send it through the json serializer
var json = angular.toJson(val);
//then we need to url encode it so that it's safe
val = encodeURIComponent(json);
}
else {
//we still need to encode the string, it could contain line breaks, etc...
val = encodeURIComponent(val);
}
query += "&macroParams[" + counter + "].key=" + key + "&macroParams[" + counter + "].value=" + val;
counter++;
});
}
return umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"macroApiBaseUrl",
"GetMacroResultAsHtmlForEditor",
query)),
'Failed to retrieve macro result for macro with alias ' + macroAlias);
$http.post(
umbRequestHelper.getApiUrl(
"macroApiBaseUrl",
"GetMacroResultAsHtmlForEditor"), {
macroAlias: macroAlias,
pageId: pageId,
macroParams: macroParamDictionary
}),
'Failed to retrieve macro result for macro with alias ' + macroAlias);
}
};
}
@@ -17,9 +17,9 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
//add to umbraco installer facts here
var facts = ['Umbraco helped millions of people watch a man jump from the edge of space',
'Over 250.000 websites are currently powered by Umbraco',
'Over 300 000 websites are currently powered by Umbraco',
"At least 2 people have named their cat 'Umbraco'",
'On an average day, more than 1.000 people download Umbraco',
'On an average day, more than 1000 people download Umbraco',
'<a target="_blank" href="http://umbraco.tv">umbraco.tv</a> is the premier source of Umbraco video tutorials to get you started',
'You can find the world\'s friendliest CMS community at <a target="_blank" href="http://our.umbraco.org">our.umbraco.org</a>',
'You can become a certified Umbraco developer by attending one of the official courses',
@@ -31,7 +31,7 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
"At least 4 people have the Umbraco logo tattooed on them",
"'Umbraco' is the danish name for an allen key",
"Umbraco has been around since 2005, that's a looong time in IT",
"More than 400 people from all over the world meet each year in Denmark in June for our annual conference <a target='_blank' href='http://codegarden14.com'>CodeGarden</a>",
"More than 400 people from all over the world meet each year in Denmark in June for our annual conference <a target='_blank' href='http://codegarden15.com'>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 and using either JavaScript or C#"
];
@@ -2,8 +2,8 @@
/******* font-face *******/
@font-face {
src: url('/Umbraco/assets/fonts/helveticons/helveticons.eot') !important;
src: url('/Umbraco/assets/fonts/helveticons/helveticons.eot?#iefix') format('embedded-opentype'), url('/Umbraco/assets/fonts/helveticons/helveticons.ttf') format('truetype'), url('/Umbraco/assets/fonts/helveticons/helveticons.svg#icomoon') format('svg') !important;
src: url('assets/fonts/helveticons/helveticons.eot') !important;
src: url('assets/fonts/helveticons/helveticons.eot?#iefix') format('embedded-opentype'), url('assets/fonts/helveticons/helveticons.ttf') format('truetype'), url('assets/fonts/helveticons/helveticons.svg#icomoon') format('svg') !important;
}
/****************************/
+2 -2
View File
@@ -155,7 +155,7 @@ body {
}
#speechbubble {
z-index: 1000;
z-index: 1060;
position: absolute;
bottom: 100px;
left: 0;
@@ -266,4 +266,4 @@ body {
margin-left: 40px;
width: 85%!important;
}
}
}
+71 -10
View File
@@ -133,7 +133,7 @@ h5{
.umb-control-group label.control-label {
text-align: left
}
.umb-control-group label .help-block,
.umb-control-group label .help-block,
.umb-control-group label small {
font-size: 11px;
color: #a0a0a0;
@@ -148,6 +148,11 @@ h5{
padding-top: 5px;
margin-left: 240px;
}
.umb-user-panel .controls-row {
margin-left: 0px;
}
.controls-row label {
display: inline-block
}
@@ -189,7 +194,7 @@ h5{
.umb-dashboard-control a{text-decoration: underline;}
.umb-dashboard-control
.umb-dashboard-control
iframe{ position: absolute; display: block; width: 99%; height: 99%; overflow: auto !important;}
@@ -234,16 +239,16 @@ table thead a {
.umb-table tbody.ui-sortable tr.ui-sortable-helper {
background-color: @sortableHelperBg;
border: none;
border: none;
}
.umb-table tbody.ui-sortable tr.ui-sortable-helper td
.umb-table tbody.ui-sortable tr.ui-sortable-helper td
{
border:none;
}
.umb-table tbody.ui-sortable tr.ui-sortable-placeholder {
background-color: @sortablePlaceholderBg;
border:none;
border:none;
}
.umb-table tbody.ui-sortable tr.ui-sortable-placeholder td
@@ -363,7 +368,7 @@ table thead a {
background: @inputBorder;
height: 1px;
margin: 20px 0 0 0;
width: 82%;
width: 82%;
float: left;
}
@@ -432,7 +437,7 @@ table thead a {
color:@green;
}
// Loading Animation
// Loading Animation
// ------------------------
.umb-loader{
@@ -518,11 +523,67 @@ height:1px;
}
.umb-loader-wrapper {
position: absolute;
right: 0;
left: 0;
margin: 10px 0;
overflow: hidden;
overflow: hidden;
}
}
// Helpers
.strong {
font-weight: bold;
}
.inline {
display: inline;
}
// Input label styles
// @Simon: not sure where to put this part yet
// --- TODO Needs to be divided into the right .less directories
// Titles for input fields
.input-label--title {
font-weight: bold;
color: @black;
margin-bottom: 3px;
}
// Used for input checkmark fields
.input-label--small {
display: inline;
font-size: 12px;
font-weight: bold;
color: fade(@black, 70);
&:hover {
color: @black;
}
}
input[type=checkbox]:checked + .input-label--small {
color: @blue;
}
// Use this for headers in the panels
.panel-dialog--header {
border-bottom: 1px solid @gray;
margin: 10px 0;
padding-bottom: 10px;
font-size: @fontSizeLarge;
font-weight: bold;
line-height: 20px;
}
@@ -42,6 +42,23 @@
bottom: 90px;
}
.umb-mediapicker-upload {
display: -ms-flexbox;
display: -webkit-box;
display: -webkit-flex;
display: flex;
.form-search {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
.upload-button {
margin-left: 16px;
}
}
.umb-panel.editor-breadcrumb .umb-panel-body, .umb-panel.editor-breadcrumb .umb-bottom-bar {
bottom: 31px !important;
}
@@ -153,6 +170,7 @@
border-radius: @tabsBorderRadius;
box-shadow: none;
padding: 0;
z-index: 6020;
}
.umb-btn-toolbar .dropdown-menu small {
@@ -40,8 +40,16 @@
padding: 10px;
}
.umb-contentpicker small a {
.umb-contentpicker small {
&:not(:last-child) {
padding-right: 3px;
border-right: 1px solid @grayMed;
}
a {
color: @gray;
}
}
/* CODEMIRROR DATATYPE */
@@ -14,6 +14,7 @@
@grayDarker: #222;
@grayDark: #343434;
@gray: #555;
@grayMed: #999;
@grayLight: #d9d9d9;
@grayLighter: #f8f8f8;
@white: #fff;
@@ -37,7 +37,7 @@
<li class="span2" ng-repeat="video in videos">
<div class="thumbnail" style="margin-right: 20px">
<a target="_blank" href="{{video.link}}?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=tv" title="{{video.title}}">
<img ng-src="{{video.thumbnail}}" alt="{{video.title}}">
<img ng-src="{{video.thumbnail}}?width=120" alt="{{video.title}}">
</a>
</div>
</li>
@@ -34,11 +34,12 @@ angular.module("umbraco")
$scope.submitFolder = function(e) {
if (e.keyCode === 13) {
e.preventDefault();
$scope.showFolderInput = false;
mediaResource
.addFolder($scope.newFolderName, $scope.options.formData.currentFolder)
.then(function(data) {
$scope.showFolderInput = false;
$scope.newFolderName = "";
//we've added a new folder so lets clear the tree cache for that specific item
treeService.clearCache({
@@ -80,7 +81,7 @@ angular.module("umbraco")
$scope.options.formData.currentFolder = folder.id;
$scope.currentFolder = folder;
};
//This executes prior to the whole processing which we can use to get the UI going faster,
//this also gives us the start callback to invoke to kick of the whole thing
$scope.$on('fileuploadadd', function (e, data) {
@@ -62,18 +62,16 @@
<div class="umb-panel umb-dialogs-mediapicker browser" ng-hide="target" ng-style="{opacity: dropping == true ? '0.25' : '1.0'}">
<div class="umb-panel-header">
<div class="umb-el-wrap umb-panel-buttons">
<div class="span5">
<div class="form-search">
<i class="icon-search"></i>
<input type="text"
ng-model="searchTerm"
class="umb-search-field search-query"
placeholder="Filter...">
</div>
<div class="umb-el-wrap umb-panel-buttons umb-mediapicker-upload">
<div class="form-search">
<i class="icon-search"></i>
<input type="text"
ng-model="searchTerm"
class="umb-search-field search-query"
placeholder="Filter...">
</div>
<div class="pull-right">
<div class="upload-button">
<span class="btn fileinput-button" ng-class="{disabled: disabled}">
<i class="icon-page-up"></i>
<input type="file" name="files[]" multiple ng-disabled="disabled" class="uploader">
@@ -103,7 +101,8 @@
ng-show="showFolderInput"
ng-model="newFolderName"
ng-keydown="submitFolder($event)"
on-blur="showFolderInput = false">
on-blur="showFolderInput = false"
focus-when="{{showFolderInput}}">
</li>
</ul>
</div>
@@ -0,0 +1,8 @@
angular.module("umbraco").controller('Umbraco.Dialogs.Template.SnippetController',
function($scope) {
$scope.type = $scope.dialogOptions.type;
$scope.section = {
name: "",
required: false
};
});
@@ -0,0 +1,37 @@
<form novalidate name="contentForm"
ng-controller="Umbraco.Dialogs.Template.SnippetController"
ng-submit="close()"
val-form-manager>
<div class="umb-panel">
<div class="umb-panel-header">
<div class="panel-dialog--header" style="border-bottom: 1px solid whitesmoke">Configure the section</div>
</div>
<div class="umb-panel-body with-footer umb-querybuilder">
<label>
<div class="input-label--title">
Section name:
</div>
<input type="text" ng-model="section.name"/>
</label>
<label ng-show="type === 'rendersection'">
<input style="margin: 0;" type="checkbox" ng-checked="section.required" ng-model="section.required"/>
<div class="input-label--small">
<localize key="general_required">Required</localize>
</div>
</label>
</div>
<div class="umb-panel-footer">
<div class="umb-el-wrap umb-panel-buttons">
<div class="btn-toolbar umb-btn-toolbar pull-right">
<a href ng-click="close()" class="btn btn-link">
<localize key="general_close">Close</localize>
</a>
<a href ng-click="submit(section)" class="btn btn-primary">Insert</a>
</div>
</div>
</div>
</div>
</form>
@@ -1,5 +1,5 @@
angular.module("umbraco")
.controller("Umbraco.Dialogs.UserController", function ($scope, $location, $timeout, userService, historyService, eventsService, externalLoginInfo, authResource) {
.controller("Umbraco.Dialogs.UserController", function ($scope, $location, $timeout, userService, historyService, eventsService, externalLoginInfo, authResource, currentUserResource, formHelper) {
$scope.history = historyService.getCurrent();
$scope.version = Umbraco.Sys.ServerVariables.application.version + " assembly: " + Umbraco.Sys.ServerVariables.application.assemblyVersion;
@@ -102,4 +102,44 @@ angular.module("umbraco")
});
});
//create the initial model for change password property editor
$scope.changePasswordModel = {
alias: "_umb_password",
view: "changepassword",
config: {},
value: {}
};
//go get the config for the membership provider and add it to the model
currentUserResource.getMembershipProviderConfig().then(function (data) {
$scope.changePasswordModel.config = data;
//ensure the hasPassword config option is set to true (the user of course has a password already assigned)
//this will ensure the oldPassword is shown so they can change it
$scope.changePasswordModel.config.hasPassword = true;
$scope.changePasswordModel.config.disableToggle = true;
});
////this is the model we will pass to the service
//$scope.profile = {};
$scope.changePassword = function () {
if (formHelper.submitForm({ scope: $scope })) {
currentUserResource.changePassword($scope.changePasswordModel.value).then(function (data) {
//if the password has been reset, then update our model
if (data.value) {
$scope.changePasswordModel.value.generatedPassword = data.value;
}
formHelper.resetForm({ scope: $scope, notifications: data.notifications });
}, function (err) {
formHelper.handleError(err);
});
}
};
});
@@ -8,28 +8,34 @@
</div>
</div>
<h1 class="headline">{{user.name}}</h1>
<small class="umb-version">Umbraco version {{version}}</small>
<p class="muted">
<small>
<localize key="user_sessionExpires" />: {{remainingAuthSeconds | timespan}}
</small>
</p>
</div>
<div class="umb-panel-body umb-scrollable">
<div class="tab-content umb-control-group">
<div class="umb-pane" ng-if="canEditProfile">
<div class="umb-pane">
<h5><localize key="user_yourProfile" /></h5>
<p>
<a href="#/users/framed/%252Fumbraco%252Fusers%252Fedituser.aspx%253Fid%253D{{user.id}}"
<a href="#/users/framed/users%252Fedituser.aspx%253Fid%253D{{user.id}}"
class="btn btn-primary"
ng-click="close()">
ng-click="close()" ng-if="canEditProfile">
<localize key="general_edit">Edit</localize>
</a>
<a href
class="btn"
ng-click="showChangePassword = showChangePassword === true ? false : true;" ng-init="showChangePassword = false;">
<localize key="user_newPassword">Change password</localize>
</a>
</p>
</div>
<div class="umb-pane external-logins" ng-if="externalLoginProviders.length > 0">
<h5>External login providers</h5>
@@ -63,6 +69,24 @@
</div>
<div class="umb-pane" ng-if="showChangePassword">
<form novalidate name="passwordForm"
ng-controller="Umbraco.Dashboard.StartupChangePasswordController"
ng-submit="changePassword()"
val-form-manager>
<h3><localize key="user_changePassword">Change password</localize></h3>
<umb-editor model="changePasswordModel"></umb-editor>
<umb-control-group hideLabel="1">
<button class="btn btn-primary"><localize key="user_change">Change</localize></button>
<!-- Could not get the button to change the showChangePassword scope variable to hide the form again... -->
<!--<button class="btn"><localize key="general_cancel" ng-click="showChangePassword = false;">Cancel</localize></button>-->
</umb-control-group>
</form>
</div>
<div class="umb-pane">
<h5><localize key="user_yourHistory" /></h5>
<ul class="umb-tree">
@@ -75,7 +99,5 @@
</div>
</div>
<small class="umb-version">Umbraco version {{version}}</small>
</div>
</div>
</div>
@@ -3,15 +3,16 @@
ng-submit="changePassword()"
val-form-manager>
<h3>Change password</h3>
<h3><localize key="user_changePassword">Change password</localize></h3>
<umb-pane>
<umb-editor model="changePasswordModel"></umb-editor>
<umb-control-group hideLabel="1">
<button class="btn btn-primary">Change</button>
<button class="btn btn-primary">
<localize key="user_change">Change</localize>
</button>
</umb-control-group>
</umb-pane>
</form>
@@ -9,7 +9,7 @@
<li ng-repeat="section in sections | limitTo: maxSections" ng-class="{current: section.alias == currentSection}">
<a href="#/{{section.alias}}"
ng-dblclick="sectionDblClick(section)"
ng-click="sectionClick(section)"
ng-click="sectionClick($event, section)"
prevent-default>
<section-icon icon="{{section.cssclass}}"></section-icon>
<span>{{section.name}}</span>
@@ -36,9 +36,9 @@
<li ng-repeat="section in sections | limitTo: overflowingSections" ng-class="{current: section.alias == currentSection}">
<a href="#/{{section.alias}}"
ng-dblclick="sectionDblClick(section)"
ng-click="sectionClick(section)"
ng-click="sectionClick($event, section)"
prevent-default>
<section-icon icon="{{section.cssclass}}"></section-icon>
<section-icon icon="{{section.cssclass}}"></section-icon>
<span>{{section.name}}</span>
</a>
</li>
@@ -1,7 +1,7 @@
//this controller simply tells the dialogs service to open a mediaPicker window
//with a specified callback, this callback will receive an object with a selection on it
function contentPickerController($scope, dialogService, entityResource, editorState, $log, iconHelper, $routeParams, fileManager, contentEditingHelper) {
function contentPickerController($scope, dialogService, entityResource, editorState, $log, iconHelper, $routeParams, fileManager, contentEditingHelper, angularHelper, navigationService, $location) {
function trim(str, chr) {
var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^' + chr + '+|' + chr + '+$', 'g');
@@ -49,7 +49,9 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
//the default pre-values
var defaultConfig = {
multiPicker: false,
showEditButton: false,
showOpenButton: false,
showEditButton: false,
showPathOnHover: false,
startNode: {
query: "",
type: "content",
@@ -64,13 +66,17 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
//Umbraco persists boolean for prevalues as "0" or "1" so we need to convert that!
$scope.model.config.multiPicker = ($scope.model.config.multiPicker === "1" ? true : false);
$scope.model.config.showOpenButton = ($scope.model.config.showOpenButton === "1" ? true : false);
$scope.model.config.showEditButton = ($scope.model.config.showEditButton === "1" ? true : false);
$scope.model.config.showPathOnHover = ($scope.model.config.showPathOnHover === "1" ? true : false);
var entityType = $scope.model.config.startNode.type === "member"
? "Member"
: $scope.model.config.startNode.type === "media"
? "Media"
: "Document";
$scope.allowOpenButton = entityType === "Document" || entityType === "Media";
$scope.allowEditButton = entityType === "Document";
//the dialog options for the picker
var dialogOptions = {
@@ -87,6 +93,7 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
$scope.clear();
$scope.add(data);
}
angularHelper.getCurrentForm($scope).$setDirty();
},
treeAlias: $scope.model.config.startNode.type,
section: $scope.model.config.startNode.type
@@ -141,7 +148,23 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
$scope.remove = function (index) {
$scope.renderModel.splice(index, 1);
angularHelper.getCurrentForm($scope).$setDirty();
};
$scope.showNode = function (index) {
var item = $scope.renderModel[index];
var id = item.id;
var section = $scope.model.config.startNode.type.toLowerCase();
entityResource.getPath(id, entityType).then(function (path) {
navigationService.changeSection(section);
navigationService.showTree(section, {
tree: section, path: path, forceReload: false, activate: true
});
var routePath = section + "/" + section + "/edit/" + id.toString();
$location.path(routePath).search("");
});
}
$scope.add = function (item) {
var currIds = _.map($scope.renderModel, function (i) {
@@ -150,7 +173,7 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
if (currIds.indexOf(item.id) < 0) {
item.icon = iconHelper.convertFromLegacyIcon(item.icon);
$scope.renderModel.push({ name: item.name, id: item.id, icon: item.icon });
$scope.renderModel.push({ name: item.name, id: item.id, icon: item.icon, path: item.path });
}
};
@@ -182,7 +205,7 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
if (entity) {
entity.icon = iconHelper.convertFromLegacyIcon(entity.icon);
$scope.renderModel.push({ name: entity.name, id: entity.id, icon: entity.icon });
$scope.renderModel.push({ name: entity.name, id: entity.id, icon: entity.icon, path: entity.path });
}
@@ -5,19 +5,18 @@
<ul class="unstyled list-icons"
ui-sortable
ng-model="renderModel">
<li ng-repeat="node in renderModel">
<li ng-repeat="node in renderModel" ng-attr-title="{{model.config.showPathOnHover && 'Path: ' + node.path || undefined}}">
<i class="icon icon-navigation handle"></i>
<a href="#" prevent-default ng-click="remove($index)">
<i class="icon icon-delete red hover-show"></i>
<i class="{{node.icon}} hover-hide"></i>
{{node.name}}
</a>
<div ng-if="!dialogEditor && model.config.showEditButton">
<small><a href umb-launch-mini-editor="node"><localize key="edit">Edit</localize></a></small>
</div>
</a>
<div ng-if="!dialogEditor && ((model.config.showOpenButton && allowOpenButton) || (model.config.showEditButton && allowEditButton))">
<small ng-if="model.config.showOpenButton && allowOpenButton"><a href ng-click="showNode($index)"><localize key="open">Open</localize></a></small>
<small ng-if="model.config.showEditButton && allowEditButton"><a href umb-launch-mini-editor="node"><localize key="edit">Edit</localize></a></small>
</div>
</li>
</ul>
@@ -37,11 +36,10 @@
<div class="help-inline" val-msg-for="minCount" val-toggle-msg="minCount">
You need to add at least {{model.config.minNumber}} items
</div>
<div class="help-inline" val-msg-for="maxCount" val-toggle-msg="maxCount">
You can only have {{model.config.maxNumber}} items selected
</div>
</ng-form>
</div>
@@ -243,11 +243,23 @@ function listViewController($rootScope, $scope, $routeParams, $injector, notific
$scope.reloadView($scope.contentId);
}
});
}, 200));
}, 1000));
$scope.enterSearch = function($event) {
$scope.filterResults = function (ev) {
//13: enter
switch (ev.keyCode) {
case 13:
$scope.options.pageNumber = 1;
$scope.actionInProgress = true;
$scope.reloadView($scope.contentId);
break;
}
};
$scope.enterSearch = function ($event) {
$($event.target).next().focus();
}
};
$scope.selectAll = function($event) {
var checkbox = $event.target;
@@ -47,7 +47,7 @@
<form class="form-search pull-right" novalidate ng-show="!actionInProgress">
<div class="inner-addon left-addon">
<i class="icon icon-search" ng-click="enterSearch($event)"></i>
<input type="text" class="form-control" localize="placeholder" placeholder="@general_typeToSearch" ng-model="options.filter" prevent-enter-submit no-dirty-check>
<input type="text" class="form-control" localize="placeholder" placeholder="@general_typeToSearch" ng-model="options.filter" ng-keydown="filterResults($event)" prevent-enter-submit no-dirty-check>
</div>
</form>
</div>
@@ -1,7 +1,7 @@
//this controller simply tells the dialogs service to open a mediaPicker window
//with a specified callback, this callback will receive an object with a selection on it
angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerController",
function ($rootScope, $scope, dialogService, entityResource, mediaResource, mediaHelper, $timeout, userService) {
function ($rootScope, $scope, dialogService, entityResource, mediaResource, mediaHelper, $timeout, userService, angularHelper) {
//check the pre-values for multi-picker
var multiPicker = $scope.model.config.multiPicker && $scope.model.config.multiPicker !== '0' ? true : false;
@@ -54,6 +54,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
$scope.remove = function(index) {
$scope.images.splice(index, 1);
$scope.ids.splice(index, 1);
angularHelper.getCurrentForm($scope).$setDirty();
$scope.sync();
};
@@ -76,6 +77,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
$scope.images.push(media);
$scope.ids.push(media.id);
angularHelper.getCurrentForm($scope).$setDirty();
});
$scope.sync();
@@ -1,6 +1,6 @@
//this controller simply tells the dialogs service to open a memberPicker window
//with a specified callback, this callback will receive an object with a selection on it
function memberPickerController($scope, dialogService, entityResource, $log, iconHelper){
function memberPickerController($scope, dialogService, entityResource, $log, iconHelper, angularHelper){
function trim(str, chr) {
var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^' + chr + '+|' + chr + '+$', 'g');
@@ -27,6 +27,7 @@ function memberPickerController($scope, dialogService, entityResource, $log, ico
$scope.clear();
$scope.add(data);
}
angularHelper.getCurrentForm($scope).$setDirty();
}
};
@@ -64,8 +64,7 @@ angular.module("umbraco")
//queue rules loading
angular.forEach(editorConfig.stylesheets, function (val, key) {
stylesheets.push("../css/" + val + ".css?" + new Date().getTime());
stylesheets.push(Umbraco.Sys.ServerVariables.umbracoSettings.cssPath + "/" + val + ".css?" + new Date().getTime());
await.push(stylesheetResource.getRulesByName(val).then(function (rules) {
angular.forEach(rules, function (rule) {
var r = {};
+3 -2
View File
@@ -190,7 +190,7 @@
</Reference>
<Reference Include="MySql.Data">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\MySql.Data.6.9.7\lib\net45\MySql.Data.dll</HintPath>
<HintPath>..\packages\MySql.Data.6.9.8\lib\net45\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -1856,6 +1856,7 @@
<Content Include="Umbraco\Images\Editor\newdocument.gif" />
<Content Include="Umbraco\Images\Editor\opacity.png" />
<Content Include="Umbraco\Images\Editor\outdent.gif" />
<Content Include="Umbraco\Images\Editor\renderbody.gif" />
<Content Include="Umbraco\Images\Editor\removeformat.gif" />
<Content Include="Umbraco\Images\Editor\separator.gif" />
<Content Include="Umbraco\Images\Editor\showStyles.png" />
@@ -2413,7 +2414,7 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>7310</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:7310</IISUrl>
<IISUrl>http://localhost:7320</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -75,13 +75,16 @@ else
@if (registerModel.MemberProperties != null)
{
@*
It will only displays properties marked as "Member can edit" on the "Info" tab of the Member Type.
*@
for (var i = 0; i < registerModel.MemberProperties.Count; i++)
{
@Html.LabelFor(m => registerModel.MemberProperties[i].Value, registerModel.MemberProperties[i].Name)
@*
By default this will render a textbox but if you want to change the editor template for this property you can
@*
By default this will render a textbox but if you want to change the editor template for this property you can
easily change it. For example, if you wanted to render a custom editor for this field called "MyEditor" you would
create a file at ~/Views/Shared/EditorTemplates/MyEditor.cshtml", then you will change the next line of code to
create a file at ~/Views/Shared/EditorTemplates/MyEditor.cshtml", then you will change the next line of code to
render your specific editor template like:
@Html.EditorFor(m => profileModel.MemberProperties[i].Value, "MyEditor")
*@
@@ -1,17 +0,0 @@
LazyLoad.js( [
'lib/jquery/jquery.min.js',
/* 1.1.5 */
'lib/angular/1.1.5/angular.min.js',
'lib/angular/1.1.5/angular-cookies.min.js',
'lib/angular/1.1.5/angular-mobile.min.js',
'lib/angular/1.1.5/angular-mocks.js',
'lib/angular/1.1.5/angular-sanitize.min.js',
'lib/underscore/underscore-min.js',
'js/umbraco.installer.js',
'js/umbraco.directives.js'
], function () {
jQuery(document).ready(function () {
angular.bootstrap(document, ['ngSanitize', 'umbraco.install', 'umbraco.directives.validation']);
});
}
);
@@ -72,12 +72,7 @@
views/dashboard/default/startupdashboardintro.html
</control>
</tab>
<tab caption="Change Password">
<control showOnce="false" addPanel="false" panelCaption="">
views/dashboard/ChangePassword.html
</control>
</tab>
</tab>
</section>
<section alias="StartupMemberDashboardSection">
+2 -7
View File
@@ -75,11 +75,6 @@
views/dashboard/default/startupdashboardintro.html
</control>
</tab>
<tab caption="Change Password">
<control showOnce="false" addPanel="false" panelCaption="">
views/dashboard/ChangePassword.html
</control>
</tab>
</section>
<section alias="StartupMemberDashboardSection">
<areas>
@@ -96,7 +91,7 @@
<area>contour</area>
</areas>
<tab caption="Dashboard">
<control>/umbraco/plugins/umbracocontour/formsdashboard.ascx</control>
<control>plugins/umbracocontour/formsdashboard.ascx</control>
</tab>
</section>
</dashBoard>
</dashBoard>
@@ -213,6 +213,7 @@
<plugin loadOnFrontend="true">charmap</plugin>
<plugin loadOnFrontend="true">table</plugin>
<plugin loadOnFrontend="true">lists</plugin>
<plugin loadOnFrontend="true">hr</plugin>
</plugins>
<validElements>
<![CDATA[+a[id|style|rel|data-id|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|
@@ -213,6 +213,7 @@
<plugin loadOnFrontend="true">charmap</plugin>
<plugin loadOnFrontend="true">table</plugin>
<plugin loadOnFrontend="true">lists</plugin>
<plugin loadOnFrontend="true">hr</plugin>
</plugins>
<validElements>
<![CDATA[+a[id|style|rel|data-id|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|
+1 -1
View File
@@ -27,7 +27,7 @@
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
<package id="MySql.Data" version="6.9.7" targetFramework="net45" />
<package id="MySql.Data" version="6.9.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
@@ -45,7 +45,20 @@
<p ng-bind-html-unsafe="installer.fact"></p>
</div>
<h3 ng-cloak ng-animate="'fade'" id="feedback" ng-show="installer.feedback">{{installer.feedback}}</h3>
<h3 ng-cloak ng-animate="'fade'" id="feedback" ng-show="installer.feedback">{{installer.feedback}}</h3>
<div id="missinglazyload" style="display: none;">
<h3>There has been a problem with the build.</h3>
<p>This might be because you could be offline or on a slow connection. Please try the following steps</p>
<ol>
<li>Make sure you have <a href="https://nodejs.org" target="_blank">Node.js</a> installed.</li>
<li>Open command prompt and cd to \src\Umbraco.Web.UI.Client.</li>
<li>Check to see if \src\Umbraco.Web.UI.Client\node_modules folder exists (this could be hidden); if so delete it.</li>
<li>Run npm install; if successfull the node_modules folder should be created in the Umbraco.Web.UI.Client directory.</li>
<li>Run build\Build.bat.</li>
</ol>
</div>
<script type="text/javascript">
var Umbraco = {};
Umbraco.Sys = {};
@@ -52,6 +52,7 @@
</head>
<noscript><h5><strong>&nbsp; JavaScript is disabled. Please enable to continue!</strong></h5></noscript>
<body ng-class="{touch:touchDevice,emptySection:emptySection}" ng-controller="Umbraco.MainController" id="umbracoMainPageBody">
<div ng-hide="!authenticated" ng-cloak id="mainwrapper" id="mainwrapper" class="clearfix" ng-click="closeDialogs($event)">
@@ -923,6 +923,7 @@ Mange hilsner fra Umbraco robotten
<key alias="userTypes">Brugertyper</key>
<key alias="writer">Forfatter</key>
<key alias="translator">Oversætter</key>
<key alias="change">Skift</key>
<key alias="yourProfile">Din profil</key>
<key alias="yourHistory">Din historik</key>
<key alias="sessionExpires">Session udløber</key>
@@ -1057,6 +1057,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="userTypes">User types</key>
<key alias="writer">Writer</key>
<key alias="translator">Translator</key>
<key alias="change">Change</key>
<key alias="yourProfile" version="7.0">Your profile</key>
<key alias="yourHistory" version="7.0">Your recent history</key>
<key alias="sessionExpires" version="7.0">Session expires in</key>
@@ -1055,6 +1055,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="userTypes">User types</key>
<key alias="writer">Writer</key>
<key alias="translator">Translator</key>
<key alias="change">Change</key>
<key alias="yourProfile" version="7.0">Your profile</key>
<key alias="yourHistory" version="7.0">Your recent history</key>
<key alias="sessionExpires" version="7.0">Session expires in</key>
@@ -985,6 +985,7 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de
<key alias="usertype">Gebruikerstype</key>
<key alias="userTypes">Gebruikerstypes</key>
<key alias="writer">Auteur</key>
<key alias="change">Wijzig</key>
<key alias="yourProfile" version="7.0">Je profiel</key>
<key alias="yourHistory" version="7.0">Je recente historie</key>
@@ -28,8 +28,8 @@
table.relations td.DataType {}
/* direction icons */
table.relations td.parentToChild { background-image: url('/umbraco/developer/RelationTypes/Images/ParentToChild.png'); }
table.relations td.bidirectional { background-image: url('/umbraco/developer/RelationTypes/Images/Bidirectional.png'); }
table.relations td.parentToChild { background-image: url('../../developer/RelationTypes/Images/ParentToChild.png'); }
table.relations td.bidirectional { background-image: url('../../developer/RelationTypes/Images/Bidirectional.png'); }
</style>
<script type="text/javascript">
@@ -144,4 +144,4 @@
</umb:Pane>
</asp:Content>
</asp:Content>

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