CHANGED: Uses spinner controls (input:number) instead of text fields (input:text) in options for entering numerical values. input:number is introduced in HTML5 so now it works only at Google Chrome, Opera and Safari.
This commit is contained in:
1 parent
cbe51e1c0b
commit
f0de026412
2 files changed
+18
-18
No files matched your search
+17
-17
@@ -44,7 +44,7 @@ class auto_thickbox_options {
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo $this->texts['options']; ?></h2>
|
||||
<form method="post" action="options.php" name="form">
|
||||
<form method="post" action="options.php" name="form" novalidate>
|
||||
<?php settings_fields( $this->option_group ); ?>
|
||||
<div id="poststuff" class="metabox-holder">
|
||||
<?php
|
||||
@@ -171,7 +171,7 @@ class auto_thickbox_options {
|
||||
<th scope="row"></th>
|
||||
<th scope="row"><?php $this->util->_e('Clickable Range'); ?></th>
|
||||
<td class="slider">
|
||||
<input type="text" name="auto-thickbox-plus[click_range]" value="<?php echo $this->options['click_range']; ?>" id="click-range" class="small-text"<?php $this->util->disabled($click_range_disabled); ?> />
|
||||
<input type="number" min="0" max="50" step="5" name="auto-thickbox-plus[click_range]" value="<?php echo $this->options['click_range']; ?>" id="click-range" class="small-text"<?php $this->util->disabled($click_range_disabled); ?> />
|
||||
<span>%</span>
|
||||
<?php if ($this->has_slider): ?>
|
||||
<div id="click-range-slider"></div>
|
||||
@@ -320,9 +320,9 @@ class auto_thickbox_options {
|
||||
<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>
|
||||
<input type="number" min="0" step="10" 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>
|
||||
<input type="number" min="0" step="10" name="auto-thickbox-plus[win_height]" value="<?php echo $this->options['win_height']; ?>" class="small-text" /> px</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -357,21 +357,21 @@ class auto_thickbox_options {
|
||||
<th scope="row"><a href="<?php $this->util->_e('https://developer.mozilla.org/en/CSS/font-size'); ?>" target="_blank"><?php echo ucwords($this->util->_s('Font Size', 'Font size')); ?></a></th>
|
||||
<th scope="row"><?php $this->util->_e('Title'); ?></th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[font_size_title]" value="<?php echo $this->options['font_size_title']; ?>" class="small-text" /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[font_size_title]" value="<?php echo $this->options['font_size_title']; ?>" class="small-text" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<th scope="row"><?php $this->util->_e('Caption'); ?></th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[font_size_cap]" value="<?php echo $this->options['font_size_cap']; ?>" class="small-text" /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[font_size_cap]" value="<?php echo $this->options['font_size_cap']; ?>" class="small-text" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<th scope="row"><?php $this->util->_e('Navigation'); ?></th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[font_size_nav]" value="<?php echo $this->options['font_size_nav']; ?>" class="small-text" /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[font_size_nav]" value="<?php echo $this->options['font_size_nav']; ?>" class="small-text" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -468,14 +468,14 @@ class auto_thickbox_options {
|
||||
<th scope="row"><a href="<?php $this->util->_e('https://developer.mozilla.org/en/CSS/margin'); ?>" target="_blank"><?php $this->util->_e('Margin'); ?></a></th>
|
||||
<th scope="row"><?php echo $this->texts['image']; ?></th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[margin_img]" value="<?php echo $this->options['margin_img']; ?>" class="small-text" /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[margin_img]" value="<?php echo $this->options['margin_img']; ?>" class="small-text" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><a href="<?php $this->util->_e('https://developer.mozilla.org/en/CSS/border'); ?>" target="_blank"><?php $this->util->_e('Border'); ?></a></th>
|
||||
<th scope="row"><?php $this->util->_e('Window'); ?></th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[border_width_win]" value="<?php echo $this->options['border_width_win']; ?>" class="small-text"<?php $this->util->disabled($border_win_none); ?> /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[border_width_win]" value="<?php echo $this->options['border_width_win']; ?>" class="small-text"<?php $this->util->disabled($border_win_none); ?> /> px
|
||||
<select name="auto-thickbox-plus[border_style_win]"<?php $this->util->disabled($border_win_none); ?> style="margin:1px 3px">
|
||||
<?php $this->border_style_listbox('border_style_win'); ?>
|
||||
</select>
|
||||
@@ -491,7 +491,7 @@ class auto_thickbox_options {
|
||||
<th scope="row"></th>
|
||||
<th scope="row"><?php echo $this->texts['image']; ?> (<?php $this->util->_e('Top left'); ?>)</th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[border_width_img_tl]" value="<?php echo $this->options['border_width_img_tl']; ?>" class="small-text"<?php $this->util->disabled($border_img_tl_none); ?> /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[border_width_img_tl]" value="<?php echo $this->options['border_width_img_tl']; ?>" class="small-text"<?php $this->util->disabled($border_img_tl_none); ?> /> px
|
||||
<select name="auto-thickbox-plus[border_style_img_tl]"<?php $this->util->disabled($border_img_tl_none); ?> style="margin:1px 3px">
|
||||
<?php $this->border_style_listbox('border_style_img_tl'); ?>
|
||||
</select>
|
||||
@@ -507,7 +507,7 @@ class auto_thickbox_options {
|
||||
<th scope="row"></th>
|
||||
<th scope="row"><?php echo $this->texts['image']; ?> (<?php $this->util->_e('Bottom right'); ?>)</th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[border_width_img_br]" value="<?php echo $this->options['border_width_img_br']; ?>" class="small-text"<?php $this->util->disabled($border_img_br_none); ?> /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[border_width_img_br]" value="<?php echo $this->options['border_width_img_br']; ?>" class="small-text"<?php $this->util->disabled($border_img_br_none); ?> /> px
|
||||
<select name="auto-thickbox-plus[border_style_img_br]"<?php $this->util->disabled($border_img_br_none); ?> style="margin:1px 3px">
|
||||
<?php $this->border_style_listbox('border_style_img_br'); ?>
|
||||
</select>
|
||||
@@ -523,7 +523,7 @@ class auto_thickbox_options {
|
||||
<th scope="row"></th>
|
||||
<th scope="row"><?php echo $this->texts['wp_gallery']; ?></th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[border_width_gallery]" value="<?php echo $this->options['border_width_gallery']; ?>" class="small-text"<?php $this->util->disabled($border_gallery_none); ?> /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[border_width_gallery]" value="<?php echo $this->options['border_width_gallery']; ?>" class="small-text"<?php $this->util->disabled($border_gallery_none); ?> /> px
|
||||
<select name="auto-thickbox-plus[border_style_gallery]"<?php $this->util->disabled($border_gallery_none); ?> style="margin:1px 3px">
|
||||
<?php $this->border_style_listbox('border_style_gallery'); ?>
|
||||
</select>
|
||||
@@ -539,21 +539,21 @@ class auto_thickbox_options {
|
||||
<th scope="row"><a href="<?php $this->util->_e('https://developer.mozilla.org/en/CSS/border-radius'); ?>" target="_blank"><?php $this->util->_e('Border Radius'); ?></a></th>
|
||||
<th scope="row"><?php $this->util->_e('Window'); ?></th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[radius_win]" value="<?php echo $this->options['radius_win']; ?>" class="small-text" /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[radius_win]" value="<?php echo $this->options['radius_win']; ?>" class="small-text" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<th scope="row"><?php echo $this->texts['image']; ?></th>
|
||||
<td>
|
||||
<input type="text" name="auto-thickbox-plus[radius_img]" value="<?php echo $this->options['radius_img']; ?>" class="small-text" /> px
|
||||
<input type="number" min="0" name="auto-thickbox-plus[radius_img]" value="<?php echo $this->options['radius_img']; ?>" class="small-text" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><a href="<?php $this->util->_e('https://developer.mozilla.org/en/CSS/opacity'); ?>" target="_blank"><?php $this->util->_e('Opacity'); ?></a></th>
|
||||
<th scope="row"><?php $this->util->_e('Background'); ?></th>
|
||||
<td class="slider">
|
||||
<input type="text" name="auto-thickbox-plus[opacity_bg]" value="<?php echo $this->options['opacity_bg']; ?>" class="small-text" />
|
||||
<input type="number" min="0" max="1" step="0.05" name="auto-thickbox-plus[opacity_bg]" value="<?php echo $this->options['opacity_bg']; ?>" class="small-text" />
|
||||
<?php if ($this->has_slider): ?>
|
||||
<label class="opacity-trans"><?php $this->util->_e('Transparent'); ?></label>
|
||||
<div class="opacity-slider"></div>
|
||||
@@ -568,7 +568,7 @@ class auto_thickbox_options {
|
||||
<th scope="row"></th>
|
||||
<th scope="row"><?php $this->util->_e('Thumbnail'); ?></th>
|
||||
<td class="slider">
|
||||
<input type="text" name="auto-thickbox-plus[opacity_thumb]" value="<?php echo $this->options['opacity_thumb']; ?>" class="small-text" />
|
||||
<input type="number" min="0" max="1" step="0.05" name="auto-thickbox-plus[opacity_thumb]" value="<?php echo $this->options['opacity_thumb']; ?>" class="small-text" />
|
||||
<?php if ($this->has_slider): ?>
|
||||
<label class="opacity-trans"><?php $this->util->_e('Transparent'); ?></label>
|
||||
<div class="opacity-slider"></div>
|
||||
@@ -836,7 +836,7 @@ class auto_thickbox_options {
|
||||
<label class="item"><input type="radio" name="auto-thickbox-plus[effect_speed]" value="slow"<?php $this->util->checked($this->options['effect_speed'], 'slow'); ?> onclick="updateEffectSpeed(this)" />
|
||||
<?php $this->util->_e('Slow'); ?></label>
|
||||
<label class="item"><input type="radio" name="auto-thickbox-plus[effect_speed]" value="number"<?php $this->util->checked($effect_speed_num); ?> onclick="updateEffectSpeed(this)" />
|
||||
<input type="text" name="auto-thickbox-plus[effect_speed]" value="<?php echo $effect_speed; ?>"<?php $this->util->disabled(!$effect_speed_num); ?> class="small-text" /> ms</label>
|
||||
<input type="number" min="0" step="100" name="auto-thickbox-plus[effect_speed]" value="<?php echo $effect_speed; ?>"<?php $this->util->disabled(!$effect_speed_num); ?> class="small-text" /> ms</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ jQuery(function($) {
|
||||
|
||||
if ($.isFunction($().slider)) {
|
||||
$(".opacity-slider").each(function() {
|
||||
var text = $(this).prevAll("input:text");
|
||||
var text = $(this).prevAll("input[type='number']");
|
||||
$(this).slider({
|
||||
max: 1,
|
||||
step: 0.05,
|
||||
|
||||
Reference in new issue
Block a user