Changeset 589:026ba1d1eb58 for plugins/aboutConfig
- Timestamp:
- 07/13/11 14:36:14 (14 years ago)
- Branch:
- default
- Location:
- plugins/aboutConfig
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/aboutConfig/_define.php
r464 r589 16 16 /* Description*/ "Manage every blog configuration directive", 17 17 /* Author */ "Olivier Meunier", 18 /* Version */ '0. 3'18 /* Version */ '0.4' 19 19 ); 20 20 ?> -
plugins/aboutConfig/index.php
r582 r589 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 # Local navigation 15 if (!empty($_POST['gs_nav'])) { 16 http::redirect($p_url.$_POST['gs_nav']); 17 exit; 18 } 19 if (!empty($_POST['ls_nav'])) { 20 http::redirect($p_url.$_POST['ls_nav']); 21 exit; 22 } 23 14 24 # Local settings update 15 25 if (!empty($_POST['s']) && is_array($_POST['s'])) … … 90 100 table.settings { border: 1px solid #999; margin-bottom: 2em; } 91 101 table.settings th { background: #f5f5f5; color: #444; padding-top: 0.3em; padding-bottom: 0.3em; } 92 ul.submenu {float: right; border: 1px solid #ccc; padding-right: 1em; padding-left: 1.5em; margin-top:0.5em; margin-bottom:0.5em; }102 p.anchor-nav {float: right; } 93 103 </style> 104 <script type="text/javascript"> 105 //<![CDATA[ 106 $(function() { 107 $("#gs_submit").hide(); 108 $("#ls_submit").hide(); 109 $("#gs_nav").change(function() { 110 window.location = $("#gs_nav option:selected").val(); 111 }) 112 $("#ls_nav").change(function() { 113 window.location = $("#ls_nav option:selected").val(); 114 }) 115 }); 116 //]]> 117 </script> 94 118 </head> 95 119 … … 107 131 108 132 <div id="local" class="multi-part" title="<?php echo __('blog settings'); ?>"> 109 <form action="plugin.php" method="post">110 133 111 134 <?php 112 113 135 $table_header = '<table class="settings" id="%s"><caption>%s</caption>'. 114 136 '<thead>'. … … 124 146 125 147 $settings = array(); 126 127 148 foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) { 128 149 foreach ($namespace->dumpSettings() as $k => $v) { … … 130 151 } 131 152 } 132 133 153 ksort($settings); 134 135 154 if (count($settings) > 0) { 136 echo '<ul class="submenu">';155 $ns_combo = array(); 137 156 foreach ($settings as $ns => $s) { 138 echo '<li><a href="#l_'.$ns.'">'.$ns.'</a></li>'; 139 } 140 echo '</ul>'; 141 } 142 157 $ns_combo[$ns] = '#l_'.$ns; 158 } 159 echo 160 '<form action="plugin.php" method="post">'. 161 '<p class="anchor-nav">'. 162 '<label for="ls_nav" class="classic">'.__('Goto:').'</label> '.form::combo('ls_nav',$ns_combo). 163 ' <input type="submit" value="'.__('Ok').'" id="ls_submit" />'. 164 '<input type="hidden" name="p" value="aboutConfig" />'. 165 $core->formNonce().'</p></form>'; 166 } 167 ?> 168 169 <form action="plugin.php" method="post"> 170 171 <?php 143 172 foreach ($settings as $ns => $s) 144 173 { … … 160 189 161 190 <div id="global" class="multi-part" title="<?php echo __('global settings'); ?>"> 162 <form action="plugin.php" method="post"> 191 163 192 <?php 164 193 $settings = array(); … … 173 202 174 203 if (count($settings) > 0) { 175 echo '<ul class="submenu">';204 $ns_combo = array(); 176 205 foreach ($settings as $ns => $s) { 177 echo '<li><a href="#g_'.$ns.'">'.$ns.'</a></li>'; 178 } 179 echo '</ul>'; 180 } 181 206 $ns_combo[$ns] = '#g_'.$ns; 207 } 208 echo 209 '<form action="plugin.php" method="post">'. 210 '<p class="anchor-nav">'. 211 '<label for="gs_nav" class="classic">'.__('Goto:').'</label> '.form::combo('gs_nav',$ns_combo). 212 ' <input type="submit" value="'.__('Ok').'" id="gs_submit" />'. 213 '<input type="hidden" name="p" value="aboutConfig" />'. 214 $core->formNonce().'</p></form>'; 215 } 216 ?> 217 218 <form action="plugin.php" method="post"> 219 220 <?php 182 221 foreach ($settings as $ns => $s) 183 222 {
Note: See TracChangeset
for help on using the changeset viewer.