Changeset 408
- Timestamp:
- 08/19/08 06:40:34 (3 months ago)
- Location:
- wp-scripts/trunk
- Files:
-
- 6 modified
-
c/sweetTitles.css (modified) (1 diff)
-
js/site.custom.jquery.js (modified) (1 diff)
-
js/site.custom.mootools.js (modified) (1 diff)
-
js/site.custom.prototype.js (modified) (2 diffs)
-
js/sweetTitles_jquery.js (modified) (6 diffs)
-
wp-scripts.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-scripts/trunk/c/sweetTitles.css
r5 r408 4 4 position: absolute; 5 5 z-index: 1000; 6 width: 270px;6 _width: 250px; 7 7 background: #444; 8 8 border: 1px solid #9dd63c; 9 9 text-align: left; 10 10 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; 13 18 } 14 19 -
wp-scripts/trunk/js/site.custom.jquery.js
r324 r408 4 4 */ 5 5 6 function mySidebarLoader() { 6 jQuery(document).ready(function() { 7 if (typeof Spoiler != 'object') 8 return; 7 9 jQuery('#sidebar .spl-box').each(function(i) { 8 10 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}); 19 19 } 20 20 }); 21 } 22 jQuery(document).ready(function() {mySidebarLoader();}); 21 }); -
wp-scripts/trunk/js/site.custom.mootools.js
r162 r408 5 5 6 6 function mySidebarLoader() { 7 if (typeof Spoiler != 'object') 8 return; 7 9 $$('#sidebar .spl-box').each(function(el){ 8 10 var tgl = $E('h3', el); -
wp-scripts/trunk/js/site.custom.prototype.js
r162 r408 4 4 */ 5 5 6 function mySidebarLoader() { 6 Event.observe(window, 'load', function(){ 7 if (typeof Spoiler != 'object') 8 return; 7 9 $$('#sidebar .spl-box').each(function(el) { 8 10 el = $(el); … … 19 21 } 20 22 } 21 }); 22 } 23 24 Event.observe(window, 'load', mySidebarLoader); 23 }); 24 }); -
wp-scripts/trunk/js/sweetTitles_jquery.js
r405 r408 4 4 Author: Dustin Diaz | http://www.dustindiaz.com 5 5 */ 6 6 7 var sweetTitles = { 7 8 xCord : 0, // @Number: x pixel value of current cursor position … … 13 14 delay : 350, // @Number: delay value in ms 14 15 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){ 17 18 var el = jQuery(this); 18 19 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'); 20 21 } 21 22 }); … … 23 24 updateXY : function(e) { 24 25 if ( document.captureEvents ) { 26 document.captureEvents(Event.MOUSEMOVE); 25 27 sweetTitles.xCord = e.pageX; 26 28 sweetTitles.yCord = e.pageY; … … 38 40 tipOver : function() { 39 41 sweetTitles.obj = this; 42 jQuery(document.body).bind('mousemove', sweetTitles.updateXY); 40 43 tID = window.setTimeout("sweetTitles.tipShow()",250) 41 jQuery(document.body).bind('mousemove', sweetTitles.updateXY);42 44 }, 43 45 tipShow : function() { 44 jQuery(document.body).unbind('mousemove', sweetTitles.updateXY);45 46 var tp = parseInt(Number(this.yCord)+15); 46 47 var lt = parseInt(Number(this.xCord)+10); … … 48 49 var addy = ''; 49 50 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>"; 51 54 // 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>"); 53 56 if ( parseInt(document.documentElement.clientWidth+document.documentElement.scrollLeft) < parseInt(this.tip.outerWidth()+lt) ) { 54 57 this.tip.css({left : parseInt(lt-(this.tip.outerWidth()+10))+'px'}); … … 61 64 this.tip.css({top : tp+'px'}); 62 65 } 63 this.tip.fadeTo('fast', 0.8).show(); 66 this.tip.fadeIn('normal'); 67 jQuery(document.body).unbind('mousemove', sweetTitles.updateXY); 64 68 } 65 69 }; 70 66 71 jQuery(document).ready(function(){sweetTitles.init()}); -
wp-scripts/trunk/wp-scripts.php
r407 r408 2 2 /* 3 3 Plugin Name: WP-Scripts 4 Version: 1.2 4 Version: 1.201 5 5 Plugin URI: http://082net.com/tag/wp-scripts/ 6 6 Description: 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>. … … 21 21 */ 22 22 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 <?php50 }51 add_action('admin_footer', 'wp_scripts_warning');52 endif; // If plugin manage page.53 return;54 }55 56 23 if(!class_exists('wpInsertScripts')) : 57 24 class wpInsertScripts { … … 59 26 var $URL; 60 27 var $path; 61 var $version = '1.2 ';28 var $version = '1.201'; 62 29 var $moo_ver = '1.11'; 63 30 var $error; … … 368 335 $info['fat'] = array('fat-blog', $jspath.'/fat.js', false, $this->version); 369 336 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); 371 338 else 372 339 $info['site.custom'] = array('site-custom', $jspath.'/site.custom.js', false, $this->version);
