TWiki
>
TWiki Web
>
TWikiVariables
>
TWikiVariablesWizard
(2015-01-16,
TWikiContributor
)
(raw view)
E
dit
A
ttach
P
DF
---+ TWiki Variables Wizard — to Find and Compose Variables %STARTINCLUDE% <style type="text/css"> #one_var h6 { margin-top: 0; } </style> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top"> %SET{ "useBox" value="%IF{ "istopic 'ScrollBoxAddOn'" then="1" else="0" }%" }%<nop> %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="scroll_box_engine" }$percnt' else='<nop>' }% %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="static_box_start" boxstyle="padding: 10px; width: auto;" contentstyle="margin-top: -5px;" }$percnt' else='<nop>' }% %INCLUDE{ "TWikiVariablesSearch" section="categories" }%<nop> __Categories:__ %BR% <nop>%CALCULATE{$SET(varTopics, %SEARCH{ "* Category:" topic="Var*" nonoise="on" format="$topic$percntCALCULATE{$dollarSET(v, $dollarSUBSTRING($topic, 4, 99))$dollarSET(var_head_$dollarGET(v), $pattern(.*?\-\++ *([^\n]*).*))$dollarSET(var_cat_$dollarGET(v), $pattern(.*?\* Category: *([^\n]*).*))$dollarLISTJOIN($dollarsp, $dollarLISTMAP($dollarSET(cat_$item, $dollarGET(cat_$item), $dollarGET(v)), $dollarGET(var_cat_$dollarGET(v))))}$percnt" separator=", " }%)$SET(vars, $LISTMAP($SUBSTRING($item, 4, 99), $GET(varTopics)))$LISTJOIN($sp, $LISTMAP($SET(cat_$item, $LISTNONEMPTY($GET(cat_$item))), %GET{twVarCategories}%))$SET(cat_all, $LISTMAP($item$SET(head, %$SUBSTITUTE($SUBSTITUTE($SUBSTITUTE($TRANSLATE($GET(var_head_$item), $comma, ~), }, }%), \", "), ~, ,))$SET(var_head_$item, $IF($SEARCH(^%[A-Z_]+ , $GET(head))>0, $INSERTSTRING($GET(head), $INT($SEARCH([ ], $GET(head))-1), %), $GET(head))), $GET(vars)))}% <form> <select name="sel_cats" id="sel_cats" size="10"> <option value="all">all</option> %CALCULATE{$LISTJOIN($sp, $LISTMAP(<option value="$item">$SUBSTITUTE($PROPERSPACE($SUBSTITUTE($item, Variables,)), And , & )</option>, %GET{twVarCategories}%))}% </select> </form> %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="static_box_end" }$percnt' else='<nop>' }% </td> <td><div style="width: 22px; text-align: center;">%ICON{arrowright}%</div></td> <td valign="top" width="90%"> %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="static_box_start" boxstyle="padding: 10px; width: auto;" contentstyle="width: 100%; margin-top: -5px;" }$percnt' else='<nop>' }% __Variables:__ %BR% <form> <select name="sel_vars" id="sel_vars" size="10" style="width: 100%; overflow-x: hidden;"> <option> </option> </select> </form> %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="static_box_end" }$percnt' else='<nop>' }% <div style="margin: 2px 0 3px 0; text-align: center;"> %ICON{arrowdown}% </div> </td></tr></table> %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="static_box_start" boxstyle="padding: 10px 0 10px 10px; width: auto;" contentstyle="margin-top: -1px;" }$percnt' else='<nop>' }% <div id="one_var" style="width: 99%; height: 15em; overflow-x: hidden; overflow-y: auto;"> %GRAY% Select a category and a variable %ENDCOLOR% </div> %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="static_box_end" }$percnt' else='<nop>' }% <div style="margin: 2px 0 3px 0; text-align: center;"> %ICON{arrowdown}% </div> %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="static_box_start" boxstyle="padding: 10px; width: auto;" contentstyle="margin-top: -7px;" }$percnt' else='<nop>' }% <div style="float: right; width: 100px; text-align: right; padding: 1px 3px;"> <input type="button" value="Select all" class="twikiButton" id="select_all" title="Select all text for copy & paste operation" /> </div> <div style="padding: 3px;"> __Build Your Variable:__ </div> <textarea class="twikiTextarea twikiEditboxStyleMono" id="edit_var" name="text" rows="3" cols="70" style="width:99%"> </textarea> %IF{ '"%GET{useBox}%"="1"' then='$percntINCLUDE{ "ScrollBoxAddOn" section="static_box_end" }$percnt' else='<nop>' }% <div style='display: none;'> Pre-load image: %ICONURL{processing-bar-wide}% </div> <!--<pre>--> <script> var hashCats = new Object(); %CALCULATE{$LISTJOIN($sp, $LISTMAP(hashCats["$item"] = "$LISTJOIN($sp, $GET(cat_$item))";, all, %GET{twVarCategories}%))}% var hashHeads = new Object(); %CALCULATE{$LISTJOIN($sp, $LISTMAP(hashHeads["$item"] = "$GET(var_head_$item)";, $GET(vars)))}% $("#sel_cats").change(function () { var str = $("#sel_cats option:selected").val(); if( str=='' ) { str = "%CALCULATE{$LISTJOIN($sp, $GET(cat_all))}%" } else { str = hashCats[str]; } var twVars = str.split(" "); var txt = ''; for( var i=0; i<twVars.length; i++ ) { var twVar = twVars[i]; if( twVar!='' ) { txt += "<option value='" + twVar + "'>" + hashHeads[twVar].slice(0, 120) + "</option>"; } } $("#sel_vars").html( txt ); }); $("#sel_vars").change(function () { var twVar = $("#sel_vars option:selected").val(); if( twVar!='' ) { var txt = hashHeads[twVar].replace(/(%.*?%).*/, "$1"); $("#edit_var").html( txt ); $("#one_var").html( "<div style='padding: 3px;'><img src='%ICONURL{processing-bar-wide}%' width='124' height='12' alt='' title='Loading...' />" ); $.ajax({ url: "%SCRIPTURLPATH{view}%/%WEB%/Var"+twVar, data: { skin: "text" }, cache: false }).done(function( html ) { $("#one_var").html( html.replace('h3>', 'h6>') ); }); } }); $("#select_all").click(function () { $("#edit_var").select(); $("#edit_var").focus(); }); </script> <!--</pre>--> %STOPINCLUDE% __Related Topics:__ UserDocumentationCategory, TWikiVariables, TWikiVariablesSearch, TWikiVariablesQuickStart, SearchHelp
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r2 - 2015-01-16
-
TWikiContributor
Log In
TWiki
TWiki Web
Index
Search
User Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Cern Search
TWiki Search
Google Search
TWiki
All webs
Copyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use
Discourse
or
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiVariablesWizard