Changeset 355


Ignore:
Timestamp:
01/13/2010 12:40:50 PM (2 years ago)
Author:
ofer
Message:

Tweaks for transposh.css for improving speed and reducing number of requests

Location:
trunk/WordPress/plugin/transposh
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WordPress/plugin/transposh/css/transposh.css

    r242 r355  
    11/* 
    22 * Fix collisions with some themes 
     3 * This css will be either lazy-loaded or become part of the .js file 
    34 */ 
    45 
     6 /* this is now useless? 
    57.post .postbody .tr_img_, .attachment .tr_img_, .navigation .alignleft .tr_img_, .navigation .alignright .tr_img_, 
    68.tr_img_ { 
    79    border: 0px;  
    810    margin: 0px; 
    9 } 
     11}*/ 
    1012 
    1113.tr-icon { 
  • trunk/WordPress/plugin/transposh/css/transposh_flags.css

    r271 r355  
     1/* 
     2 * Widget's css (always needed in flags widget use) 
     3 */ 
     4.transposh_flags { 
     5    direction: ltr; 
     6    line-height: 0; 
     7} 
     8.transposh_flags a  { 
     9    /*    line-height:11px;*/ 
     10    display: inline; 
     11    /*background: transparent;*/ /* ie8 quirk */ 
     12} 
     13 
     14.transposh_flags a:hover { 
     15    /* ie8 quirk */ 
     16    background:transparent 
     17} 
     18 
     19.transposh_flags a span, .transposh_flags a img { 
     20    border-color:transparent; 
     21    border-style:solid; 
     22    border-width:1px 3px; 
     23    padding: 0; 
     24} 
     25 
     26.transposh_flags a span:hover, .transposh_flags a img:hover { 
     27    border-color:blue 
     28} 
     29 
    130.trf { 
    231        background-image:url(../img/flags.png); 
  • trunk/WordPress/plugin/transposh/css/transposh_widget.css

    r330 r355  
    66    line-height: 0; 
    77} 
    8 /*.transposh_flags a  { 
    9     line-height:11px;*/ 
    10         /*display: inline;*/ 
    11         /*background: transparent;*/ /* ie8 quirk */ 
    12 /*}*/ 
     8.transposh_flags a  { 
     9    /*    line-height:11px;*/ 
     10    display: inline; 
     11    /*background: transparent;*/ /* ie8 quirk */ 
     12} 
    1313 
    1414.transposh_flags a:hover { 
  • trunk/WordPress/plugin/transposh/transposh.php

    r354 r355  
    460460     */ 
    461461    function add_transposh_css() { 
    462         if(!$this->is_editing_permitted() && !$this->is_auto_translate_permitted()) { 
    463             //translation not allowed - no need for the transposh.css 
    464             return; 
    465         } 
     462        //translation not allowed - no need for the transposh.css 
     463        if(!$this->is_editing_permitted() && !$this->is_auto_translate_permitted()) return;         
     464        // actually - this is only needed when editing 
     465        if (!$this->edit_mode) return; 
     466        // TODO - remove on lazy load... 
    466467        //include the transposh.css 
    467468        wp_enqueue_style("transposh","{$this->transposh_plugin_url}/css/transposh.css",array(),TRANSPOSH_PLUGIN_VER); 
     
    486487            wp_enqueue_script("jquery","http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js",array(),'1.3.2'); 
    487488            // toying around - for later... 
    488             //wp_enqueue_script("jquery","http://code.jquery.com/jquery-1.4a2.min.js",array(),'1.4a2'); 
    489             //wp_enqueue_script("jquery","http://api.jquery.com/scripts/jquery-1.4.js",array(),'1.4b'); 
     489            //wp_enqueue_script("jquery","http://code.jquery.com/jquery-1.4rc1.js",array(),'1.4rc'); 
    490490        } 
    491491    } 
  • trunk/WordPress/plugin/transposh/wp/transposh_widget.php

    r349 r355  
    8888    } 
    8989 
    90     /* 
    91  * Add custom css, i.e. transposh.css 
    92     */ 
     90    /** 
     91     * Add custom css, i.e. transposh_widget.css, flags now override widget 
     92     */ 
    9393    function add_transposh_widget_css() { 
    9494        //include the transposh_widget.css 
     
    9797            wp_enqueue_style("transposh_widget","{$this->transposh->transposh_plugin_url}/css/transposh_widget.css",array(),TRANSPOSH_PLUGIN_VER); 
    9898            if ($this->transposh->options->get_widget_css_flags()) { 
    99                 wp_enqueue_style("transposh_flags", "{$this->transposh->transposh_plugin_url}/css/transposh_flags.css",array(),TRANSPOSH_PLUGIN_VER); 
     99                wp_deregister_style("transposh_widget"); 
     100                wp_enqueue_style("transposh_widget", "{$this->transposh->transposh_plugin_url}/css/transposh_flags.css",array(),TRANSPOSH_PLUGIN_VER); 
    100101                if (file_exists("{$this->transposh->transposh_plugin_url}/css/transposh_flags_u.css")) 
    101                     wp_enqueue_style("transposh_flags", "{$this->transposh->transposh_plugin_url}/css/transposh_flags_u.css",array(),TRANSPOSH_PLUGIN_VER); 
     102                    wp_deregister_style("transposh_widget"); 
     103                    wp_enqueue_style("transposh_widget", "{$this->transposh->transposh_plugin_url}/css/transposh_flags_u.css",array(),TRANSPOSH_PLUGIN_VER); 
    102104            } 
    103105        } 
Note: See TracChangeset for help on using the changeset viewer.