updated ske interface: better formatting, using gdex, using example.s_id, multiple pages
This commit is contained in:
@@ -131,7 +131,7 @@ def do_chosen_examples(example_list, entry):
|
||||
return modal_template(options, "Examples picker", (message.DoChosenExamples, example_list))
|
||||
|
||||
|
||||
def ske_list(search_term, data, senses, ske_kinds):
|
||||
def ske_list(search_term, data, page_num, senses, ske_kinds):
|
||||
list_contents = []
|
||||
ske_list_hidden = False
|
||||
|
||||
@@ -148,12 +148,18 @@ def ske_list(search_term, data, senses, ske_kinds):
|
||||
list_contents.append(h("span.error", {}, "Something went wrong in SKE: {}".format(data)))
|
||||
|
||||
contents = [
|
||||
h("div.flex.three", {}, [
|
||||
h("select#ske-select.third", {}, [
|
||||
h("div.flex.four", {}, [
|
||||
h("select#ske-select.fourth", {}, [
|
||||
h("option", {}, "{}".format(x)) for x in ske_kinds]),
|
||||
h("label.third.ske-mid-input", {}, [
|
||||
h("label.fourth.ske-mid-input", {}, [
|
||||
h("input#ske-search", {"props": {"value": search_term, "type": "text"}}, "")]),
|
||||
h("span.third.button.ske-right-button",
|
||||
h("label.fourth.ske-mid-input", {}, [
|
||||
h("input#ske-page-num", {"attrs": {
|
||||
"value": str(page_num),
|
||||
"type": "number",
|
||||
"min": 1,
|
||||
"step": 1}}, "")]),
|
||||
h("span.fourth.button.ske-right-button",
|
||||
{"on": {"click": message.msg(message.SearchInSkeModal)}}, "Isci")]),
|
||||
h("div.ske-list",
|
||||
{"style": {"visibility": "hidden" if ske_list_hidden else "visible"}},
|
||||
|
||||
@@ -58,7 +58,7 @@ class View:
|
||||
def view_ske_button(model):
|
||||
return h(
|
||||
"span#ske-button.button.toggle",
|
||||
{ "on": {"click": msg(ShowSkeModal, model.entry.headword, 0)} },
|
||||
{ "on": {"click": msg(ShowSkeModal, 1, model.entry.headword, 0)} },
|
||||
h("svg#ske-img", {
|
||||
"attrs": {
|
||||
"xmlns": "http://www.w3.org/2000/svg",
|
||||
|
||||
Reference in New Issue
Block a user