Skip to content

Commit

Permalink
Remove useless styles
Browse files Browse the repository at this point in the history
UI improvements
Remove inline styles
Remove legened useless
Improve global javascript performances
  • Loading branch information
Rahe committed Jan 20, 2013
1 parent c7749af commit 90cac7d
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 147 deletions.
29 changes: 16 additions & 13 deletions css/sis-style.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
.progress {
position: relative;
height: 13px;
margin-bottom: 43px;
margin-bottom: 13px;
margin-top: 60px;
color: #FFFFFF;
display: none;
}

.progress .progress-percent {
position: absolute;
left: 0%;
top: -63px;
width: 82px;
height: 49px;
margin-top: -9px;
font-weight: bold;
line-height: 39px;
text-align: center;
}
input.h, input.w {
border-color: #DFDFDF;
background-color: white;
Expand Down Expand Up @@ -59,4 +47,19 @@ tr.notChangedAdding {

#ajax_thumbnail_rebuild {
margin-top: 40px;
}
#sis_progress-percent {
width: 100%;
text-align: center;
font-weight: bold;
}

#time .ui-state-highlight{
margin-top: 20px;
padding: 0 .7em;
}

#time .ui-icon{
float: left;
margin-right: .7em;
}
26 changes: 11 additions & 15 deletions inc/class.admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ function init() {
// Add the button
add_settings_field( 'add_size_button', __( 'Add a new size', 'sis' ), array( &$this, 'addSizeButton' ), 'media' );

// Add legend
add_settings_field( 'add_legend', __( 'Legend of the sizes', 'sis' ), array( &$this, 'addLegend' ), 'media' );

// Add php button
add_settings_field( 'get_php_button', __( 'Get php for theme', 'sis' ), array( &$this, 'getPhpButton' ), 'media' );

Expand Down Expand Up @@ -295,18 +292,6 @@ public function getPhpButton() { ?>
<p> <?php _e( 'Copy and paste the code below into your Wordpress theme function file if you wanted to save them and deactivate the plugin.', 'sis'); ?> </p>
<code></code>
<?php
}

/**
* Add the legend fo the colors
*
* @access public
* @return void
* @author Nicolas Juen
*/
public function addLegend() { ?>
<?php _e('The images created on your theme are <span style="color:#F2A13A">orange</span> and your custom size are <span style="color:#89D76A"> green </span>.', 'sis'); ?>
<?php
}

/**
Expand Down Expand Up @@ -443,6 +428,7 @@ public static function a_GetSizes() {
* @return oid
*/
public static function a_GetList() {
global $wpdb;
// Basic vars
$res = array();
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
Expand All @@ -453,6 +439,16 @@ public static function a_GetList() {
}

if ( isset( $_POST['post_types'] ) && !empty( $_POST['post_types'] ) ) {

foreach( $_POST['post_types'] as $key => $type ) {
if( !post_type_exists( $type ) ) {
unset( $_POST['post_types'][$key] );
}
}

if( empty( $_POST['post_types'][$key]) ) {
self::displayJson();
}

// Get image medias
$whichmimetype = wp_post_mime_type_where( 'image', $wpdb->posts );
Expand Down
Loading

0 comments on commit 90cac7d

Please sign in to comment.