From adf094cbecdf934e90145503841fc84711e17a26 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 25 Oct 2018 16:39:43 +0300 Subject: [PATCH] minor tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/sort.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui (gen4)/features/sort.js b/ui (gen4)/features/sort.js index c0cd4e01..0b4ab84e 100755 --- a/ui (gen4)/features/sort.js +++ b/ui (gen4)/features/sort.js @@ -98,6 +98,7 @@ module.SortActions = actions.Actions({ Expand one specific method... .expandSortMethod(method) -> [method, ..] + -> null Expand specific methods... .expandSortMethod(method, method, ..) @@ -146,7 +147,8 @@ module.SortActions = actions.Actions({ // return a single method... if(!(methods instanceof Array)){ - return get(methods) + // XXX can we return a function from an action??? + return get(methods) || null } // return multiple methods... @@ -725,6 +727,7 @@ var SortUIActions = actions.Actions({ // XXX do a better action calling scheme... showSortMethodDoc: ['- Sort/', widgets.makeUIDialog(function(method){ + var that = this var data = this.expandSortMethod(method) return $('
') @@ -739,7 +742,9 @@ var SortUIActions = actions.Actions({ 'Sort order:\n ' +data .map(function(m){ - return `${m}`}) + return that.expandSortMethod(m) ? + `${m}` + : m }) .join('\n ')))) })],