mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Ensuring the Blog SummaryAdmin template pulls in required scripts and making a couple JS functions better jQuery citizens
--HG-- branch : dev
This commit is contained in:
@@ -85,11 +85,12 @@
|
|||||||
var firstError = _this.find(".input-validation-error").first();
|
var firstError = _this.find(".input-validation-error").first();
|
||||||
// try to focus the first error on the page
|
// try to focus the first error on the page
|
||||||
if (firstError.size() === 1) {
|
if (firstError.size() === 1) {
|
||||||
return firstError.focus();
|
firstError.focus();
|
||||||
|
return _this;
|
||||||
}
|
}
|
||||||
// or, give it up to the browser to autofocus
|
// or, give it up to the browser to autofocus
|
||||||
if ('autofocus' in document.createElement('input')) {
|
if ('autofocus' in document.createElement('input')) {
|
||||||
return;
|
return _this;
|
||||||
}
|
}
|
||||||
// otherwise, make the autofocus attribute work
|
// otherwise, make the autofocus attribute work
|
||||||
var autofocus = _this.find(":input[autofocus]").first();
|
var autofocus = _this.find(":input[autofocus]").first();
|
||||||
@@ -102,7 +103,7 @@
|
|||||||
|
|
||||||
// give it up to the browser to handle placeholder text
|
// give it up to the browser to handle placeholder text
|
||||||
if ('placeholder' in document.createElement('input')) {
|
if ('placeholder' in document.createElement('input')) {
|
||||||
return;
|
return _this;
|
||||||
}
|
}
|
||||||
// otherwise, make the placeholder attribute work
|
// otherwise, make the placeholder attribute work
|
||||||
$(":input[placeholder]")
|
$(":input[placeholder]")
|
||||||
|
@@ -3,8 +3,9 @@
|
|||||||
@using Orchard.ContentManagement;
|
@using Orchard.ContentManagement;
|
||||||
@using Orchard.Utility.Extensions;
|
@using Orchard.Utility.Extensions;
|
||||||
@{
|
@{
|
||||||
ContentItem contentItem = Model.ContentItem;
|
Script.Require("ShapesBase");
|
||||||
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
|
ContentItem contentItem = Model.ContentItem;
|
||||||
|
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
|
||||||
}
|
}
|
||||||
<div class="summary" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
|
<div class="summary" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
|
||||||
<div class="properties">
|
<div class="properties">
|
||||||
|
Reference in New Issue
Block a user