mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
added ribbon count to ribbon status indicator...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8296f08eb0
commit
005c030d79
@ -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 {
|
||||||
|
|||||||
@ -187,25 +187,36 @@ 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-number')
|
.addClass('ribbon-index')
|
||||||
.attr('info', 'Current ribbon (click to edit)')
|
.append($('<span>')
|
||||||
.makeEditable()
|
.addClass('ribbon-number')
|
||||||
.on('edit-done', function(_, text){
|
.attr('info', 'Current ribbon (click to edit)')
|
||||||
that.focusRibbon(text == '*' ? that.base : parseInt(text))
|
.makeEditable()
|
||||||
})
|
.on('edit-done', function(_, text){
|
||||||
.focus(function(){
|
that.focusRibbon(text == '*' ? that.base : parseInt(text))
|
||||||
$(this).selectText()
|
})
|
||||||
})
|
.focus(function(){
|
||||||
.blur(function(){
|
$(this).selectText()
|
||||||
that.updateStatusBar()
|
})
|
||||||
})
|
.blur(function(){
|
||||||
|
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(..)
|
||||||
|
|||||||
@ -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...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user