Make a delay before favorites sorting action starts in order to prevent accidental sorting action

This commit is contained in:
Hadi Nategh 2015-01-14 17:00:47 +00:00
parent 26bbb237c3
commit f9e28d24e8
2 changed files with 2 additions and 0 deletions

View File

@ -167,6 +167,7 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],
items:'li:not([data-id$="add"])',
placeholder:'ui-fav-sortable-placeholder',
delay: 250, //(millisecond) delay before the sorting should start
update: function (event, ui)
{
self.favSortedList = jQuery(this).sortable('toArray', {attribute:'data-id'});

View File

@ -366,6 +366,7 @@ var AppJS = Class.extend(
jQuery('ul','#favorite_sidebox_'+this.appname).sortable({
items:'li:not([data-id$="add"])',
placeholder:'ui-fav-sortable-placeholder',
delay:250, //(millisecond) delay before the sorting should start
helper: function(event, item) {
// We'll need to know which app this is for
item.attr('data-appname',self.appname);