Changeset 408

Show
Ignore:
Timestamp:
08/19/08 06:40:34 (3 months ago)
Author:
082net
Message:

## wp-scripts ##

Fixed sweetTitles_jquery.js bug
Updated sweetTitles.css

Location:
wp-scripts/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • wp-scripts/trunk/c/sweetTitles.css

    r5 r408  
    44        position: absolute; 
    55        z-index: 1000; 
    6         width: 270px; 
     6        _width: 250px; 
    77        background: #444; 
    88        border: 1px solid #9dd63c; 
    99        text-align: left; 
    1010        padding: 6px; 
    11         min-height: 2em; 
    12 /*      -moz-border-radius:6px;*/ 
     11        min-width: 120px; 
     12        max-width: 270px; 
     13        min-height: 1em; 
     14        border-radius: 6px; 
     15        -khtml-border-radius: 6px; 
     16        -moz-border-radius:6px; 
     17        -webkit-border-radius: 6px; 
    1318        } 
    1419 
  • wp-scripts/trunk/js/site.custom.jquery.js

    r324 r408  
    44*/ 
    55 
    6 function mySidebarLoader() { 
     6jQuery(document).ready(function() { 
     7        if (typeof Spoiler != 'object') 
     8                return; 
    79        jQuery('#sidebar .spl-box').each(function(i) { 
    810                var el = jQuery(this); 
    9                 var tgl = jQuery(this.childNodes).filter('h3:first'); 
    10                 var body = jQuery(this.childNodes).filter('.spl-body:first'); 
    11                 if(tgl && body) { 
    12                         jQuery(tgl).click(function(){ 
    13                                 Spoiler.Collapse(body, 'slide', tgl, {duration: 0.4}); 
    14                                 return false; 
    15                         }).addClass('effcollapse'); 
    16                         if(el.hasClass('hide_first')) { 
    17                                 Spoiler.Collapse(body, 'simple', tgl, {duration: 0.6}); 
    18                         } 
     11                var body = el.find('.spl-body:first'); 
     12                if (!body.length) 
     13                        return;//means continue; 
     14                var tgl = el.find('h3:first').click(function(e){ 
     15                        Spoiler.Collapse(body, 'slide', this, {duration: 0.4}); 
     16                }).addClass('effcollapse'); 
     17                if(el.hasClass('hide_first')) { 
     18                        Spoiler.Collapse(body, 'simple', tgl, {duration: 0.6}); 
    1919                } 
    2020        }); 
    21 } 
    22 jQuery(document).ready(function() {mySidebarLoader();}); 
     21}); 
  • wp-scripts/trunk/js/site.custom.mootools.js

    r162 r408  
    55 
    66function mySidebarLoader() { 
     7        if (typeof Spoiler != 'object') 
     8                return; 
    79        $$('#sidebar .spl-box').each(function(el){ 
    810                var tgl = $E('h3', el); 
  • wp-scripts/trunk/js/site.custom.prototype.js

    r162 r408  
    44*/ 
    55 
    6 function mySidebarLoader() { 
     6Event.observe(window, 'load', function(){ 
     7        if (typeof Spoiler != 'object') 
     8                return; 
    79        $$('#sidebar .spl-box').each(function(el) { 
    810                el = $(el); 
     
    1921                        } 
    2022                } 
    21         }); 
    22 } 
    23  
    24 Event.observe(window, 'load', mySidebarLoader); 
     23        });      
     24}); 
  • wp-scripts/trunk/js/sweetTitles_jquery.js

    r405 r408  
    44Author: Dustin Diaz | http://www.dustindiaz.com 
    55*/ 
     6 
    67var sweetTitles = {  
    78        xCord : 0,                              // @Number: x pixel value of current cursor position 
     
    1314        delay : 350,                    // @Number: delay value in ms 
    1415        init : function() { 
    15                 this.tip = jQuery('<div id="toolTip"></div>').appendTo(document.body).hide(); 
    16                 jQuery(this.tipElements.join(',')).each(function(e){ 
     16                this.tip = jQuery('<div id="toolTip"></div>').css({opacity: '0.8'}).appendTo(document.body).hide(); 
     17                jQuery(this.tipElements.join(', ')).each(function(e){ 
    1718                        var el = jQuery(this); 
    1819                        if (el.attr('title') != '') { 
    19                                 el.attr('tip', el.attr('title')).removeAttr('title').hover(sweetTitles.tipOver, sweetTitles.tipOut); 
     20                                el.attr('tip', el.attr('title')).removeAttr('title').hover(sweetTitles.tipOver, sweetTitles.tipOut).find('img').removeAttr('alt'); 
    2021                        } 
    2122                }); 
     
    2324        updateXY : function(e) { 
    2425                if ( document.captureEvents ) { 
     26                        document.captureEvents(Event.MOUSEMOVE); 
    2527                        sweetTitles.xCord = e.pageX; 
    2628                        sweetTitles.yCord = e.pageY; 
     
    3840        tipOver : function() { 
    3941                sweetTitles.obj = this; 
     42                jQuery(document.body).bind('mousemove', sweetTitles.updateXY); 
    4043                tID = window.setTimeout("sweetTitles.tipShow()",250) 
    41                 jQuery(document.body).bind('mousemove', sweetTitles.updateXY); 
    4244        }, 
    4345        tipShow : function() {           
    44                 jQuery(document.body).unbind('mousemove', sweetTitles.updateXY); 
    4546                var tp = parseInt(Number(this.yCord)+15); 
    4647                var lt = parseInt(Number(this.xCord)+10); 
     
    4849                var addy = ''; 
    4950                var access = ''; 
    50                 addy = (anch.href.length > 62 ? anch.href.toString().substring(0,62)+"..." : anch.href); 
     51                if (anch.href) 
     52                        addy = (anch.href.length > 62 ? anch.href.toString().substring(0,62)+"..." : anch.href); 
     53                var em = (addy == '' && access == '') ? '' : "<em>"+access+addy+"</em>"; 
    5154//              access = ( anch.accessKey ? ' <span>[alt+'+anch.accessKey+']</span> ' : '' ); 
    52                 this.tip.html("<p>"+anch.getAttribute('tip')+"<em>"+access+addy+"</em></p>"); 
     55                this.tip.html("<p>"+anch.getAttribute('tip')+em+"</p>"); 
    5356                if ( parseInt(document.documentElement.clientWidth+document.documentElement.scrollLeft) < parseInt(this.tip.outerWidth()+lt) ) { 
    5457                        this.tip.css({left : parseInt(lt-(this.tip.outerWidth()+10))+'px'}); 
     
    6164                        this.tip.css({top : tp+'px'}); 
    6265                } 
    63                 this.tip.fadeTo('fast', 0.8).show(); 
     66                this.tip.fadeIn('normal'); 
     67                jQuery(document.body).unbind('mousemove', sweetTitles.updateXY); 
    6468        } 
    6569}; 
     70 
    6671jQuery(document).ready(function(){sweetTitles.init()}); 
  • wp-scripts/trunk/wp-scripts.php

    r407 r408  
    22/* 
    33Plugin Name: WP-Scripts 
    4 Version: 1.2 
     4Version: 1.201 
    55Plugin URI: http://082net.com/tag/wp-scripts/ 
    66Description: load popular javascripts on blog head using 'wp_head'. this contains prototype, mootools, scriptaculous, fat, behaviour, sweetTitles, lightbox. you can select script on option panel. Javascripts can be compressed by <a href="http://www.phpclasses.org/browse/package/3158.html">JsComppressor</a>. If your WP version is lesser than 2.1 you shoud install <a href="http://082net.com/tag/wp-compatibility-pack/">WP-Compatibility-Pack</a>. 
     
    2121*/ 
    2222 
    23 if(!function_exists('wp_print_scripts')) { 
    24         if(strpos($_SERVER['PHP_SELF'], 'wp-admin/plugins.php') !== false) : 
    25         function wp_scripts_warning() { 
    26                 load_plugin_textdomain('wp-scripts', '/wp-content/plugins/wp-scripts/lang'); 
    27 ?> 
    28 <script type="text/javascript">//<![CDATA[ 
    29 if(!div_wraper_082net) { 
    30         var div_wrapers_082net = document.getElementsByTagName('DIV'); 
    31         if(div_wrapers_082net) { 
    32                 for(var i=0; i<div_wrapers_082net.length; i++) { 
    33                         if(/wrap/.exec(div_wrapers_082net[i].className)) { 
    34                                 var div_wraper_082net = div_wrapers_082net[i]; 
    35                                 break; 
    36                         } 
    37                 } 
    38         } 
    39 } 
    40 if(div_wraper_082net) { 
    41         var wp_scripts_warning = document.createElement("DIV"); 
    42         wp_scripts_warning.innerHTML = "<p><strong><?php _e('WP-Scripts is not active', 'wp-scripts'); ?></strong> : <?php _e('WP-Scripts requires <a href=\'http://082net.com/tag/wp-compatibility-pack/\'>WP-Compatibility-Pack</a> with lesser than WP 2.1', 'wp-scripts'); ?></p>"; 
    43         wp_scripts_warning.className = 'updated fade'; 
    44         wp_scripts_warning.id = 'wp_scripts_warning'; 
    45         div_wraper_082net.parentNode.insertBefore(wp_scripts_warning, div_wraper_082net); 
    46         Fat.fade_element('wp_scripts_warning'); 
    47 } 
    48 //]]></script> 
    49 <?php 
    50         } 
    51         add_action('admin_footer', 'wp_scripts_warning'); 
    52         endif; // If plugin manage page. 
    53         return; 
    54 } 
    55  
    5623if(!class_exists('wpInsertScripts')) : 
    5724class wpInsertScripts { 
     
    5926        var $URL; 
    6027        var $path; 
    61         var $version = '1.2'; 
     28        var $version = '1.201'; 
    6229        var $moo_ver = '1.11'; 
    6330        var $error; 
     
    368335                $info['fat'] = array('fat-blog', $jspath.'/fat.js', false, $this->version); 
    369336                if(file_exists(dirname(__FILE__).'/js/site.custom.'.$this->op['baselib'].'.js')) 
    370                         $info['site.custom'] = array('site-custom', $jspath.'/site.custom.'.$this->op['baselib'].'.js', false, $this->version); 
     337                        $info['site.custom'] = array('site-custom', $jspath.'/site.custom.'.$this->op['baselib'].'.js', array($this->op['baselib']), $this->version); 
    371338                else 
    372339                        $info['site.custom'] = array('site-custom', $jspath.'/site.custom.js', false, $this->version);