Browse Source

auto-reload the texture image after uploading a new one

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
66cfae3f60
  1. 15
      pyweb/mumble/templates/mumble/mumble.html

15
pyweb/mumble/templates/mumble/mumble.html

@ -131,7 +131,7 @@
flex: 1,
height: 200,
title: gettext("Texture"),
html: String.format('<img src="{0}" alt="Avatar" />',
html: String.format('<img src="{0}" alt="Avatar" id="img_avatar" />',
"{% url mumble.views.showTexture MumbleServer.id MumbleAccount.id %}"),
}, {
flex: 1,
@ -157,7 +157,18 @@
}],
buttons: [{
text: gettext('Submit'),
handler: function(){ this.ownerCt.ownerCt.getForm().submit(); },
handler: function(){
this.ownerCt.ownerCt.getForm().submit({
success: function(form, action){
var now = new Date();
var img = Ext.fly("img_avatar");
img.dom.src = String.format("{0}?_dc={1}",
"{% url mumble.views.showTexture MumbleServer.id MumbleAccount.id %}?_dc=",
now.getTime()
);
}
});
},
}],
}],
},

Loading…
Cancel
Save