From 62ca9e1d1dadca26b7acd31c8f09f5a885c2882a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 7 Jun 2016 21:00:16 +0300 Subject: [PATCH] some tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-status.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/ui (gen4)/features/ui-status.js b/ui (gen4)/features/ui-status.js index 73fbafca..8e1447e5 100755 --- a/ui (gen4)/features/ui-status.js +++ b/ui (gen4)/features/ui-status.js @@ -181,7 +181,17 @@ var StatusBarActions = actions.Actions({ }, ribbon: function(item, gid, img){ var that = this - var n = this.data ? this.data.getRibbonOrder(gid || this.current) : '-' + + // get ribbon number... + var n = (this.data && this.data.ribbon_order.length > 0) ? + this.data.getRibbonOrder(gid || this.current) + : '-' + // flag the base ribbon... + n += (this.data + && this.data.base + && this.data.getRibbon(gid) == this.base) ? + '*' + : '' // make an element... if(typeof(item) == typeof('str')){ @@ -200,7 +210,7 @@ var StatusBarActions = actions.Actions({ }) } - item.text(n + ((this.data && this.data.getRibbon(gid) == this.base) ? '*' : '')) + item.text(n) return item }, @@ -450,6 +460,13 @@ var StatusBarActions = actions.Actions({ this.ribbons.viewer.find('.global-info .index .position').focus().click() } }], + editStatusBarRibbon: ['- Interface/', + function(){ + this.toggleStatusBar('?') == 'none' && this.toggleStatusBar() + + // XXX do this better... + this.ribbons.viewer.find('.global-info .ribbon-number').focus().click() + }], toggleStatusBarIndexMode: ['Interface/Status bar index mode', toggler.CSSClassToggler( function(){ return this.ribbons.viewer.find('.global-info .index') },