Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

JumpBox

(redirected from Cookbook.InputJumpBox)


(:input jumpbox ... :)

This page demonstrates a simple jumpbox:

(:input jumpbox value=JumpBox:)
(:input jumpbox value=Test:)
(:input jumpbox value=Cookbook:)

(:input jumpbox value=Toyama:)
(:input jumpbox value=Gyokusendo:)
(:input jumpbox value=Suwada:)
(:input jumpbox value=Maruto:)
(:input jumpbox value=Kaneko:)

Or, from a pagelist:

(:if false:)
[[#jumpbox]]
(:input jumpbox value="{=$PageUrl}" label="{=$Title}":)
[[#jumpboxend]]
(:ifend:)

(:pagelist group=Test fmt=#jumpbox count=6:)

The local customization used to enable (:input jumpbox ...:):

<?php if (!defined('PmWiki')) exit();

$InputTags['jumpbox'] = array(
  'name' => 'n',
  ':html' =>
    "<form action='{$PageUrl}' method='get'>
     <select onchange='window.location.href=this.options[this.selectedIndex].value'
       \$InputSelectArgs>\$InputSelectOptions</select>
     <input type='submit' value='$[Jump to page]' /></form>");

Markup('input-jumpbox', '<split',
  '/\\(:input\\s+jumpbox\\s.*?:\\)(?:\\s*\\(:input\\s+jumpbox\\s.*?:\\))*/ei',
  "InputSelect(\$pagename, 'jumpbox', PSS('$0'))");

With minor modifications this local customization may also provide a hidden submit button as Option Menu recipe did (Dfaure):

<?php if (!defined('PmWiki')) exit();

$FmtPV['$_UniqId_'] = '($GLOBALS["_UniqId_"] = uniqid("id"))';
$FmtPV['$_PrevId_'] = '$GLOBALS["_UniqId_"]';

$InputTags['jumpbox'] = array(
  'name' => 'n',
  ':html' =>
    "<form action='{$PageUrl}' method='get'>
     <select onchange='window.location.href=this.options[this.selectedIndex].value'
       \$InputSelectArgs class='inputbox' >\$InputSelectOptions</select>
     <input id='{\$_UniqId_}' type='submit' value='$[Jump to page]' class='inputbutton' />
     <script type='text/javascript'><!--
document.getElementById('{\$_PrevId_}').style.display = 'none';
//--></script></form>");

Markup('input-jumpbox', '<split',
  '/\\(:input\\s+jumpbox\\s.*?:\\)(?:\\s*\\(:input\\s+jumpbox\\s.*?:\\))*/ei',
  "InputSelect(\$pagename, 'jumpbox', PSS('$0'))");
Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 12:03 PM
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.06 00.05 MarkupToHTML begin
 3: 00.06 00.05 MarkupToHTML begin
 4: 00.08 00.07 MarkupToHTML end
 5: 00.08 00.07 MarkupToHTML begin
 6: 00.08 00.07 FPLTemplate: Chain begin
 7: 00.08 00.07 FPLTemplate: FPLTemplateLoad
 8: 00.08 00.07 FPLTemplate: FPLTemplateDefaults
 9: 00.08 00.07 FPLTemplate: FPLTemplatePageList
10: 00.08 00.07 MakePageList pre
11: 00.09 00.07 PageListSources begin
12: 00.09 00.07 PageStore::ls begin wiki.d/{$FullName}
13: 00.12 00.09 PageStore::ls merge wiki.d/{$FullName}
14: 00.15 00.12 PageStore::ls end wiki.d/{$FullName}
15: 00.16 00.12 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
16: 00.16 00.12 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
17: 00.16 00.12 PageStore::ls end $FarmD/wikilib.d/{$FullName}
18: 00.16 00.13 PageListSources end count=1005
19: 00.16 00.13 PageListSort pre ret=4 order=name
20: 00.16 00.13 MakePageList items count=1005, filters=
21: 00.17 00.14 MakePageList post count=1005, readc=0
22: 00.17 00.14 PageListCache begin save key=bc376443f784b7881e414e124e222dd8
23: 00.17 00.14 PageListCache end save
24: 00.17 00.14 PageListSort begin
25: 00.17 00.14 PageListSort sort
26: 00.23 00.20 PageListSort end
27: 00.23 00.20 MakePageList end
28: 00.23 00.20 FPLTemplate: FPLTemplateSliceList
29: 00.23 00.20 FPLTemplate: FPLTemplateFormat
30: 00.24 00.20 MarkupToHTML begin
31: 00.25 00.21 MarkupToHTML end
32: 00.25 00.21 FPLTemplate: Chain end
33: 00.25 00.22 MarkupToHTML end
34: 00.27 00.23 MarkupToHTML end
35: 00.28 00.24 MarkupToHTML begin
36: 00.30 00.26 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
37: 00.31 00.27 ReadApprovedUrls SiteAdmin.ApprovedUrls end
38: 00.32 00.29 MarkupToHTML end
39: 00.33 00.29 MarkupToHTML begin
40: 00.34 00.30 MarkupToHTML end
41: 00.34 00.31 now