Changeset 217499
- Timestamp:
- 03/14/2010 03:22:29 PM (16 years ago)
- Location:
- sidebartabs/trunk
- Files:
-
- 2 added
- 9 edited
-
js/jquery.corner.js (modified) (9 diffs)
-
langs/sidebartabs-pt_BR.mo (modified) (previous)
-
langs/sidebartabs-pt_BR.po (modified) (10 diffs)
-
langs/sidebartabs-ru_RU.mo (added)
-
langs/sidebartabs-ru_RU.po (added)
-
readme.txt (modified) (2 diffs)
-
sidebarTabs.php (modified) (10 diffs)
-
sidebarTabs_admin.php (modified) (2 diffs)
-
sidebarTabs_fixed.php (modified) (2 diffs)
-
sidebarTabs_scrollable.php (modified) (2 diffs)
-
styleSidebar.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sidebartabs/trunk/js/jquery.corner.js
r169107 r217499 2 2 * jQuery corner plugin: simple corner rounding 3 3 * Examples and documentation at: http://jquery.malsup.com/corner/ 4 * version 2.01 (08-SEP-2009) 4 * version 2.08 (02-MAR-2010) 5 * Requires jQuery v1.3.2 or later 5 6 * Dual licensed under the MIT and GPL licenses: 6 7 * http://www.opensource.org/licenses/mit-license.php 7 8 * http://www.gnu.org/licenses/gpl.html 9 * Authors: Dave Methvin and Mike Alsup 8 10 */ 9 11 … … 12 14 * 13 15 * effect: name of the effect to apply, such as round, bevel, notch, bite, etc (default is round). 14 * corners: one or more of: top, bottom, tr, tl, br, or bl. 15 * by default, all four corners are adorned. 16 * corners: one or more of: top, bottom, tr, tl, br, or bl. (default is all corners) 16 17 * width: width of the effect; in the case of rounded corners this is the radius. 17 * specify this value using the px suffix such as 10px (and yes, it must be pixels). 18 * 19 * @author Dave Methvin (http://methvin.com/jquery/jq-corner.html) 20 * @author Mike Alsup (http://jquery.malsup.com/corner/) 18 * specify this value using the px suffix such as 10px (yes, it must be pixels). 21 19 */ 22 20 ;(function($) { 23 21 24 var moz = $.browser.mozilla && /gecko/i.test(navigator.userAgent); 25 var webkit = $.browser.safari && $.browser.version >= 3; 22 var style = document.createElement('div').style; 23 var moz = style['MozBorderRadius'] !== undefined; 24 var webkit = style['WebkitBorderRadius'] !== undefined; 25 var radius = style['borderRadius'] !== undefined || style['BorderRadius'] !== undefined; 26 var mode = document.documentMode || 0; 27 var noBottomFold = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8); 26 28 27 29 var expr = $.browser.msie && (function() { 28 30 var div = document.createElement('div'); 29 try { div.style.setExpression('width','0+0'); }31 try { div.style.setExpression('width','0+0'); div.style.removeExpression('width'); } 30 32 catch(e) { return false; } 31 33 return true; … … 67 69 case 'long': return Math.round(width*(Math.sqrt(i))); 68 70 case 'sculpt': return Math.round(width*(Math.log((width-i-1),width))); 71 case 'dogfold': 69 72 case 'dog': return (i&1) ? (i+1) : width; 70 73 case 'dog2': return (i&2) ? (i+1) : width; … … 72 75 case 'fray': return (i%2)*width; 73 76 case 'notch': return width; 77 case 'bevelfold': 74 78 case 'bevel': return i+1; 75 79 } … … 90 94 return this.each(function(index){ 91 95 var $this = $(this); 92 var o = (options || $this.attr($.fn.corner.defaults.metaAttr) || '').toLowerCase(); 96 // meta values override options 97 var o = [$this.attr($.fn.corner.defaults.metaAttr) || '', options || ''].join(' ').toLowerCase(); 93 98 var keep = /keep/.test(o); // keep borders? 94 99 var cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]); // corner color 95 100 var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]); // strip color 96 101 var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10; // corner width 97 var re = /round|bevel |notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;102 var re = /round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog/; 98 103 var fx = ((o.match(re)||['round'])[0]); 104 var fold = /dogfold|bevelfold/.test(o); 99 105 var edges = { T:0, B:1 }; 100 106 var opts = { … … 106 112 107 113 // support native rounding 108 if ($.fn.corner.defaults.useNative && fx == 'round' && ( moz || webkit) && !cc && !sc) {114 if ($.fn.corner.defaults.useNative && fx == 'round' && (radius || moz || webkit) && !cc && !sc) { 109 115 if (opts.TL) 110 $this.css( moz ? '-moz-border-radius-topleft' : '-webkit-border-top-left-radius', width + 'px');116 $this.css(radius ? 'border-top-left-radius' : moz ? '-moz-border-radius-topleft' : '-webkit-border-top-left-radius', width + 'px'); 111 117 if (opts.TR) 112 $this.css( moz ? '-moz-border-radius-topright' : '-webkit-border-top-right-radius', width + 'px');118 $this.css(radius ? 'border-top-right-radius' : moz ? '-moz-border-radius-topright' : '-webkit-border-top-right-radius', width + 'px'); 113 119 if (opts.BL) 114 $this.css( moz ? '-moz-border-radius-bottomleft' : '-webkit-border-bottom-left-radius', width + 'px');120 $this.css(radius ? 'border-bottom-left-radius' : moz ? '-moz-border-radius-bottomleft' : '-webkit-border-bottom-left-radius', width + 'px'); 115 121 if (opts.BR) 116 $this.css( moz ? '-moz-border-radius-bottomright' : '-webkit-border-bottom-right-radius', width + 'px');122 $this.css(radius ? 'border-bottom-right-radius' : moz ? '-moz-border-radius-bottomright' : '-webkit-border-bottom-right-radius', width + 'px'); 117 123 return; 118 124 } 119 125 120 126 var strip = document.createElement('div'); 121 strip.style.overflow = 'hidden'; 122 strip.style.height = '1px'; 123 strip.style.backgroundColor = sc || 'transparent'; 124 strip.style.borderStyle = 'solid'; 127 $(strip).css({ 128 overflow: 'hidden', 129 height: '1px', 130 minHeight: '1px', 131 fontSize: '1px', 132 backgroundColor: sc || 'transparent', 133 borderStyle: 'solid' 134 }); 125 135 126 136 var pad = { … … 132 142 if (!keep) this.style.border = 'none'; 133 143 strip.style.borderColor = cc || gpc(this.parentNode); 134 var cssHeight = $ .curCSS(this, 'height');144 var cssHeight = $(this).outerHeight(); 135 145 136 146 for (var j in edges) { … … 181 191 bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild); 182 192 } 193 194 if (fold && $.support.boxModel) { 195 if (bot && noBottomFold) continue; 196 for (var c in opts) { 197 if (!opts[c]) continue; 198 if (bot && (c == 'TL' || c == 'TR')) continue; 199 if (!bot && (c == 'BL' || c == 'BR')) continue; 200 201 var common = { position: 'absolute', border: 'none', margin: 0, padding: 0, overflow: 'hidden', backgroundColor: strip.style.borderColor }; 202 var $horz = $('<div/>').css(common).css({ width: width + 'px', height: '1px' }); 203 switch(c) { 204 case 'TL': $horz.css({ bottom: 0, left: 0 }); break; 205 case 'TR': $horz.css({ bottom: 0, right: 0 }); break; 206 case 'BL': $horz.css({ top: 0, left: 0 }); break; 207 case 'BR': $horz.css({ top: 0, right: 0 }); break; 208 } 209 d.appendChild($horz[0]); 210 211 var $vert = $('<div/>').css(common).css({ top: 0, bottom: 0, width: '1px', height: width + 'px' }); 212 switch(c) { 213 case 'TL': $vert.css({ left: width }); break; 214 case 'TR': $vert.css({ right: width }); break; 215 case 'BL': $vert.css({ left: width }); break; 216 case 'BR': $vert.css({ right: width }); break; 217 } 218 d.appendChild($vert[0]); 219 } 220 } 183 221 } 184 222 } … … 187 225 188 226 $.fn.uncorner = function() { 189 if ( moz || webkit)190 this.css( moz ? '-moz-border-radius' : '-webkit-border-radius', 0);227 if (radius || moz || webkit) 228 this.css(radius ? 'border-radius' : moz ? '-moz-border-radius' : '-webkit-border-radius', 0); 191 229 $('div.jquery-corner', this).remove(); 192 230 return this; -
sidebartabs/trunk/langs/sidebartabs-pt_BR.po
r214052 r217499 3 3 "Project-Id-Version: sidebarTabs version 1.1\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 2010-03- 06 13:12-0300\n"5 "POT-Creation-Date: 2010-03-14 12:03-0300\n" 6 6 "PO-Revision-Date: \n" 7 7 "Last-Translator: Newton de Góes Horta <nghorta@gmail.com>\n" … … 17 17 "X-Poedit-SearchPath-0: .\n" 18 18 19 #: sidebarTabs.php:25 319 #: sidebarTabs.php:255 20 20 msgid "Put widgets into tabbed (scrollable) interface in sidebar" 21 21 msgstr "Colocar widgets em uma interface com abas na barra lateral (sidebar) do blog" 22 22 23 #: sidebarTabs.php:25 423 #: sidebarTabs.php:256 24 24 msgid "sidebarTabs" 25 25 msgstr "sidebarTab" 26 26 27 #: sidebarTabs.php:28 727 #: sidebarTabs.php:282 28 28 msgid "Instance 1" 29 29 msgstr "Instância 1" 30 30 31 #: sidebarTabs.php:29 631 #: sidebarTabs.php:291 32 32 msgid "Title:" 33 33 msgstr "Título:" 34 34 35 #: sidebarTabs.php:29 935 #: sidebarTabs.php:294 36 36 msgid "Exclude Title:" 37 37 msgstr "Excluir Título:" 38 38 39 #: sidebarTabs.php: 30239 #: sidebarTabs.php:297 40 40 msgid "Orders sidebarTabs:" 41 41 msgstr "sidebarTabs Ordens:" 42 42 43 #: sidebarTabs.php: 30343 #: sidebarTabs.php:298 44 44 msgid "Seperate mutiple sidebarTabs orders with commas. Leave blank for all." 45 45 msgstr "Separe múltiplas ordens de sidebarTabs com vírgula. Deixe em branco para todas." 46 46 47 #: sidebarTabs.php:30 547 #: sidebarTabs.php:300 48 48 msgid "Layout of Instance:" 49 49 msgstr "Layout da Instância:" 50 50 51 #: sidebarTabs.php:30 751 #: sidebarTabs.php:302 52 52 msgid "Horizontal" 53 53 msgstr "Horizontal" 54 54 55 #: sidebarTabs.php:30 855 #: sidebarTabs.php:303 56 56 msgid "Vertical" 57 57 msgstr "Vertical" 58 58 59 #: sidebarTabs.php:3 1359 #: sidebarTabs.php:308 60 60 msgid "Effect (Only vertical instances):" 61 61 msgstr "Efeito (Somente instâncias verticais):" 62 62 63 #: sidebarTabs.php:31 563 #: sidebarTabs.php:310 64 64 msgid "default" 65 65 msgstr "default" 66 66 67 #: sidebarTabs.php:31 667 #: sidebarTabs.php:311 68 68 msgid "fade" 69 69 msgstr "fade" 70 70 71 #: sidebarTabs.php:31 771 #: sidebarTabs.php:312 72 72 msgid "slide" 73 73 msgstr "slide" 74 74 75 #: sidebarTabs.php:3 2275 #: sidebarTabs.php:317 76 76 msgid "Display in Sidebar:" 77 77 msgstr "Exibe na Sidebar:" 78 78 79 #: sidebarTabs.php:324 79 #: sidebarTabs.php:319 80 #: sidebarTabs_admin.php:353 81 #: sidebarTabs_fixed.php:244 82 #: sidebarTabs_scrollable.php:100 80 83 msgid "Yes" 81 84 msgstr "Sim" 82 85 83 #: sidebarTabs.php:32 586 #: sidebarTabs.php:320 84 87 #: sidebarTabs_admin.php:202 88 #: sidebarTabs_admin.php:352 89 #: sidebarTabs_fixed.php:243 90 #: sidebarTabs_scrollable.php:99 85 91 msgid "No" 86 92 msgstr "Não" … … 111 117 112 118 #: sidebarTabs_admin.php:40 113 #: sidebarTabs_admin.php:4 65119 #: sidebarTabs_admin.php:486 114 120 msgid "Default args" 115 121 msgstr "Default args" … … 117 123 #: sidebarTabs_admin.php:43 118 124 #: sidebarTabs_admin.php:133 119 #: sidebarTabs_admin.php:31 5120 #: sidebarTabs_admin.php:3 49125 #: sidebarTabs_admin.php:317 126 #: sidebarTabs_admin.php:370 121 127 msgid "Back to Manage sidebarTabs" 122 128 msgstr "Voltar para Administrar sidebarTabs" … … 153 159 154 160 #: sidebarTabs_admin.php:114 155 #: sidebarTabs_admin.php:5 05161 #: sidebarTabs_admin.php:526 156 162 msgid "Edit" 157 163 msgstr "Editar" … … 182 188 183 189 #: sidebarTabs_admin.php:200 184 #: sidebarTabs_admin.php: 479190 #: sidebarTabs_admin.php:500 185 191 msgid "Icon" 186 192 msgstr "Ícone" … … 190 196 msgstr "Gravar" 191 197 192 #: sidebarTabs_admin.php:31 2198 #: sidebarTabs_admin.php:314 193 199 msgid "Options" 194 200 msgstr "Opções" 195 201 196 #: sidebarTabs_admin.php:32 1202 #: sidebarTabs_admin.php:323 197 203 msgid "Attention: D'ont forget to Save the changes after you are done. Always save after upgrade of plugin version." 198 204 msgstr "Atenção: Não se esqueça de salvar após as alterações serem efetuadas. Sempre salve após a atualização de versão do plugin." 199 205 200 #: sidebarTabs_admin.php:32 3206 #: sidebarTabs_admin.php:325 201 207 msgid "Layout of Tabs" 202 208 msgstr "Layout das Abas" 203 209 204 #: sidebarTabs_admin.php:32 7210 #: sidebarTabs_admin.php:329 205 211 msgid "Select" 206 212 msgstr "Selecione" 207 213 208 #: sidebarTabs_admin.php:3 29209 #: sidebarTabs_admin.php:4 47214 #: sidebarTabs_admin.php:331 215 #: sidebarTabs_admin.php:468 210 216 msgid "Fixed without icons" 211 217 msgstr "Fixo sem ícones" 212 218 213 #: sidebarTabs_admin.php:33 0214 #: sidebarTabs_admin.php:4 48219 #: sidebarTabs_admin.php:332 220 #: sidebarTabs_admin.php:469 215 221 msgid "Fixed with icons" 216 222 msgstr "Fixo com ícones" 217 223 218 #: sidebarTabs_admin.php:33 1219 #: sidebarTabs_admin.php:4 49224 #: sidebarTabs_admin.php:333 225 #: sidebarTabs_admin.php:470 220 226 msgid "Scrollable without icons" 221 227 msgstr "Rolável sem ícones" 222 228 223 #: sidebarTabs_admin.php:33 2224 #: sidebarTabs_admin.php:4 50229 #: sidebarTabs_admin.php:334 230 #: sidebarTabs_admin.php:471 225 231 msgid "Scrollable with icons" 226 232 msgstr "Rolável com ícones" 227 233 228 #: sidebarTabs_admin.php:344 234 #: sidebarTabs_admin.php:342 235 msgid "Default arguments before and after widget of your theme" 236 msgstr "Argumentos padrão before e after widget de seu tema" 237 238 #: sidebarTabs_admin.php:346 239 msgid "<strong>Note</strong>: Some themes, without the use of arguments, break the sidebar layout. Others don't work correctly with them. So I decided to create this option and leave the choice up to each one. An excellent explanation this issue is the comment (#69) made by Clifton in page of plugin. If the plugin works correctly without these arguments in your theme select 'No', otherwise select 'Yes'." 240 msgstr "<strong>Nota</strong>: Alguns temas, sem o uso dos argumentos, quebra o layout da barra lateral. Outros não funcionam corretamente com eles. Assim decidi criar esta opção e deixar a escolha para cada um. Uma excelente explanação sobre a questão é o comentário (#69) feito por Clifton na página do plugin. Se o plugin funciona corretamente sem esses argumentos em seu tema selecione 'Não', caso contário selecione 'Sim'." 241 242 #: sidebarTabs_admin.php:350 243 msgid "Use?" 244 msgstr "Usar?" 245 246 #: sidebarTabs_admin.php:365 229 247 msgid "Loading. Wait..." 230 248 msgstr "Carregando. Aguarde..." 231 249 232 #: sidebarTabs_admin.php: 390250 #: sidebarTabs_admin.php:411 233 251 #, php-format 234 252 msgid "The tab number was set to %s." 235 253 msgstr "O número da aba foi setado para %s." 236 254 237 #: sidebarTabs_admin.php:4 01255 #: sidebarTabs_admin.php:422 238 256 msgid "The tab number should be at least 1 and so was changed to 1." 239 257 msgstr "O número da aba deve ser pelo menos 1." 240 258 241 #: sidebarTabs_admin.php:4 05259 #: sidebarTabs_admin.php:426 242 260 msgid "The tab number was changed to be only one higher than the previous total number of tabs." 243 261 msgstr "O número da aba foi alterado para um número maior que o total de abas anteriores" 244 262 245 #: sidebarTabs_admin.php:4 57263 #: sidebarTabs_admin.php:478 246 264 msgid "Manage sidebarTabs" 247 265 msgstr "Administrar sidebarTabs" 248 266 249 #: sidebarTabs_admin.php:4 62267 #: sidebarTabs_admin.php:483 250 268 msgid "Delete" 251 269 msgstr "Excluir" 252 270 253 #: sidebarTabs_admin.php:4 63271 #: sidebarTabs_admin.php:484 254 272 msgid "Create New sidebarTab" 255 273 msgstr "Criar nova sidebarTab" 256 274 257 #: sidebarTabs_admin.php:4 64275 #: sidebarTabs_admin.php:485 258 276 msgid "sidebarTabs Options" 259 277 msgstr "Opções sidebarTabs" 260 278 261 #: sidebarTabs_admin.php:4 66279 #: sidebarTabs_admin.php:487 262 280 msgid "Reset ?" 263 281 msgstr "Reset ?" 264 282 265 #: sidebarTabs_admin.php:4 66283 #: sidebarTabs_admin.php:487 266 284 msgid "Reset" 267 285 msgstr "Reset" 268 286 269 #: sidebarTabs_admin.php:4 75287 #: sidebarTabs_admin.php:496 270 288 msgid "Order" 271 289 msgstr "Ordem" 272 290 273 #: sidebarTabs_admin.php:4 76291 #: sidebarTabs_admin.php:497 274 292 msgid "Widget" 275 293 msgstr "Widget" 276 294 277 #: sidebarTabs_admin.php:4 77295 #: sidebarTabs_admin.php:498 278 296 msgid "Tab Name" 279 297 msgstr "Nome da Aba" 280 298 281 #: sidebarTabs_admin.php:4 78299 #: sidebarTabs_admin.php:499 282 300 msgid "Description" 283 301 msgstr "Descrição" 284 302 285 #: sidebarTabs_admin.php: 480303 #: sidebarTabs_admin.php:501 286 304 msgid "Callback" 287 305 msgstr "Callback" 288 306 289 #: sidebarTabs_admin.php: 481307 #: sidebarTabs_admin.php:502 290 308 msgid "Unregister" 291 309 msgstr "Unregister" 292 310 293 #: sidebarTabs_admin.php: 482311 #: sidebarTabs_admin.php:503 294 312 msgid "Action" 295 313 msgstr "Ação" 296 314 297 #: sidebarTabs_admin.php: 489315 #: sidebarTabs_admin.php:510 298 316 msgid "yes" 299 317 msgstr "sim" 300 318 301 #: sidebarTabs_admin.php: 490319 #: sidebarTabs_admin.php:511 302 320 msgid "no" 303 321 msgstr "não" 304 322 305 #: sidebarTabs_admin.php:5 13323 #: sidebarTabs_admin.php:534 306 324 msgid "Preview (without style) - Layout: " 307 325 msgstr "Preview (sem estilo) - Layout: " 308 326 309 #: sidebarTabs_admin.php:5 34327 #: sidebarTabs_admin.php:555 310 328 msgid "No instance created. Go to Design > Widget after create the sidebarTabs." 311 329 msgstr "Nenhuma instância criada. Vá para Aparência > Widgets após criar as sidebarTabs." … … 424 442 425 443 #: sidebarTabs_fixed.php:198 426 msgid "Dimensions / Font of Tabs / CSS Margin Instance "427 msgstr "Dimensões / Fonte das Abas / CSS das Margens da Instância "444 msgid "Dimensions / Font of Tabs / CSS Margin Instance / Others" 445 msgstr "Dimensões / Fonte das Abas / CSS das Margens da Instância / Outros" 428 446 429 447 #: sidebarTabs_fixed.php:202 … … 480 498 msgstr "branco assume as margens default do plugin" 481 499 482 #: sidebarTabs_fixed.php:247 483 #: sidebarTabs_scrollable.php:114 500 #: sidebarTabs_fixed.php:241 501 #: sidebarTabs_scrollable.php:97 502 msgid "Align horizontal tabs on the left?" 503 msgstr "Alinhar abas horizontais à esquerda?" 504 505 #: sidebarTabs_fixed.php:254 506 #: sidebarTabs_scrollable.php:121 484 507 msgid "Update Settings" 485 508 msgstr "Alterar Opções" … … 490 513 491 514 #: sidebarTabs_scrollable.php:62 492 msgid "Dimensions / CSS Margin Instance "493 msgstr "Dimensões / CSS das Margens da Instância "515 msgid "Dimensions / CSS Margin Instance / Others" 516 msgstr "Dimensões / CSS das Margens da Instância / Outros" 494 517 495 518 #: sidebarTabs_scrollable.php:67 -
sidebartabs/trunk/readme.txt
r214048 r217499 5 5 Requires at least: 2.8 6 6 Tested up to: 2.9 7 Stable tag: 2. 17 Stable tag: 2.2 8 8 9 9 Put widgets into tabbed interface in sidebar … … 72 72 73 73 == ChangeLog == 74 = 2.2 = 75 * Created the option "Default arguments before and after widget of your theme": Some themes, without the use of defaults arguments before and after widget, break the sidebar layout. Others don't work correctly with them. So I created this option and leave the choice up to each one. An excellent explanation this issue is the comment (#69) made by Clifton in page of plugin; 76 * Created the option "Align horizontal tabs on the left". 77 74 78 = 2.1 = 75 79 * Added the option "Display in sidebar" in the instance of the plugin; -
sidebartabs/trunk/sidebarTabs.php
r214048 r217499 5 5 Description: sidebarTabs allows you to easily widgets into Tabs 6 6 Author: Newton Horta 7 Version: 2. 17 Version: 2.2 8 8 Author URI: http://www.blogviche.com.br 9 9 … … 43 43 $options["bht"] = "0"; 44 44 $options["margin_c"] = 'margin: 10px 0 10px 0'; 45 $options["args_theme"] ="0"; 46 $options["align_left"] ="0"; 45 47 update_option("sidebarTabs", $options); 46 48 … … 86 88 $layout_instance = $widget_options[$widget_id]['layout_instance']; 87 89 $effect = $widget_options[$widget_id]['effects']; 90 if ($options['args_theme'] && !$short_code && !$dsb) $op .= $args['before_widget']; 88 91 $exclude = $widget_options[$widget_id]['exclude']; 89 92 if (!$exclude && !is_admin()) $op .= $args['before_title'] . $widget_options[$widget_id]['title'] . $args['after_title']; … … 94 97 } 95 98 96 // $sidebar = $wp_registered_sidebars['sidebar-1'];97 99 if ($abas) $abas = split(',',$abas); 98 100 else { … … 103 105 } 104 106 } 105 #Print the sidebartabs links106 107 107 108 if ($layout_instance == 1) { … … 112 113 } else { 113 114 $op .= "\n<div class='accordion' id='accordion".$widget_id."'>\n"; 114 // $op .= " <ul id='accordion_ul".$widget_id."' class='accordion".$widget_id."'>\n";115 115 } 116 116 $c_vert = 1; … … 195 195 } 196 196 if ($effect == '') $effect = 'fade'; 197 if ($options['args_theme'] && !$short_code && !$dsb) $op .= $args['after_widget']; 197 198 $op .= get_scripts_sidebarTabs($widget_id,$layout_instance,$effect); 199 198 200 if ($short_code) return $op; 199 201 else echo $op; … … 204 206 function sidebarTabs_addHeader(){ 205 207 $sbto=get_option("sidebarTabs"); 206 echo "\n".'<!-- Start Of Script Generated By sidebarTabs -->'."\n";208 echo "\n".'<!-- Start Of Script Generated By sidebarTabs 2.2 -->'."\n"; 207 209 $style = "<link rel=\"stylesheet\" href=\"" . get_bloginfo('wpurl') . "/wp-content/plugins/sidebartabs/styleSidebar.php\" type=\"text/css\" media=\"screen\" />\n"; 208 210 echo $style; … … 257 259 // Display Widget 258 260 function widget($args, $instance) { 259 extract($args);260 $title = apply_filters('widget_title', esc_attr($instance['title']));261 $exclude = esc_attr($instance['exclude']);262 $orderSelect = esc_attr($instance['orderSelect']);263 $layout_instance = esc_attr($instance['layout_instance']);264 $effects = esc_attr($instance['effects']);265 $display_sb = esc_attr($instance['display_sb']);266 261 get_sidebarTabs($args); 267 262 } … … 341 336 function get_scripts_sidebarTabs($id_w, $layout_instance='1', $effect) { 342 337 $options_script = get_option("sidebarTabs"); 343 ?> 344 <script type='text/javascript'> 345 /* <![CDATA[ */ 346 jQuery(document).ready(function($){ 347 <?php 338 339 $gss = "\n<script type='text/javascript'>"."\n"; 340 $gss .= '/* <![CDATA[ */'."\n"; 341 $gss .= ' jQuery(document).ready(function($){'."\n"; 342 348 343 if ($layout_instance == 1) { 349 344 if (($options_script['layout'] == 1 || $options_script['layout'] == 3) && $options_script['typeCorner']) { 350 ?>351 jQuery("ul.sidebarTabs<?php echo $id_w; ?> li a").corner("<?php echo $options_script['typeCorner'].' '.$options_script['width_corner'].'px'; ?>");352 <?php 345 346 $gss .= ' jQuery("ul.sidebarTabs'.$id_w.' li a").corner("'.$options_script['typeCorner'].' '.$options_script['width_corner'].'px");'."\n"; 347 353 348 } 354 349 if ($options_script['layout'] == 3 || $options_script['layout'] == 4) { 355 350 ?> 356 351 var tabInicial<?php echo $id_w; ?> = jQuery("ul.sidebarTabs<?php echo $id_w; ?> li a:eq(0)").offset().left 357 jQuery("ul.sidebarTabs<?php echo $id_w; ?>").tabs("div.sidebarTabs_divs<?php echo $id_w; ?> > .tb"); 352 <?php 353 $gss .= ' jQuery("ul.sidebarTabs'.$id_w.'").tabs("div.sidebarTabs_divs'.$id_w.' > .tb");'; 354 358 355 // enabling scrollable 359 jQuery("div.scrollable<?php echo $id_w; ?>").scrollable({360 onSeek: function(e) {361 var api = jQuery("ul.sidebarTabs<?php echo $id_w; ?>").tabs(0);362 api.click(e);363 },364 size: 1,365 items: '#sidebarTabs_ul<?php echo $id_w; ?>',366 clickable: true367 });368 jQuery("#sidebarTabs_ul<?php echo $id_w; ?>li a").click(function(e) {369 var apis = jQuery("div.scrollable<?php echo $id_w; ?>").scrollable(0);370 if (jQuery(this).offset().left>tabInicial<?php echo $id_w; ?>) apis.next();371 });372 <?php356 $gss .= ' jQuery("div.scrollable'.$id_w.'").scrollable({ 357 onSeek: function(e) { 358 var api = jQuery("ul.sidebarTabs'.$id_w.'").tabs(0); 359 api.click(e); 360 }, 361 size: 1, 362 items: "#sidebarTabs_ul'.$id_w.'", 363 clickable: true 364 }); 365 jQuery("#sidebarTabs_ul'.$id_w.' li a").click(function(e) { 366 var apis = jQuery("div.scrollable'.$id_w.'").scrollable(0); 367 if (jQuery(this).offset().left>tabInicial'.$id_w.') apis.next(); 368 }); '; 369 373 370 } else { 374 ?>375 jQuery("ul.sidebarTabs<?php echo $id_w; ?>").tabs("div.sidebarTabs_divs<?php echo $id_w; ?> > .tb");376 <?php 371 372 $gss .= ' jQuery("ul.sidebarTabs'.$id_w.'").tabs("div.sidebarTabs_divs'.$id_w.' > .tb");'; 373 377 374 } 378 375 } else { 379 ?> 380 jQuery("#accordion<?php echo $id_w; ?>").tabs("#accordion<?php echo $id_w; ?> div.pane", {tabs: 'h4.accordion_h4', effect: '<?php echo $effect; ?>', initialIndex: null});381 <?php 376 377 $gss .= ' jQuery("#accordion'.$id_w.'").tabs("#accordion'.$id_w.' div.pane", {tabs: "h4.accordion_h4", effect: "'.$effect.'", initialIndex: null});'; 378 382 379 } 383 ?> 384 }); 380 381 $gss .= ' 382 }); 385 383 /* ]]> */ 386 </script> 387 <?php 384 </script>'; 385 386 return $gss; 388 387 } 389 388 -
sidebartabs/trunk/sidebarTabs_admin.php
r214538 r217499 253 253 $options["bht"] = $_POST['bht']; 254 254 $options["margin_c"] = $_POST['margin_c']; 255 $options["args_theme"] = $_POST['args_theme']; 256 $options["align_left"] = $_POST['align_left']; 255 257 update_option("sidebarTabs", $options); 256 258 $message_options = $save_options; … … 331 333 <label><input type="radio" value="3" name="layout" class="optionLayout" <?php if ("3" == $options["layout"]) echo "checked=\"checked\""; ?> /> <?php _e('Scrollable without icons','sidebartabs') ?> </label> 332 334 <label><input type="radio" value="4" name="layout" class="optionLayout" <?php if ("4" == $options["layout"]) echo "checked=\"checked\""; ?> /> <?php _e('Scrollable with icons','sidebartabs') ?></label> 335 </td> 336 </tr> 337 </table> 338 <br /> 339 </div> 340 341 <div class="stuffbox metabox-holder" style="padding-top:0;"> 342 <h3><?php _e('Default arguments before and after widget of your theme','sidebartabs'); ?></h3> 343 <br class="clear" /> 344 <table class="form-table"> 345 <tr> 346 <td colspan="2"><?php echo _e("<strong>Note</strong>: Some themes, without the use of arguments, break the sidebar layout. Others don't work correctly with them. So I decided to create this option and leave the choice up to each one. An excellent explanation this issue is the comment (#69) made by Clifton in page of plugin. If the plugin works correctly without these arguments in your theme select 'No', otherwise select 'Yes'.",'sidebartabs') ?> 347 </td> 348 </tr> 349 <tr valign="top"> 350 <th scope="row"><?php _e('Use?','sidebartabs') ?></th> 351 <td> 352 <label><input type="radio" value="0" name="args_theme" class="optionArgs" <?php if (!$options["args_theme"]) echo "checked=\"checked\""; ?> /> <?php _e('No','sidebartabs') ?> </label> 353 <label><input type="radio" value="1" name="args_theme" class="optionArgs" <?php if ($options["args_theme"]) echo "checked=\"checked\""; ?> /> <?php _e('Yes','sidebartabs') ?> </label> 333 354 </td> 334 355 </tr> -
sidebartabs/trunk/sidebarTabs_fixed.php
r214538 r217499 196 196 </div> 197 197 <div class="stuffbox metabox-holder" style="padding-top:0;"> 198 <h3><?php _e('Dimensions / Font of Tabs / CSS Margin Instance ','sidebartabs'); ?></h3>198 <h3><?php _e('Dimensions / Font of Tabs / CSS Margin Instance / Others','sidebartabs'); ?></h3> 199 199 <br class="clear" /> 200 200 <table class="form-table"> … … 236 236 <td scope="row"> 237 237 <input type="text" id="margin_c" name="margin_c" size="40" value="<?php echo $margin_c ?>" /><br /> <small>(<?php echo _e('blank assumes the default margin of plugin','sidebartabs'); ?>)</small> 238 </td> 239 </tr> 240 <tr valign="top"> 241 <th scope="row"><?php _e('Align horizontal tabs on the left?','sidebartabs') ?></th> 242 <td> 243 <label><input type="radio" value="0" name="align_left" class="optionAlign" <?php if (!$options["align_left"]) echo "checked=\"checked\""; ?> /> <?php _e('No','sidebartabs') ?> </label> 244 <label><input type="radio" value="1" name="align_left" class="optionAlign" <?php if ($options["align_left"]) echo "checked=\"checked\""; ?> /> <?php _e('Yes','sidebartabs') ?> </label> 238 245 </td> 239 246 </tr> -
sidebartabs/trunk/sidebarTabs_scrollable.php
r214538 r217499 60 60 </div> 61 61 <div class="stuffbox metabox-holder" style="padding-top:0;"> 62 <h3><?php _e('Dimensions / CSS Margin Instance ','sidebartabs'); ?></h3>62 <h3><?php _e('Dimensions / CSS Margin Instance / Others','sidebartabs'); ?></h3> 63 63 <br class="clear" /> 64 64 <table class="form-table"> … … 94 94 </td> 95 95 </tr> 96 <tr valign="top"> 97 <th scope="row"><?php _e('Align horizontal tabs on the left?','sidebartabs') ?></th> 98 <td> 99 <label><input type="radio" value="0" name="align_left" class="optionAlign" <?php if (!$options["align_left"]) echo "checked=\"checked\""; ?> /> <?php _e('No','sidebartabs') ?> </label> 100 <label><input type="radio" value="1" name="align_left" class="optionAlign" <?php if ($options["align_left"]) echo "checked=\"checked\""; ?> /> <?php _e('Yes','sidebartabs') ?> </label> 101 </td> 102 </tr> 96 103 </table> 97 104 <br /> -
sidebartabs/trunk/styleSidebar.php
r214048 r217499 225 225 <?php } else { ?> 226 226 div.sb_container a.prev { 227 <?php if (!$opsbt['align_left']) { ?> 227 228 width:10px; 229 <?php } else { ?> 230 width: 0; 231 <?php } ?> 228 232 height:10px; 229 233 float:left; … … 231 235 } 232 236 div.sb_container a.prev { 237 <?php if (!$opsbt['align_left']) { ?> 233 238 margin-right: 3px; 239 <?php } else { ?> 240 margin_right: 0; 241 <?php } ?> 234 242 } 235 243 div.sb_container a.next {
Note: See TracChangeset
for help on using the changeset viewer.