Permalink
Browse files

Fix 188: Restore focus on id=reference after a modification on books

  • Loading branch information...
a2line committed Sep 20, 2018
1 parent bdba57b commit befef208f39dc25a6c4b47a9c595ae8ffcdd47cd
Showing with 14 additions and 4 deletions.
  1. +13 −3 hd/etc/js.txt
  2. +1 −1 lib/updateData.ml
View
@@ -13,16 +13,25 @@
$('#load_once_p_mod').one('click', function() {
$.getScript('%if;(cgi)%bvar.static_path;%end;js/p_mod.js');
});
$('#load_once_copylink').one('click', function() {
$.getScript('%if;(cgi)%bvar.static_path;%end;js/copylink.js');
});
</script>
%if;(wizard and (evar.m="MOD_IND_OK" or evar.m="MOD_FAM_OK"
%if;wizard;
%if;(evar.m="MOD_DATA_OK" and evar.data!="")
<script>
var htmlTitle = document.title;
if (htmlTitle == "[*modification successful]" ||
htmlTitle == "[*no modification]") {
document.getElementById("reference").focus();
}
</script>
%end;
%if;(evar.m="MOD_IND_OK" or evar.m="MOD_FAM_OK"
or evar.m="ADD_FAM_OK" or evar.m="DEL_FAM_OK"
or evar.m="SND_IMAGE_OK" or evar.m="DEL_IMAGE_OK"
or evar.m="CHG_EVT_IND_ORD_OK" or evar.m="CHG_EVT_FAM_ORD_OK"
or evar.m="MOD_DATA_OK"))
or (evar.m="MOD_DATA_OK" and evar.data=""))
<script>
var htmlTitle = document.title;
if (htmlTitle == "[*person modified]" ||
@@ -38,6 +47,7 @@
document.getElementById("i%evar.ip;").focus();
}
</script>
%end;
%end;
%end;
%if;(evar.m="MOD_IND" or evar.m="MOD_IND_OK"
View
@@ -1132,7 +1132,7 @@ let print_mod_ok conf base =
Hutil.header conf title;
Hutil.print_link_to_welcome conf true;
Wserver.printf "<p>\n";
Wserver.printf "<a href=\"%sm=MOD_DATA;data=%s;s=%s\">" (commd conf) data
Wserver.printf "<a href=\"%sm=MOD_DATA;data=%s;s=%s\" id=\"reference\">" (commd conf) data
ini;
Wserver.printf "%s" (capitale (transl conf "new modification"));
Wserver.printf "</a>";

0 comments on commit befef20

Please sign in to comment.