From 010f8dabf8c538091103b012d6f200ae9744709c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 18 Jan 2017 20:57:29 +0300 Subject: [PATCH] docs... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index f176d86c..a1ad026f 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -217,6 +217,9 @@ function(list, options){ // // length_limit: , // +// // list of items to mark for removal... +// to_remove: [ ... ], +// // // called when an item is opend... // // // // NOTE: this is simpler that binding to the global open event @@ -251,6 +254,9 @@ function(list, options){ // NOTE: this will push a remove button to the end of the button list, // this can be disabled by setting .no_delete_button to false in // options... +// NOTE: this is not designed to be used multiple times in one dialog, +// if multiple lists need to be edited use multiple (nested) +// dialogs (one per list)... // // XXX add sort buttons: up/down/top/bottom... Items.EditableList = @@ -300,6 +306,12 @@ function(list, options){ // make the list... var res = make.List(lst, options) + // mark items for removal -- if a list is given by user... + to_remove.forEach(function(e){ + dialog.filter('"'+ e +'"') + .toggleClass('strike-out') + }) + options.itemopen && res.on('open', function(){ options.itemopen(dialog.selected) })