Improved DatePicker with time support
authorAlexander Ebert <ebert@woltlab.com>
Mon, 29 Apr 2013 23:54:15 +0000 (01:54 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 29 Apr 2013 23:54:15 +0000 (01:54 +0200)
com.woltlab.wcf/template/headInclude.tpl
wcfsetup/install/files/acp/templates/header.tpl
wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/style/datePicker.less
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 374d3658ac0b410feac0fc28756eb17e2764dbd6..7a34c9f11339693c7454a64eea3eee87a65f79fb 100644 (file)
@@ -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}',
index 7f7e0f14cb37a5761ae453f381efdfef69804986..9ca9398070a24876bda059c32694c5f609db2f19 100644 (file)
@@ -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}',
index 40737f1049c46724e4acd86a1f0634ab57bdd70c..a8ca282a0e7ee7a81d4e6fe9867696b8a7c1f2c7 100755 (executable)
@@ -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'),
index 8d6e5b465b4ef42834d9ebd2175947c13fbbbf33..b31c61f0a3281341b4c49f5d84b8ae2056715f0f 100644 (file)
                        > 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;
-                               }
                        }
                }
        }
index 2d69db590c8028bc264010504812d7b533c8844e..52717e1c8404f643f26db3c4bf24d521cd8d3233 100644 (file)
                <item name="wcf.date.relative.pastDays"><![CDATA[(($days > 1) ? '%day%' : 'Gestern' ) + ', %time%']]></item>
                
                <!-- variables for localized date formats -->
+               <item name="wcf.date.hour"><![CDATA[Stunde]]></item>
+               <item name="wcf.date.minute"><![CDATA[Minute]]></item>
+               
                <item name="wcf.date.month.january"><![CDATA[Januar]]></item>
                <item name="wcf.date.month.february"><![CDATA[Februar]]></item>
                <item name="wcf.date.month.march"><![CDATA[März]]></item>
index 58c834ae548b89dc6dc06262e6948d92633c3f35..5a1e4d304cf3da44cb6a63dcbe451b6dc10471c0 100644 (file)
                <item name="wcf.date.relative.pastDays"><![CDATA[(($days > 1) ? '%day%' : 'Yesterday' ) + ', %time%']]></item>
                
                <!-- variables for localized date formats -->
+               <item name="wcf.date.hour"><![CDATA[Hour]]></item>
+               <item name="wcf.date.minute"><![CDATA[Minute]]></item>
+               
                <item name="wcf.date.month.january"><![CDATA[January]]></item>
                <item name="wcf.date.month.february"><![CDATA[February]]></item>
                <item name="wcf.date.month.march"><![CDATA[March]]></item>