Preventing date/tim localization shapes from being rendered multiple times

--HG--
branch : 1.4.x
This commit is contained in:
Sebastien Ros
2012-05-11 14:09:24 -07:00
parent 080eabf1b5
commit 2a054f3ac4
2 changed files with 15 additions and 1 deletions

View File

@@ -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");

View File

@@ -2,7 +2,14 @@
@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");
Script.Require("jQueryUI_TimePicker");