mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
- date i18n : non standard date formating was totally wrong, full rewrite of date parsing (in getter and setter) relying on datepicker and datetimepicker parsers (they are awfull) - date "now" button do no more close the criteria - ie9 compat. : use history.replaceState only if available in order to prevent bugs with ie9 SVN:trunk[5710]
80 lines
1.6 KiB
JavaScript
80 lines
1.6 KiB
JavaScript
//iTop Search form criteria date
|
|
;
|
|
$(function()
|
|
{
|
|
// the widget definition, where 'itop' is the namespace,
|
|
// 'search_form_criteria_date' the widget name
|
|
$.widget( 'itop.search_form_criteria_date', $.itop.search_form_criteria_date_abstract,
|
|
{
|
|
// default options
|
|
options:
|
|
{
|
|
// // Overload default operator
|
|
// 'operator': 'between_dates',
|
|
// // Available operators
|
|
// 'available_operators': {
|
|
//
|
|
// },
|
|
aInputsParam: [
|
|
{
|
|
"code": "from",
|
|
"code_uc_first":"From",
|
|
"x_picker" : 'datepicker',
|
|
"value_index": 0,
|
|
"onclose_show" : "until",
|
|
"has_time": false,
|
|
},
|
|
{
|
|
"code": "until",
|
|
"code_uc_first":"Until",
|
|
"x_picker" : 'datepicker',
|
|
"value_index": 1,
|
|
"has_time": false,
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
// the constructor
|
|
_create: function()
|
|
{
|
|
var me = this;
|
|
|
|
this._super();
|
|
this.element.addClass('search_form_criteria_date');
|
|
},
|
|
// called when created, and later when changing options
|
|
_refresh: function()
|
|
{
|
|
|
|
},
|
|
// events bound via _bind are removed automatically
|
|
// revert other modifications here
|
|
_destroy: function()
|
|
{
|
|
this.element.removeClass('search_form_criteria_date');
|
|
this._super();
|
|
},
|
|
// _setOptions is called with a hash of all options that are changing
|
|
// always refresh when changing options
|
|
_setOptions: function()
|
|
{
|
|
this._superApply(arguments);
|
|
},
|
|
// _setOption is called for each individual option that is changing
|
|
_setOption: function( key, value )
|
|
{
|
|
this._super( key, value );
|
|
},
|
|
|
|
|
|
//------------------
|
|
// Inherited methods
|
|
//------------------
|
|
|
|
|
|
|
|
|
|
});
|
|
});
|