notes and cleanup....

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-02-08 05:35:11 +03:00
parent 48f88faa85
commit de6850bc36

View File

@ -697,27 +697,22 @@ function(list, options){
// buttons: options... // buttons: options...
// NOTE: the order here is important... // NOTE: the order here is important...
// NOTE: user-added buttons take priority over these, so we do not
// need to check if a button already exists...
if(editable && !options.sort){ if(editable && !options.sort){
// up/down... // up/down...
options.item_order_buttons options.item_order_buttons
&& buttons.indexOf('UP') < 0
&& buttons.push('UP') && buttons.push('UP')
options.item_order_buttons
&& buttons.indexOf('DOWN') < 0
&& buttons.push('DOWN') && buttons.push('DOWN')
// top/bottom... // top/bottom...
options.to_top_button options.to_top_button
&& buttons.indexOf('TO_TOP') < 0
&& buttons.push('TO_TOP') && buttons.push('TO_TOP')
options.to_bottom_button options.to_bottom_button
&& buttons.indexOf('TO_BOTTOM') < 0
&& buttons.push('TO_BOTTOM') && buttons.push('TO_BOTTOM')
} }
// remove... // remove...
editable editable
&& options.delete_button !== false && options.delete_button !== false
&& buttons.indexOf('REMOVE') < 0
&& buttons.push('REMOVE') && buttons.push('REMOVE')
var move = function(p, offset){ var move = function(p, offset){