mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-20 18:57:56 +08:00
Merge branch '1.10.x' into dev
Conflicts: src/Orchard.Web/Modules/Orchard.Layouts/Scripts/LayoutEditor.min.js
This commit is contained in:
@@ -12,8 +12,8 @@
|
|||||||
self._wasInvoked = true;
|
self._wasInvoked = true;
|
||||||
};
|
};
|
||||||
this.getData = function (contentType) {
|
this.getData = function (contentType) {
|
||||||
return self._clipboardData[contentType];
|
|
||||||
self._wasInvoked = true;
|
self._wasInvoked = true;
|
||||||
|
return self._clipboardData[contentType];
|
||||||
};
|
};
|
||||||
this.disable = function() {
|
this.disable = function() {
|
||||||
self._isDisabled = true;
|
self._isDisabled = true;
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,13 +1,4 @@
|
|||||||
(function ($) {
|
(function ($) {
|
||||||
var closedDialogs = [];
|
|
||||||
|
|
||||||
var disposeClosedDialogs = function () {
|
|
||||||
$.each(closedDialogs, function () {
|
|
||||||
this.dispose();
|
|
||||||
});
|
|
||||||
|
|
||||||
closedDialogs = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
var Dialog = function (templateElementSelector) {
|
var Dialog = function (templateElementSelector) {
|
||||||
var self = this;
|
var self = this;
|
||||||
@@ -20,8 +11,6 @@
|
|||||||
this.isVisible = false;
|
this.isVisible = false;
|
||||||
this._title = this.template.find(".title").html();
|
this._title = this.template.find(".title").html();
|
||||||
|
|
||||||
disposeClosedDialogs();
|
|
||||||
|
|
||||||
this.title = function (value) {
|
this.title = function (value) {
|
||||||
var titleElement = this.root.find(".title");
|
var titleElement = this.root.find(".title");
|
||||||
this._title = value;
|
this._title = value;
|
||||||
@@ -57,25 +46,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.close = function () {
|
this.close = function () {
|
||||||
this.isVisible = false;
|
this.dispose();
|
||||||
|
|
||||||
if (this.root) {
|
|
||||||
$(window).off("resize", resizeIFrame);
|
|
||||||
|
|
||||||
// Hiding is tricky - TinyMCE throws an exception in FF when we hide the root element.
|
|
||||||
// To avoid this, move the dialog out of view. The next time a Dialog is instantiated, it will be disposed of.
|
|
||||||
this.overlay.css({
|
|
||||||
position: "absolute",
|
|
||||||
left: "0",
|
|
||||||
top: "0",
|
|
||||||
width: "0",
|
|
||||||
height: "0",
|
|
||||||
overflow: "hidden"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).off("keyup", onKeyUp);
|
|
||||||
closedDialogs.push(self);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.load = function (url, data, method) {
|
this.load = function (url, data, method) {
|
||||||
@@ -85,19 +56,21 @@
|
|||||||
this.frame.element.show();
|
this.frame.element.show();
|
||||||
this.view.hide();
|
this.view.hide();
|
||||||
|
|
||||||
resizeIFrame();
|
onWindowResize();
|
||||||
centerPosition();
|
|
||||||
this.frame.getDocument().on("keyup", onKeyUp);
|
this.frame.getDocument().on("keyup", onKeyUp);
|
||||||
|
|
||||||
$(window).on("resize", function () {
|
$(window).on("resize", onWindowResize);
|
||||||
resizeIFrame();
|
|
||||||
centerPosition();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.dispose = function () {
|
this.dispose = function () {
|
||||||
if (this.root)
|
this.isVisible = false;
|
||||||
|
this.frame.element.off();
|
||||||
|
this.frame.getDocument().off("keyup", onKeyUp);
|
||||||
|
$(window).off("resize", onWindowResize);
|
||||||
|
|
||||||
|
if (this.root) {
|
||||||
this.root.remove();
|
this.root.remove();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setHtml = function (html) {
|
this.setHtml = function (html) {
|
||||||
@@ -129,6 +102,11 @@
|
|||||||
buttons.toggle(show);
|
buttons.toggle(show);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var onWindowResize = function () {
|
||||||
|
resizeIFrame();
|
||||||
|
centerPosition();
|
||||||
|
};
|
||||||
|
|
||||||
var resizeIFrame = function () {
|
var resizeIFrame = function () {
|
||||||
if (self.frame == null)
|
if (self.frame == null)
|
||||||
return;
|
return;
|
||||||
@@ -147,7 +125,7 @@
|
|||||||
|
|
||||||
var onKeyUp = function (e) {
|
var onKeyUp = function (e) {
|
||||||
var esc = 27;
|
var esc = 27;
|
||||||
if (e.keyCode == esc) {
|
if (e.keyCode === esc) {
|
||||||
self.trigger("command", {
|
self.trigger("command", {
|
||||||
command: "cancel"
|
command: "cancel"
|
||||||
});
|
});
|
||||||
@@ -191,10 +169,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
var updateDialog = function (scope) {
|
var updateDialog = function (scope) {
|
||||||
//var document = self.frame.getDocument();
|
|
||||||
var dialogSettings = scope.find(".dialog-settings");
|
var dialogSettings = scope.find(".dialog-settings");
|
||||||
var title = dialogSettings.find(".title");
|
var title = dialogSettings.find(".title");
|
||||||
var buttons = dialogSettings.find(".buttons");
|
var buttons = $(dialogSettings.find(".buttons")[0].outerHTML);
|
||||||
|
|
||||||
if (title.length > 0) self.title(title.html());
|
if (title.length > 0) self.title(title.html());
|
||||||
if (buttons.length > 0) {
|
if (buttons.length > 0) {
|
||||||
|
@@ -13,8 +13,10 @@
|
|||||||
var command = (string)ViewBag.Command;
|
var command = (string)ViewBag.Command;
|
||||||
var titleFormat = (string)ViewBag.TitleFormat;
|
var titleFormat = (string)ViewBag.TitleFormat;
|
||||||
}
|
}
|
||||||
|
@* Only render the editor shapes if the dialog is not closing. *@
|
||||||
|
@if (Model.Submitted != true) {
|
||||||
@Html.ValidationSummary()
|
@Html.ValidationSummary()
|
||||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Update", "Element", new { session = Model.SessionKey, area = "Orchard.Layouts" }))) {
|
using (Html.BeginFormAntiForgeryPost(Url.Action("Update", "Element", new {session = Model.SessionKey, area = "Orchard.Layouts"}))) {
|
||||||
foreach (var tab in Model.Tabs) {
|
foreach (var tab in Model.Tabs) {
|
||||||
var id = String.Format("element-{0}", tab.ToLowerInvariant());
|
var id = String.Format("element-{0}", tab.ToLowerInvariant());
|
||||||
<div id="@id" class="tab-view">
|
<div id="@id" class="tab-view">
|
||||||
@@ -27,7 +29,11 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@if (Model.Submitted) {
|
}
|
||||||
|
else {
|
||||||
|
// See Layout-Dialog.cshtml for more information.
|
||||||
|
Layout.DialogClosing = true;
|
||||||
|
|
||||||
using (Script.Foot()) {
|
using (Script.Foot()) {
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(function () {
|
jQuery(function () {
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
@{
|
@using System.Collections
|
||||||
|
@{
|
||||||
SetMeta("X-UA-Compatible", "IE=edge,chrome=1");
|
SetMeta("X-UA-Compatible", "IE=edge,chrome=1");
|
||||||
Style.Include("admin-dialog.css");
|
Style.Include("admin-dialog.css");
|
||||||
Script.Require("jQuery").AtFoot();
|
Script.Require("jQuery").AtFoot();
|
||||||
@@ -9,7 +10,6 @@
|
|||||||
Model.Header.Add(Display.Title(Title: Model.Title));
|
Model.Header.Add(Display.Title(Title: Model.Title));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Display.TokenHint()
|
|
||||||
<div id="layout-content">
|
<div id="layout-content">
|
||||||
<div id="layout-main">
|
<div id="layout-main">
|
||||||
<div id="main" role="main">
|
<div id="main" role="main">
|
||||||
@@ -31,3 +31,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@*
|
||||||
|
Not rendering the Token Script prevents an issue with Edge when trying to load a resource via AJAX
|
||||||
|
while the window is being destroyed. This causes the JSON object to be undefined, causing jQuery to fail to parse the AJAX response.
|
||||||
|
*@
|
||||||
|
@if (Model.DialogClosing != true) {
|
||||||
|
@Display.TokenHint()
|
||||||
|
}
|
@@ -445,8 +445,9 @@
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dir-rtl #media-library-main-navigation > ul { /* sub-navigations, e.g. folders */
|
.dir-rtl #media-library-main-navigation {
|
||||||
margin-left: -1px;
|
border-right: inherit;
|
||||||
|
border-left: 1px solid #e0e0e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dir-rtl #button-recent i {
|
.dir-rtl #button-recent i {
|
||||||
@@ -460,7 +461,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dir-rtl .media-library-folder ul {
|
.dir-rtl .media-library-folder ul {
|
||||||
padding-left: inherit;
|
padding-left: 0;
|
||||||
padding-right: 16px;
|
padding-right: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,7 +472,12 @@ padding-right: 16px;
|
|||||||
|
|
||||||
.dir-rtl #media-library-import .import-provider {
|
.dir-rtl #media-library-import .import-provider {
|
||||||
padding-left: inherit;
|
padding-left: inherit;
|
||||||
padding-right: 25px;
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dir-rtl #media-library-main-editor {
|
||||||
|
border-left: inherit;
|
||||||
|
border-right: 1px solid #e0e0e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dir-rtl #media-library-main-selection li {
|
.dir-rtl #media-library-main-selection li {
|
||||||
@@ -490,9 +496,19 @@ padding-right: 16px;
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dir-rtl #media-library-main-list li.selected:after {
|
||||||
|
border-left: inherit;
|
||||||
|
border-right: 40px solid transparent;
|
||||||
|
right: inherit;
|
||||||
|
left: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
.dir-rtl #media-library-main-list li.selected:after{width:0;height:0;border-top:40px solid #3C822E;border-left:inherit;border-right:40px solid transparent;position:absolute;display:block;right:0;content:".";color: transparent;top:0;z-index:1000}
|
.dir-rtl #media-library-main-list li.selected:before {
|
||||||
.dir-rtl #media-library-main-list li.selected:before{position:absolute;content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMA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PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PiTFf8gAAAAGUExURf///////1V89WwAAAACdFJOU/8A5bcwSgAAAEdJREFUeNqckEEOACAIw8r/P21ihIHzJMdlKwzChi8Jk4BLYo8pw3UsDZchIsOFKaDAJFOrSKOWV0bnMMit4zgZb/94zhJgAK06APe0qnuFAAAAAElFTkSuQmCC);margin-left:-5px;margin-right:inherit;color:#fff;right:inherit;left:5px;font-family:Tahoma;z-index:2000}
|
margin-right: inherit;
|
||||||
|
margin-left: 0;
|
||||||
|
right: inherit;
|
||||||
|
left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.dir-rtl .media-library-main-list-overlay {
|
.dir-rtl .media-library-main-list-overlay {
|
||||||
left: inherit;
|
left: inherit;
|
||||||
@@ -504,3 +520,7 @@ padding-right: 16px;
|
|||||||
padding-right: inherit;
|
padding-right: inherit;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dir-rtl #media-library-main-navigation .navicon {
|
||||||
|
background-position: right;
|
||||||
|
}
|
||||||
|
@@ -178,14 +178,15 @@ namespace Orchard.OutputCache.Filters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void OnResultExecuted(ResultExecutedContext filterContext) {
|
public void OnResultExecuted(ResultExecutedContext filterContext) {
|
||||||
|
// This filter is not reentrant (multiple executions within the same request are
|
||||||
|
// not supported) so child actions are ignored completely.
|
||||||
|
if (filterContext.IsChildAction)
|
||||||
|
return;
|
||||||
|
|
||||||
var captureHandlerIsAttached = false;
|
var captureHandlerIsAttached = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (!_isCachingRequest)
|
||||||
// This filter is not reentrant (multiple executions within the same request are
|
|
||||||
// not supported) so child actions are ignored completely.
|
|
||||||
if (filterContext.IsChildAction || !_isCachingRequest)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Logger.Debug("Item '{0}' was rendered.", _cacheKey);
|
Logger.Debug("Item '{0}' was rendered.", _cacheKey);
|
||||||
|
@@ -5,6 +5,7 @@ Website: http://orchardproject.net
|
|||||||
Version: 1.10
|
Version: 1.10
|
||||||
OrchardVersion: 1.10
|
OrchardVersion: 1.10
|
||||||
Description: Provides a variety of third-party client-side libraries (stylesheets and scripts) used by other modules.
|
Description: Provides a variety of third-party client-side libraries (stylesheets and scripts) used by other modules.
|
||||||
|
Priority: 5
|
||||||
Features:
|
Features:
|
||||||
Orchard.Resources:
|
Orchard.Resources:
|
||||||
Name: Resources
|
Name: Resources
|
||||||
|
@@ -48,12 +48,13 @@ namespace Orchard.Taxonomies {
|
|||||||
.WithPart("TaxonomyNavigationPart")
|
.WithPart("TaxonomyNavigationPart")
|
||||||
.WithPart("MenuPart")
|
.WithPart("MenuPart")
|
||||||
.WithPart("CommonPart")
|
.WithPart("CommonPart")
|
||||||
|
.WithIdentity()
|
||||||
.DisplayedAs("Taxonomy Link")
|
.DisplayedAs("Taxonomy Link")
|
||||||
.WithSetting("Description", "Injects menu items from a Taxonomy")
|
.WithSetting("Description", "Injects menu items from a Taxonomy")
|
||||||
.WithSetting("Stereotype", "MenuItem")
|
.WithSetting("Stereotype", "MenuItem")
|
||||||
);
|
);
|
||||||
|
|
||||||
return 4;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom1() {
|
public int UpdateFrom1() {
|
||||||
@@ -77,5 +78,14 @@ namespace Orchard.Taxonomies {
|
|||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int UpdateFrom4() {
|
||||||
|
ContentDefinitionManager.AlterTypeDefinition("TaxonomyNavigationMenuItem",
|
||||||
|
cfg => cfg
|
||||||
|
.WithIdentity()
|
||||||
|
);
|
||||||
|
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -138,7 +138,7 @@
|
|||||||
<remove fileExtension=".woff" />
|
<remove fileExtension=".woff" />
|
||||||
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
|
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
|
||||||
<remove fileExtension=".woff2" />
|
<remove fileExtension=".woff2" />
|
||||||
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
|
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
|
||||||
</staticContent>
|
</staticContent>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
|
|
||||||
|
@@ -70,10 +70,14 @@ namespace Orchard.Data {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Cancel() {
|
public void Cancel() {
|
||||||
|
if (_session != null) {
|
||||||
|
|
||||||
// IsActive is true if the transaction hasn't been committed or rolled back
|
// IsActive is true if the transaction hasn't been committed or rolled back
|
||||||
if (_session != null && _session.Transaction.IsActive) {
|
if (_session.Transaction != null && _session.Transaction.IsActive) {
|
||||||
Logger.Debug("Rolling back transaction");
|
Logger.Debug("Rolling back transaction");
|
||||||
_session.Transaction.Rollback();
|
_session.Transaction.Rollback();
|
||||||
|
}
|
||||||
|
|
||||||
DisposeSession();
|
DisposeSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,13 +91,15 @@ namespace Orchard.Data {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// IsActive is true if the transaction hasn't been committed or rolled back
|
// IsActive is true if the transaction hasn't been committed or rolled back
|
||||||
if (_session.Transaction.IsActive) {
|
if (_session.Transaction != null && _session.Transaction.IsActive) {
|
||||||
Logger.Debug("Committing transaction");
|
Logger.Debug("Committing transaction");
|
||||||
_session.Transaction.Commit();
|
_session.Transaction.Commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
if (_contentManagerSession != null) {
|
||||||
_contentManagerSession.Clear();
|
_contentManagerSession.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
Logger.Debug("Disposing session");
|
Logger.Debug("Disposing session");
|
||||||
_session.Close();
|
_session.Close();
|
||||||
@@ -111,6 +117,8 @@ namespace Orchard.Data {
|
|||||||
var sessionFactory = _sessionFactoryHolder.GetSessionFactory();
|
var sessionFactory = _sessionFactoryHolder.GetSessionFactory();
|
||||||
Logger.Debug("Opening NHibernate session");
|
Logger.Debug("Opening NHibernate session");
|
||||||
_session = sessionFactory.OpenSession(new OrchardSessionInterceptor(_interceptors.ToArray(), Logger));
|
_session = sessionFactory.OpenSession(new OrchardSessionInterceptor(_interceptors.ToArray(), Logger));
|
||||||
|
// When BeginTransaction fails, the exception will be propagated so that
|
||||||
|
// global exception handling code will dispose this session.
|
||||||
_session.BeginTransaction(level);
|
_session.BeginTransaction(level);
|
||||||
_contentManagerSession = _contentManagerSessionFactory();
|
_contentManagerSession = _contentManagerSessionFactory();
|
||||||
}
|
}
|
||||||
|
@@ -161,7 +161,7 @@ namespace Orchard.Environment {
|
|||||||
ActivateShell(context);
|
ActivateShell(context);
|
||||||
|
|
||||||
// If everything went well, return to stop the retry loop
|
// If everything went well, return to stop the retry loop
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
if (i == Retries) {
|
if (i == Retries) {
|
||||||
|
Reference in New Issue
Block a user