added window title update with image name...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-06-11 17:12:50 +04:00
parent 952618f1a2
commit 6742a91902
3 changed files with 11 additions and 0 deletions

View File

@ -82,6 +82,11 @@ if(window.CEF_dumpJSON != null){
window.reload = function(){
gui.Window.get().reload()
}
window.setWindowTitle = function(text){
var title = text +' - '+ APP_NAME
gui.Window.get().title = title
$('.title-bar .title').text(title)
}
// load UI stuff...
$(function(){

View File

@ -7,6 +7,8 @@
//var DEBUG = DEBUG != null ? DEBUG : true
var APP_NAME = 'ImageGrid.Viewer'
var DATA_ATTR = 'DATA'
var LOAD_SCREENS = 6

View File

@ -211,6 +211,10 @@ function setupDataBindings(viewer){
.on('focusingImage', function(evt, image){
image = $(image)
DATA.current = getImageGID(image)
if(window.setWindowTitle != null){
setWindowTitle(IMAGES[getImageGID(image)].path.split('/').pop())
}
})