From 99167e4500e751eadb1a8332a691b26b284af370 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 11 Feb 2016 05:21:49 +0300 Subject: [PATCH] splitout status stuff to features/ui-status.js... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-status.js | 373 ++++++++++++++++++++++++++++++++ ui (gen4)/features/ui.js | 347 ----------------------------- ui (gen4)/viewer.js | 1 + 3 files changed, 374 insertions(+), 347 deletions(-) create mode 100755 ui (gen4)/features/ui-status.js diff --git a/ui (gen4)/features/ui-status.js b/ui (gen4)/features/ui-status.js new file mode 100755 index 00000000..47787001 --- /dev/null +++ b/ui (gen4)/features/ui-status.js @@ -0,0 +1,373 @@ +/********************************************************************** +* +* +* +**********************************************************************/ + +define(function(require){ var module = {} + +//var DEBUG = DEBUG != null ? DEBUG : true + +var toggler = require('lib/toggler') +var actions = require('lib/actions') +var features = require('lib/features') + +var data = require('data') +var images = require('images') +var ribbons = require('ribbons') + +var core = require('features/core') +var base = require('features/base') + + + +/*********************************************************************/ + +// XXX add setup / teardown... +// XXX might be a good idea to merge this with single image mode... +var makeStateIndicator = function(type){ + return $('
') + .addClass('state-indicator-container ' + type || '') +} + +// XXX do we need this??? +var makeStateIndicatorItem = function(container, type, text){ + var item = $('
') + .addClass('item '+ type || '') + .attr('text', text) + this.ribbons.viewer.find('.state-indicator-container.'+container) + .append(item) + return item +} + +// XXX should we use this or makeStateIndicatorItem(..)??? +// ...investigate the features of the above... +// - .attr('text')??? +var makeExpandingInfoItem = function(container, cls, align, full_only){ + var e = $('') + .addClass(cls + ' expanding-text ' + align +' '+ (full_only && 'full-only')) + .append($('')) + .append($('