From 7d72554c991c4a2f431293a5791f0fb6805fce1d Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 08 Nov 2017 12:09:00 -0500 Subject: about:profiles: Focus on name on "Edit" button click --- (limited to 'src/schemes/about/profiles.c') diff --git a/src/schemes/about/profiles.c b/src/schemes/about/profiles.c index d5e3d61..ede57c7 100644 --- a/src/schemes/about/profiles.c +++ b/src/schemes/about/profiles.c @@ -186,6 +186,7 @@ static const gchar *cp_script = "var radio = parent.querySelector(\"input[type=radio]\");\n" "var svg = parent.querySelector(\"svg\");\n" "var colorInput = parent.querySelector(\"input[type=hidden]\");\n" + "var nameInput = parent.querySelector(\"input[type=text]\");\n" "var cpDiv = parent.querySelector(\"div.color-picker\");\n" "var slide = cpDiv.querySelector(\"div.slide\");\n" "var slideInd = cpDiv.querySelector(\"div.slide-indicator\");\n" @@ -207,6 +208,7 @@ static const gchar *cp_script = " for (var i = 0; i < cps.length; ++i) {\n" " cps[i].style.display = \"none\";\n" " }\n" + " nameInput.focus();\n" "});\n" "svg.addEventListener(\"click\", function (event) {\n" " if (radio.checked) {\n" @@ -294,10 +296,10 @@ generate_div(MqProfiles *profiles, gchar *id) NULL), mq_html_buttonbox(NULL, "OK", NULL, "Cancel"), NULL), - mq_html_container("script", NULL, g_strdup(cp_script), NULL), mq_html_container("span", is_current ? "current" : NULL, name, NULL), mq_html_input_text(name_str, NULL, name, id == NULL), + mq_html_container("script", NULL, g_strdup(cp_script), NULL), mq_html_submit(launch_str, "Launch", FALSE), mq_html_submit(default_str, "Make Default", !id || mq_profiles_is_default(profiles, id)), -- cgit v0.9.1