Ahora las imagenes se refrescan automaticamente cuando se cambian

This commit is contained in:
Juan Ferrer Toribio 2015-09-04 10:50:06 +02:00
parent 2a433ac80f
commit 1d50d7b874
5 changed files with 19 additions and 15 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.212-deb8) stable; urgency=low
hedera-web (1.213-deb8) stable; urgency=low
* Initial Release.

View File

@ -4,6 +4,6 @@
}
.packages .box
{
max-width: 50em;
max-width: 40em;
margin: 0 auto;
}

View File

@ -4,6 +4,6 @@
}
.provinces .box
{
max-width: 50em;
max-width: 40em;
margin: 0 auto;
}

View File

@ -83,9 +83,10 @@ Htk.ColumnImage = new Class
,value: this.value
,tr: tr
,error: false
,stamp: null
};
this.setSrc (cell, true);
this.setSrc (cell);
if (this.showFull)
{
@ -102,7 +103,7 @@ Htk.ColumnImage = new Class
return td;
}
,setSrc: function (cell, useCache)
,setSrc: function (cell)
{
if (cell.value)
{
@ -113,8 +114,8 @@ Htk.ColumnImage = new Class
url += cell.value;
if (!useCache)
url += '?'+ new Date ().getTime ();
if (cell.stamp)
url += '?'+ cell.stamp;
cell.img.src = url;
}
@ -133,10 +134,14 @@ Htk.ColumnImage = new Class
,onMouseOver: function (cell)
{
var fullDir = this._fullDir ? this._fullDir : 'full';
var src = this._fullDir ? this._fullDir : 'full';
src += '/'+ cell.value;
if (cell.stamp)
src += '?'+ cell.stamp;
if (!cell.error)
this.fullImage.show (this.basedir +'/'+ fullDir, cell.value);
this.fullImage.show (this.basedir +'/'+ src);
}
,onMouseOut: function ()
@ -166,13 +171,14 @@ Htk.ColumnImage = new Class
,onNameChange: function (cell, editor, value)
{
cell.value = value;
this.setSrc (cell, true);
this.setSrc (cell);
this.changed (cell.tr, value);
}
,onFileUpload: function (cell, editor)
{
this.setSrc (cell, false);
cell.stamp = new Date ().getTime ();
this.setSrc (cell);
this.popup.hide ();
}

View File

@ -42,10 +42,8 @@ Htk.FullImage = new Class
return parseInt (Vn.Browser.getPageYOffset () + (Vn.Browser.getInnerHeight () - height) / 2) +'px';
}
,show: function (basedir, file)
{
var src = basedir +'/'+ file;
,show: function (src)
{
if (this.closed && this.src == src)
return;