mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
YAF: "ajaxified" save button, fixed a bug where internet explorer would cache ajax calls
git-svn-id: https://svn.fhem.de/fhem/trunk@3569 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bd78b356f5
commit
e6ddcf70bf
@ -360,6 +360,12 @@ sub YAF_Request ($@) {
|
||||
YAF_Print("0");
|
||||
}
|
||||
}
|
||||
#-- save config
|
||||
elsif($function eq "saveconfig"){
|
||||
fhem("save");
|
||||
Log 3, "Saved running config";
|
||||
YAF_Print("1");
|
||||
}
|
||||
else {
|
||||
YAF_Print("0");
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ function init_menue() {
|
||||
|
||||
$("#button_saveconfig").button({
|
||||
icons: {
|
||||
secondary: "ui-icon-pencil"
|
||||
secondary: "ui-icon-disk"
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -422,8 +422,29 @@ function init_handlers() {
|
||||
});
|
||||
|
||||
$("#button_saveconfig").click(function () {
|
||||
window.location.href = "../../../../fhem?cmd=save";
|
||||
return false;
|
||||
//window.location.href = "../../../../fhem?cmd=save";
|
||||
//return false;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
async: true,
|
||||
url: "../../ajax/global/saveconfig",
|
||||
context: document.body,
|
||||
success: function (jsondata) {
|
||||
//console.log("Config saved " + jsondata);
|
||||
$("#button_saveconfig").button({
|
||||
icons: {
|
||||
secondary: "ui-icon-check"
|
||||
}
|
||||
});
|
||||
var timeoutID = window.setTimeout(function () {
|
||||
$("#button_saveconfig").button({
|
||||
icons: {
|
||||
secondary: "ui-icon-disk"
|
||||
}
|
||||
});
|
||||
},3000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#widget_menue_delete").click(function () {
|
||||
|
@ -66,6 +66,7 @@
|
||||
|
||||
// Initialisiert die Oberfläche
|
||||
function init() {
|
||||
$.ajaxSetup({ cache: false });
|
||||
init_tabs();
|
||||
init_menue();
|
||||
$("#widget_menue").hide();
|
||||
|
@ -17,7 +17,7 @@ DIR FHEM/YAF/www/smoothness/images
|
||||
DIR FHEM/YAF/www/img
|
||||
DIR FHEM/YAF/www/js
|
||||
DIR FHEM/YAF/xml
|
||||
UPD 2013-07-23_20:45:00 11477 FHEM/01_YAF.pm
|
||||
UPD 2013-08-01_11:10:00 11623 FHEM/01_YAF.pm
|
||||
UPD 2013-05-15_20:00:00 6590 FHEM/YAF/widgets/fs20st/fs20st.pm
|
||||
UPD 2013-07-31_15:30:00 7548 FHEM/YAF/widgets/fht80/fht80.pm
|
||||
UPD 2013-07-31_15:30:00 6534 FHEM/YAF/widgets/fhttk/fhttk.pm
|
||||
@ -27,9 +27,9 @@ UPD 2013-05-15_20:00:00 2608 FHEM/YAF/www/img/loading.gif
|
||||
UPD 2013-05-15_20:00:00 766 FHEM/YAF/www/img/lamp_off.png
|
||||
UPD 2013-05-15_20:00:00 19226 FHEM/YAF/www/img/background.png
|
||||
UPD 2013-05-15_20:00:00 831 FHEM/YAF/www/img/lamp_on.png
|
||||
UPD 2013-07-31_15:30:00 11957 FHEM/YAF/www/js/yaf-basics.js
|
||||
UPD 2013-08-01_11:10:00 12433 FHEM/YAF/www/js/yaf-basics.js
|
||||
UPD 2013-07-31_15:30:00 10727 FHEM/YAF/www/js/yaf-dialogs.js
|
||||
UPD 2013-07-31_15:30:00 7512 FHEM/YAF/www/yaf.htm
|
||||
UPD 2013-08-01_11:10:00 7547 FHEM/YAF/www/yaf.htm
|
||||
UPD 2013-05-15_20:00:00 3433 FHEM/YAF/www/js/combobox.js
|
||||
UPD 2013-05-15_20:00:00 4593 FHEM/YAF/www/js/jquery.ui.touch-punch.min.js
|
||||
UPD 2013-05-15_20:00:00 237176 FHEM/YAF/www/js/jquery-ui-1.9.1.custom.min.js
|
||||
|
Loading…
Reference in New Issue
Block a user