From e3d60ee7406577bfe36fb53191314c18320ba86a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 30 Apr 2013 01:54:15 +0200 Subject: [PATCH] Improved DatePicker with time support --- com.woltlab.wcf/template/headInclude.tpl | 2 ++ wcfsetup/install/files/acp/templates/header.tpl | 2 ++ wcfsetup/install/files/js/WCF.js | 3 +++ wcfsetup/install/files/style/datePicker.less | 8 -------- wcfsetup/install/lang/de.xml | 3 +++ wcfsetup/install/lang/en.xml | 3 +++ 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/com.woltlab.wcf/template/headInclude.tpl b/com.woltlab.wcf/template/headInclude.tpl index 374d3658ac..7a34c9f113 100644 --- a/com.woltlab.wcf/template/headInclude.tpl +++ b/com.woltlab.wcf/template/headInclude.tpl @@ -57,6 +57,8 @@ 'wcf.date.relative.pastDays': '{capture assign=relativePastDays}{lang}wcf.date.relative.pastDays{/lang}{/capture}{@$relativePastDays|encodeJS}', 'wcf.date.dateFormat': '{lang}wcf.date.dateFormat{/lang}', 'wcf.date.dateTimeFormat': '{lang}wcf.date.dateTimeFormat{/lang}', + 'wcf.date.hour': '{lang}wcf.date.hour{/lang}', + 'wcf.date.minute': '{lang}wcf.date.minute{/lang}', 'wcf.date.timeFormat': '{lang}wcf.date.timeFormat{/lang}', 'wcf.global.button.add': '{lang}wcf.global.button.add{/lang}', 'wcf.global.button.cancel': '{lang}wcf.global.button.cancel{/lang}', diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 7f7e0f14cb..9ca9398070 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -51,6 +51,8 @@ 'wcf.date.relative.pastDays': '{capture assign=relativePastDays}{lang}wcf.date.relative.pastDays{/lang}{/capture}{@$relativePastDays|encodeJS}', 'wcf.date.dateFormat': '{lang}wcf.date.dateFormat{/lang}', 'wcf.date.dateTimeFormat': '{lang}wcf.date.dateTimeFormat{/lang}', + 'wcf.date.hour': '{lang}wcf.date.hour{/lang}', + 'wcf.date.minute': '{lang}wcf.date.minute{/lang}', 'wcf.date.timeFormat': '{lang}wcf.date.timeFormat{/lang}', 'wcf.global.button.add': '{lang}wcf.global.button.add{/lang}', 'wcf.global.button.cancel': '{lang}wcf.global.button.cancel{/lang}', diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 40737f1049..a8ca282a0e 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2369,9 +2369,12 @@ WCF.Date.Picker = { dayNames: WCF.Language.get('__days'), dayNamesMin: WCF.Language.get('__daysShort'), dayNamesShort: WCF.Language.get('__daysShort'), + hourText: WCF.Language.get('wcf.date.hour'), + minuteText: WCF.Language.get('wcf.date.minute'), monthNames: WCF.Language.get('__months'), monthNamesShort: WCF.Language.get('__monthsShort'), showButtonPanel: false, + showTime: false, showOtherMonths: true, timeFormat: this._timeFormat, yearRange: ($input.hasClass('birthday') ? '-100:+0' : '1900:2038'), diff --git a/wcfsetup/install/files/style/datePicker.less b/wcfsetup/install/files/style/datePicker.less index 8d6e5b465b..b31c61f0a3 100644 --- a/wcfsetup/install/files/style/datePicker.less +++ b/wcfsetup/install/files/style/datePicker.less @@ -145,19 +145,11 @@ > dt { margin-top: @wcfGapTiny !important; width: 100px; - - &.ui_tpicker_time_label { - display: none; - } } > dd { margin-left: 120px; margin-top: @wcfGapTiny !important; - - &.ui_tpicker_time { - display: none; - } } } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 2d69db590c..52717e1c84 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -825,6 +825,9 @@ 1) ? '%day%' : 'Gestern' ) + ', %time%']]> + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 58c834ae54..5a1e4d304c 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -825,6 +825,9 @@ 1) ? '%day%' : 'Yesterday' ) + ', %time%']]> + + + -- 2.20.1