mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
added "usecdn" to sitesettings
This commit is contained in:

committed by
agriffard

parent
611b3dde44
commit
efc573992c
@@ -76,6 +76,11 @@ namespace Orchard.Tests.Stubs {
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool UseCdn {
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public int PageSize {
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
|
@@ -44,6 +44,11 @@ namespace Orchard.Core.Settings.Models {
|
||||
get { return this.Retrieve(x => x.ResourceDebugMode); }
|
||||
set { this.Store(x => x.ResourceDebugMode, value); }
|
||||
}
|
||||
|
||||
public bool UseCdn {
|
||||
get { return this.Retrieve(x => x.UseCdn); }
|
||||
set { this.Store(x=> x.UseCdn, value); }
|
||||
}
|
||||
|
||||
public int PageSize {
|
||||
get { return this.Retrieve(x => x.PageSize, DefaultPageSize); }
|
||||
|
@@ -46,6 +46,11 @@ namespace Orchard.Core.Settings.ViewModels {
|
||||
set { Site.ResourceDebugMode = value; }
|
||||
}
|
||||
|
||||
public bool UseCdn {
|
||||
get { return Site.UseCdn; }
|
||||
set { Site.UseCdn = value; }
|
||||
}
|
||||
|
||||
public int PageSize {
|
||||
get { return Site.PageSize; }
|
||||
set { Site.PageSize = value; }
|
||||
|
@@ -58,6 +58,11 @@
|
||||
@Html.DropDownList("ResourceDebugMode", resourceDebugMode)
|
||||
<span class="hint">@T("Determines whether scripts and stylesheets load in their debuggable or minified form.")</span>
|
||||
</div>
|
||||
<div>
|
||||
@Html.LabelFor(m => m.UseCdn, T("Use CDN"))
|
||||
@Html.CheckBoxFor(m => m.UseCdn)
|
||||
<span class="hint">@T("Determines whether the defined CDN value is used for scripts and stylesheets, or their local version")</span>
|
||||
</div>
|
||||
<div>
|
||||
<label for="DefaultPageSize">@T("Default number of items per page")</label>
|
||||
@Html.TextBoxFor(m => m.PageSize, new { @class = "text small" })
|
||||
|
@@ -401,6 +401,7 @@ namespace Orchard.Core.Shapes {
|
||||
}
|
||||
var defaultSettings = new RequireSettings {
|
||||
DebugMode = debugMode,
|
||||
CdnMode = site.UseCdn,
|
||||
Culture = _workContext.Value.CurrentCulture,
|
||||
};
|
||||
var requiredResources = _resourceManager.Value.BuildRequiredResources(resourceType);
|
||||
|
@@ -186,6 +186,11 @@ namespace Orchard.Setup {
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool UseCdn {
|
||||
get { return false; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public int PageSize {
|
||||
get { return SiteSettingsPart.DefaultPageSize; }
|
||||
set { throw new NotImplementedException(); }
|
||||
|
@@ -80,6 +80,11 @@ namespace Orchard.Tokens.Tests {
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool UseCdn {
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public int PageSize {
|
||||
get { throw new NotImplementedException(); }
|
||||
|
@@ -13,6 +13,7 @@ namespace Orchard.Settings {
|
||||
string SiteCulture { get; set; }
|
||||
string SiteCalendar { get; set; }
|
||||
ResourceDebugMode ResourceDebugMode { get; set; }
|
||||
bool UseCdn { get; set; }
|
||||
int PageSize { get; set; }
|
||||
int MaxPageSize { get; set; }
|
||||
int MaxPagedCount { get; set; }
|
||||
|
Reference in New Issue
Block a user