Skip to content

Commit

Permalink
Item13123: Convert parent topic selector to jquery
Browse files Browse the repository at this point in the history
The more topic actions page takes a very long time to load. This is due
to the parent selector populating on page load.  Convert to jquery
autocomplete greatly reduces load time.
  • Loading branch information
gac410 committed Nov 29, 2014
1 parent 7552c13 commit edeb03a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/templates/more.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,8 @@
<form name="main" action="%SCRIPTURLPATH{"save"}%/%WEB%/%TOPIC%?action_save=1" method="post">
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
<h3>%MAKETEXT{"Current parent:"}% %IF{"'NONE%META{"parent" dontrecurse="on"}%'='NONE'" then="(none)" else='%SEARCH{ "name = '%TOPIC%'" scope="topic" type="query" nosearch="on" nototal="on" format="[[$parent]]" }%' }%</h3>
</div>
<div class="foswikiFormStep">
<h3>%MAKETEXT{"Select topic parent"}%</h3>
<p>%IF{"defined pickparent" then="<select name='topicparent' size='10' class='foswikiSelect' tabindex='12'>$percntTOPICLIST{$quot<option $marker value='$name'>$name</option>$quot separator=$quot$quot selection=$quot$percntMETASEARCH{type=$quotparent$quot}$percnt}$percnt<option value=$quotnone$quot>$percntMAKETEXT{$quot(no parent, orphaned topic)$quot}$percnt</option></select>" else="<input type='text' name='topicparent' size='30' class='foswikiInputField' />&nbsp;<span class='foswikiUnvisited'><a href='$percntSCRIPTURLPATH{view}$percnt/$percntWEB$percnt/$percntTOPIC$percnt?template=more;$percntQUERYSTRING$percnt;pickparent=1#SetParent'>%MAKETEXT{"Pick from a list"}%</a></span>"}%</p>
%INCLUDE{"System.JQueryAjaxHelper" section="topicselector" INPUT_NAME="topicparent" EXCLUDE="%TOPIC%" PLACEHOLDER="%IF{"'NONE%META{"parent" dontrecurse="on"}%'='NONE'" then="(none)" else='%SEARCH{ "name = '%TOPIC%'" scope="topic" type="query" nosearch="on" nototal="on" format="$parent" }%' }%"}%
</div>
<div class="foswikiFormStep foswikiLast">
<p><input type='submit' class='foswikiButton' value='%MAKETEXT{"Set new parent"}%' /></p>
Expand Down Expand Up @@ -211,6 +208,7 @@ then="-->"


%TMPL:DEF{"message"}%
%JQREQUIRE{"ui::autocomplete"}%
%TMPL:P{"revision"}%
%TMPL:P{"setparent"}%
%TMPL:P{"settings"}%
Expand All @@ -219,4 +217,4 @@ then="-->"
%TMPL:P{"copy"}%
%TMPL:P{"childtopics"}%
%TMPL:P{"backlinks"}%
%TMPL:END%
%TMPL:END%

0 comments on commit edeb03a

Please sign in to comment.