2008-03-15 18:57:47 -04:00
|
|
|
jQuery(document).ready( function() {
|
2008-01-09 07:12:35 -05:00
|
|
|
// pulse
|
2008-03-02 15:17:30 -05:00
|
|
|
jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
|
2008-01-10 17:42:49 -05:00
|
|
|
|
2008-08-20 17:42:31 -04:00
|
|
|
// show things that should be visible, hide what should be hidden
|
2008-08-21 02:42:19 -04:00
|
|
|
jQuery('.hide-if-no-js').removeClass('hide-if-no-js');
|
2008-08-20 17:42:31 -04:00
|
|
|
jQuery('.hide-if-js').hide();
|
2008-03-12 01:50:07 -04:00
|
|
|
|
|
|
|
// Basic form validation
|
|
|
|
if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) {
|
2008-03-18 15:20:18 -04:00
|
|
|
jQuery('form.validate').submit( function() { return wpAjax.validateForm( jQuery(this) ); } );
|
2008-03-12 01:50:07 -04:00
|
|
|
}
|
2008-08-20 17:42:31 -04:00
|
|
|
|
|
|
|
jQuery('a.no-crazy').click( function() {
|
|
|
|
alert( "This feature isn't enabled in this prototype." );
|
|
|
|
return false;
|
|
|
|
} );
|
2008-01-10 17:42:49 -05:00
|
|
|
});
|
2008-08-31 09:51:52 -04:00
|
|
|
/*
|
|
|
|
(function($) {
|
|
|
|
$.fn.tTips = function() {
|
2008-03-15 12:53:36 -04:00
|
|
|
|
2008-08-31 09:51:52 -04:00
|
|
|
$('body').append('<div id="tTips"><p id="tTips_inside"></p></div>');
|
|
|
|
var TT = $('#tTips');
|
2008-03-15 12:53:36 -04:00
|
|
|
|
|
|
|
this.each(function() {
|
2008-08-31 09:51:52 -04:00
|
|
|
var el = $(this), txt;
|
2008-08-09 01:36:14 -04:00
|
|
|
|
2008-03-15 12:53:36 -04:00
|
|
|
if ( txt = el.attr('title') ) el.attr('tip', txt).removeAttr('title');
|
|
|
|
else return;
|
|
|
|
el.find('img').removeAttr('alt');
|
|
|
|
|
|
|
|
el.mouseover(function(e) {
|
2008-08-20 17:42:31 -04:00
|
|
|
txt = el.attr('tip'), o = el.offset();
|
2008-03-15 12:53:36 -04:00
|
|
|
|
|
|
|
clearTimeout(TT.sD);
|
|
|
|
TT.find('p').html(txt);
|
|
|
|
|
|
|
|
TT.css({'top': o.top - 43, 'left': o.left - 5});
|
|
|
|
TT.sD = setTimeout(function(){TT.fadeIn(150);}, 100);
|
|
|
|
});
|
|
|
|
|
|
|
|
el.mouseout(function() {
|
|
|
|
clearTimeout(TT.sD);
|
|
|
|
TT.css({display : 'none'});
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}(jQuery));
|
2008-08-31 09:51:52 -04:00
|
|
|
*/
|
2008-08-20 17:42:31 -04:00
|
|
|
jQuery( function($) {
|
|
|
|
var menuToggle = function(ul, effect) {
|
|
|
|
if ( !effect ) {
|
|
|
|
effect = 'slideToggle';
|
|
|
|
}
|
|
|
|
ul[effect]().parent().toggleClass( 'wp-menu-open' );
|
2008-09-22 04:01:42 -04:00
|
|
|
|
|
|
|
$('#adminmenu li.wp-has-submenu').each(function(i, e) {
|
|
|
|
var v = $(e).hasClass('wp-menu-open') ? 'o' : 'c';
|
|
|
|
|
|
|
|
setUserSetting( 'm'+i, v );
|
|
|
|
});
|
|
|
|
|
2008-08-20 17:42:31 -04:00
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
2008-09-22 04:01:42 -04:00
|
|
|
$('#adminmenu li.wp-has-submenu').each(function(i, e) {
|
|
|
|
var v = getUserSetting( 'm'+i );
|
|
|
|
|
|
|
|
if ( $(e).hasClass('wp-has-current-submenu') ) return true; // leave the current parent open
|
|
|
|
|
|
|
|
if ( 'o' == v ) $(e).addClass('wp-menu-open');
|
|
|
|
else if ( 'c' == v ) $(e).removeClass('wp-menu-open');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#adminmenu li.wp-has-submenu > a').click( function() { return menuToggle( $(this).siblings('ul') ); } );
|
2008-08-20 17:42:31 -04:00
|
|
|
|
2008-09-22 04:01:42 -04:00
|
|
|
$('#dashmenu li.wp-has-submenu').bind( 'mouseenter mouseleave', function() { return menuToggle( $(this).children('ul'), 'toggle' ); } );
|
2008-10-01 18:32:18 -04:00
|
|
|
|
|
|
|
$('#favorite-actions').bind( 'mouseenter', function(){$('#favorite-action').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( $('#favorite-action').hasClass('slideDown') ) { $('#favorite-action').slideDown('fast') }}, 300) } );
|
|
|
|
$('#favorite-actions').bind( 'mouseleave', function(){$('#favorite-action').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( $('#favorite-action').hasClass('slideUp') ) { $('#favorite-action').slideUp('fast') }}, 500) } );
|
2008-08-20 17:42:31 -04:00
|
|
|
|
|
|
|
} );
|
|
|
|
|
2008-08-31 09:51:52 -04:00
|
|
|
//jQuery(function(){jQuery('#media-buttons a').tTips();});
|