mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Remove et2_date-timeonly_ro widget definition as it is already defined in et2_date_ro
This commit is contained in:
parent
8c3b2b9d5b
commit
ab75fde5f3
@ -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"]);
|
||||
|
Loading…
Reference in New Issue
Block a user