mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added stub info -- the architecture is not final...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
87f77e804a
commit
dae24acc1b
@ -1202,6 +1202,9 @@ stretching in width... */
|
|||||||
.overlay-info > :not(:first-child) {
|
.overlay-info > :not(:first-child) {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
.overlay-info .info {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
/* XXX REUSE: this is the same as selected/bookmarked image markers... */
|
/* XXX REUSE: this is the same as selected/bookmarked image markers... */
|
||||||
.overlay-info .marked,
|
.overlay-info .marked,
|
||||||
.overlay-info .marked:after,
|
.overlay-info .marked:after,
|
||||||
|
|||||||
@ -1068,6 +1068,9 @@ stretching in width... */
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.overlay-info .info {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
/* XXX REUSE: this is the same as selected/bookmarked image markers... */
|
/* XXX REUSE: this is the same as selected/bookmarked image markers... */
|
||||||
.overlay-info .marked,
|
.overlay-info .marked,
|
||||||
|
|||||||
@ -52,6 +52,7 @@ var ImageStateIndicatorActions = actions.Actions({
|
|||||||
'index',
|
'index',
|
||||||
//'path',
|
//'path',
|
||||||
'gid',
|
'gid',
|
||||||
|
'info',
|
||||||
|
|
||||||
// separates left/right aligned elements...
|
// separates left/right aligned elements...
|
||||||
'---',
|
'---',
|
||||||
@ -113,6 +114,14 @@ var ImageStateIndicatorActions = actions.Actions({
|
|||||||
//$(this)
|
//$(this)
|
||||||
// .prop('contenteditable', true)
|
// .prop('contenteditable', true)
|
||||||
// XXX
|
// XXX
|
||||||
|
})
|
||||||
|
// XXX STUB...
|
||||||
|
.on('mouseover', function(){
|
||||||
|
that.showInfo('Image position (click to edit image position)')
|
||||||
|
})
|
||||||
|
// XXX STUB...
|
||||||
|
.on('mouseout', function(){
|
||||||
|
that.hideInfo()
|
||||||
}))
|
}))
|
||||||
.append($('<span>')
|
.append($('<span>')
|
||||||
.addClass('length')
|
.addClass('length')
|
||||||
@ -121,6 +130,14 @@ var ImageStateIndicatorActions = actions.Actions({
|
|||||||
$(this).parent()
|
$(this).parent()
|
||||||
.toggleClass('global')
|
.toggleClass('global')
|
||||||
that.updateStateIndicators()
|
that.updateStateIndicators()
|
||||||
|
})
|
||||||
|
// XXX STUB...
|
||||||
|
.on('mouseover', function(){
|
||||||
|
that.showInfo('Image position (click to toggle ribbon/global)')
|
||||||
|
})
|
||||||
|
// XXX STUB...
|
||||||
|
.on('mouseout', function(){
|
||||||
|
that.hideInfo()
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// update...
|
// update...
|
||||||
@ -193,6 +210,16 @@ var ImageStateIndicatorActions = actions.Actions({
|
|||||||
.click(function(){
|
.click(function(){
|
||||||
that['toggle'+elem.capitalize()]()
|
that['toggle'+elem.capitalize()]()
|
||||||
})
|
})
|
||||||
|
// XXX STUB...
|
||||||
|
.on('mouseover', function(){
|
||||||
|
that.showInfo('Image '
|
||||||
|
+(elem == 'mark' ? 'selection' : 'bookmark')
|
||||||
|
+' status (click to toggle)')
|
||||||
|
})
|
||||||
|
// XXX STUB...
|
||||||
|
.on('mouseout', function(){
|
||||||
|
that.hideInfo()
|
||||||
|
})
|
||||||
|
|
||||||
// update...
|
// update...
|
||||||
} else if(action == 'update'){
|
} else if(action == 'update'){
|
||||||
@ -214,6 +241,25 @@ var ImageStateIndicatorActions = actions.Actions({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
bookmark: 'mark',
|
bookmark: 'mark',
|
||||||
|
|
||||||
|
// XXX STUB
|
||||||
|
// XXX need to style this in an appropriate way...
|
||||||
|
// ...might not be a good spot for this...
|
||||||
|
// XXX might be a good idea to make the info global, e.g. show
|
||||||
|
// info for anything that either has or is nested in an
|
||||||
|
// element that has an info attr...
|
||||||
|
info: function(action, container, elem, gid){
|
||||||
|
// construct...
|
||||||
|
if(action == 'make'){
|
||||||
|
return $('<span>')
|
||||||
|
.addClass('info')
|
||||||
|
.hide()
|
||||||
|
|
||||||
|
// remove...
|
||||||
|
} else if(action == 'remove'){
|
||||||
|
container.find('.info').remove()
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// XXX should this be a toggler???
|
// XXX should this be a toggler???
|
||||||
@ -313,6 +359,22 @@ var ImageStateIndicatorActions = actions.Actions({
|
|||||||
return this.ribbons.viewer.find('.state-indicator-container.global-info') },
|
return this.ribbons.viewer.find('.state-indicator-container.global-info') },
|
||||||
function(){ return this.config['global-state-indicator-modes'] },
|
function(){ return this.config['global-state-indicator-modes'] },
|
||||||
function(state){ this.config['global-state-indicator-mode'] = state }) ],
|
function(state){ this.config['global-state-indicator-mode'] = state }) ],
|
||||||
|
|
||||||
|
|
||||||
|
// Should these be a separate class???
|
||||||
|
showInfo: ['- Interface/',
|
||||||
|
function(text){
|
||||||
|
this.ribbons.viewer.find('.state-indicator-container.global-info .info')
|
||||||
|
.text(text)
|
||||||
|
.stop()
|
||||||
|
.css('opacity', 1)
|
||||||
|
.show()
|
||||||
|
}],
|
||||||
|
hideInfo: ['- Interface/',
|
||||||
|
function(){
|
||||||
|
this.ribbons.viewer.find('.state-indicator-container.global-info .info')
|
||||||
|
.fadeOut()
|
||||||
|
}]
|
||||||
})
|
})
|
||||||
|
|
||||||
// XXX an alternative approach:
|
// XXX an alternative approach:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user