mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-29 22:42:52 -06:00
simple translator: make it usable on iOS devices
To make the popup menus accessible, use a simple trick to activate the simulate-hovering-by-tapping behaviour.
This commit is contained in:
@@ -833,7 +833,7 @@ Translator.prototype.draw_segment_given_target=function(s,target,i) {
|
||||
return form
|
||||
}
|
||||
function draw_options() {
|
||||
return wrap("div",[span_class("arrow",text(" ⇒ ")),draw_options2()])
|
||||
return wrap("div",[span_class("arrow",hovertext(" ⇒ ")),draw_options2()])
|
||||
}
|
||||
if(t.document.globalsight)
|
||||
var actions=empty_class("td","actions")
|
||||
@@ -843,7 +843,7 @@ Translator.prototype.draw_segment_given_target=function(s,target,i) {
|
||||
var removeB=dt(text("Remove this segment"))
|
||||
removeB.onclick=function() { t.remove_segment(i) }
|
||||
var actions=wrap_class("td","actions",
|
||||
wrap("div",[span_class("actions",text("◊")),
|
||||
wrap("div",[span_class("actions",hovertext("◊")),
|
||||
wrap_class("dl","popupmenu",
|
||||
[insertB,removeB])]))
|
||||
}
|
||||
@@ -1114,3 +1114,7 @@ function delete_button(action,hint) {
|
||||
b.onclick=action;
|
||||
return b;
|
||||
}
|
||||
|
||||
function hovertext(txt) {
|
||||
return node("span",{onclick:""},[text(txt)])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user