From 4e1aa60c167b3593b8a1081c1ff60557e90c2d0f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 07 Jan 2016 03:48:18 -0500 Subject: [PATCH] Make possible to disable authentication via rcube_smtp::connect() arguments (#1490621) --- plugins/jqueryui/js/jquery-ui-1.10.4.custom.min.js | 38 ++++++++++++++++++++++++++++++-------- 1 files changed, 30 insertions(+), 8 deletions(-) diff --git a/plugins/jqueryui/js/jquery-ui-1.10.4.custom.min.js b/plugins/jqueryui/js/jquery-ui-1.10.4.custom.min.js index d7c9e59..73248ec 100755 --- a/plugins/jqueryui/js/jquery-ui-1.10.4.custom.min.js +++ b/plugins/jqueryui/js/jquery-ui-1.10.4.custom.min.js @@ -89,13 +89,14 @@ .attr('aria-labelledby', inst.id + '-dp-title'); } else { - inst.dpDiv.attr('id', inst.id + '-dp-widget') + var widgetId = inst.dpDiv.attr('id') || inst.id + '-dp-widget'; + inst.dpDiv.attr('id', widgetId) .attr('aria-hidden', 'true') .attr('aria-labelledby', inst.id + '-dp-title'); $(inst.input).attr('aria-haspopup', 'true') .attr('aria-expanded', 'false') - .attr('aria-owns', inst.id + '-dp-widget'); + .attr('aria-owns', widgetId); } return inst; @@ -108,17 +109,23 @@ var that = this; // register additional keyboard events to control date selection with cursor keys - $(target).bind('keyup', function(event) { + $(target).unbind('keydown.datepicker-extended').bind('keydown.datepicker-extended', function(event) { var inc = 1; switch (event.keyCode) { case 109: + case 173: case 189: // "minus" inc = -1; + case 61: case 107: case 187: // "plus" + // do nothing if the input does not contain full date string + if (this.value.length < that._formatDate(inst, inst.selectedDay, inst.selectedMonth, inst.selectedYear).length) { + return true; + } that._adjustInstDate(inst, inc, 'D'); - that._selectDate(target, that._formatDate(inst, inst.selectedDay, inst.selectedMonth, inst.selectedYear)); - break; + that._selectDateRC(target, that._formatDate(inst, inst.selectedDay, inst.selectedMonth, inst.selectedYear)); + return false; case $.ui.keyCode.UP: case $.ui.keyCode.DOWN: @@ -207,7 +214,7 @@ .attr('tabindex', inst.inline ? '0' : '-1') .attr('role', 'grid') .attr('aria-readonly', 'true') - .attr('aria-activedescendant', activeCell.attr('id') || '') + .attr('aria-activedescendant', activeCell ? activeCell.attr('id') : '') .find('td').attr('role', 'gridcell').attr('aria-selected', 'false') .find('a').attr('tabindex', '-1'); @@ -221,8 +228,23 @@ inst.dpDiv.find('.ui-datepicker-calendar').focus(); inst._hasfocus = false; } - } + }, + _selectDateRC: function(id, dateStr) { + var target = $(id), inst = this._getInst(target[0]); + + dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); + if (inst.input) { + inst.input.val(dateStr); + } + this._updateAlternate(inst); + if (inst.input) { + inst.input.trigger("change"); // fire the change event + } + if (inst.inline) { + this._updateDatepicker(inst); + } + } }); -}(jQuery)); \ No newline at end of file +}(jQuery)); -- Gitblit v1.9.1