Commit 197e6772 authored by Edvard Rejthar's avatar Edvard Rejthar

UI: Alt+ sipky pohybuji mezi hlasováním

parent 6548040a
......@@ -21,7 +21,7 @@ if (document.location.href.indexOf("https://mdm.labs.nic.cz/detail/") === 0) {
$("div#detail_tabs ul").prepend("<li class='ui-state-default ui-corner-top'><a href='#analysisWrapper'>Analýza <span id='analysis-info'></span></a></li>");
$("div#detail_tabs").append($("<div />", {id: 'analysisWrapper', class: 'ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide'}));
$("div#detail_tabs").tabs("refresh");
$("<h1>MDMaug analýza</h1>").prependTo("#analysisWrapper");
$("<h1>MDMaug analýza</h1><p>(Alt+↕ pohybuje mezi hlasováním)</p>").prependTo("#analysisWrapper");
//jQueryUI=1.8 $("div#detail_tabs").tabs().tabs('add','#analysisWrapper','Analýza');
//sessionStorage.clear();
......@@ -482,6 +482,20 @@ if (document.location.href.indexOf("https://mdm.labs.nic.cz/detail/") === 0) {
//hotkeys pro ovladani tabu
$('body').keydown(function (e) {
if (e.altKey) {
if(KEY.DOWN == e.keyCode) {
if($(":focus").closest(".web").length){
$("input:checked",$($(":focus").closest(".web")).next(".web")).focus();
} else {
$(".web input:checked:first").focus();
}
}
if(KEY.UP == e.keyCode) {
if($(":focus").closest(".web").length){
$("input:checked",$($(":focus").closest(".web")).prev(".web")).focus();
} else {
$(".web input:checked:first").focus();
}
}
if (KEY.N1 <= e.keyCode && e.keyCode <= KEY.N6) {
$('#detail_tabs').tabs('option', 'active', e.keyCode - KEY.N1);
e.preventDefault();
......
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