Commit 0bc69116 authored by Andreas Gärtner's avatar Andreas Gärtner

Added sencha refresh to build process;

parent 2f0c4bfa
......@@ -10,6 +10,13 @@
<mkdir dir="${build.dir}" />
</target>
<target name="sencha:refresh">
<exec executable="sencha" dir="${main.dir}">
<arg value="app"/>
<arg value="refresh"/>
</exec>
</target>
<target name="sencha:build:testing">
<exec executable="sencha" dir="${main.dir}">
<arg value="app"/>
......@@ -38,5 +45,5 @@
</copy>
</target>
<target name="run" depends="sencha:build:testing, -assets:testing:copy"/>
<target name="run" depends="sencha:refresh, sencha:build:production, -assets:production:copy"/>
</project>
\ No newline at end of file
......@@ -182,26 +182,6 @@ Ext.application({
launch: function(){
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
// Use native application update depending on manifest file changes on startup
/*var appCache = window.applicationCache;
if (appCache.status !== appCache.UNCACHED) {
appCache.update();
}*/
window.addEventListener('load', function(e) {
window.applicationCache.addEventListener('updateready', function(e) {
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
// New version of ARSnova detected, swap in new chache
window.applicationCache.swapCache();
Ext.Msg.confirm(Messages.NEW_VERSION_TITLE, Messages.NEW_VERSION_AVAILABLE, function(answer) {
if (answer == 'yes') {
window.location.reload();
}
});
}
}, false);
}, false);
this.checkLocalStorage();
this.checkBrowser();
......@@ -217,10 +197,11 @@ Ext.application({
ARSnova.app.getController('Auth').checkLogin();
},
/**
* reload application if manifest file is changed
*/
onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
Ext.Msg.confirm(Messages.NEW_VERSION_TITLE, Messages.NEW_VERSION_AVAILABLE,
function(buttonId) {
if (buttonId === 'yes') {
window.location.reload();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment