Commit 7dda25a7 authored by Ivan Tyagov's avatar Ivan Tyagov

When using rename & add pop up set automatically the focus to input field in...

When using rename & add pop up set automatically the focus to input field in order to make it straight forward for user.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41023 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d210efc7
......@@ -196,7 +196,7 @@
i18n:attributes="title"\n
i18n:domain="ui"\n
class="clickable_image rename_tab_dialog_image"\n
onclick="toggleElementById(\'rename_tab_dialog\');"></span>\n
onclick="showRenamePadPopup();"></span>\n
\n
<span title="Remove"\n
i18n:attributes="title"\n
......@@ -222,7 +222,7 @@
</tal:block>\n
<li class="tab"\n
tal:condition="not: isKnowledgePadTemplateUsed"\n
onclick="showAddNewPadPopup(\'add_new_tab_dialog\', \'new_pad_title\');"\n
onclick="showAddNewPadPopup();"\n
i18n:translate="title" i18n:domain="ui"\n
title="Add new tab"\n
id="add_new_tab_dialog_link">Add tab</li>\n
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts91216542.63</string> </value>
<value> <string>ts91285696.36</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -254,9 +254,16 @@ function addBoxToServer(url, dom_id, gadget_relative_url){\n
button.disabled = true;}\n
}\n
\n
function showAddNewPadPopup(popup_id, input_id){\n
toggleElementById(\'add_new_tab_dialog\'); \n
// MochiKit.DOM.getElement(\'new_pad_title\').focus();\n
function showAddNewPadPopup(){\n
toggleElementById(\'add_new_tab_dialog\'); \n
// set focus on new Pad title after toggle effect is over \n
setTimeout("MochiKit.DOM.getElement(\'new_pad_title\').focus()", 500 );\n
}\n
\n
function showRenamePadPopup(){\n
toggleElementById(\'rename_tab_dialog\');\n
// set focus on new Pad title after toggle effect is over \n
setTimeout("MochiKit.DOM.getElement(\'new_knowledge_pad_title\').focus()", 500 );\n
}\n
\n
function loadPadFromServer(pad_relative_url, wrapper_dom_id, mode){\n
......@@ -442,7 +449,7 @@ MochiKit.DOM.addLoadEvent(initialize);\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>16315</int> </value>
<value> <int>16600</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
637
\ No newline at end of file
638
\ No newline at end of file
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