Source
if ((!isset('width', obj.objDims) || obj.objDims.width < 0) && isset('shiftXleft', obj.objDims) && isset('shiftXright', obj.objDims)) {
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Time range selector.
jQuery(function($) {
var $container = $('.filter-space').first(),
xhr = null,
endpoint = new Curl('zabbix.php', false),
element = {
from: $container.find('[name=from]'),
to: $container.find('[name=to]'),
from_clndr: $container.find('[name=from_calendar]'),
to_clndr: $container.find('[name=to_calendar]'),
apply: $container.find('[name=apply]'),
increment: $container.find('.btn-time-right'),
decrement: $container.find('.btn-time-left'),
zoomout: $container.find('.btn-time-out'),
quickranges: $container.find('.time-quick a'),
label: $container.find('.btn-time')
},
request_data = {
idx: $container.data('profileIdx'),
idx2: $container.data('profileIdx2'),
from: element.from.val(),
to: element.to.val()
},
ui_accessible = ($container.data('accessible') == 1),
ui_disabled = false;
endpoint.setArgument('action', 'timeselector.update');
endpoint.addSID();
endpoint.setArgument('type', 11); // PAGE_TYPE_TEXT_RETURN_JSON
$.subscribe('timeselector.rangechange timeselector.decrement timeselector.increment timeselector.zoomout' +
' timeselector.rangeoffset',
timeSelectorEventHandler
);
element.from.keydown(submitChangeHandler);
element.to.keydown(submitChangeHandler);
// Time selector DOM elements event triggerers initialization.
$container.on('click', function(event) {
var action = '',
data = {},
$target = $(event.target);