Changeset 589:026ba1d1eb58
- Timestamp:
- 07/13/11 14:36:14 (14 years ago)
- Branch:
- default
- Location:
- plugins
- Files:
-
- 4 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 { -
plugins/userPref/_define.php
r464 r589 16 16 /* Description*/ "Manage every user preference directive", 17 17 /* Author */ "Franck Paul", 18 /* Version */ '0. 1'18 /* Version */ '0.2' 19 19 ); 20 20 ?> -
plugins/userPref/index.php
r582 r589 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 # Local navigation 15 if (!empty($_POST['gp_nav'])) { 16 http::redirect($p_url.$_POST['gp_nav']); 17 exit; 18 } 19 if (!empty($_POST['lp_nav'])) { 20 http::redirect($p_url.$_POST['lp_nav']); 21 exit; 22 } 23 14 24 # Local prefs update 15 25 if (!empty($_POST['s']) && is_array($_POST['s'])) … … 86 96 table.prefs { border: 1px solid #999; margin-bottom: 2em; } 87 97 table.prefs th { background: #f5f5f5; color: #444; padding-top: 0.3em; padding-bottom: 0.3em; } 88 ul.submenu {float: right; border: 1px solid #ccc; padding-right: 1em; padding-left: 1.5em; margin-top:0.5em; margin-bottom:0.5em; }98 p.anchor-nav {float: right; } 89 99 </style> 100 <script type="text/javascript"> 101 //<![CDATA[ 102 $(function() { 103 $("#gp_submit").hide(); 104 $("#lp_submit").hide(); 105 $("#gp_nav").change(function() { 106 window.location = $("#gp_nav option:selected").val(); 107 }) 108 $("#lp_nav").change(function() { 109 window.location = $("#lp_nav option:selected").val(); 110 }) 111 }); 112 //]]> 113 </script> 90 114 </head> 91 115 … … 103 127 104 128 <div id="local" class="multi-part" title="<?php echo __('user preferences'); ?>"> 105 <form action="plugin.php" method="post">106 129 107 130 <?php 108 109 $table_header = '<table class="prefs"><caption>%s</caption>'. 131 $table_header = '<table class="prefs" id="%s"><caption>%s</caption>'. 110 132 '<thead>'. 111 133 '<tr>'."\n". … … 120 142 121 143 $prefs = array(); 122 123 144 foreach ($core->auth->user_prefs->dumpWorkspaces() as $ws => $workspace) { 124 145 foreach ($workspace->dumpPrefs() as $k => $v) { … … 126 147 } 127 148 } 128 129 149 ksort($prefs); 130 131 150 if (count($prefs) > 0) { 132 echo '<ul class="submenu">';151 $ws_combo = array(); 133 152 foreach ($prefs as $ws => $s) { 134 echo '<li><a href="#l_'.$ws.'">'.$ws.'</a></li>'; 135 } 136 echo '</ul>'; 137 } 138 153 $ws_combo[$ws] = '#l_'.$ws; 154 } 155 echo 156 '<form action="plugin.php" method="post">'. 157 '<p class="anchor-nav">'. 158 '<label for="lp_nav" class="classic">'.__('Goto:').'</label> '.form::combo('lp_nav',$ws_combo). 159 ' <input type="submit" value="'.__('Ok').'" id="lp_submit" />'. 160 '<input type="hidden" name="p" value="aboutConfig" />'. 161 $core->formNonce().'</p></form>'; 162 } 163 ?> 164 165 <form action="plugin.php" method="post"> 166 167 <?php 139 168 foreach ($prefs as $ws => $s) 140 169 { 141 170 ksort($s); 142 echo sprintf($table_header, $ws);171 echo sprintf($table_header,'l_'.$ws,$ws); 143 172 foreach ($s as $k => $v) 144 173 { … … 156 185 157 186 <div id="global" class="multi-part" title="<?php echo __('global preferences'); ?>"> 158 <form action="plugin.php" method="post">159 187 160 188 <?php … … 170 198 171 199 if (count($prefs) > 0) { 172 echo '<ul class="submenu">';200 $ws_combo = array(); 173 201 foreach ($prefs as $ws => $s) { 174 echo '<li><a href="#g_'.$ws.'">'.$ws.'</a></li>'; 175 } 176 echo '</ul>'; 177 } 178 202 $ws_combo[$ws] = '#g_'.$ws; 203 } 204 echo 205 '<form action="plugin.php" method="post">'. 206 '<p class="anchor-nav">'. 207 '<label for="gp_nav" class="classic">'.__('Goto:').'</label> '.form::combo('gp_nav',$ws_combo). 208 ' <input type="submit" value="'.__('Ok').'" id="gp_submit" />'. 209 '<input type="hidden" name="p" value="aboutConfig" />'. 210 $core->formNonce().'</p></form>'; 211 } 212 ?> 213 214 <form action="plugin.php" method="post"> 215 216 <?php 179 217 foreach ($prefs as $ws => $s) 180 218 { 181 219 ksort($s); 182 echo sprintf($table_header, $ws);220 echo sprintf($table_header,'g_'.$ws,$ws); 183 221 foreach ($s as $k => $v) 184 222 {
Note: See TracChangeset
for help on using the changeset viewer.