Compare commits

...

143 Commits

Author SHA1 Message Date
Daniel Stolt
1b216bccdf Added input file type validation to Gulp pipelines. 2015-07-26 00:52:28 +01:00
Daniel Stolt
c9c39b7e6a Changed Orchard.Layouts to use new Gulp pipeline. 2015-07-26 00:37:01 +01:00
Daniel Stolt
b85ad00791 Changed Orchard.Azure.MediaServices to use new Gulp pipeline. 2015-07-26 00:13:52 +01:00
Daniel Stolt
05e3fdea3b Incremental work on Gulp centralization. 2015-07-25 22:02:14 +01:00
Sipke Schoorstra
ea91185816 Falling back to a default base URL in case none is configured.
This fixes an issue where you run Setup from a command line and the recipe does not set BaseUrl on site settings.
The issue is that if the HttpContext does not have a URL, certain properties on the Request object will throw when constructing a URI with a null value.
2015-07-24 10:34:37 +01:00
Sébastien Ros
c0ebbd4ce7 Merge pull request #5548 from minglei84/1.9.x
Fixed [Default Value] And [DropForeignKeyCommand] For Mysql
2015-07-23 12:35:15 -07:00
Nicholas Mayne
818b35a370 Merge pull request #5551 from Codinlab/issue/5519
Fixes #5519 : DynamicForms client validation
2015-07-23 17:22:12 +01:00
Sipke Schoorstra
34947136d4 Fixed and updated scripts and gulp in Dynamic Forms and Layouts. 2015-07-23 11:42:16 +01:00
Sebastien Ros
894d932210 Reverting changes on Orchard.proj for Kudu
Fixes #5557
2015-07-22 14:50:14 -07:00
Sebastien Ros
8032d202e3 Compiling the solution for CI tests 2015-07-22 14:36:57 -07:00
Sebastien Ros
046c62e710 Diagnosing CI failures (wip) 2015-07-22 14:19:28 -07:00
Sebastien Ros
9001972d8b Fixing functional tests execution
On .NET 4.6
2015-07-22 13:03:58 -07:00
Sebastien Ros
0fc8f5accf Updating Redis driver 2015-07-21 18:08:10 -07:00
Lombiq
2a34cb582b Reverting that form validation services of Dynamic Forms were moved to a separate feature (should be only on dev) 2015-07-21 23:42:58 +02:00
Daniel Stolt
7411013b45 Fixed a localization unit test that was failing on some cultures. 2015-07-21 22:11:54 +01:00
Thierry Fleury
0e7f864d4d Fixes #5519 : DynamicForms client validation 2015-07-21 12:17:58 +02:00
Murray Hou
14cdf57bc5 Fixed DropForeignKeyCommand For Mysql 2015-07-21 15:48:54 +08:00
Murray Hou
41e9fda2de Fixed [default value] For Mysql
The [default value] can'nt use [modify column] in mysql.
2015-07-21 15:38:21 +08:00
Sebastien Ros
e6211dbf54 Merge branch '1.9.x' of https://github.com/OrchardCMS/Orchard into 1.9.x 2015-07-20 14:31:33 -07:00
Sebastien Ros
1664aa1bde Fixing Setup due to missing dynamic forms feature 2015-07-20 14:30:57 -07:00
Sebastien Ros
1b54e3e8fb Restoring build log level 2015-07-20 14:29:56 -07:00
Sipke Schoorstra
5d09053d30 Fixed an issue when changing the homepage.
This fixes an issue where the previous published homepage would not have its regenerated alias stored.
2015-07-20 20:56:37 +01:00
Sipke Schoorstra
1494aec836 Removed mixed tabs and spaces. 2015-07-20 20:10:58 +01:00
Sébastien Ros
e964d80f7e Merge pull request #5537 from jtkech/patch-1
#5512: Incorrect message of DynamicForms StringLength rule if only Maximum is specified
2015-07-19 09:58:24 -07:00
Nicholas Mayne
1e62b2b9f8 Merge pull request #5526 from yw80/1.9.x
Correct code indentation format for file IndexingTaskExecutor.cs
2015-07-19 17:53:25 +01:00
Nicholas Mayne
1732c333c2 Merge pull request #5540 from jchenga/issues/5539
[Fixes #5530] YSOD instead of the set up page in Azure.
2015-07-19 17:51:45 +01:00
Jack Cheng
a01d219607 [Fixes #5530] YSOD instead of the set up page in Azure. 2015-07-19 09:23:18 -07:00
Lombiq
36910e8659 Adding missing OrchardFeature attributes to Dynamic Forms validation services 2015-07-18 14:35:43 +02:00
jtkech
230314d7a1 Update StringLength.cs 2015-07-18 02:26:14 +02:00
Sebastien Ros
7282df4326 Adding support for Kudu deployment 2015-07-17 16:27:59 -07:00
Lombiq
81034f43d2 Fixing another potential NRE when saving a content item with LocalizationPart for the first time 2015-07-17 18:56:06 +02:00
Sipke Schoorstra
ddaf49db4a #5530: Fixed a spelling mistake in Layouts.
Fixes #5530
2015-07-17 09:46:53 +01:00
Daniel Stolt
3d3d6205b6 #5516: Changed DefaultDateLocalizationServices.ConvertFromLocalizedDateString() to return DateTimeKind.Utc and added unit test to verify.
Fixes #5516
2015-07-16 22:00:20 +01:00
yw80
e72d226263 Delete redundant text in file ShapeTracingTemplates.cshtml 2015-07-17 03:17:59 +08:00
yw80
4da838a3c3 Correct code indentation format for file IndexingTaskExecutor.cs
Incorrect indentation format causes code reading difficulties.
2015-07-17 03:03:53 +08:00
Sébastien Ros
d63119b1e6 Merge pull request #5433 from jersiovic/patch-3
Issue #5432 Differentiator is ignored processing placement
2015-07-16 12:02:46 -07:00
Nicholas Mayne
6bc98bede6 Merge pull request #5498 from yw80/1.9.x
Delete the CamelFriendly function call to DisplayName.
2015-07-16 15:23:00 +01:00
Lombiq
99e05c8a09 Fixing exception in Layouts when a driver was inherited from a custom base driver, fixes #5509 2015-07-16 12:11:38 +02:00
Sergio Navarro
3e1087ff58 Update ShapePlacementParsingStrategy.cs 2015-07-14 20:51:29 +02:00
Sergio Navarro
43315c349f Update ShapePlacementParsingStrategy.cs 2015-07-14 20:49:39 +02:00
Lombiq
e74b6ad6f8 Fixing potential NRE in LocalizationPartHandler by adding a nullcheck in LocalizationPartDriver 2015-07-12 19:35:52 +02:00
Daniel Stolt
6fe3cf8538 Deleted unused element from layout editor. 2015-07-11 17:03:45 +01:00
Daniel Stolt
db6c25aba2 Added keyboard shortcut reference to layout editor. 2015-07-11 16:58:49 +01:00
yw80
938fd5b827 Delete the CamelFriendly function call to DisplayName.
The CamelFriendly function is designed for Technical Name. The
DisplayName needs to be displayed as it is.
2015-07-10 12:00:27 +08:00
Sébastien Ros
b100634587 Merge pull request #5486 from jersiovic/patch-4
Issue #5141 Retrieve/Store methods from InfoSet doesn't support char type
2015-07-09 13:00:10 -07:00
Sébastien Ros
a071f21f4e Merge pull request #5485 from jersiovic/patch-1
Issue #5061 GetImageProfileUrl reprocess images obtained through a dynamic profile on every restart 1.9.x pull request
2015-07-09 12:57:48 -07:00
Sébastien Ros
eed1a9a063 Merge pull request #5479 from dcinzona/patch-3
Fixes #5398 - ShellDescriptorCache in HostComponents
2015-07-09 12:57:20 -07:00
Sébastien Ros
0faaa22546 Merge pull request #5465 from qt1/IBN-Labs/Support-Guid-in--CreateColumn
Support CreateColumn<Guid>()
2015-07-09 12:32:29 -07:00
Sébastien Ros
0f6fa5844b Merge pull request #5442 from yw80/1.9.x
Fixed the items count in media library when modify the item size in css
2015-07-09 12:18:09 -07:00
Sipke Schoorstra
784e1c0961 Added web.config with redirect bindings. 2015-07-09 13:44:02 +01:00
Sipke Schoorstra
9a2eaf7ac9 #5489: Handling potential null value for MediaLibraryPickerField.MediaParts.
This happens when a content type has both a MediaLibraryPickerField and the LayoutPart attached.
The layout editor renders the field, whose shape template accesses the MediaParts property, which is not initialized for new content items.

Fixes #5489
2015-07-08 22:45:52 +01:00
Sergio Navarro
d805c7773d Fixed #5141 Retrieve & Store doesn't support char 2015-07-07 19:42:06 +02:00
Gustavo Tandeciarz
18c5b5dfff Fixes #5398 - ShellDescriptorCache in HostComponents
Added Orchard.Environment.Descriptor.ShellDescriptorCache setting back to HostComponents.config. For some reason, this was removed at some point but I believe it needs to be there for Azure Web Apps deployments (when running with a shared file system and multiple instances)

Original commit by @sebastienros
a2d91796d1
2015-07-06 10:14:10 -04:00
Lombiq
89c5b2f7de Fixing that Audit Trail summary item edit link was double-encoded 2015-07-06 01:15:12 +02:00
Sipke Schoorstra
6bce34f379 #5260: Fixed the issue where form validation result gets output cached.
Fixes #5260
2015-07-04 13:01:17 +02:00
Sipke Schoorstra
c8f2c27311 Fixed form redirect issue.
This fixes the issue where you would not stay on the same page after a model validation occurred.
2015-07-04 12:45:17 +02:00
Sipke Schoorstra
22fa33c06f #5279: Fixed "potentially dangerous request" error.
Fixes #5279
2015-07-04 12:25:23 +02:00
Sipke Schoorstra
2508f503b7 #5298: Suppressed input validation on SMPT test form.
This fixes the issue when you try and use address formats such as "User <user@domain.com>" and adds support for sending HTML as part of the message body.

Fixes #5298
2015-07-04 09:51:05 +02:00
Sipke Schoorstra
1093e16a81 #5452: Improved ContentItem and Projection elements by rendering an abstract representation instead.
Fixes #5452
2015-07-04 09:36:31 +02:00
Sipke Schoorstra
1fe436e05a Fixed incorrect method error. 2015-07-04 09:32:51 +02:00
Sipke Schoorstra
b18f153e6a #5445: Fixed form field binding issues.
This fixes two issues:
1. Adding a Form element (and selecting the content type to create using the submitted values) and then adding a form element would not cause the Bindings tab to appear.
2. Adding nested containers (such as Grid, Row and Column) to a Form element would prevent the Bindings tab from appearing when adding a form field element such as TextField to a nested container.

Work Item: #5445
2015-07-04 00:37:14 +02:00
Sipke Schoorstra
b05dcf9a56 Fixed default layout data for Form. 2015-07-02 15:40:54 +03:00
Sipke Schoorstra
3c7fffc320 Fixed that default layout data would not be applied.
This fixes the issue where the default layout data string would not be applied when creating new content items of a content type with the LayoutPart attached.
For example, creating new Form content items would start out with an empty canvas instead of with a default Form element and a submit button.
2015-07-02 15:34:08 +03:00
Sipke Schoorstra
b580995e4b Added "TypeName" to element data serialization black list.
Having the "TypeName" as part of the element's data field is redundant.
2015-07-02 15:30:20 +03:00
Sipke Schoorstra
2873eb8991 #5337: Fixed homepage becoming lost after publishing layout template being used by the homepage.
Work Item: 5337
2015-07-02 13:37:20 +03:00
Sipke Schoorstra
eebe29fec3 #5467: Fixes the issue where the "Set as homepage" setting is not retained when saving,
The issue was that when you save a content item (without publishing it) while checking the "Set as homepage" checkbox, it would lose its checked status after save.
With this change, the checkbox is again rendered but in a checked status, so that when you do publish, it will become the homepage.

Fixes #5467
2015-07-02 13:01:49 +03:00
qt1
7bbad86eb4 Support CreateColumn<Guid>() 2015-07-01 21:53:05 +03:00
Sébastien Ros
dbba4e2787 Merge pull request #5458 from dcinzona/patch-1
Update web.config MVC bindings for Azure Cloud Service
2015-07-01 07:46:39 -07:00
Sébastien Ros
27365a71d9 Merge pull request #5460 from dcinzona/patch-3
Web.Config: Orchard Layouts Updating MVC reference to 5.2.3
2015-07-01 07:46:20 -07:00
Sébastien Ros
6a5028b80a Merge pull request #5461 from dcinzona/patch-4
Web.config - Dynamic Forms: MVC reference updated to 5.2.3
2015-07-01 07:46:00 -07:00
Gustavo Tandeciarz
e021218b3c Updated bindings in azure cloud service web.config
Updated bindings for system.web.http and system.net.http.formatting to 5.2.3
2015-06-30 19:48:05 -04:00
Gustavo Tandeciarz
993e6a1e43 Web.config: MVC reference updated to 5.2.3
Was still referencing 5.1.0.0
2015-06-30 17:54:18 -04:00
Gustavo Tandeciarz
0318db4c53 Web.Config: Updating MVC reference to 5.2.3
web.config was still referencing 5.1.0.0
2015-06-30 17:53:13 -04:00
Sebastien Ros
03a193b6c2 Fixing compilation 2015-06-30 14:38:12 -07:00
Gustavo Tandeciarz
38705580c8 Update web.config MVC bindings
Updated from 5.2.0.0 to 5.2.3
2015-06-30 14:48:02 -04:00
Sebastien Ros
6b0985a44e Merge branch 'master' into 1.9.x 2015-06-30 11:31:35 -07:00
Sebastien Ros
2c3973bfa0 Merge branch '1.9.1' 2015-06-30 11:30:37 -07:00
Jasmin Savard
28168c0550 Fixes #5457; Admin Culture Picker cookie not working on localhost 2015-06-30 13:09:19 -04:00
Sipke Schoorstra
c3dffb79f5 #5378: Fixed content field elements placement for content picker field and media picker field. 2015-06-29 14:27:23 +03:00
Sipke Schoorstra
5b40567b6d #5407: Layout elements now evaluate tokens. 2015-06-29 14:01:58 +03:00
Sergio Navarro
0f48019321 Fixed bug addes on pull request 2015-06-28 01:11:06 +02:00
Sipke Schoorstra
583ff8951a Removed unused namespaces. 2015-06-27 19:49:23 +03:00
Sipke Schoorstra
5c688267fa #5420: Added stub CSS files for various activities to prevent 404 errors. 2015-06-27 18:47:06 +03:00
Sipke Schoorstra
2c496a36db #5437: Maintaining selected values after model validation error. 2015-06-27 18:31:08 +03:00
yw80
51a364a184 Fix the items count in media library when modify the item size in css
Item shape is square in the media library. If the item size in
orchard-medialibrary-admin.css modified for different width and height,
the count of items will be wrong.
2015-06-27 17:43:51 +08:00
Nicholas Mayne
c435a98670 Merge pull request #5435 from yw80/1.9.x
Remove a excess @ in TaxonomyField.cshtml
2015-06-26 09:07:23 +01:00
yw80
42dae3edf3 Remove a excess @ in TaxonomyField.cshtml
I think this is just an oversight.
2015-06-26 14:21:07 +08:00
Sergio Navarro
24ee246a34 Differentiator is ignored processing placement
In placement files shapeType uses "__" intead of '-' char for declaring a differenciator. The point is second one is used only in template files as can be seen in documentation http://docs.orchardproject.net/Documentation/Accessing-and-rendering-shapes#NamingShapesandTemplates
However GetShapeType looks for '-' character ignoring placements for a ShapeType with a differentiator. This produces strange behaviors and a lot of headaches to users because when they set for example: <Place Fields_Common_Text__SeoTitle="/Header:0"/>  in a placement file it forces all Fields_Common_Text shapes within the same Match to be rendered at Header:0 area instead of only affecting those with the SeoTitle differentiator.
2015-06-26 02:34:08 +02:00
Sergio Navarro
9966e13fa3 Removed FilterContext and extra read 2015-06-25 22:50:34 +02:00
Sébastien Ros
f3fc2b53ba Merge pull request #5429 from dalenewman/patch-2
Fix moderator notification
2015-06-25 13:20:16 -07:00
Sébastien Ros
1a9b7af4ac Merge pull request #5430 from jchenga/issues/5148-1.9.x
[Fixes #5418] Lost Password not working with Anonymous Access Off
2015-06-25 13:15:32 -07:00
Jack Cheng
0c7fd67dca [Fixes #5418] Lost Password not working with Anonymous Access Off 2015-06-25 12:57:09 -07:00
Dale Newman
6063ba31d0 Fix moderator notification
`Orchard.Email.Services.SmtpMessageChannel.Process` expects a string for Recipients, not a string array. This results in an *Object reference not set to an instance of an object* exception and the moderator(s) do not get notified. Fixes #4928.
2015-06-25 15:45:50 -04:00
Sébastien Ros
7bf2c702a1 Merge pull request #5427 from jersiovic/patch-2
#5426 Projections don't order queries following Position field
2015-06-25 12:41:42 -07:00
Sébastien Ros
61d432ba4c Merge pull request #5413 from dcinzona/patch-2
Assembly binding to azure storage 4.3.0
2015-06-25 12:23:20 -07:00
Sébastien Ros
7cdb9ecf53 Merge pull request #5404 from MpDzik/pr/localize-quote
Fix handling localized strings with quotes
2015-06-25 12:22:52 -07:00
Sergio Navarro
ae61c81575 #5426 Projections don't order queries following Position field
Projections don't order queries following the Position field of each order in the query

Related issue https://github.com/OrchardCMS/Orchard/issues/5426
2015-06-25 20:26:15 +02:00
Lombiq
e10ba8126a Fixing that ClientHostAddressAccessor failed in a background task
This was the case e.g. when roles were modified in a background task with Audit Trail trying to record the event
2015-06-25 00:35:21 +02:00
Lombiq
a7626b78f5 Fixing that instead of just widgets all content items were retrieved in some WidgetsService methods 2015-06-24 16:04:11 +02:00
Sergio Navarro
29042d10f2 Update ImageProfileManager.cs
Image cache is empty after every reboot of the Orchard app. It makey Dynamic ImageProfiles reprocess images after every reboot. It has a big impact on performance because all the images that use dynamic profiles are reprocessed when they are requested after a reboot. When you open a page with a number of images disks usage increases drammatically and the apps answer very slow to other requests

This is related with this issue https://github.com/OrchardCMS/Orchard/issues/5061
2015-06-23 23:05:17 +02:00
Sebastien Ros
760e30855c Updating version number 1.9.1 2015-06-23 11:20:06 -07:00
Marek Dzikiewicz
6636527006 Add unit tests for #4154 and #5402 2015-06-23 11:44:46 +02:00
Marek Dzikiewicz
aacf0b2476 Introduce ILocalizationStreamParser
This moves the logic of parsing PO files from
DefaultLocalizedStringManager to a separate service, so that parsing
can be tested independently from resolving translations from loaded PO
files.
2015-06-23 11:44:29 +02:00
Gustavo Tandeciarz
88ac0d2879 Assembly binding to azure storage 4.3.0
Retargeting to 1.9.x - updated assembly binding from 3.1.0 to 4.3.0
2015-06-22 18:55:35 -04:00
Sébastien Ros
ac305af963 Merge pull request #5406 from MpDzik/pr/media-import-loc
MediaLibrary - Fix localization of Import button
2015-06-22 15:45:46 -07:00
Sebastien Ros
78fb58f016 Fixing localization gender 2015-06-22 10:10:58 -07:00
Sebastien Ros
8481768b58 Fixing culture list encoding 2015-06-22 10:06:34 -07:00
Marek Dzikiewicz
50d65bc0b9 MediaLibrary - Fix localization of Import button 2015-06-21 17:42:54 +02:00
agriffard
4eb8d1d2ea Fix some typos #5405 2015-06-21 15:44:04 +02:00
Marek Dzikiewicz
104cf7d5f4 Fix handling localized strings with quotes 2015-06-20 22:42:33 +02:00
Daniel Stolt
220c1b591a Restored reset of markup content styling in layout editor. 2015-06-20 20:38:42 +03:00
Daniel Stolt
b06a4ecb73 #5403 Improved native clipboard support in layout editor. 2015-06-20 19:35:11 +03:00
Daniel Stolt
764db254da Made layout editor toolbox separately scrollable while in sticky mode. 2015-06-20 16:42:53 +03:00
Bertrand Le Roy
c1359f7a86 Add a heading element that renders as h1-h6 tags. 2015-06-19 18:57:45 -07:00
Sebastien Ros
51409346cc Fixing mismatched assembly versions 2015-06-19 12:57:19 -07:00
Sebastien Ros
2cd5af5193 Reverting IMembership usage in FormsAuthenticationService 2015-06-19 10:54:46 -07:00
Sebastien Ros
1180425109 Updating libraries 2015-06-19 10:39:00 -07:00
Sébastien Ros
3c3a6df6dd Merge pull request #5391 from paynecrl97/5390/delay_output_cache_key_creation
Defers output cache key creation until we know we need it
2015-06-19 09:35:10 -07:00
paynecrl97
c6e96867c7 Only executes itemDescriptor logic if Debug logging is enabled 2015-06-19 09:17:29 +01:00
Sebastien Ros
8d134ba0c5 Fixing html-encoding in WebSearch settings page 2015-06-18 16:47:38 -07:00
Sebastien Ros
9d5bc20666 Fixing unit tests 2015-06-18 14:19:44 -07:00
Sébastien Ros
1fcf7c86d0 Merge pull request #5371 from gcsuk/1.9.x
Improved Recipe Journal Logging Detail
2015-06-18 12:39:05 -07:00
Sébastien Ros
bca643bf1f Merge pull request #5292 from Hazzamanic/1.9.x
fixing placementeditor try/catch block
2015-06-18 12:28:00 -07:00
Sebastien Ros
f276501923 Merge branch 'sebros/authcookie' into 1.9.x 2015-06-18 10:31:57 -07:00
Sebastien Ros
76408da930 #5315: Adding new settings to configure SSL cookies
- Creating ISslSettingsProvider to define whether cookies can only be sent over SSL or not
- Implementing DefaultSslSettingsProvider based on Sites.config and web.config
making it configurable per tenant or for the whole site
- Implementing SecureSocketsLayerSettingsProvider in Orchard.SecureSocketsLayerSettingsProvider

Fixes 5315
2015-06-17 18:06:47 -07:00
Skrypt
43497c8093 Closes #5389; Admin Culture Picker wrong cookie domain. 2015-06-17 20:02:04 -04:00
paynecrl97
f13c9d47c7 Adds more detail to itemDescriptor 2015-06-17 16:05:53 +01:00
paynecrl97
1a8b17d04e Defers output cache key creation until we know we need it 2015-06-17 14:02:05 +01:00
Sebastien Ros
20c5b494cd By default, html-encode translation parameters
Also ensure that any existing parameter is not double-encoded by
removing .Text when used as a translation parameter.
2015-06-16 16:50:45 -07:00
Sebastien Ros
cd49d2ccf2 Updating ruleset location for all projects 2015-06-16 16:22:04 -07:00
Sebastien Ros
aa2e2cf1d0 Ignoring VS 2015 settings files 2015-06-16 11:16:35 -07:00
Bertrand Le Roy
8eea9a6771 Add missing reference to media library from image editor web config so that views compile properly. 2015-06-15 12:42:50 -07:00
Lombiq
1d445c5438 Fixing that Custom Forms didn't display a submit button text if there was none configured
The button text not being configured can happen on an 1.8 to 1.9 upgrade for example.
2015-06-15 00:07:01 +02:00
Lombiq
6aabc4d9f9 Fixing that the Audit Trail Recycle Bin caused YSOD if a content item didn't have a display text (like Comments) 2015-06-14 23:18:25 +02:00
Bertrand Le Roy
14172fec51 Fix compilation issue on dynamic forms admin views that use namespaces from layouts. 2015-06-13 16:42:09 -07:00
Sipke Schoorstra
9e88d16273 Added missing null check to Projection element driver's export method. 2015-06-13 19:11:25 +03:00
Lombiq
66af4a8cdf Adding null check for query string parameters in AuditTrail to prevent possible YSOD 2015-06-13 01:02:16 +02:00
Rob King
92bde1ac71 Merge pull request #2 from gcsuk/ImprovedRecipeJournal
Replaced string.format with Localizable T
2015-06-10 12:24:32 +01:00
Rob King
7e149c4bc1 Replaced string.format with Localizable T 2015-06-10 10:07:04 +01:00
Rob King
d78afaeb51 Merge pull request #1 from gcsuk/ImprovedRecipeJournal
Improved Recipe Journal Logging Detail
2015-06-09 16:09:53 +01:00
Rob King
a0279f2d9c Improved recipe logging to give a trail of executed tasks 2015-06-09 15:59:44 +01:00
Hazza
98475f7aa0 fixing placementeditor try/catch block 2015-05-16 16:34:20 +01:00
Bertrand Le Roy
d1fa8d4daf Update Readme to reflect the most recent mission statement. 2015-05-06 10:43:45 -07:00
761 changed files with 17632 additions and 3122 deletions

3
.deployment Normal file
View File

@@ -0,0 +1,3 @@
[config]
command = deploy.cmd
SCM_COMMAND_IDLE_TIMEOUT = 3600

7
.gitignore vendored
View File

@@ -172,6 +172,7 @@ profiling/
src/Orchard.Web/Modules-temp/*
src/Backup/*
src/packages/*
src/node_modules
src/UpgradeLog.*
*.itrace.csdef
*.build.csdef
@@ -183,9 +184,7 @@ src/Orchard.Web/Orchard.Web.Publish.xml
src/TestResults/*
src/Orchard.Web/Properties/PublishProfiles
src/Orchard.Azure/Orchard.Azure.CloudService/Staging/
src/Orchard.Web/Modules/Orchard.Azure.MediaServices/node_modules
src/Orchard.Web/Modules/Orchard.Layouts/node_modules
src/Orchard.Web/Modules/Orchard.DynamicForms/node_modules
#enable all /lib artifacts
!lib/*/*.*
!lib/*/*.*
*/.vs/*

View File

@@ -5,19 +5,15 @@ Orchard is a free, open source, community-focused Content Management System buil
#### Please visit our website at http://orchardproject.net for the most current information about this project.
Orchard is a free, open source, community-focused project aimed at delivering applications and reusable components
on the ASP.NET platform. It will create shared components for building ASP.NET applications and extensions, and
specific applications that leverage these components to meet the needs of end-users, scripters, and developers.
Additionally, we seek to create partnerships with existing application authors to help them achieve their goals.
Orchard is delivered under the [.NET Foundation](http://www.dotnetfoundation.org/). It is licensed under a
[New BSD license](http://www.opensource.org/licenses/bsd-license.php), which is approved by the OSI. The intended
output of the Orchard project is three-fold:
Orchard is a free, open source, community-focused **Content Management System** built on the ASP.NET MVC platform.
* Individual .NET-based applications that appeal to end-users, scripters, and developers
* A set of re-usable components that makes it easy to build such applications
* A vibrant community to help define these applications and extensions
In the near term, the Orchard project is focused on delivering a .NET-based CMS application that will allow users
to rapidly create content-driven Websites, and an extensibility framework that will allow developers and customizers to provide additional functionality through modules and themes. You can learn more about the project on the [Orchard Project Website](http://www.orchardproject.net).
Orchard is built on a modern architecture that puts extensibility up-front, as its number one concern. All components in Orchard can be replaced or extended. Content is built from easily composable building blocks. Modules extend the system in a very decoupled fashion, where a commenting module for example can as easily apply to pages, blog posts, photos or products. A rich UI composition system completes the picture and ensures that you can get the exact presentation that you need for your content.
Orchard is delivered under the [.NET Foundation](http://www.dotnetfoundation.org/orchard). It is licensed under a [New BSD license](http://www.opensource.org/licenses/bsd-license.php), which is approved by the OSI.
Our mission is to empower our users and foster a dedicated and diverse community that builds the CMS that we all want to use.
There are many ways you can [contribute to Orchard](http://orchardproject.net/contribution): you can [fix bugs](https://github.com/OrchardCMS/Orchard/issues), contribute modules and themes to [our gallery](http://gallery.orchardproject.net/), [write documentation](https://github.com/OrchardCMS/OrchardDoc), [translate Orchard](http://orchardproject.net/localize), or answer questions [on our forums](http://orchard.codeplex.com/discussions) and [on Stack Overflow](http://stackoverflow.com/questions/tagged/orchardcms).
## Project Status
Orchard is currently in version 1.8.1. We invite participation by the developer community in shaping the projects direction, so that we can publicly validate our designs and development approach.

114
deploy.cmd Normal file
View File

@@ -0,0 +1,114 @@
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.11
:: ----------------------
:: Prerequisites
:: -------------
:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
goto error
)
:: Setup
:: -----
setlocal enabledelayedexpansion
SET ARTIFACTS=%~dp0%..\artifacts
IF NOT DEFINED DEPLOYMENT_SOURCE (
SET DEPLOYMENT_SOURCE=%~dp0%.
)
IF NOT DEFINED DEPLOYMENT_TARGET (
SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)
IF NOT DEFINED NEXT_MANIFEST_PATH (
SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest
IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
)
)
IF NOT DEFINED KUDU_SYNC_CMD (
:: Install kudu sync
echo Installing Kudu Sync
call npm install kudusync -g --silent
IF !ERRORLEVEL! NEQ 0 goto error
:: Locally just running "kuduSync" would also work
SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)
IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
mkdir "%DEPLOYMENT_TEMP%"
)
IF NOT DEFINED MSBUILD_PATH (
SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
echo Handling .NET Web Application deployment.
:: 1. Restore NuGet packages
IF /I "" NEQ "" (
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\"
IF !ERRORLEVEL! NEQ 0 goto error
)
:: 2. Build to the temporary path
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m
IF !ERRORLEVEL! NEQ 0 goto error
:: 3. KuduSync
call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%\build\Precompiled" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
IF !ERRORLEVEL! NEQ 0 goto error
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error
goto end
:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%
:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul
:exitSetErrorLevel
exit /b 1
:exitFromFunction
()
:end
endlocal
echo Finished successfully.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

165
src/Gulpfile.js Normal file
View File

@@ -0,0 +1,165 @@
var glob = require("glob"),
path = require("path-posix"),
merge = require("merge-stream"),
gulpif = require("gulp-if"),
gulp = require("gulp"),
newer = require("gulp-newer"),
plumber = require("gulp-plumber"),
sourcemaps = require("gulp-sourcemaps"),
less = require("gulp-less"),
autoprefixer = require("gulp-autoprefixer"),
minify = require("gulp-minify-css"),
typescript = require("gulp-typescript"),
uglify = require("gulp-uglify"),
rename = require("gulp-rename"),
concat = require("gulp-concat"),
header = require("gulp-header")
/*
** GULP TASKS
*/
// Incremental build (each asset group is built only if one or more inputs are newer than the output).
gulp.task("build", function () {
var assetGroupTasks = getAssetGroups().map(function (assetGroup) {
var doRebuild = false;
return createAssetGroupTask(assetGroup, doRebuild);
});
return merge(assetGroupTasks);
});
// Full rebuild (all assets groups are built regardless of timestamps).
gulp.task("rebuild", function () {
var assetGroupTasks = getAssetGroups().map(function (assetGroup) {
var doRebuild = true;
return createAssetGroupTask(assetGroup, doRebuild);
});
return merge(assetGroupTasks);
});
// Continuous watch (each asset group is built whenever one of its inputs changes).
gulp.task("watch", function () {
getAssetGroups().forEach(function (assetGroup) {
gulp.watch(assetGroup.inputPaths, function (event) {
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding output '" + assetGroup.outputPath + "'.");
var task = createAssetGroupTask(assetGroup);
});
});
});
/*
** ASSET GROUPS
*/
function getAssetGroups() {
var assetManifestPaths = glob.sync("Orchard.Web/{Core,Modules,Themes}/*/Assets.json");
var assetGroups = [];
assetManifestPaths.forEach(function (assetManifestPath) {
var assetManifest = require("./" + assetManifestPath);
assetManifest.forEach(function (assetGroup) {
resolveAssetGroupPaths(assetGroup, assetManifestPath);
assetGroups.push(assetGroup);
});
});
return assetGroups;
}
function resolveAssetGroupPaths(assetGroup, assetManifestPath) {
assetGroup.basePath = path.dirname(assetManifestPath);
assetGroup.inputPaths = assetGroup.inputs.map(function (inputPath) {
return path.join(assetGroup.basePath, inputPath);
});
assetGroup.outputPath = path.join(assetGroup.basePath, assetGroup.output);
assetGroup.outputDir = path.dirname(assetGroup.outputPath);
assetGroup.outputFileName = path.basename(assetGroup.output);
}
function createAssetGroupTask(assetGroup, doRebuild) {
var outputExt = path.extname(assetGroup.output).toLowerCase();
switch (outputExt) {
case ".css":
return buildCssPipeline(assetGroup, doRebuild);
case ".js":
return buildJsPipeline(assetGroup, doRebuild);
}
}
/*
** PROCESSING PIPELINES
*/
function buildCssPipeline(assetGroup, doRebuild) {
assetGroup.inputPaths.forEach(function (inputPath) {
var ext = path.extname(inputPath).toLowerCase();
if (ext !== ".less" && ext !== ".css")
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
});
var doConcat = path.basename(assetGroup.outputFileName, ".css") !== "@";
return gulp.src(assetGroup.inputPaths)
.pipe(gulpif(!doRebuild,
gulpif(doConcat,
newer(assetGroup.outputPath),
newer({
dest: assetGroup.outputDir,
ext: ".css"
}))))
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(gulpif("*.less", less()))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(autoprefixer({ browsers: ["last 2 versions"] }))
// TODO: Start using below whenever gulp-header supports sourcemaps.
//.pipe(header(
// "/*\n" +
// "** NOTE: This file is generated by Gulp compilation and should not be edited directly!\n" +
// "** Any changes made directly to this file will be overwritten next time the Gulp compilation runs.\n" +
// "** For more information, see the Readme.txt file in the Gulp solution folder.\n" +
// "*/\n\n"))
.pipe(sourcemaps.write())
.pipe(gulp.dest(assetGroup.outputDir))
.pipe(minify())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest(assetGroup.outputDir));
}
function buildJsPipeline(assetGroup, doRebuild) {
assetGroup.inputPaths.forEach(function (inputPath) {
var ext = path.extname(inputPath).toLowerCase();
if (ext !== ".ts" && ext !== ".js")
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
});
var doConcat = path.basename(assetGroup.outputFileName, ".js") !== "@";
return gulp.src(assetGroup.inputPaths)
.pipe(gulpif(!doRebuild,
gulpif(doConcat,
newer(assetGroup.outputPath),
newer({
dest: assetGroup.outputDir,
ext: ".js"
}))))
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(gulpif("*.ts", typescript({
declaration: false,
//noImplicitAny: true,
noEmitOnError: true,
sortOutput: true,
}).js))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
// TODO: Start using below whenever gulp-header supports sourcemaps.
//.pipe(header(
// "/*\n" +
// "** NOTE: This file is generated by Gulp compilation and should not be edited directly!\n" +
// "** Any changes made directly to this file will be overwritten next time the Gulp compilation runs.\n" +
// "** For more information, see the Readme.txt file in the Gulp solution folder.\n" +
// "*/\n\n"))
.pipe(sourcemaps.write())
.pipe(gulp.dest(assetGroup.outputDir))
.pipe(uglify())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest(assetGroup.outputDir));
}

View File

@@ -18,7 +18,7 @@
</appSettings>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Collections.Generic"/>
@@ -60,7 +60,7 @@
<add extension=".csproj" type="Orchard.Environment.Extensions.Compilers.CSharpExtensionBuildProviderShim"/>
</buildProviders>
<assemblies>
<add assembly="System.Web.Mvc, Version=5..0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
@@ -147,7 +147,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
@@ -171,11 +171,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>

View File

@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -93,13 +93,14 @@ namespace Orchard.Specs.Bindings {
_webHost = new WebHost(_orchardTemp);
Host.Initialize(siteFolder, virtualDirectory ?? "/", _dynamicCompilationOption);
var shuttle = new Shuttle();
Host.Execute(() => {
log4net.Config.BasicConfigurator.Configure(new CastleAppender());
HostingTraceListener.SetHook(msg => shuttle._sink.Receive(msg));
});
Host.Execute(() => Executor(shuttle));
_messages = shuttle._sink;
}
private static void Executor(Shuttle shuttle) {
HostingTraceListener.SetHook(msg => shuttle._sink.Receive(msg));
}
private class CastleAppender : IAppender {
public void Close() { }
public string Name { get; set; }

View File

@@ -7,7 +7,7 @@
<system.web>
<compilation targetFramework="4.5">
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
</assemblies>
</compilation>
<pages>

View File

@@ -10,11 +10,11 @@
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<controls>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>

View File

@@ -21,13 +21,13 @@
<appSettings>
<add key="webpages:Enabled" value="false" />
<add key="webpages:Version" value="3.0.0.0"/>
<add key="webpages:Version" value="3.0.0"/>
<add key="log4net.Config" value="Config\log4net.config" />
<add key="owin:AutomaticAppStartup" value="false" />
</appSettings>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
@@ -62,7 +62,7 @@
<add extension=".csproj" type="Orchard.Environment.Extensions.Compilers.CSharpExtensionBuildProviderShim"/>
</buildProviders>
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
@@ -150,63 +150,74 @@
<httpErrors existingResponse="PassThrough" />
</system.webServer>
<runtime>
<gcServer enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="App_Data/Dependencies"/>
<dependentAssembly>
<assemblyIdentity name="Iesi.Collections" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da"/>
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -68,7 +68,7 @@ namespace Orchard.Specs.Hosting {
TargetInstance = Activator.CreateInstance(classType);
foreach (FieldInfo field in classType.GetFields()) {
if (typeof (Delegate).IsAssignableFrom(field.FieldType))
if (typeof (TDelegate).IsAssignableFrom(field.FieldType))
//If the field is a delegate
field.SetValue(TargetInstance, ((SerializableDelegate<TDelegate>)info.GetValue(field.Name, typeof(SerializableDelegate<TDelegate>))).Delegate);
else if (!field.FieldType.IsSerializable)
@@ -86,8 +86,12 @@ namespace Orchard.Specs.Hosting {
foreach (FieldInfo field in targetType.GetFields()) {
//See corresponding comments above
if (typeof (Delegate).IsAssignableFrom(field.FieldType))
info.AddValue(field.Name, new SerializableDelegate<TDelegate>((TDelegate)field.GetValue(TargetInstance)));
if (typeof (TDelegate).IsAssignableFrom(field.FieldType)) {
var value = (TDelegate)field.GetValue(TargetInstance);
if (value != null) {
info.AddValue(field.Name, new SerializableDelegate<TDelegate>(value));
}
}
else if (!field.FieldType.IsSerializable)
info.AddValue(field.Name, new AnonymousClassWrapper(field.FieldType, field.GetValue(TargetInstance)));
else

View File

@@ -51,7 +51,7 @@
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
@@ -140,48 +140,81 @@
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
</system.webServer>
<runtime>
<gcServer enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="App_Data/Dependencies"/>
<dependentAssembly>
<assemblyIdentity name="Iesi.Collections" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da"/>
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -16,7 +16,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>

View File

@@ -50,7 +50,7 @@
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
</Reference>

View File

@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -29,6 +29,7 @@ using Orchard.Tests.Environment.Extensions;
using Orchard.Tests.Environment.Features;
using Orchard.Tests.Stubs;
using IPackageManager = Orchard.Packaging.Services.IPackageManager;
using Orchard.Tests.Modules.Recipes.Services;
namespace Orchard.Tests.Modules.Recipes.RecipeHandlers {
[TestFixture]
@@ -66,6 +67,7 @@ namespace Orchard.Tests.Modules.Recipes.RecipeHandlers {
builder.RegisterType<ShellStateManager>().As<IShellStateManager>().SingleInstance();
builder.RegisterType<StubEventBus>().As<IEventBus>().SingleInstance();
builder.RegisterType<ModuleRecipeHandler>();
builder.RegisterType<StubRecipeJournal>().As<IRecipeJournal>();
builder.RegisterSource(new EventsRegistrationSource());
}

View File

@@ -16,7 +16,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>

View File

@@ -1,16 +1,8 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Autofac;
using NUnit.Framework;
using Orchard.Localization.Models;
using Orchard.Localization.Services;
using Orchard.Services;
namespace Orchard.Tests.Localization {
@@ -217,6 +209,17 @@ namespace Orchard.Tests.Localization {
Assert.AreEqual(dateTimeLocal, result);
}
[Test]
[Description("DateTime which is DateTimeKind.Local is converted to DateTimeKind.Utc.")]
public void ConvertFromLocalizedDateStringTest01() {
var container = TestHelpers.InitializeContainer("en-US", "GregorianCalendar", TimeZoneInfo.Utc);
var target = container.Resolve<IDateLocalizationServices>();
var dateTimeLocal = new DateTime(1998, 1, 15);
var dateTimeLocalString = target.ConvertToLocalizedDateString(dateTimeLocal);
var result = target.ConvertFromLocalizedDateString(dateTimeLocalString);
Assert.AreEqual(DateTimeKind.Utc, result.Value.Kind);
}
[Test]
[Description("Converting to Gregorian calendar yields a DateTimeParts instance equivalent to the original DateTime.")]
public void ConvertToSiteCalendarTest01() {

View File

@@ -0,0 +1,43 @@
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Orchard.Localization.Services;
namespace Orchard.Tests.Localization {
[TestFixture]
public class LocalizationStreamParserTests {
[Test]
public void ShouldTrimLeadingQuotes() {
var parser = new LocalizationStreamParser();
var text = new StringBuilder();
text.AppendLine("#: ~/Themes/MyTheme/Views/MyView.cshtml");
text.AppendLine("msgctxt \"~/Themes/MyTheme/Views/MyView.cshtml\"");
text.AppendLine("msgid \"\\\"{0}\\\" Foo\"");
text.AppendLine("msgstr \"\\\"{0}\\\" Foo\"");
var translations = new Dictionary<string, string>();
parser.ParseLocalizationStream(text.ToString(), translations, false);
Assert.AreEqual("\"{0}\" Foo", translations["~/themes/mytheme/views/myview.cshtml|\"{0}\" foo"]);
}
[Test]
public void ShouldTrimTrailingQuotes() {
var parser = new LocalizationStreamParser();
var text = new StringBuilder();
text.AppendLine("#: ~/Themes/MyTheme/Views/MyView.cshtml");
text.AppendLine("msgctxt \"~/Themes/MyTheme/Views/MyView.cshtml\"");
text.AppendLine("msgid \"Foo \\\"{0}\\\"\"");
text.AppendLine("msgstr \"Foo \\\"{0}\\\"\"");
var translations = new Dictionary<string, string>();
parser.ParseLocalizationStream(text.ToString(), translations, false);
Assert.AreEqual("Foo \"{0}\"", translations["~/themes/mytheme/views/myview.cshtml|foo \"{0}\""]);
}
}
}

View File

@@ -0,0 +1,46 @@
using Autofac;
using Moq;
using NUnit.Framework;
using Orchard.Localization;
using Orchard.Localization.Services;
using Orchard.Mvc;
using Orchard.Tests.Stubs;
using System.Web;
namespace Orchard.Tests.Localization {
[TestFixture]
public class TextTests {
private IContainer _container;
private IText _text;
[SetUp]
public void Init() {
var mockLocalizedManager = new Mock<ILocalizedStringManager>();
mockLocalizedManager
.Setup(x => x.GetLocalizedString(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>()))
.Returns("foo {0}");
var builder = new ContainerBuilder();
builder.RegisterInstance(new StubCultureSelector("fr-CA")).As<ICultureSelector>();
builder.RegisterInstance(new StubWorkContext()).As<WorkContext>();
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
builder.RegisterInstance(mockLocalizedManager.Object);
builder.RegisterType<Orchard.Localization.Text>().As<IText>().WithParameter(new NamedParameter("scope", "scope"));
_container = builder.Build();
_text = _container.Resolve<IText>();
}
[Test]
public void TextHtmlEncodeAllArguments() {
Assert.That(_text.Get("foo {0}", "bar").Text, Is.EqualTo("foo bar"));
Assert.That(_text.Get("foo {0}", "<bar>").Text, Is.EqualTo("foo &lt;bar&gt;"));
}
[Test]
public void TextDoesEncodeHtmlEncodedArguments()
{
Assert.That(_text.Get("foo {0}", new HtmlString("bar")).Text, Is.EqualTo("foo bar"));
Assert.That(_text.Get("foo {0}", new HtmlString("<bar>")).Text, Is.EqualTo("foo <bar>"));
}
}
}

View File

@@ -259,6 +259,8 @@
<Compile Include="FileSystems\Dependencies\AssemblyProbingFolderTests.cs" />
<Compile Include="FileSystems\Dependencies\DependenciesFolderTests.cs" />
<Compile Include="FileSystems\VirtualPath\DefaultVirtualPathProviderTests.cs" />
<Compile Include="Localization\LocalizationStreamParserTests.cs" />
<Compile Include="Localization\TextTests.cs" />
<Compile Include="Localization\CurrentCultureWorkContextTests.cs" />
<Compile Include="Localization\CultureManagerTests.cs" />
<Compile Include="Localization\DateTimePartsTests.cs" />

View File

@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -282,5 +282,21 @@ namespace Orchard.Tests.Utility.Extensions {
Assert.That("abc".Translate("d".ToCharArray(), "d".ToCharArray()), Is.StringMatching("abc"));
Assert.That("abc".Translate("abc".ToCharArray(), "def".ToCharArray()), Is.StringMatching("def"));
}
[Test]
public void ShouldEncodeToBase64() {
Assert.That("abc".ToBase64(), Is.EqualTo("YWJj"));
}
[Test]
public void ShouldDecodeFromBase64() {
Assert.That("YWJj".FromBase64(), Is.EqualTo("abc"));
}
[Test]
public void ShouldRoundtripBase64() {
Assert.That("abc".ToBase64().FromBase64(), Is.EqualTo("abc"));
Assert.That("YWJj".FromBase64().ToBase64(), Is.EqualTo("YWJj"));
}
}
}

View File

@@ -24,6 +24,7 @@
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<UseVSHostingProcess>false</UseVSHostingProcess>
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>

View File

@@ -32,8 +32,8 @@ using System.Security;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]
// Enable web application to call this assembly in Full Trust
[assembly: AllowPartiallyTrustedCallers]

View File

@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -87,6 +87,13 @@
<Property Name="Disabled" Value="false"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Descriptor.ShellDescriptorCache">
<Properties>
<!-- Set Value="true" to disable shell descriptors cache (cache.dat). Recommended when using multiple instances. -->
<Property Name="Disabled" Value="false"/>
</Properties>
</Component>
<Component Type="Orchard.Services.ClientAddressAccessor">
<Properties>

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The common module introduces content parts that are going to be used by most content types (common, body, identity).
FeatureDescription: Core content parts.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The containers module introduces container and containable behaviors for content items.
FeatureDescription: Container and containable parts to enable parent-child relationships between content items.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The contents module enables the creation of custom content types.
Features:

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
FeatureDescription: Standard admin dashboard.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The Feeds module is providing RSS feeds to content items.
FeatureDescription: RSS feeds for content items.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu.
FeatureDescription: Menu management.

View File

@@ -59,7 +59,7 @@
<ul class="menu-items-zone">
@foreach (var descriptor in Model.MenuItemDescriptors.OrderBy(x => x.DisplayName)) {
<li>
<div class="menu-item-description"><h2>@T(descriptor.DisplayName.CamelFriendly())</h2>
<div class="menu-item-description"><h2>@T(descriptor.DisplayName)</h2>
@if (!string.IsNullOrWhiteSpace(descriptor.Description)) {
<span class="hint">@T(descriptor.Description)</span>
}

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The dashboard module is providing the reports screen of the application.
FeatureDescription: Reports management.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The scheduling module enables background task scheduling.
FeatureDescription: Scheduled background tasks.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The settings module creates site settings that other modules can contribute to.
FeatureDescription: Site settings.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The shapes module contains core shape templates and display hooks.
FeatureDescription: Core shape templates and display hooks.

View File

@@ -1 +1,6 @@
<div class="message message-@Model.Type">@Html.Raw(Html.Encode(Model.Message).Replace("\n", "<br />"))</div>
@*
Model.Message can either be:
- an IHtmlString and won't be re-encoded
- a string and will be encoded
*@
<div class="message message-@Model.Type">@Html.Raw(Html.Encode(Model.Message).Replace("\n", "<br />"))</div>

View File

@@ -3,7 +3,7 @@
<div class="user-display">
@if (WorkContext.CurrentUser != null) {
<span class="user-actions welcome">
@T("Welcome, <strong>{0}</strong>!", "<a href=\"" + @Url.Action("ChangePassword", new { Controller = "Account", Area = "Orchard.Users" }) + "\">" + @Html.ItemDisplayText(WorkContext.CurrentUser) + "</a>")
@T("Welcome, <strong>{0}</strong>!", Html.Raw("<a href=\"" + @Url.Action("ChangePassword", new { Controller = "Account", Area = "Orchard.Users" }) + "\">" + Html.ItemDisplayText(WorkContext.CurrentUser) + "</a>"))
</span>
<span class="user-actions">
@Html.ActionLink(T("Sign Out").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl }, new { rel = "nofollow" })

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The title module enables content items to have titles.
FeatureDescription: Title content part.

View File

@@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -29,7 +29,7 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter.
FeatureDescription: XML-RPC opt-in implementation.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site.
FeatureDescription: Lucene indexing services.

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -29,7 +29,7 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The Markdown module enables rich text contents to be created using the Markdown syntax.
FeatureDescription: Markdown editor.

View File

@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -29,7 +29,7 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>

View File

@@ -2,7 +2,7 @@ Name: Alias
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: Maps friendly urls to specific module actions.
FeatureDescription: Maps friendly urls to specific module actions.

View File

@@ -25,6 +25,7 @@
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -34,7 +35,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -29,7 +29,7 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>

View File

@@ -2,7 +2,7 @@ Name: AntiSpam
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: Provides anti-spam services to protect your content from malicious submissions.
Features:

View File

@@ -25,6 +25,7 @@
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -34,7 +35,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

View File

@@ -29,6 +29,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -29,7 +29,7 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>

View File

@@ -3,7 +3,7 @@ Path: ArchiveLater
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: The ArchiveLater module introduces scheduled archiving functionality.
FeatureDescription: Scheduled archiving.

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -29,7 +29,7 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: Provides a log for recording and viewing back-end changes.
Features:

View File

@@ -24,6 +24,7 @@
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -33,7 +34,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using Orchard.ContentManagement;
@@ -15,7 +16,9 @@ namespace Orchard.AuditTrail.Services.Models {
var filters = new Filters(updateModel);
foreach (string nameValue in nameValues) {
filters.Add(nameValue, nameValues[nameValue]);
if (!String.IsNullOrEmpty(nameValue)) {
filters.Add(nameValue, nameValues[nameValue]);
}
}
return filters;

View File

@@ -18,7 +18,7 @@
var isLatest = contentItem.VersionRecord.Number == eventVersionNumber;
var isRemoved = !contentItem.VersionRecord.Latest && !contentItem.VersionRecord.Published;
if (isPublishedEvent || isLatest) {
@T("{0} of the {1} {2} was {3}.", Html.ActionLink(T("Version {0}", eventVersionNumber).Text, "Detail", "Content", new { area = "Orchard.AuditTrail", id = contentItemId, version = eventVersionNumber }, null), contentType.ToLower(), isRemoved ? "<strong>" + title + "</strong>" : Html.ItemEditLink(title, contentItemId).ToString(), eventPastTense)
@T("{0} of the {1} {2} was {3}.", Html.ActionLink(T("Version {0}", eventVersionNumber).Text, "Detail", "Content", new { area = "Orchard.AuditTrail", id = contentItemId, version = eventVersionNumber }, null), contentType.ToLower(), isRemoved ? Html.Raw("<strong>" + title + "</strong>") : Html.ItemEditLink(title, contentItemId), eventPastTense)
}
else if (isRemoved) {
@T("The {0} <strong>{1}</strong> was {2}.", contentType.ToLower(), title, eventPastTense)

View File

@@ -17,6 +17,6 @@
<div>
@Html.CheckBoxFor(m => m.ShowAuditTrailCommentInput)
@Html.LabelFor(m => m.ShowAuditTrailCommentInput, T("Show comment input").Text, new { @class = "forcheckbox" })
<span class="hint">@T("Renders a text field to allow the user to enter a comment about the changes she made.")</span>
<span class="hint">@T("Renders a text field to allow the user to enter a comment about the changes they made.")</span>
</div>
</fieldset>

View File

@@ -48,7 +48,8 @@
var isSelected = Model.SelectedContentItems.Where(x => x.Id == contentItem.Id && x.Selected).Select(x => x.Id).Any();
var commonPart = contentItem.As<CommonPart>();
var removedText = commonPart != null ? dateLocalizationServices.ConvertToLocalizedString(commonPart.VersionModifiedUtc) : T("-").Text;
var contentDisplayText = Html.ItemDisplayText(contentItem).ToString();
var contentDisplayTextHtmlString = Html.ItemDisplayText(contentItem);
var contentDisplayText = contentDisplayTextHtmlString != null ? contentDisplayTextHtmlString.ToString() : contentItem.ContentType;
var contentDisplayUrl = Url.Action("Detail", "Content", new {id = contentItem.Id, version = contentItem.Version, area = "Orchard.AuditTrail"});
<tr>
<td>

View File

@@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -29,7 +29,7 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</assemblies>

View File

@@ -67,9 +67,8 @@ namespace Orchard.Autoroute.Drivers {
var homepage = _aliasService.Get(string.Empty);
var displayRouteValues = _contentManager.GetItemMetadata(part).DisplayRouteValues;
if(homepage.Match(displayRouteValues)) {
viewModel.PromoteToHomePage = true;
}
viewModel.IsHomePage = homepage.Match(displayRouteValues);
viewModel.PromoteToHomePage = viewModel.IsHomePage || part.DisplayAlias == "/";
if (settings.PerItemConfiguration) {
// if enabled, the list of all available patterns is displayed, and the user can

View File

@@ -66,6 +66,10 @@ namespace Orchard.Autoroute.Handlers {
if (current != null) {
current.CustomPattern = String.Empty; // force the regeneration
current.DisplayAlias = _autorouteService.Value.GenerateAlias(current);
// we changed the alias of the previous homepage, so publish this change if the content item was published.
if(current.IsPublished())
_orchardServices.ContentManager.Publish(current.ContentItem);
}
_autorouteService.Value.PublishAlias(current);
}

View File

@@ -2,7 +2,7 @@ Name: Autoroute
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.0
Version: 1.9.1
OrchardVersion: 1.9
Description: Description for the module
Features:

View File

@@ -25,6 +25,7 @@
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -34,7 +35,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.0")]
[assembly: AssemblyFileVersion("1.9.0")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -4,6 +4,7 @@ namespace Orchard.Autoroute.ViewModels {
public class AutoroutePartEditViewModel {
public AutorouteSettings Settings { get; set; }
public bool IsHomePage { get; set; }
public bool PromoteToHomePage { get; set; }
public string CurrentUrl { get; set; }
public string CustomPattern { get; set; }

View File

@@ -16,7 +16,7 @@
}
}
@if (!Model.PromoteToHomePage) {
@if (!Model.IsHomePage) {
<fieldset class="permalink">
<label>@T("Permalink")</label>
@if (Model.Settings.AllowCustomPattern) {
@@ -24,7 +24,7 @@
<span>@Url.MakeAbsolute("/")@urlPrefix</span>
<span>@Html.TextBoxFor(m => m.CurrentUrl, new { @class = "text is-url" })</span>
</span>
<span class="hint">@T("Save the current item and leave the input empty to have it automatically generated using the pattern {0} e.g., {1}", defaultPattern.Name, defaultPattern.Description)</span>
<span class="hint">@T("Save the current item and leave the input empty to have it automatically generated using the pattern {0} e.g., {1}.", defaultPattern.Name, defaultPattern.Description)</span>
}
else {
var hintClass = string.Empty;
@@ -35,7 +35,7 @@
if (string.IsNullOrEmpty(Model.CurrentUrl)
|| (!string.IsNullOrEmpty(Model.CurrentUrl) && Model.Settings.AutomaticAdjustmentOnEdit)) {
<span class="@hintClass">@T("Save the current item and the url will be generated using the pattern {0} e.g., {1}", defaultPattern.Name, defaultPattern.Description)</span>
<span class="@hintClass">@T("Save the current item and the url will be generated using the pattern {0} e.g., {1}.", defaultPattern.Name, defaultPattern.Description)</span>
}
}
@if (!String.IsNullOrEmpty(Model.CurrentUrl)) {
@@ -54,10 +54,10 @@
@Html.EditorFor(m => m.PromoteToHomePage)
<label for="@Html.FieldIdFor(m => m.PromoteToHomePage)" class="forcheckbox">@T("Set as home page")</label>
</span>
<span class="hint">@T("Check to promote this content as the home page")</span>
<span class="hint">@T("Check to promote this content as the home page.")</span>
</fieldset>
}
}
else {
<span>@T("This content is the current home page")</span>
<span>@T("This content is the current home page.")</span>
}

View File

@@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"/>
@@ -28,7 +28,7 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>

View File

@@ -0,0 +1,14 @@
[
{
"inputs": [ "Assets/Less/*.less" ],
"output": "Styles/@.css"
},
{
"inputs": [ "Assets/TypeScript/*.ts" ],
"output": "Scripts/@.js"
},
{
"inputs": [ "Assets/JavaScript/Lib/*.js" ],
"output": "Scripts/Lib/@.js"
}
]

View File

@@ -0,0 +1,213 @@
/**
* @preserve console-shim 1.0.2
* https://github.com/kayahr/console-shim
* Copyright (C) 2011 Klaus Reimer <k@ailis.de>
* Licensed under the MIT license
* (See http://www.opensource.org/licenses/mit-license)
*/
(function(){
"use strict";
/**
* Returns a function which calls the specified function in the specified
* scope.
*
* @param {Function} func
* The function to call.
* @param {Object} scope
* The scope to call the function in.
* @param {...*} args
* Additional arguments to pass to the bound function.
* @returns {function(...[*]): undefined}
* The bound function.
*/
var bind = function(func, scope, args)
{
var fixedArgs = Array.prototype.slice.call(arguments, 2);
return function()
{
var args = fixedArgs.concat(Array.prototype.slice.call(arguments, 0));
(/** @type {Function} */ func).apply(scope, args);
};
};
// Create console if not present
if (!window["console"]) window.console = /** @type {Console} */ ({});
var console = (/** @type {Object} */ window.console);
// Implement console log if needed
if (!console["log"])
{
// Use log4javascript if present
if (window["log4javascript"])
{
var log = log4javascript.getDefaultLogger();
console.log = bind(log.info, log);
console.debug = bind(log.debug, log);
console.info = bind(log.info, log);
console.warn = bind(log.warn, log);
console.error = bind(log.error, log);
}
// Use empty dummy implementation to ignore logging
else
{
console.log = (/** @param {...*} args */ function(args) {});
}
}
// Implement other log levels to console.log if missing
if (!console["debug"]) console.debug = console.log;
if (!console["info"]) console.info = console.log;
if (!console["warn"]) console.warn = console.log;
if (!console["error"]) console.error = console.log;
// Wrap the log methods in IE (<=9) because their argument handling is wrong
// This wrapping is also done if the __consoleShimTest__ symbol is set. This
// is needed for unit testing.
if (window["__consoleShimTest__"] != null ||
eval("/*@cc_on @_jscript_version <= 9@*/"))
{
/**
* Wraps the call to a real IE logging method. Modifies the arguments so
* parameters which are not represented by a placeholder are properly
* printed with a space character as separator.
*
* @param {...*} args
* The function arguments. First argument is the log function
* to call, the other arguments are the log arguments.
*/
var wrap = function(args)
{
var i, max, match, log;
// Convert argument list to real array
args = Array.prototype.slice.call(arguments, 0);
// First argument is the log method to call
log = args.shift();
max = args.length;
if (max > 1 && window["__consoleShimTest__"] !== false)
{
// When first parameter is not a string then add a format string to
// the argument list so we are able to modify it in the next stop
if (typeof(args[0]) != "string")
{
args.unshift("%o");
max += 1;
}
// For each additional parameter which has no placeholder in the
// format string we add another placeholder separated with a
// space character.
match = args[0].match(/%[a-z]/g);
for (i = match ? match.length + 1 : 1; i < max; i += 1)
{
args[0] += " %o";
}
}
Function.apply.call(log, console, args);
};
// Wrap the native log methods of IE to fix argument output problems
console.log = bind(wrap, window, console.log);
console.debug = bind(wrap, window, console.debug);
console.info = bind(wrap, window, console.info);
console.warn = bind(wrap, window, console.warn);
console.error = bind(wrap, window, console.error);
}
// Implement console.assert if missing
if (!console["assert"])
{
console["assert"] = function()
{
var args = Array.prototype.slice.call(arguments, 0);
var expr = args.shift();
if (!expr)
{
args[0] = "Assertion failed: " + args[0];
console.error.apply(console, args);
}
};
}
// Linking console.dir and console.dirxml to the console.log method if
// missing. Hopefully the browser already logs objects and DOM nodes as a
// tree.
if (!console["dir"]) console["dir"] = console.log;
if (!console["dirxml"]) console["dirxml"] = console.log;
// Linking console.exception to console.error. This is not the same but
// at least some error message is displayed.
if (!console["exception"]) console["exception"] = console.error;
// Implement console.time and console.timeEnd if one of them is missing
if (!console["time"] || !console["timeEnd"])
{
var timers = {};
console["time"] = function(id)
{
timers[id] = new Date().getTime();
};
console["timeEnd"] = function(id)
{
var start = timers[id];
if (start)
{
console.log(id + ": " + (new Date().getTime() - start) + "ms");
delete timers[id];
}
};
}
// Implement console.table if missing
if (!console["table"])
{
console["table"] = function(data, columns)
{
var i, iMax, row, j, jMax, k;
// Do nothing if data has wrong type or no data was specified
if (!data || !(data instanceof Array) || !data.length) return;
// Auto-calculate columns array if not set
if (!columns || !(columns instanceof Array))
{
columns = [];
for (k in data[0])
{
if (!data[0].hasOwnProperty(k)) continue;
columns.push(k);
}
}
for (i = 0, iMax = data.length; i < iMax; i += 1)
{
row = [];
for (j = 0, jMax = columns.length; j < jMax; j += 1)
{
row.push(data[i][columns[j]]);
}
Function.apply.call(console.log, console, row);
}
};
}
// Dummy implementations of other console features to prevent error messages
// in browsers not supporting it.
if (!console["clear"]) console["clear"] = function() {};
if (!console["trace"]) console["trace"] = function() {};
if (!console["group"]) console["group"] = function() {};
if (!console["groupCollapsed"]) console["groupCollapsed"] = function() {};
if (!console["groupEnd"]) console["groupEnd"] = function() {};
if (!console["timeStamp"]) console["timeStamp"] = function() {};
if (!console["profile"]) console["profile"] = function() {};
if (!console["profileEnd"]) console["profileEnd"] = function() {};
if (!console["count"]) console["count"] = function() {};
})();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,619 @@
/*!
* jQuery blockUI plugin
* Version 2.66.0-2013.10.09
* Requires jQuery v1.7 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2013 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
*/
;(function() {
/*jshint eqeqeq:false curly:false latedef:false */
"use strict";
function setup($) {
$.fn._fadeIn = $.fn.fadeIn;
var noOp = $.noop || function() {};
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
// confusing userAgent strings on Vista)
var msie = /MSIE/.test(navigator.userAgent);
var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
var mode = document.documentMode || 0;
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
// global $ methods for blocking/unblocking the entire page
$.blockUI = function(opts) { install(window, opts); };
$.unblockUI = function(opts) { remove(window, opts); };
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
$.growlUI = function(title, message, timeout, onClose) {
var $m = $('<div class="growlUI"></div>');
if (title) $m.append('<h1>'+title+'</h1>');
if (message) $m.append('<h2>'+message+'</h2>');
if (timeout === undefined) timeout = 3000;
// Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
var callBlock = function(opts) {
opts = opts || {};
$.blockUI({
message: $m,
fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700,
fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
centerY: false,
showOverlay: false,
onUnblock: onClose,
css: $.blockUI.defaults.growlCSS
});
};
callBlock();
var nonmousedOpacity = $m.css('opacity');
$m.mouseover(function() {
callBlock({
fadeIn: 0,
timeout: 30000
});
var displayBlock = $('.blockMsg');
displayBlock.stop(); // cancel fadeout if it has started
displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
}).mouseout(function() {
$('.blockMsg').fadeOut(1000);
});
// End konapun additions
};
// plugin method for blocking element content
$.fn.block = function(opts) {
if ( this[0] === window ) {
$.blockUI( opts );
return this;
}
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
this.each(function() {
var $el = $(this);
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
return;
$el.unblock({ fadeOut: 0 });
});
return this.each(function() {
if ($.css(this,'position') == 'static') {
this.style.position = 'relative';
$(this).data('blockUI.static', true);
}
this.style.zoom = 1; // force 'hasLayout' in ie
install(this, opts);
});
};
// plugin method for unblocking element content
$.fn.unblock = function(opts) {
if ( this[0] === window ) {
$.unblockUI( opts );
return this;
}
return this.each(function() {
remove(this, opts);
});
};
$.blockUI.version = 2.66; // 2nd generation blocking at no extra cost!
// override these in your code to change the default behavior and style
$.blockUI.defaults = {
// message displayed when blocking (use null for no message)
message: '<h1>Please wait...</h1>',
title: null, // title string; only used when theme == true
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
theme: false, // set to true to use with jQuery UI themes
// styles for the message when blocking; if you wish to disable
// these and use an external stylesheet then do this in your code:
// $.blockUI.defaults.css = {};
css: {
padding: 0,
margin: 0,
width: '30%',
top: '40%',
left: '35%',
textAlign: 'center',
color: '#000',
border: '3px solid #aaa',
backgroundColor:'#fff',
cursor: 'wait'
},
// minimal style set used when themes are used
themedCSS: {
width: '30%',
top: '40%',
left: '35%'
},
// styles for the overlay
overlayCSS: {
backgroundColor: '#000',
opacity: 0.6,
cursor: 'wait'
},
// style to replace wait cursor before unblocking to correct issue
// of lingering wait cursor
cursorReset: 'default',
// styles applied when using $.growlUI
growlCSS: {
width: '350px',
top: '10px',
left: '',
right: '10px',
border: 'none',
padding: '5px',
opacity: 0.6,
cursor: 'default',
color: '#fff',
backgroundColor: '#000',
'-webkit-border-radius':'10px',
'-moz-border-radius': '10px',
'border-radius': '10px'
},
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
// (hat tip to Jorge H. N. de Vasconcelos)
/*jshint scripturl:true */
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
// force usage of iframe in non-IE browsers (handy for blocking applets)
forceIframe: false,
// z-index for the blocking overlay
baseZ: 1000,
// set these to true to have the message automatically centered
centerX: true, // <-- only effects element blocking (page block controlled via css above)
centerY: true,
// allow body element to be stetched in ie6; this makes blocking look better
// on "short" pages. disable if you wish to prevent changes to the body height
allowBodyStretch: true,
// enable if you want key and mouse events to be disabled for content that is blocked
bindEvents: true,
// be default blockUI will supress tab navigation from leaving blocking content
// (if bindEvents is true)
constrainTabKey: true,
// fadeIn time in millis; set to 0 to disable fadeIn on block
fadeIn: 200,
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
fadeOut: 400,
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
timeout: 0,
// disable if you don't want to show the overlay
showOverlay: true,
// if true, focus will be placed in the first available input field when
// page blocking
focusInput: true,
// elements that can receive focus
focusableElements: ':input:enabled:visible',
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
// no longer needed in 2012
// applyPlatformOpacityRules: true,
// callback method invoked when fadeIn has completed and blocking message is visible
onBlock: null,
// callback method invoked when unblocking has completed; the callback is
// passed the element that has been unblocked (which is the window object for page
// blocks) and the options that were passed to the unblock call:
// onUnblock(element, options)
onUnblock: null,
// callback method invoked when the overlay area is clicked.
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
onOverlayClick: null,
// don't ask; if you really must know: http://groups.google.com/requiredUploads/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
quirksmodeOffsetHack: 4,
// class name of the message block
blockMsgClass: 'blockMsg',
// if it is already blocked, then ignore it (don't unblock and reblock)
ignoreIfBlocked: false
};
// private data and functions follow...
var pageBlock = null;
var pageBlockEls = [];
function install(el, opts) {
var css, themedCSS;
var full = (el == window);
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
opts = $.extend({}, $.blockUI.defaults, opts || {});
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
return;
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
if (opts.onOverlayClick)
opts.overlayCSS.cursor = 'pointer';
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
msg = msg === undefined ? opts.message : msg;
// remove the current block (if there is one)
if (full && pageBlock)
remove(window, {fadeOut:0});
// if an existing element is being used as the blocking content then we capture
// its current place in the DOM (and current display style) so we can restore
// it when we unblock
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
var node = msg.jquery ? msg[0] : msg;
var data = {};
$(el).data('blockUI.history', data);
data.el = node;
data.parent = node.parentNode;
data.display = node.style.display;
data.position = node.style.position;
if (data.parent)
data.parent.removeChild(node);
}
$(el).data('blockUI.onUnblock', opts.onUnblock);
var z = opts.baseZ;
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
// layer1 is the iframe layer which is used to supress bleed through of underlying content
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
// layer3 is the message content that is displayed while blocking
var lyr1, lyr2, lyr3, s;
if (msie || opts.forceIframe)
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
else
lyr1 = $('<div class="blockUI" style="display:none"></div>');
if (opts.theme)
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
else
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
if (opts.theme && full) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
if ( opts.title ) {
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
}
s += '<div class="ui-widget-content ui-dialog-content"></div>';
s += '</div>';
}
else if (opts.theme) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
if ( opts.title ) {
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
}
s += '<div class="ui-widget-content ui-dialog-content"></div>';
s += '</div>';
}
else if (full) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
}
else {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
}
lyr3 = $(s);
// if we have a message, style it
if (msg) {
if (opts.theme) {
lyr3.css(themedCSS);
lyr3.addClass('ui-widget-content');
}
else
lyr3.css(css);
}
// style the overlay
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
lyr2.css(opts.overlayCSS);
lyr2.css('position', full ? 'fixed' : 'absolute');
// make iframe layer transparent in IE
if (msie || opts.forceIframe)
lyr1.css('opacity',0.0);
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
$.each(layers, function() {
this.appendTo($par);
});
if (opts.theme && opts.draggable && $.fn.draggable) {
lyr3.draggable({
handle: '.ui-dialog-titlebar',
cancel: 'li'
});
}
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
if (ie6 || expr) {
// give body 100% height
if (full && opts.allowBodyStretch && $.support.boxModel)
$('html,body').css('height','100%');
// fix ie6 issue when blocked element has a border width
if ((ie6 || !$.support.boxModel) && !full) {
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
var fixT = t ? '(0 - '+t+')' : 0;
var fixL = l ? '(0 - '+l+')' : 0;
}
// simulate fixed position
$.each(layers, function(i,o) {
var s = o[0].style;
s.position = 'absolute';
if (i < 2) {
if (full)
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
else
s.setExpression('height','this.parentNode.offsetHeight + "px"');
if (full)
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
else
s.setExpression('width','this.parentNode.offsetWidth + "px"');
if (fixL) s.setExpression('left', fixL);
if (fixT) s.setExpression('top', fixT);
}
else if (opts.centerY) {
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
s.marginTop = 0;
}
else if (!opts.centerY && full) {
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
s.setExpression('top',expression);
}
});
}
// show the message
if (msg) {
if (opts.theme)
lyr3.find('.ui-widget-content').append(msg);
else
lyr3.append(msg);
if (msg.jquery || msg.nodeType)
$(msg).show();
}
if ((msie || opts.forceIframe) && opts.showOverlay)
lyr1.show(); // opacity is zero
if (opts.fadeIn) {
var cb = opts.onBlock ? opts.onBlock : noOp;
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
var cb2 = msg ? cb : noOp;
if (opts.showOverlay)
lyr2._fadeIn(opts.fadeIn, cb1);
if (msg)
lyr3._fadeIn(opts.fadeIn, cb2);
}
else {
if (opts.showOverlay)
lyr2.show();
if (msg)
lyr3.show();
if (opts.onBlock)
opts.onBlock();
}
// bind key and mouse events
bind(1, el, opts);
if (full) {
pageBlock = lyr3[0];
pageBlockEls = $(opts.focusableElements,pageBlock);
if (opts.focusInput)
setTimeout(focus, 20);
}
else
center(lyr3[0], opts.centerX, opts.centerY);
if (opts.timeout) {
// auto-unblock
var to = setTimeout(function() {
if (full)
$.unblockUI(opts);
else
$(el).unblock(opts);
}, opts.timeout);
$(el).data('blockUI.timeout', to);
}
}
// remove the block
function remove(el, opts) {
var count;
var full = (el == window);
var $el = $(el);
var data = $el.data('blockUI.history');
var to = $el.data('blockUI.timeout');
if (to) {
clearTimeout(to);
$el.removeData('blockUI.timeout');
}
opts = $.extend({}, $.blockUI.defaults, opts || {});
bind(0, el, opts); // unbind events
if (opts.onUnblock === null) {
opts.onUnblock = $el.data('blockUI.onUnblock');
$el.removeData('blockUI.onUnblock');
}
var els;
if (full) // crazy selector to handle odd field errors in ie6/7
els = $('body').children().filter('.blockUI').add('body > .blockUI');
else
els = $el.find('>.blockUI');
// fix cursor issue
if ( opts.cursorReset ) {
if ( els.length > 1 )
els[1].style.cursor = opts.cursorReset;
if ( els.length > 2 )
els[2].style.cursor = opts.cursorReset;
}
if (full)
pageBlock = pageBlockEls = null;
if (opts.fadeOut) {
count = els.length;
els.stop().fadeOut(opts.fadeOut, function() {
if ( --count === 0)
reset(els,data,opts,el);
});
}
else
reset(els, data, opts, el);
}
// move blocking element back into the DOM where it started
function reset(els,data,opts,el) {
var $el = $(el);
if ( $el.data('blockUI.isBlocked') )
return;
els.each(function(i,o) {
// remove via DOM calls so we don't lose event handlers
if (this.parentNode)
this.parentNode.removeChild(this);
});
if (data && data.el) {
data.el.style.display = data.display;
data.el.style.position = data.position;
if (data.parent)
data.parent.appendChild(data.el);
$el.removeData('blockUI.history');
}
if ($el.data('blockUI.static')) {
$el.css('position', 'static'); // #22
}
if (typeof opts.onUnblock == 'function')
opts.onUnblock(el,opts);
// fix issue in Safari 6 where block artifacts remain until reflow
var body = $(document.body), w = body.width(), cssW = body[0].style.width;
body.width(w-1).width(w);
body[0].style.width = cssW;
}
// bind/unbind the handler
function bind(b, el, opts) {
var full = el == window, $el = $(el);
// don't bother unbinding if there is nothing to unbind
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
return;
$el.data('blockUI.isBlocked', b);
// don't bind events when overlay is not in use or if bindEvents is false
if (!full || !opts.bindEvents || (b && !opts.showOverlay))
return;
// bind anchors and inputs for mouse and key events
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
if (b)
$(document).bind(events, opts, handler);
else
$(document).unbind(events, handler);
// former impl...
// var $e = $('a,:input');
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
}
// event handler to suppress keyboard/mouse events when blocking
function handler(e) {
// allow tab navigation (conditionally)
if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) {
if (pageBlock && e.data.constrainTabKey) {
var els = pageBlockEls;
var fwd = !e.shiftKey && e.target === els[els.length-1];
var back = e.shiftKey && e.target === els[0];
if (fwd || back) {
setTimeout(function(){focus(back);},10);
return false;
}
}
}
var opts = e.data;
var target = $(e.target);
if (target.hasClass('blockOverlay') && opts.onOverlayClick)
opts.onOverlayClick(e);
// allow events within the message content
if (target.parents('div.' + opts.blockMsgClass).length > 0)
return true;
// allow events for content that is not being blocked
return target.parents().children().filter('div.blockUI').length === 0;
}
function focus(back) {
if (!pageBlockEls)
return;
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
if (e)
e.focus();
}
function center(el, x, y) {
var p = el.parentNode, s = el.style;
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
if (x) s.left = l > 0 ? (l+'px') : '0';
if (y) s.top = t > 0 ? (t+'px') : '0';
}
function sz(el, p) {
return parseInt($.css(el,p),10)||0;
}
}
/*global define:true */
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
define(['jquery'], setup);
} else {
setup(jQuery);
}
})();

View File

@@ -0,0 +1,172 @@
/*
* jQuery File Upload Processing Plugin 1.3.0
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2012, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/* jshint nomen:false */
/* global define, window */
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define([
'jquery',
'./jquery.fileupload'
], factory);
} else {
// Browser globals:
factory(
window.jQuery
);
}
}(function ($) {
'use strict';
var originalAdd = $.blueimp.fileupload.prototype.options.add;
// The File Upload Processing plugin extends the fileupload widget
// with file processing functionality:
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
options: {
// The list of processing actions:
processQueue: [
/*
{
action: 'log',
type: 'debug'
}
*/
],
add: function (e, data) {
var $this = $(this);
data.process(function () {
return $this.fileupload('process', data);
});
originalAdd.call(this, e, data);
}
},
processActions: {
/*
log: function (data, options) {
console[options.type](
'Processing "' + data.files[data.index].name + '"'
);
}
*/
},
_processFile: function (data, originalData) {
var that = this,
dfd = $.Deferred().resolveWith(that, [data]),
chain = dfd.promise();
this._trigger('process', null, data);
$.each(data.processQueue, function (i, settings) {
var func = function (data) {
if (originalData.errorThrown) {
return $.Deferred()
.rejectWith(that, [originalData]).promise();
}
return that.processActions[settings.action].call(
that,
data,
settings
);
};
chain = chain.pipe(func, settings.always && func);
});
chain
.done(function () {
that._trigger('processdone', null, data);
that._trigger('processalways', null, data);
})
.fail(function () {
that._trigger('processfail', null, data);
that._trigger('processalways', null, data);
});
return chain;
},
// Replaces the settings of each processQueue item that
// are strings starting with an "@", using the remaining
// substring as key for the option map,
// e.g. "@autoUpload" is replaced with options.autoUpload:
_transformProcessQueue: function (options) {
var processQueue = [];
$.each(options.processQueue, function () {
var settings = {},
action = this.action,
prefix = this.prefix === true ? action : this.prefix;
$.each(this, function (key, value) {
if ($.type(value) === 'string' &&
value.charAt(0) === '@') {
settings[key] = options[
value.slice(1) || (prefix ? prefix +
key.charAt(0).toUpperCase() + key.slice(1) : key)
];
} else {
settings[key] = value;
}
});
processQueue.push(settings);
});
options.processQueue = processQueue;
},
// Returns the number of files currently in the processsing queue:
processing: function () {
return this._processing;
},
// Processes the files given as files property of the data parameter,
// returns a Promise object that allows to bind callbacks:
process: function (data) {
var that = this,
options = $.extend({}, this.options, data);
if (options.processQueue && options.processQueue.length) {
this._transformProcessQueue(options);
if (this._processing === 0) {
this._trigger('processstart');
}
$.each(data.files, function (index) {
var opts = index ? $.extend({}, options) : options,
func = function () {
if (data.errorThrown) {
return $.Deferred()
.rejectWith(that, [data]).promise();
}
return that._processFile(opts, data);
};
opts.index = index;
that._processing += 1;
that._processingQueue = that._processingQueue.pipe(func, func)
.always(function () {
that._processing -= 1;
if (that._processing === 0) {
that._trigger('processstop');
}
});
});
}
return this._processingQueue;
},
_create: function () {
this._super();
this._processing = 0;
this._processingQueue = $.Deferred().resolveWith(this)
.promise();
}
});
}));

View File

@@ -0,0 +1,119 @@
/*
* jQuery File Upload Validation Plugin 1.1.2
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/* global define, window */
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define([
'jquery',
'./jquery.fileupload-process'
], factory);
} else {
// Browser globals:
factory(
window.jQuery
);
}
}(function ($) {
'use strict';
// Append to the default processQueue:
$.blueimp.fileupload.prototype.options.processQueue.push(
{
action: 'validate',
// Always trigger this action,
// even if the previous action was rejected:
always: true,
// Options taken from the global options map:
acceptFileTypes: '@',
maxFileSize: '@',
minFileSize: '@',
maxNumberOfFiles: '@',
disabled: '@disableValidation'
}
);
// The File Upload Validation plugin extends the fileupload widget
// with file validation functionality:
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
options: {
/*
// The regular expression for allowed file types, matches
// against either file type or file name:
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
// The maximum allowed file size in bytes:
maxFileSize: 10000000, // 10 MB
// The minimum allowed file size in bytes:
minFileSize: undefined, // No minimal file size
// The limit of files to be uploaded:
maxNumberOfFiles: 10,
*/
// Function returning the current number of files,
// has to be overriden for maxNumberOfFiles validation:
getNumberOfFiles: $.noop,
// Error and info messages:
messages: {
maxNumberOfFiles: 'Maximum number of files exceeded',
acceptFileTypes: 'File type not allowed',
maxFileSize: 'File is too large',
minFileSize: 'File is too small'
}
},
processActions: {
validate: function (data, options) {
if (options.disabled) {
return data;
}
var dfd = $.Deferred(),
settings = this.options,
file = data.files[data.index],
fileSize;
if (options.minFileSize || options.maxFileSize) {
fileSize = file.size;
}
if ($.type(options.maxNumberOfFiles) === 'number' &&
(settings.getNumberOfFiles() || 0) + data.files.length >
options.maxNumberOfFiles) {
file.error = settings.i18n('maxNumberOfFiles');
} else if (options.acceptFileTypes &&
!(options.acceptFileTypes.test(file.type) ||
options.acceptFileTypes.test(file.name))) {
file.error = settings.i18n('acceptFileTypes');
} else if (fileSize > options.maxFileSize) {
file.error = settings.i18n('maxFileSize');
} else if ($.type(fileSize) === 'number' &&
fileSize < options.minFileSize) {
file.error = settings.i18n('minFileSize');
} else {
delete file.error;
}
if (file.error || data.files.error) {
data.files.error = true;
dfd.rejectWith(this, [data]);
} else {
dfd.resolveWith(this, [data]);
}
return dfd.promise();
}
}
});
}));

File diff suppressed because it is too large Load Diff

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