mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +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");
|
||||
Script.Require("jQueryUI_DatePicker");
|
||||
|
||||
|
@@ -3,6 +3,13 @@
|
||||
|
||||
@{
|
||||
|
||||
// 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");
|
||||
Script.Require("jQueryUI_TimePicker");
|
||||
|
||||
|
Reference in New Issue
Block a user