From 53d1ececc4f59638fa04c50cf38369cfa3b148b2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 4 Nov 2016 21:46:57 +0300 Subject: [PATCH] added loading to the progress, still a stub (not sure how to go about this yet)... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-widgets.js | 5 ++++- ui (gen4)/ui.js | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index 390f52c6..f85d53e1 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -1136,9 +1136,12 @@ var WidgetTestActions = actions.Actions({ // XXX shorten the nested class names... // XXX revise styles... showProgress: ['- Interface/Show progress bar...', - function(text, value, max, msg){ + function(text, value, max){ var viewer = this.ribbons.viewer + var msg = text instanceof Array ? text.slice(1).join(': ') : null + text = text instanceof Array ? text[0] : text + // container... var container = viewer.find('.progress-container') container = container.length == 0 ? diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 7fd1219b..7945d767 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -146,11 +146,13 @@ $(function(){ ig.logger = ig.logger || {emit: function(e, v){ console.log(' ', e, v) - // XXX HACK... - if(e == 'queued'){ + // XXX HACK -- need meaningful status... + if(e == 'queued' + || e == 'found'){ ig.showProgress('Progress', '+0', '+1') - } else if(e == 'loaded' || e == 'done' || e == 'written'){ + } else if(e == 'loaded' || e == 'done' || e == 'written' + || e == 'skipping' || e == 'index'){ ig.showProgress('Progress', '+1') } }}