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


(: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 29, 2008, at 05:44 PM
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.08 00.07 MarkupToHTML begin
 3: 00.08 00.07 MarkupToHTML begin
 4: 00.12 00.10 MarkupToHTML end
 5: 00.12 00.10 MarkupToHTML begin
 6: 00.12 00.11 FPLTemplate begin
 7: 00.12 00.11 MakePageList pre
 8: 00.12 00.11 PageListCache begin load key=bc376443f784b7881e414e124e222dd8
 9: 00.12 00.11 PageListCache end load
10: 00.12 00.11 PageListSources begin
11: 00.12 00.11 PageListSources end count=860
12: 00.12 00.11 PageListSort pre ret=4 order=name
13: 00.12 00.11 MakePageList items count=860, filters=
14: 00.14 00.12 MakePageList post count=860, readc=0
15: 00.14 00.12 PageListSort begin
16: 00.14 00.12 PageListSort sort
17: 00.19 00.17 PageListSort end
18: 00.19 00.17 MakePageList end
19: 00.19 00.18 MarkupToHTML begin
20: 00.22 00.21 MarkupToHTML end
21: 00.22 00.21 FPLTemplate end
22: 00.22 00.21 MarkupToHTML end
23: 00.24 00.23 MarkupToHTML end
24: 00.26 00.24 MarkupToHTML begin
25: 00.29 00.28 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
26: 00.30 00.28 ReadApprovedUrls SiteAdmin.ApprovedUrls end
27: 00.32 00.30 MarkupToHTML end
28: 00.32 00.30 MarkupToHTML begin
29: 00.33 00.32 MarkupToHTML end
30: 00.34 00.33 now