Plugin Directory

Changeset 217499


Ignore:
Timestamp:
03/14/2010 03:22:29 PM (16 years ago)
Author:
nghorta
Message:
 
Location:
sidebartabs/trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • sidebartabs/trunk/js/jquery.corner.js

    r169107 r217499  
    22 * jQuery corner plugin: simple corner rounding
    33 * 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
    56 * Dual licensed under the MIT and GPL licenses:
    67 * http://www.opensource.org/licenses/mit-license.php
    78 * http://www.gnu.org/licenses/gpl.html
     9 * Authors: Dave Methvin and Mike Alsup
    810 */
    911
     
    1214 *
    1315 *  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)
    1617 *  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).
    2119 */
    2220;(function($) {
    2321
    24 var moz = $.browser.mozilla && /gecko/i.test(navigator.userAgent);
    25 var webkit = $.browser.safari && $.browser.version >= 3;
     22var style = document.createElement('div').style;
     23var moz = style['MozBorderRadius'] !== undefined;
     24var webkit = style['WebkitBorderRadius'] !== undefined;
     25var radius = style['borderRadius'] !== undefined || style['BorderRadius'] !== undefined;
     26var mode = document.documentMode || 0;
     27var noBottomFold = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
    2628
    2729var expr = $.browser.msie && (function() {
    2830    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'); }
    3032    catch(e) { return false; }
    3133    return true;
     
    6769    case 'long':   return Math.round(width*(Math.sqrt(i)));
    6870    case 'sculpt': return Math.round(width*(Math.log((width-i-1),width)));
     71    case 'dogfold':
    6972    case 'dog':    return (i&1) ? (i+1) : width;
    7073    case 'dog2':   return (i&2) ? (i+1) : width;
     
    7275    case 'fray':   return (i%2)*width;
    7376    case 'notch':  return width;
     77    case 'bevelfold':
    7478    case 'bevel':  return i+1;
    7579    }
     
    9094    return this.each(function(index){
    9195        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();
    9398        var keep = /keep/.test(o);                       // keep borders?
    9499        var cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);  // corner color
    95100        var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);  // strip color
    96101        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/;
    98103        var fx = ((o.match(re)||['round'])[0]);
     104        var fold = /dogfold|bevelfold/.test(o);
    99105        var edges = { T:0, B:1 };
    100106        var opts = {
     
    106112           
    107113        // 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) {
    109115            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');
    111117            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');
    113119            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');
    115121            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');
    117123            return;
    118124        }
    119125           
    120126        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        });
    125135   
    126136        var pad = {
     
    132142        if (!keep) this.style.border = 'none';
    133143        strip.style.borderColor = cc || gpc(this.parentNode);
    134         var cssHeight = $.curCSS(this, 'height');
     144        var cssHeight = $(this).outerHeight();
    135145
    136146        for (var j in edges) {
     
    181191                    bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild);
    182192                }
     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                }
    183221            }
    184222        }
     
    187225
    188226$.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);
    191229    $('div.jquery-corner', this).remove();
    192230    return this;
  • sidebartabs/trunk/langs/sidebartabs-pt_BR.po

    r214052 r217499  
    33"Project-Id-Version: sidebarTabs version 1.1\n"
    44"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"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Newton de Góes Horta <nghorta@gmail.com>\n"
     
    1717"X-Poedit-SearchPath-0: .\n"
    1818
    19 #: sidebarTabs.php:253
     19#: sidebarTabs.php:255
    2020msgid "Put widgets into tabbed (scrollable) interface in sidebar"
    2121msgstr "Colocar widgets em uma interface com abas na barra lateral (sidebar) do blog"
    2222
    23 #: sidebarTabs.php:254
     23#: sidebarTabs.php:256
    2424msgid "sidebarTabs"
    2525msgstr "sidebarTab"
    2626
    27 #: sidebarTabs.php:287
     27#: sidebarTabs.php:282
    2828msgid "Instance 1"
    2929msgstr "Instância 1"
    3030
    31 #: sidebarTabs.php:296
     31#: sidebarTabs.php:291
    3232msgid "Title:"
    3333msgstr "Título:"
    3434
    35 #: sidebarTabs.php:299
     35#: sidebarTabs.php:294
    3636msgid "Exclude Title:"
    3737msgstr "Excluir Título:"
    3838
    39 #: sidebarTabs.php:302
     39#: sidebarTabs.php:297
    4040msgid "Orders sidebarTabs:"
    4141msgstr "sidebarTabs Ordens:"
    4242
    43 #: sidebarTabs.php:303
     43#: sidebarTabs.php:298
    4444msgid "Seperate mutiple sidebarTabs orders with commas. Leave blank for all."
    4545msgstr "Separe múltiplas ordens de sidebarTabs com vírgula. Deixe em branco para todas."
    4646
    47 #: sidebarTabs.php:305
     47#: sidebarTabs.php:300
    4848msgid "Layout of Instance:"
    4949msgstr "Layout da Instância:"
    5050
    51 #: sidebarTabs.php:307
     51#: sidebarTabs.php:302
    5252msgid "Horizontal"
    5353msgstr "Horizontal"
    5454
    55 #: sidebarTabs.php:308
     55#: sidebarTabs.php:303
    5656msgid "Vertical"
    5757msgstr "Vertical"
    5858
    59 #: sidebarTabs.php:313
     59#: sidebarTabs.php:308
    6060msgid "Effect (Only vertical instances):"
    6161msgstr "Efeito (Somente instâncias verticais):"
    6262
    63 #: sidebarTabs.php:315
     63#: sidebarTabs.php:310
    6464msgid "default"
    6565msgstr "default"
    6666
    67 #: sidebarTabs.php:316
     67#: sidebarTabs.php:311
    6868msgid "fade"
    6969msgstr "fade"
    7070
    71 #: sidebarTabs.php:317
     71#: sidebarTabs.php:312
    7272msgid "slide"
    7373msgstr "slide"
    7474
    75 #: sidebarTabs.php:322
     75#: sidebarTabs.php:317
    7676msgid "Display in Sidebar:"
    7777msgstr "Exibe na Sidebar:"
    7878
    79 #: sidebarTabs.php:324
     79#: sidebarTabs.php:319
     80#: sidebarTabs_admin.php:353
     81#: sidebarTabs_fixed.php:244
     82#: sidebarTabs_scrollable.php:100
    8083msgid "Yes"
    8184msgstr "Sim"
    8285
    83 #: sidebarTabs.php:325
     86#: sidebarTabs.php:320
    8487#: sidebarTabs_admin.php:202
     88#: sidebarTabs_admin.php:352
     89#: sidebarTabs_fixed.php:243
     90#: sidebarTabs_scrollable.php:99
    8591msgid "No"
    8692msgstr "Não"
     
    111117
    112118#: sidebarTabs_admin.php:40
    113 #: sidebarTabs_admin.php:465
     119#: sidebarTabs_admin.php:486
    114120msgid "Default args"
    115121msgstr "Default args"
     
    117123#: sidebarTabs_admin.php:43
    118124#: sidebarTabs_admin.php:133
    119 #: sidebarTabs_admin.php:315
    120 #: sidebarTabs_admin.php:349
     125#: sidebarTabs_admin.php:317
     126#: sidebarTabs_admin.php:370
    121127msgid "Back to Manage sidebarTabs"
    122128msgstr "Voltar para Administrar sidebarTabs"
     
    153159
    154160#: sidebarTabs_admin.php:114
    155 #: sidebarTabs_admin.php:505
     161#: sidebarTabs_admin.php:526
    156162msgid "Edit"
    157163msgstr "Editar"
     
    182188
    183189#: sidebarTabs_admin.php:200
    184 #: sidebarTabs_admin.php:479
     190#: sidebarTabs_admin.php:500
    185191msgid "Icon"
    186192msgstr "Ícone"
     
    190196msgstr "Gravar"
    191197
    192 #: sidebarTabs_admin.php:312
     198#: sidebarTabs_admin.php:314
    193199msgid "Options"
    194200msgstr "Opções"
    195201
    196 #: sidebarTabs_admin.php:321
     202#: sidebarTabs_admin.php:323
    197203msgid "Attention: D'ont forget to Save the changes after you are done. Always save after upgrade of plugin version."
    198204msgstr "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."
    199205
    200 #: sidebarTabs_admin.php:323
     206#: sidebarTabs_admin.php:325
    201207msgid "Layout of Tabs"
    202208msgstr "Layout das Abas"
    203209
    204 #: sidebarTabs_admin.php:327
     210#: sidebarTabs_admin.php:329
    205211msgid "Select"
    206212msgstr "Selecione"
    207213
    208 #: sidebarTabs_admin.php:329
    209 #: sidebarTabs_admin.php:447
     214#: sidebarTabs_admin.php:331
     215#: sidebarTabs_admin.php:468
    210216msgid "Fixed without icons"
    211217msgstr "Fixo sem ícones"
    212218
    213 #: sidebarTabs_admin.php:330
    214 #: sidebarTabs_admin.php:448
     219#: sidebarTabs_admin.php:332
     220#: sidebarTabs_admin.php:469
    215221msgid "Fixed with icons"
    216222msgstr "Fixo com ícones"
    217223
    218 #: sidebarTabs_admin.php:331
    219 #: sidebarTabs_admin.php:449
     224#: sidebarTabs_admin.php:333
     225#: sidebarTabs_admin.php:470
    220226msgid "Scrollable without icons"
    221227msgstr "Rolável sem ícones"
    222228
    223 #: sidebarTabs_admin.php:332
    224 #: sidebarTabs_admin.php:450
     229#: sidebarTabs_admin.php:334
     230#: sidebarTabs_admin.php:471
    225231msgid "Scrollable with icons"
    226232msgstr "Rolável com ícones"
    227233
    228 #: sidebarTabs_admin.php:344
     234#: sidebarTabs_admin.php:342
     235msgid "Default arguments before and after widget of your theme"
     236msgstr "Argumentos padrão before e after widget de seu tema"
     237
     238#: sidebarTabs_admin.php:346
     239msgid "<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'."
     240msgstr "<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
     243msgid "Use?"
     244msgstr "Usar?"
     245
     246#: sidebarTabs_admin.php:365
    229247msgid "Loading. Wait..."
    230248msgstr "Carregando. Aguarde..."
    231249
    232 #: sidebarTabs_admin.php:390
     250#: sidebarTabs_admin.php:411
    233251#, php-format
    234252msgid "The tab number was set to %s."
    235253msgstr "O número da aba foi setado para %s."
    236254
    237 #: sidebarTabs_admin.php:401
     255#: sidebarTabs_admin.php:422
    238256msgid "The tab number should be at least 1 and so was changed to 1."
    239257msgstr "O número da aba deve ser pelo menos 1."
    240258
    241 #: sidebarTabs_admin.php:405
     259#: sidebarTabs_admin.php:426
    242260msgid "The tab number was changed to be only one higher than the previous total number of tabs."
    243261msgstr "O número da aba foi alterado para um número maior que o total de abas anteriores"
    244262
    245 #: sidebarTabs_admin.php:457
     263#: sidebarTabs_admin.php:478
    246264msgid "Manage sidebarTabs"
    247265msgstr "Administrar sidebarTabs"
    248266
    249 #: sidebarTabs_admin.php:462
     267#: sidebarTabs_admin.php:483
    250268msgid "Delete"
    251269msgstr "Excluir"
    252270
    253 #: sidebarTabs_admin.php:463
     271#: sidebarTabs_admin.php:484
    254272msgid "Create New sidebarTab"
    255273msgstr "Criar nova sidebarTab"
    256274
    257 #: sidebarTabs_admin.php:464
     275#: sidebarTabs_admin.php:485
    258276msgid "sidebarTabs Options"
    259277msgstr "Opções sidebarTabs"
    260278
    261 #: sidebarTabs_admin.php:466
     279#: sidebarTabs_admin.php:487
    262280msgid "Reset ?"
    263281msgstr "Reset ?"
    264282
    265 #: sidebarTabs_admin.php:466
     283#: sidebarTabs_admin.php:487
    266284msgid "Reset"
    267285msgstr "Reset"
    268286
    269 #: sidebarTabs_admin.php:475
     287#: sidebarTabs_admin.php:496
    270288msgid "Order"
    271289msgstr "Ordem"
    272290
    273 #: sidebarTabs_admin.php:476
     291#: sidebarTabs_admin.php:497
    274292msgid "Widget"
    275293msgstr "Widget"
    276294
    277 #: sidebarTabs_admin.php:477
     295#: sidebarTabs_admin.php:498
    278296msgid "Tab Name"
    279297msgstr "Nome da Aba"
    280298
    281 #: sidebarTabs_admin.php:478
     299#: sidebarTabs_admin.php:499
    282300msgid "Description"
    283301msgstr "Descrição"
    284302
    285 #: sidebarTabs_admin.php:480
     303#: sidebarTabs_admin.php:501
    286304msgid "Callback"
    287305msgstr "Callback"
    288306
    289 #: sidebarTabs_admin.php:481
     307#: sidebarTabs_admin.php:502
    290308msgid "Unregister"
    291309msgstr "Unregister"
    292310
    293 #: sidebarTabs_admin.php:482
     311#: sidebarTabs_admin.php:503
    294312msgid "Action"
    295313msgstr "Ação"
    296314
    297 #: sidebarTabs_admin.php:489
     315#: sidebarTabs_admin.php:510
    298316msgid "yes"
    299317msgstr "sim"
    300318
    301 #: sidebarTabs_admin.php:490
     319#: sidebarTabs_admin.php:511
    302320msgid "no"
    303321msgstr "não"
    304322
    305 #: sidebarTabs_admin.php:513
     323#: sidebarTabs_admin.php:534
    306324msgid "Preview (without style) - Layout: "
    307325msgstr "Preview (sem estilo) - Layout: "
    308326
    309 #: sidebarTabs_admin.php:534
     327#: sidebarTabs_admin.php:555
    310328msgid "No instance created. Go to Design > Widget after create the sidebarTabs."
    311329msgstr "Nenhuma instância criada. Vá para Aparência > Widgets após criar as sidebarTabs."
     
    424442
    425443#: 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"
     444msgid "Dimensions / Font of Tabs / CSS Margin Instance / Others"
     445msgstr "Dimensões / Fonte das Abas / CSS das Margens da Instância / Outros"
    428446
    429447#: sidebarTabs_fixed.php:202
     
    480498msgstr "branco assume as margens default do plugin"
    481499
    482 #: sidebarTabs_fixed.php:247
    483 #: sidebarTabs_scrollable.php:114
     500#: sidebarTabs_fixed.php:241
     501#: sidebarTabs_scrollable.php:97
     502msgid "Align horizontal tabs on the left?"
     503msgstr "Alinhar abas horizontais à esquerda?"
     504
     505#: sidebarTabs_fixed.php:254
     506#: sidebarTabs_scrollable.php:121
    484507msgid "Update Settings"
    485508msgstr "Alterar Opções"
     
    490513
    491514#: sidebarTabs_scrollable.php:62
    492 msgid "Dimensions / CSS Margin Instance"
    493 msgstr "Dimensões / CSS das Margens da Instância"
     515msgid "Dimensions / CSS Margin Instance / Others"
     516msgstr "Dimensões / CSS das Margens da Instância / Outros"
    494517
    495518#: sidebarTabs_scrollable.php:67
  • sidebartabs/trunk/readme.txt

    r214048 r217499  
    55Requires at least: 2.8
    66Tested up to: 2.9
    7 Stable tag: 2.1
     7Stable tag: 2.2
    88
    99Put widgets into tabbed interface in sidebar
     
    7272
    7373== 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
    7478= 2.1 =
    7579* Added the option "Display in sidebar" in the instance of the plugin;
  • sidebartabs/trunk/sidebarTabs.php

    r214048 r217499  
    55Description: sidebarTabs allows you to easily widgets into Tabs
    66Author: Newton Horta
    7 Version: 2.1
     7Version: 2.2
    88Author URI: http://www.blogviche.com.br
    99
     
    4343        $options["bht"] = "0";
    4444        $options["margin_c"] = 'margin: 10px 0 10px 0';
     45        $options["args_theme"] ="0";
     46        $options["align_left"] ="0";
    4547        update_option("sidebarTabs", $options);
    4648
     
    8688    $layout_instance = $widget_options[$widget_id]['layout_instance'];
    8789    $effect = $widget_options[$widget_id]['effects'];
     90    if ($options['args_theme'] && !$short_code && !$dsb) $op .= $args['before_widget'];
    8891    $exclude = $widget_options[$widget_id]['exclude'];
    8992    if (!$exclude && !is_admin()) $op .= $args['before_title'] . $widget_options[$widget_id]['title'] . $args['after_title'];
     
    9497    }   
    9598
    96     //  $sidebar = $wp_registered_sidebars['sidebar-1'];
    9799    if ($abas) $abas = split(',',$abas);
    98100    else {
     
    103105        }
    104106    }
    105     #Print the sidebartabs links
    106107
    107108    if ($layout_instance == 1) {   
     
    112113    } else {
    113114        $op .= "\n<div class='accordion' id='accordion".$widget_id."'>\n";
    114 //      $op .= "      <ul id='accordion_ul".$widget_id."' class='accordion".$widget_id."'>\n";
    115115    }
    116116    $c_vert = 1;
     
    195195    }
    196196    if ($effect == '') $effect = 'fade';
     197    if ($options['args_theme'] && !$short_code && !$dsb) $op .= $args['after_widget'];
    197198    $op .= get_scripts_sidebarTabs($widget_id,$layout_instance,$effect);
     199
    198200    if ($short_code) return $op;
    199201    else echo $op;
     
    204206function sidebarTabs_addHeader(){
    205207    $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";
    207209    $style = "<link rel=\"stylesheet\" href=\"" . get_bloginfo('wpurl') . "/wp-content/plugins/sidebartabs/styleSidebar.php\" type=\"text/css\" media=\"screen\" />\n";
    208210    echo $style;
     
    257259    // Display Widget
    258260    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']);
    266261        get_sidebarTabs($args);     
    267262    }
     
    341336function get_scripts_sidebarTabs($id_w, $layout_instance='1', $effect) {
    342337    $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
    348343    if ($layout_instance == 1) {
    349344        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
    353348        }
    354349        if ($options_script['layout'] == 3 || $options_script['layout'] == 4) {
    355350    ?> 
    356351        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       
    358355    // 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: true
    367         });
    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     <?php
     356        $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   
    373370        } 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
    377374        }
    378375    } 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
    382379    }   
    383 ?>     
    384 });
     380
     381$gss .= '       
     382   });
    385383/* ]]> */
    386 </script>
    387 <?php
     384</script>';
     385
     386return $gss;
    388387}
    389388
  • sidebartabs/trunk/sidebarTabs_admin.php

    r214538 r217499  
    253253                $options["bht"] = $_POST['bht'];
    254254                $options["margin_c"] = $_POST['margin_c'];
     255                $options["args_theme"] = $_POST['args_theme'];
     256                $options["align_left"] = $_POST['align_left'];
    255257                update_option("sidebarTabs", $options);
    256258                $message_options = $save_options;   
     
    331333                            <label><input type="radio" value="3" name="layout" class="optionLayout" <?php if ("3" == $options["layout"]) echo "checked=\"checked\""; ?> /> <?php _e('Scrollable without icons','sidebartabs') ?> &nbsp;&nbsp;</label>
    332334                            <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') ?> &nbsp;&nbsp;</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') ?>  &nbsp;&nbsp;</label>
    333354                        </td>
    334355                    </tr>   
  • sidebartabs/trunk/sidebarTabs_fixed.php

    r214538 r217499  
    196196                    </div> 
    197197                    <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>
    199199                        <br class="clear" />
    200200                        <table class="form-table"> 
     
    236236                                <td scope="row">
    237237                                    <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') ?> &nbsp;&nbsp;</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') ?>  &nbsp;&nbsp;</label>
    238245                                </td>
    239246                            </tr>   
  • sidebartabs/trunk/sidebarTabs_scrollable.php

    r214538 r217499  
    6060                </div> 
    6161                <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>
    6363                    <br class="clear" />
    6464                    <table class="form-table"> 
     
    9494                            </td>
    9595                        </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') ?> &nbsp;&nbsp;</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') ?>  &nbsp;&nbsp;</label>
     101                            </td>
     102                        </tr>   
    96103                    </table>
    97104                    <br />
  • sidebartabs/trunk/styleSidebar.php

    r214048 r217499  
    225225<?php } else { ?>
    226226div.sb_container a.prev {
     227<?php if (!$opsbt['align_left']) { ?>
    227228    width:10px;
     229<?php } else { ?>
     230    width: 0;
     231<?php } ?>     
    228232    height:10px;
    229233    float:left;
     
    231235}
    232236div.sb_container a.prev {
     237<?php if (!$opsbt['align_left']) { ?>
    233238    margin-right: 3px;
     239<?php } else { ?>
     240    margin_right: 0;
     241<?php } ?>     
    234242}
    235243div.sb_container a.next {
Note: See TracChangeset for help on using the changeset viewer.