mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Preventing date/tim localization shapes from being rendered multiple times
--HG-- branch : 1.4.x
This commit is contained in:
@@ -3,6 +3,13 @@
|
|||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
||||||
|
// prevent the shape from being rendered twice in a page
|
||||||
|
if (WorkContext.GetState<object>("DatePickerLocalization") != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
WorkContext.SetState("DatePickerLocalization", new object());
|
||||||
|
|
||||||
Style.Require("jQueryUI_DatePicker");
|
Style.Require("jQueryUI_DatePicker");
|
||||||
Script.Require("jQueryUI_DatePicker");
|
Script.Require("jQueryUI_DatePicker");
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,14 @@
|
|||||||
@using System.Globalization
|
@using System.Globalization
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
||||||
|
// prevent the shape from being rendered twice in a page
|
||||||
|
if (WorkContext.GetState<object>("TimePickerLocalization") != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
WorkContext.SetState("TimePickerLocalization", new object());
|
||||||
|
|
||||||
Style.Require("jQueryUI_TimePicker");
|
Style.Require("jQueryUI_TimePicker");
|
||||||
Script.Require("jQueryUI_TimePicker");
|
Script.Require("jQueryUI_TimePicker");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user