NEW: "View - Size - Window (Content) - !Width/Height" option. You can change the default size of ThickBox window with non-image, and it can be overridden with width/height parameters in URL.
This commit is contained in:
1 parent
bbb47aa894
commit
9fd8b7f3d1
3 files changed
+21
-2
No files matched your search
@@ -315,6 +315,16 @@ class auto_thickbox_options {
|
||||
<?php echo $this->texts['none']; ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php $this->util->_e('Size'); ?></th>
|
||||
<th scope="row"><?php $this->util->_e('Window'); ?> (<?php $this->util->_e('Content'); ?>)</th>
|
||||
<td>
|
||||
<label class="item"><?php $this->util->_e('Width'); ?>
|
||||
<input type="text" name="auto-thickbox-plus[win_width]" value="<?php echo $this->options['win_width']; ?>" class="small-text" /> px</label>
|
||||
<label class="item boundary"><?php $this->util->_e('Height'); ?>
|
||||
<input type="text" name="auto-thickbox-plus[win_height]" value="<?php echo $this->options['win_height']; ?>" class="small-text" /> px</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><a href="<?php $this->util->_e('https://developer.mozilla.org/en/CSS/position'); ?>" target="_blank"><?php $this->util->_e('Position'); ?></a></th>
|
||||
<th scope="row"><?php $this->util->_e('Window'); ?></th>
|
||||
|
||||
@@ -324,6 +324,11 @@ SCRIPT;
|
||||
if ( !$this->is_default_options('position_cap') )
|
||||
$script .= "tb_options.position_cap = '{$this->options['position_cap']}';\n";
|
||||
|
||||
if ( !$this->is_default_options('win_width') )
|
||||
$script .= "tb_options.win_width = {$this->options['win_width']};\n";
|
||||
if ( !$this->is_default_options('win_height') )
|
||||
$script .= "tb_options.win_height = {$this->options['win_height']};\n";
|
||||
|
||||
if ( !$this->is_default_options('ref_title') )
|
||||
$script .= "tb_options.ref_title = [{$this->options['ref_title']}];\n";
|
||||
if ( !$this->is_default_options('ref_cap') )
|
||||
@@ -591,6 +596,8 @@ SCRIPT;
|
||||
'key_end_home_end' => 'on',
|
||||
'position_title' => 'top',
|
||||
'position_cap' => 'bottom',
|
||||
'win_width' => '600',
|
||||
'win_height' => '400',
|
||||
'position_win' => 'fixed',
|
||||
'font_title' => '"Lucida Grande", Verdana, Arial, sans-serif',
|
||||
'font_cap' => '"Lucida Grande", Verdana, Arial, sans-serif',
|
||||
|
||||
+4
-2
@@ -33,6 +33,8 @@ var tb_options = {
|
||||
resize_content: false,
|
||||
position_title: "top",
|
||||
position_cap: "bottom",
|
||||
win_width: 600,
|
||||
win_height: 400,
|
||||
ref_title: ['link-title', 'link-name'],
|
||||
ref_cap: ['link-title', 'link-name'],
|
||||
effect_open: "none",
|
||||
@@ -459,8 +461,8 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
|
||||
var queryString = url.replace(/^[^\?]+\??/,'');
|
||||
var params = tb_parseQuery( queryString );
|
||||
|
||||
TB_WIDTH = (params['width']*1) || 600; //defaults to 600 if no paramaters were added to URL
|
||||
TB_HEIGHT = (params['height']*1) || 400; //defaults to 400 if no paramaters were added to URL
|
||||
TB_WIDTH = (params['width']*1) || tb_options.win_width; //defaults to 600 if no paramaters were added to URL
|
||||
TB_HEIGHT = (params['height']*1) || tb_options.win_height; //defaults to 400 if no paramaters were added to URL
|
||||
ajaxContentW = TB_WIDTH;
|
||||
ajaxContentH = TB_HEIGHT;
|
||||
|
||||
|
||||
Reference in new issue
Block a user