mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
Adjust speed of double click trigger for taglist item modification
This commit is contained in:
parent
0f362fa6a0
commit
0d1a1c3f4a
@ -3937,52 +3937,58 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
var zIndex = 100;
|
||||
var dragItem = jQuery('div.ms-sel-item:not(div.ui-draggable)');
|
||||
|
||||
dragItem.draggable({
|
||||
appendTo:'body',
|
||||
//Performance wise better to not add ui-draggable class to items since we are not using that class
|
||||
containment:'document',
|
||||
distance: 0,
|
||||
cursor:'move',
|
||||
cursorAt:{left:2},
|
||||
//cancel dragging on close button to avoid conflict with close action
|
||||
cancel:'.ms-close-btn',
|
||||
/**
|
||||
* function to act on draggable item on revert's event
|
||||
* @returns {Boolean} return true
|
||||
*/
|
||||
revert: function (){
|
||||
this.parent().find('.ms-sel-item').css('position','relative');
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* function to act as draggable starts dragging
|
||||
*
|
||||
* @param {type} event
|
||||
* @param {type} ui
|
||||
*/
|
||||
start:function(event, ui)
|
||||
{
|
||||
var dragItem = jQuery(this);
|
||||
if (event.ctrlKey || event.metaKey)
|
||||
if (dragItem.length > 0)
|
||||
{
|
||||
dragItem.draggable({
|
||||
appendTo:'body',
|
||||
//Performance wise better to not add ui-draggable class to items since we are not using that class
|
||||
containment:'document',
|
||||
distance: 0,
|
||||
cursor:'move',
|
||||
cursorAt:{left:2},
|
||||
//cancel dragging on close button to avoid conflict with close action
|
||||
cancel:'.ms-close-btn',
|
||||
/**
|
||||
* function to act on draggable item on revert's event
|
||||
* @returns {Boolean} return true
|
||||
*/
|
||||
revert: function (){
|
||||
this.parent().find('.ms-sel-item').css('position','relative');
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* function to act as draggable starts dragging
|
||||
*
|
||||
* @param {type} event
|
||||
* @param {type} ui
|
||||
*/
|
||||
start:function(event, ui)
|
||||
{
|
||||
dragItem.addClass('mailCompose_copyEmail')
|
||||
.css('cursor','copy');
|
||||
var dragItem = jQuery(this);
|
||||
if (event.ctrlKey || event.metaKey)
|
||||
{
|
||||
dragItem.addClass('mailCompose_copyEmail')
|
||||
.css('cursor','copy');
|
||||
}
|
||||
dragItem.css ('z-index',zIndex++);
|
||||
dragItem.css('position','absolute');
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {type} event
|
||||
* @param {type} ui
|
||||
*/
|
||||
create:function(event,ui)
|
||||
{
|
||||
jQuery(this).css('css','move');
|
||||
}
|
||||
dragItem.css ('z-index',zIndex++);
|
||||
dragItem.css('position','absolute');
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {type} event
|
||||
* @param {type} ui
|
||||
*/
|
||||
create:function(event,ui)
|
||||
{
|
||||
jQuery(this).css('css','move');
|
||||
}
|
||||
}).draggable('disable');
|
||||
setTimeout(function(){dragItem.draggable('enable');},400)
|
||||
}).draggable('disable');
|
||||
window.setTimeout(function(){
|
||||
|
||||
if(dragItem && dragItem.data() && typeof dragItem.data()['uiDraggable'] !== 'undefined') dragItem.draggable('enable');
|
||||
},100);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
10
phpgwapi/js/jquery/magicsuggest/magicsuggest.js
vendored
10
phpgwapi/js/jquery/magicsuggest/magicsuggest.js
vendored
@ -1024,7 +1024,7 @@
|
||||
|
||||
$.each(_selection, function(index, value){
|
||||
|
||||
var selectedItemEl, delItemEl,editItemEl,
|
||||
var selectedItemEl, delItemEl,
|
||||
selectedItemHtml = cfg.selectionRenderer !== null ? cfg.selectionRenderer.call(ref, value) : value[cfg.displayField];
|
||||
|
||||
var validCls = self._validateSingleItem(value[cfg.displayField]) ? '' : ' ms-sel-invalid';
|
||||
@ -1050,7 +1050,7 @@
|
||||
|
||||
delItemEl.click($.proxy(handlers._onTagTriggerClick, ref));
|
||||
if (cfg.allowFreeEntries === true){
|
||||
selectedItemEl.dblclick($.proxy(handlers._onTagEditTriggerClick, ref));
|
||||
selectedItemEl.dblclick($.proxy(handlers._onTagEditTriggerDblClick, ref));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1280,7 +1280,7 @@
|
||||
* Triggered when focusing on the container div. Will focus on the input field instead.
|
||||
* @private
|
||||
*/
|
||||
_onFocus: function(e) {
|
||||
_onFocus: function() {
|
||||
if (!_cntInMf)
|
||||
{
|
||||
ms.input.focus();
|
||||
@ -1328,7 +1328,7 @@
|
||||
self._updateHelper(cfg.minCharsRenderer.call(this, cfg.minChars - curLength));
|
||||
}
|
||||
|
||||
setTimeout(function(){self._renderSelection()},300);
|
||||
setTimeout(function(){self._renderSelection()},400);
|
||||
$(ms).trigger('focus', [ms]);
|
||||
}
|
||||
},
|
||||
@ -1496,7 +1496,7 @@
|
||||
* @param e
|
||||
* @private
|
||||
*/
|
||||
_onTagEditTriggerClick: function(e) {
|
||||
_onTagEditTriggerDblClick: function(e) {
|
||||
var itemData = $(e.currentTarget).data('json');
|
||||
if (ms.input.val() === '')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user