added ribbon count to ribbon status indicator...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-12-14 02:06:50 +03:00
parent 8296f08eb0
commit 005c030d79
3 changed files with 33 additions and 14 deletions

View File

@ -1394,7 +1394,7 @@ stretching in width... */
opacity: 0.6; opacity: 0.6;
} }
*/ */
.overlay-info .ribbon-number[base] { .overlay-info .ribbon-index[base] {
/* NOTE: we are using shadow instead of a border or underline /* NOTE: we are using shadow instead of a border or underline
here as we need to control both the uniform shading and here as we need to control both the uniform shading and
placement without overcomplicating things when having placement without overcomplicating things when having
@ -1402,6 +1402,13 @@ stretching in width... */
//border-bottom: solid 2px yellow; //border-bottom: solid 2px yellow;
box-shadow: 0 -2px 0 0 yellow inset; box-shadow: 0 -2px 0 0 yellow inset;
} }
.overlay-info .ribbon-count {
opacity: 0.3;
font-size: small;
}
.overlay-info .ribbon-count:before {
content: "/";
}
/* changes */ /* changes */
.overlay-info .changes { .overlay-info .changes {

View File

@ -187,10 +187,13 @@ var StatusBarActions = actions.Actions({
var n = (this.data && this.data.ribbon_order.length > 0) ? var n = (this.data && this.data.ribbon_order.length > 0) ?
this.data.getRibbonOrder(gid || this.current) this.data.getRibbonOrder(gid || this.current)
: '-' : '-'
var t = this.data ? this.data.ribbon_order.length : null
// make an element... // make an element...
if(typeof(item) == typeof('str')){ if(typeof(item) == typeof('str')){
item = $('<span>') item = $('<span>')
.addClass('ribbon-index')
.append($('<span>')
.addClass('ribbon-number') .addClass('ribbon-number')
.attr('info', 'Current ribbon (click to edit)') .attr('info', 'Current ribbon (click to edit)')
.makeEditable() .makeEditable()
@ -202,10 +205,18 @@ var StatusBarActions = actions.Actions({
}) })
.blur(function(){ .blur(function(){
that.updateStatusBar() that.updateStatusBar()
}) }))
.append($('<span>')
.addClass('ribbon-count')
.attr('info', 'Number of ribbons'))
} }
item.html(n) item
.find('.ribbon-number')
.html(n)
.end()
.find('.ribbon-count')
.html(t || '')
// flag the base ribbon... // flag the base ribbon...
// NOTE: for some reason can't get jQuery .prop(..)/.removeProp(..) // NOTE: for some reason can't get jQuery .prop(..)/.removeProp(..)

View File

@ -113,6 +113,7 @@ $(function(){
'experiments', 'experiments',
//'-commandline', //'-commandline',
//'-ui-partial-ribbons',
// XXX BUG: disabling features on this level does not // XXX BUG: disabling features on this level does not
// work, yet works deeper down... // work, yet works deeper down...