Plugin Directory

Changeset 606024


Ignore:
Timestamp:
09/30/2012 05:26:44 AM (13 years ago)
Author:
attosoft
Message:

NEW: "General - Mobile Support" options that has "No Window Margin"/"No ThickBox" option and "Width"/"Height" option (See also [605631] and [604041])

Location:
auto-thickbox-plus/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • auto-thickbox-plus/trunk/auto-thickbox-options.php

    r605638 r606024  
    133133        </td>
    134134    </tr>
     135    <tr>
     136        <th scope="row"><?php $this->util->_e('Mobile Support'); ?></th>
     137        <td>
     138            <label class="item"><input type="radio" name="auto-thickbox-plus[mobile_support]" value="no_margin"<?php $this->util->checked($this->options['mobile_support'], 'no_margin'); ?> />
     139            <?php $this->util->_e('No Window Margin'); ?></label>
     140            <label class="item"><input type="radio" name="auto-thickbox-plus[mobile_support]" value="no_thickbox"<?php $this->util->checked($this->options['mobile_support'], 'no_thickbox'); ?> />
     141            <?php $this->util->_e('No ThickBox'); ?></label>
     142        </td>
     143    </tr>
     144    <tr>
     145        <th scope="row"></th>
     146        <td>
     147            <label class="item"><?php $this->util->_e('Width'); ?>
     148            <input type="number" min="0" step="10" name="auto-thickbox-plus[small_width]" value="<?php echo $this->options['small_width']; ?>" class="small-text" /> px</label>
     149            <label class="item boundary"><?php $this->util->_e('Height'); ?>
     150            <input type="number" min="0" step="10" name="auto-thickbox-plus[small_height]" value="<?php echo $this->options['small_height']; ?>" class="small-text" /> px</label>
     151        </td>
     152    </tr>
    135153</table>
    136154<?php
  • auto-thickbox-plus/trunk/auto-thickbox.php

    r605638 r606024  
    337337            $script .= "tb_options.position_cap = '{$this->options['position_cap']}';\n";
    338338
     339        if ( !$this->is_default_options('mobile_support') )
     340            $script .= "tb_options.mobile_support = '{$this->options['mobile_support']}';\n";
     341        if ( !$this->is_default_options('small_width') )
     342            $script .= "tb_options.small_width = {$this->options['small_width']};\n";
     343        if ( !$this->is_default_options('small_height') )
     344            $script .= "tb_options.small_height = {$this->options['small_height']};\n";
    339345        if ( !$this->is_default_options('win_width') )
    340346            $script .= "tb_options.win_width = {$this->options['win_width']};\n";
     
    580586            'builtin_res' => 'off',
    581587            'script_place' => 'header',
     588            'mobile_support' => 'no_margin',
     589            'small_width' => '480',
     590            'small_height' => '480',
    582591            'effect_open' => 'none',
    583592            'effect_close' => 'fade',
  • auto-thickbox-plus/trunk/readme.txt

    r605638 r606024  
    279279* NEW: Mobile support for small-screen devices such as iPhone, Android, Symbian, BlackBerry and Windows Phone
    280280* NEW: Auto Resize feature works even when resizing browser window
     281* NEW: "General - Mobile Support" options that has "No Window Margin"/"No ThickBox" option and "Width"/"Height" option
    281282* NEW: "View - Margin - Window" option
    282283* FIXED: Gallery images cannot be displayed in gallery style with [Cleaner Gallery](http://wordpress.org/extend/plugins/cleaner-gallery/)
  • auto-thickbox-plus/trunk/thickbox.js

    r605852 r606024  
    3535    position_title: "top",
    3636    position_cap: "bottom",
     37    mobile_support: "no_margin",
     38    small_width: 480,
     39    small_height: 480,
    3740    win_width: 600,
    3841    win_height: 400,
     
    6568
    6669function tb_click(){
     70    if (tb_options.mobile_support == 'no_thickbox') {
     71        var pageSize = tb_getPageSize();
     72        if (pageSize[0] <= tb_options.small_width || pageSize[1] <= tb_options.small_height)
     73            return true;
     74    }
     75
    6776    if (document.getElementById("TB_window") !== null) {
    6877        jQuery(document).unbind('.thickbox');
     
    747756    var imgSize = tb_getSize(jQuery("#TB_Image"));
    748757
    749     var SMALL_WIDTH = 480;
    750     var SMALL_HEIGHT = 480;
    751758    var pageSize = tb_getPageSize();
    752     var winMargin = (pageSize[0] <= SMALL_WIDTH || pageSize[1] <= SMALL_HEIGHT) ? 0 : tb_options.margin_win * 2;
     759    var winMargin = (pageSize[0] <= tb_options.small_width || pageSize[1] <= tb_options.small_height) ? 0 : tb_options.margin_win * 2;
    753760
    754761    // Resizing large images - orginal by Christian Montoya edited by me.
Note: See TracChangeset for help on using the changeset viewer.