Changeset 148021
- Timestamp:
- 08/22/2009 04:54:12 AM (17 years ago)
- Location:
- advanced-spoiler/trunk
- Files:
-
- 3 added
- 2 edited
-
advanced-spoiler.php (modified) (6 diffs)
-
css/ui-lightness/ui.dialog.css (added)
-
js/moo-spoiler.js (modified) (1 diff)
-
langs/adv-spoiler-ru_RU.mo (added)
-
langs/adv-spoiler-ru_RU.po (added)
Legend:
- Unmodified
- Added
- Removed
-
advanced-spoiler/trunk/advanced-spoiler.php
r113514 r148021 8 8 Show or hide contents(text, image etc.) wrapped by spoiler markup tag([spoiler][/spoiler]). Requires WP 2.7 or greater. 9 9 10 Version: 2.01 a10 Version: 2.01b 11 11 12 12 Author: Choen, Young-Min … … 283 283 284 284 function admin_style() { 285 wp_enqueue_style('jquery-ui-lightness ', $this->url . '/css/ui-lightness/ui.all.css', false, '1.5.2');285 wp_enqueue_style('jquery-ui-lightness-dialog', $this->url . '/css/ui-lightness/ui.dialog.css', false, '1.5.2'); 286 286 } 287 287 288 288 function enqueue_script() { 289 if ($this->op['plugin_mode'] == 'simple') 289 global $wp_scripts; 290 switch($this->op['plugin_mode']): 291 case 'simple': 290 292 return; 291 switch($this->js_library) { 292 case 'prototype': 293 wp_enqueue_script('adv-spoiler', $this->url.'/js/aj-spoiler.js', array('scriptaculous-effects'), $this->version); 294 break; 295 case 'mootools': 296 $depth = false; 297 wp_enqueue_script('adv-spoiler', $this->url.'/js/moo-spoiler.js', $depth, $this->version); 298 break; 299 case 'jquery': default: 293 break; 294 case 'prototype': 295 wp_enqueue_script('adv-spoiler', $this->url.'/js/prototype-spoiler.js', array('scriptaculous-effects'), $this->version); 296 break; 297 case 'mootools': 298 if (!in_array('mootools-Fx', $wp_scripts->registered)) 299 return; 300 wp_enqueue_script('adv-spoiler', $this->url.'/js/moo-spoiler.js', array('mootools-Fx'), $this->version); 301 break; 302 case 'jquery': default: 300 303 wp_enqueue_script('adv-spoiler', $this->url.'/js/jquery-spoiler.js', array('jquery'), $this->version); 301 } 304 break; 305 endswitch; 302 306 } 303 307 … … 313 317 if ( get_user_option('rich_editing') == 'true') { 314 318 add_filter("mce_external_plugins", array(&$this, "add_mce_plugin")); 315 add_filter('mce_buttons ', array(&$this, 'register_mce_button'));319 add_filter('mce_buttons_2', array(&$this, 'register_mce_button')); 316 320 add_filter( 'tiny_mce_version', array(&$this, 'mce_version') ); 317 321 } … … 319 323 320 324 function register_mce_button($buttons) { 321 array_push($buttons, "s poiler");325 array_push($buttons, "separator", "spoiler"); 322 326 return $buttons; 323 327 } … … 329 333 330 334 function mce_version( $version ) { 331 return $version . '-spl';335 return $version+6; 332 336 } 333 337 … … 365 369 <td><select name="plugin_mode"> 366 370 <option value="jquery"<?php selected($plugin_mode, 'jquery') ?>><?php _e('jQuery', $this->domain) ?></option> 371 <!-- <option value="prototype"<?php selected($plugin_mode, 'prototype') ?>><?php _e('Prototype', $this->domain) ?></option> 372 <option value="mootools"<?php selected($plugin_mode, 'mootools') ?>><?php _e('Mootools', $this->domain) ?></option> --> 367 373 <option value="simple"<?php selected($plugin_mode, 'simple') ?>><?php _e('Simple', $this->domain) ?></option> 368 374 </select> -
advanced-spoiler/trunk/js/moo-spoiler.js
r113514 r148021 12 12 var newOptions = Object.extend(options||{}, arguments[1]||{}); 13 13 return newOptions; 14 },15 _start: function() {16 $$('div.spoiler-box').each(function(spl) {17 var c_tgl = $E('a.spoiler-tgl', spl);18 var c_body = $E('div.spoiler-body', spl);19 if(c_body && c_tgl) {20 var opt = c_tgl.getAttribute('rev').split('||');21 c_tgl.onclick = function(){Spoiler.plugin(c_body, c_tgl, opt); return false;};22 if(c_body.style.display != 'none') {23 var hider = function(){Spoiler.plugin(c_body, c_tgl, opt)};24 this.timer += 60;25 hider.delay(this.timer);26 }27 }28 }, this);29 14 }, 30 15 start: function() {
Note: See TracChangeset
for help on using the changeset viewer.