diff -r 6aeb7a756187 -r 3c88a81ff781 ginebra2/chrome/bedrockchrome/windowcount.snippet/windowcount.js --- a/ginebra2/chrome/bedrockchrome/windowcount.snippet/windowcount.js Thu Sep 23 15:32:11 2010 -0400 +++ b/ginebra2/chrome/bedrockchrome/windowcount.snippet/windowcount.js Fri Oct 15 17:30:59 2010 -0400 @@ -9,6 +9,9 @@ * on the display mode. */ +var FILLED_SRC = "/windowcount/filledcircle.png"; +var EMPTY_SRC = "/windowcount/emptycircle.png"; + // // INIT the WindowCount snippet // @@ -18,24 +21,24 @@ this.id = id; this.begin = - ''+ + '
'+ ''+ ''+ ''+ ''+ ''+ - '
'+ ''; this.filledimg = - '' ; + ''; this.emptyimg = - '' ; + ''; this.end = ''+ '
' ; + ''; this.InitWCBar = function() { this.wcOneWindow(); @@ -105,12 +108,12 @@ } this.wcTwoWindows = function() { + var htmlText = '' + this.begin + this.emptyimg + this.emptyimg + this.end; this.setHtmlText(htmlText) - } this.wcThreeWindows = function() { @@ -157,13 +160,14 @@ } //app.debug("setCurrentIndex: View " + window.views.current().type + " Index : " + index); - Icons[index].setAttribute('src', "windowcount.snippet/icons/filledcircle.png"); + Icons[index].setAttribute('src', FILLED_SRC); } this.setSnippetPosition = function() { if (window.snippets.WindowCountBarId ) { + mode = window.chrome.displayMode; if (mode == "portrait") { window.snippets.WindowCountBarId.setPosition(0,27);