From ab75fde5f331ef6b11fd6658f97e43b9b6fffbfd Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 7 Jan 2016 15:30:00 +0000 Subject: [PATCH] Remove et2_date-timeonly_ro widget definition as it is already defined in et2_date_ro --- etemplate/js/et2_widget_date.js | 37 ++------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/etemplate/js/et2_widget_date.js b/etemplate/js/et2_widget_date.js index e8b1f03aad..626f734c00 100644 --- a/etemplate/js/et2_widget_date.js +++ b/etemplate/js/et2_widget_date.js @@ -1092,39 +1092,6 @@ var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM], } } }); -et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date-time_today", "time_or_date"]); +et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date-time_today", "time_or_date", "date-timeonly_ro"]); + -/** - * @augments et2_date_ro - */ -var et2_date_timeonly_ro = et2_date_ro.extend( -{ - attributes: { - "value": { - "type": "string" - } - }, - /** - * Construtor - * - * @param _value - * @memberOf et2_date_timeonly_ro - */ - set_value: function(_value) { - if(this.egw().preference("timeformat") == "12" && _value.indexOf(":") > 0) { - var parts = _value.split(":"); - if(parts[0] >= 12) { - this.span.text((parts[0] == "12" ? "12" : parseInt(parts[0])-12)+":"+parts[1]+" pm"); - } - else - { - this.span.text(_value + " am"); - } - } - else - { - this.span.text(_value); - } - } -}); -et2_register_widget(et2_date_timeonly_ro, ["date-timeonly_ro"]);