mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Add a hack to have some sort of cache management as well for .ms files, to avoid stupid issue where people need to force the browser cache refresh after upgrades
This commit is contained in:
parent
f769b45c11
commit
7bb8a908b9
1 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,10 @@
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
|
// This is to fetch the "RANDOMID" after script.min.js?version= in
|
||||||
|
// index.html
|
||||||
|
// We later use the same ID as a hacky cache mechanism for the .ms files
|
||||||
|
var ynh_assets_version = document.getElementsByTagName('script')[0].src.split("=")[1];
|
||||||
|
|
||||||
// Get application context
|
// Get application context
|
||||||
var app = Sammy.apps['#main'];
|
var app = Sammy.apps['#main'];
|
||||||
var store = app.store;
|
var store = app.store;
|
||||||
|
@ -319,7 +325,7 @@
|
||||||
$('#modal').modal('hide');
|
$('#modal').modal('hide');
|
||||||
|
|
||||||
// Render content
|
// Render content
|
||||||
var rendered = this.render('views/'+ view +'.ms', data);
|
var rendered = this.render('views/' + view + '.ms?version=' + ynh_assets_version, data);
|
||||||
|
|
||||||
// Update content helper
|
// Update content helper
|
||||||
var leSwap = function() {
|
var leSwap = function() {
|
||||||
|
|
Loading…
Reference in a new issue