mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 10:07:55 +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;
|
||||
};
|
||||
this.getData = function (contentType) {
|
||||
return self._clipboardData[contentType];
|
||||
self._wasInvoked = true;
|
||||
return self._clipboardData[contentType];
|
||||
};
|
||||
this.disable = function() {
|
||||
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 ($) {
|
||||
var closedDialogs = [];
|
||||
|
||||
var disposeClosedDialogs = function () {
|
||||
$.each(closedDialogs, function () {
|
||||
this.dispose();
|
||||
});
|
||||
|
||||
closedDialogs = [];
|
||||
};
|
||||
|
||||
var Dialog = function (templateElementSelector) {
|
||||
var self = this;
|
||||
@@ -20,8 +11,6 @@
|
||||
this.isVisible = false;
|
||||
this._title = this.template.find(".title").html();
|
||||
|
||||
disposeClosedDialogs();
|
||||
|
||||
this.title = function (value) {
|
||||
var titleElement = this.root.find(".title");
|
||||
this._title = value;
|
||||
@@ -57,25 +46,7 @@
|
||||
}
|
||||
|
||||
this.close = function () {
|
||||
this.isVisible = false;
|
||||
|
||||
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.dispose();
|
||||
};
|
||||
|
||||
this.load = function (url, data, method) {
|
||||
@@ -85,19 +56,21 @@
|
||||
this.frame.element.show();
|
||||
this.view.hide();
|
||||
|
||||
resizeIFrame();
|
||||
centerPosition();
|
||||
onWindowResize();
|
||||
this.frame.getDocument().on("keyup", onKeyUp);
|
||||
|
||||
$(window).on("resize", function () {
|
||||
resizeIFrame();
|
||||
centerPosition();
|
||||
});
|
||||
$(window).on("resize", onWindowResize);
|
||||
};
|
||||
|
||||
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.setHtml = function (html) {
|
||||
@@ -129,6 +102,11 @@
|
||||
buttons.toggle(show);
|
||||
};
|
||||
|
||||
var onWindowResize = function () {
|
||||
resizeIFrame();
|
||||
centerPosition();
|
||||
};
|
||||
|
||||
var resizeIFrame = function () {
|
||||
if (self.frame == null)
|
||||
return;
|
||||
@@ -147,7 +125,7 @@
|
||||
|
||||
var onKeyUp = function (e) {
|
||||
var esc = 27;
|
||||
if (e.keyCode == esc) {
|
||||
if (e.keyCode === esc) {
|
||||
self.trigger("command", {
|
||||
command: "cancel"
|
||||
});
|
||||
@@ -191,10 +169,9 @@
|
||||
};
|
||||
|
||||
var updateDialog = function (scope) {
|
||||
//var document = self.frame.getDocument();
|
||||
var dialogSettings = scope.find(".dialog-settings");
|
||||
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 (buttons.length > 0) {
|
||||
|
@@ -13,21 +13,27 @@
|
||||
var command = (string)ViewBag.Command;
|
||||
var titleFormat = (string)ViewBag.TitleFormat;
|
||||
}
|
||||
@Html.ValidationSummary()
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Update", "Element", new { session = Model.SessionKey, area = "Orchard.Layouts" }))) {
|
||||
@* Only render the editor shapes if the dialog is not closing. *@
|
||||
@if (Model.Submitted != true) {
|
||||
@Html.ValidationSummary()
|
||||
using (Html.BeginFormAntiForgeryPost(Url.Action("Update", "Element", new {session = Model.SessionKey, area = "Orchard.Layouts"}))) {
|
||||
foreach (var tab in Model.Tabs) {
|
||||
var id = String.Format("element-{0}", tab.ToLowerInvariant());
|
||||
<div id="@id" class="tab-view">
|
||||
@foreach (var editor in Model.EditorResult.Editors) {
|
||||
var position = ShapePosition.Parse((String)editor.Metadata.Position);
|
||||
var position = ShapePosition.Parse((String) editor.Metadata.Position);
|
||||
if (position.Name == tab) {
|
||||
@Display(editor)
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
@if (Model.Submitted) {
|
||||
else {
|
||||
// See Layout-Dialog.cshtml for more information.
|
||||
Layout.DialogClosing = true;
|
||||
|
||||
using (Script.Foot()) {
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
@@ -1,4 +1,5 @@
|
||||
@{
|
||||
@using System.Collections
|
||||
@{
|
||||
SetMeta("X-UA-Compatible", "IE=edge,chrome=1");
|
||||
Style.Include("admin-dialog.css");
|
||||
Script.Require("jQuery").AtFoot();
|
||||
@@ -9,7 +10,6 @@
|
||||
Model.Header.Add(Display.Title(Title: Model.Title));
|
||||
}
|
||||
}
|
||||
@Display.TokenHint()
|
||||
<div id="layout-content">
|
||||
<div id="layout-main">
|
||||
<div id="main" role="main">
|
||||
@@ -31,3 +31,11 @@
|
||||
</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,23 +445,24 @@
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dir-rtl #media-library-main-navigation > ul { /* sub-navigations, e.g. folders */
|
||||
margin-left: -1px;
|
||||
.dir-rtl #media-library-main-navigation {
|
||||
border-right: inherit;
|
||||
border-left: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.dir-rtl #button-recent i {
|
||||
padding-left:5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
.dir-rtl .media-library-navigation-folder-link i {
|
||||
padding-left:5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
.dir-rtl .media-library-folder ul {
|
||||
padding-left: inherit;
|
||||
padding-right: 16px;
|
||||
padding-left: 0;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.dir-rtl #media-library-main-list {
|
||||
@@ -471,7 +472,12 @@ padding-right: 16px;
|
||||
|
||||
.dir-rtl #media-library-import .import-provider {
|
||||
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 {
|
||||
@@ -490,9 +496,19 @@ padding-right: 16px;
|
||||
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{position:absolute;content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54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8gAAAAGUExURf///////1V89WwAAAACdFJOU/8A5bcwSgAAAEdJREFUeNqckEEOACAIw8r/P21ihIHzJMdlKwzChi8Jk4BLYo8pw3UsDZchIsOFKaDAJFOrSKOWV0bnMMit4zgZb/94zhJgAK06APe0qnuFAAAAAElFTkSuQmCC);margin-left:-5px;margin-right:inherit;color:#fff;right:inherit;left:5px;font-family:Tahoma;z-index:2000}
|
||||
.dir-rtl #media-library-main-list li.selected:before {
|
||||
margin-right: inherit;
|
||||
margin-left: 0;
|
||||
right: inherit;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
.dir-rtl .media-library-main-list-overlay {
|
||||
left: inherit;
|
||||
@@ -501,6 +517,10 @@ padding-right: 16px;
|
||||
}
|
||||
|
||||
.dir-rtl .media-library-main-list-overlay p {
|
||||
padding-right:inherit;
|
||||
padding-left:5px;
|
||||
padding-right: inherit;
|
||||
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) {
|
||||
// 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;
|
||||
|
||||
try {
|
||||
|
||||
// This filter is not reentrant (multiple executions within the same request are
|
||||
// not supported) so child actions are ignored completely.
|
||||
if (filterContext.IsChildAction || !_isCachingRequest)
|
||||
if (!_isCachingRequest)
|
||||
return;
|
||||
|
||||
Logger.Debug("Item '{0}' was rendered.", _cacheKey);
|
||||
|
@@ -5,6 +5,7 @@ Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.10
|
||||
Description: Provides a variety of third-party client-side libraries (stylesheets and scripts) used by other modules.
|
||||
Priority: 5
|
||||
Features:
|
||||
Orchard.Resources:
|
||||
Name: Resources
|
||||
|
@@ -48,12 +48,13 @@ namespace Orchard.Taxonomies {
|
||||
.WithPart("TaxonomyNavigationPart")
|
||||
.WithPart("MenuPart")
|
||||
.WithPart("CommonPart")
|
||||
.WithIdentity()
|
||||
.DisplayedAs("Taxonomy Link")
|
||||
.WithSetting("Description", "Injects menu items from a Taxonomy")
|
||||
.WithSetting("Stereotype", "MenuItem")
|
||||
);
|
||||
|
||||
return 4;
|
||||
return 5;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
@@ -77,5 +78,14 @@ namespace Orchard.Taxonomies {
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
public int UpdateFrom4() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("TaxonomyNavigationMenuItem",
|
||||
cfg => cfg
|
||||
.WithIdentity()
|
||||
);
|
||||
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
}
|
@@ -138,7 +138,7 @@
|
||||
<remove fileExtension=".woff" />
|
||||
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
|
||||
<remove fileExtension=".woff2" />
|
||||
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
|
||||
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
|
||||
|
@@ -70,10 +70,14 @@ namespace Orchard.Data {
|
||||
}
|
||||
|
||||
public void Cancel() {
|
||||
if (_session != null) {
|
||||
|
||||
// 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");
|
||||
_session.Transaction.Rollback();
|
||||
}
|
||||
|
||||
DisposeSession();
|
||||
}
|
||||
}
|
||||
@@ -87,13 +91,15 @@ namespace Orchard.Data {
|
||||
|
||||
try {
|
||||
// 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");
|
||||
_session.Transaction.Commit();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (_contentManagerSession != null) {
|
||||
_contentManagerSession.Clear();
|
||||
}
|
||||
|
||||
Logger.Debug("Disposing session");
|
||||
_session.Close();
|
||||
@@ -111,6 +117,8 @@ namespace Orchard.Data {
|
||||
var sessionFactory = _sessionFactoryHolder.GetSessionFactory();
|
||||
Logger.Debug("Opening NHibernate session");
|
||||
_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);
|
||||
_contentManagerSession = _contentManagerSessionFactory();
|
||||
}
|
||||
|
@@ -161,7 +161,7 @@ namespace Orchard.Environment {
|
||||
ActivateShell(context);
|
||||
|
||||
// If everything went well, return to stop the retry loop
|
||||
return;
|
||||
break;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (i == Retries) {
|
||||
|
Reference in New Issue
Block a user