2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

fhemweb.js: fix "device specific help" after iOS <a> handling.

git-svn-id: https://svn.fhem.de/fhem/trunk@8943 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-07-12 06:37:31 +00:00
parent 1bb6760935
commit 8a894bba51

View File

@ -56,6 +56,23 @@ FW_jqueryReadyFn()
if(document.body.getAttribute("longpoll"))
setTimeout("FW_longpoll()", 100);
$("div.devSpecHelp a").each(function(){ // Help on detail window
var dev = $(this).attr("href").split("#").pop();
$(this).attr("href", "#");
$(this).click(function(evt){
if($("#devSpecHelp").length) {
$("#devSpecHelp").remove();
return;
}
$("#content").append('<div id="devSpecHelp"></div>');
FW_cmd(FW_root+"?cmd=help "+dev+"&XHR=1", function(data) {
$("#devSpecHelp").html(data);
var off = $("#devSpecHelp").position().top-20;
$('body, html').animate({scrollTop:off}, 500);
});
});
});
$("a").each(function() { FW_replaceLink(this); })
$("head script").each(function() {
var sname = $(this).attr("src"),
@ -156,23 +173,6 @@ FW_jqueryReadyFn()
});
});
$("div.devSpecHelp a").each(function(){ // Help on detail window
var dev = $(this).attr("href").split("#").pop();
$(this).attr("href", "#");
$(this).click(function(evt){
if($("#devSpecHelp").length) {
$("#devSpecHelp").remove();
return;
}
$("#content").append('<div id="devSpecHelp"></div>');
FW_cmd(FW_root+"?cmd=help "+dev+"&XHR=1", function(data) {
$("#devSpecHelp").html(data);
var off = $("#devSpecHelp").position().top-20;
$('body, html').animate({scrollTop:off}, 500);
});
});
});
}
@ -350,7 +350,6 @@ FW_replaceLink(el)
attr = attr.replace(/'$/,'');
}
var ma = attr.match(/^(.*\?)(cmd[^=]*=.*)$/);
if(ma == null || ma.length == 0 || !ma[2].match(/=(save|set)/)) {
ma = attr.match(new RegExp("^"+FW_root)); // Avoid "Connection lost" @iOS