Skip to content

Commit

Permalink
fix styling of sharepress scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyblake committed Dec 13, 2013
1 parent c4d7924 commit fead47a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
25 changes: 24 additions & 1 deletion pro-meta-box.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
<?php if (!defined('ABSPATH')) exit; /* silence is golden... */ ?>

<style>
.timestamp-wrap {
line-height: 23px;
}
.timestamp-wrap select {
height: 21px;
line-height: 14px;
padding: 0;
vertical-align: top;
font-size: 12px;
}
#sp_jj, #sp_hh, #sp_mn {
width: 2em;
}
#sp_aa {
width: 3.4em;
}
.timestamp-wrap input {
border-width: 1px;
border-style: solid;
padding: 1px;
font-size: 12px;
}
</style>
<div id="sharepress" <?php if (($posted || $scheduled || $last_posted) && @$_GET['sharepress'] != 'schedule') echo 'style="display:none;"' ?>>

<br />
Expand Down
10 changes: 5 additions & 5 deletions pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ function touch_time($scheduled = null) {

$field = Sharepress::META;

$month = "<select " . ( $multi ? '' : 'id="mm" ' ) . "name=\"{$field}[mm]\"$tab_index_attribute>\n";
$month = "<select " . ( $multi ? '' : 'id="sp_mm" ' ) . "name=\"{$field}[mm]\"$tab_index_attribute>\n";
for ( $i = 1; $i < 13; $i = $i +1 ) {
$month .= "\t\t\t" . '<option value="' . zeroise($i, 2) . '"';
if ( $i == $mm )
Expand All @@ -546,10 +546,10 @@ function touch_time($scheduled = null) {
}
$month .= '</select>';

$day = '<input type="text" name="'.$field.'[jj]" onblur="if(!jQuery.trim(jQuery(this).val())) jQuery(this).val(\''.$jj.'\');" value="' . $jj . '" style="width:30px;" maxlength="2" autocomplete="off" />';
$year = '<input type="text" name="'.$field.'[aa]" onblur="if(!jQuery.trim(jQuery(this).val())) jQuery(this).val(\''.$aa.'\');" value="' . $aa . '" style="width:50px;" maxlength="4" autocomplete="off" />';
$hour = '<input type="text" name="'.$field.'[hh]" onblur="if(!jQuery.trim(jQuery(this).val())) jQuery(this).val(\''.$hh.'\');" value="' . $hh . '" style="width:30px;" maxlength="2" autocomplete="off" />';
$minute = '<input type="text" name="'.$field.'[mn]" onblur="if(!jQuery.trim(jQuery(this).val())) jQuery(this).val(\''.$mn.'\');" value="' . $mn . '" style="width:30px;" maxlength="2" autocomplete="off" />';
$day = '<input id="sp_jj" type="text" name="'.$field.'[jj]" onblur="if(!jQuery.trim(jQuery(this).val())) jQuery(this).val(\''.$jj.'\');" value="' . $jj . '" maxlength="2" autocomplete="off" />';
$year = '<input id="sp_aa" type="text" name="'.$field.'[aa]" onblur="if(!jQuery.trim(jQuery(this).val())) jQuery(this).val(\''.$aa.'\');" value="' . $aa . '" maxlength="4" autocomplete="off" />';
$hour = '<input id="sp_hh" type="text" name="'.$field.'[hh]" onblur="if(!jQuery.trim(jQuery(this).val())) jQuery(this).val(\''.$hh.'\');" value="' . $hh . '" maxlength="2" autocomplete="off" />';
$minute = '<input id="sp_mn" type="text" name="'.$field.'[mn]" onblur="if(!jQuery.trim(jQuery(this).val())) jQuery(this).val(\''.$mn.'\');" value="' . $mn . '" maxlength="2" autocomplete="off" />';

echo '<div class="timestamp-wrap">';
/* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */
Expand Down

0 comments on commit fead47a

Please sign in to comment.