Make WordPress Core

Changeset 18971


Ignore:
Timestamp:
10/14/2011 03:58:27 AM (12 years ago)
Author:
koopersmith
Message:

Tweak pointer styles. see #18693.

Location:
trunk/wp-includes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/css/wp-pointer.css

    r18969 r18971  
    1 .wp-pointer-content{padding:0 10px;background:white;border:1px solid #aaa;-moz-box-shadow:0 0 16px rgba(0,0,0,0.1);-webkit-box-shadow:0 0 16px rgba(0,0,0,0.1);box-shadow:0 0 16px rgba(0,0,0,0.1);}.wp-pointer-buttons{padding:0 0 10px 0;overflow:auto;}.wp-pointer-buttons a{float:right;display:inline-block;}.wp-pointer-arrow,.wp-pointer-arrow-inner{position:absolute;width:0;height:0;}.wp-pointer-arrow{z-index:10;}.wp-pointer-arrow-inner{z-index:20;}.wp-pointer-left{margin-left:10px;}.wp-pointer-right{margin-left:-10px;}.wp-pointer-top{margin-top:10px;}.wp-pointer-bottom{margin-top:-10px;}.wp-pointer-left .wp-pointer-arrow,.wp-pointer-right .wp-pointer-arrow,.wp-pointer-top .wp-pointer-arrow,.wp-pointer-bottom .wp-pointer-arrow{border:solid 10px transparent;}.wp-pointer-left .wp-pointer-arrow{border-right-color:#aaa;border-left-width:0;}.wp-pointer-right .wp-pointer-arrow{border-left-color:#aaa;border-right-width:0;}.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#aaa;border-top-width:0;}.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#aaa;border-bottom-width:0;}.wp-pointer-left .wp-pointer-arrow-inner,.wp-pointer-right .wp-pointer-arrow-inner,.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer-bottom .wp-pointer-arrow-inner{border:solid 9px transparent;}.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fff;border-left-width:0;top:-9px;left:2px;}.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fff;border-right-width:0;top:-9px;right:2px;}.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fff;border-top-width:0;top:2px;left:-9px;}.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fff;border-bottom-width:0;bottom:2px;left:-9px;}
     1.wp-pointer-content{padding:0 15px;background:white;border:1px solid #aaa;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:1px 1px 2px rgba(0,0,0,0.4);-webkit-box-shadow:1px 1px 2px rgba(0,0,0,0.4);box-shadow:1px 1px 2px rgba(0,0,0,0.4);}.wp-pointer-buttons{margin:0 -15px;padding:1em 15px;overflow:auto;background:#f5f5f5;border-top:1px solid #ccc;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;}.wp-pointer-buttons a{float:right;display:inline-block;text-decoration:none;}.wp-pointer-arrow,.wp-pointer-arrow-inner{position:absolute;width:0;height:0;}.wp-pointer-arrow{z-index:10;}.wp-pointer-arrow-inner{z-index:20;}.wp-pointer-left{margin-left:10px;}.wp-pointer-right{margin-left:-10px;}.wp-pointer-top{margin-top:10px;}.wp-pointer-bottom{margin-top:-10px;}.wp-pointer-left .wp-pointer-arrow,.wp-pointer-right .wp-pointer-arrow,.wp-pointer-top .wp-pointer-arrow,.wp-pointer-bottom .wp-pointer-arrow{border:solid 10px transparent;}.wp-pointer-left .wp-pointer-arrow{border-right-color:#aaa;border-left-width:0;}.wp-pointer-right .wp-pointer-arrow{border-left-color:#aaa;border-right-width:0;}.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#aaa;border-top-width:0;}.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#aaa;border-bottom-width:0;}.wp-pointer-left .wp-pointer-arrow-inner,.wp-pointer-right .wp-pointer-arrow-inner,.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer-bottom .wp-pointer-arrow-inner{border:solid 9px transparent;}.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fff;border-left-width:0;top:-9px;left:2px;}.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fff;border-right-width:0;top:-9px;right:2px;}.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fff;border-top-width:0;top:2px;left:-9px;}.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fff;border-bottom-width:0;bottom:2px;left:-9px;}
  • trunk/wp-includes/css/wp-pointer.dev.css

    r18969 r18971  
    11.wp-pointer-content {
    2     padding: 0 10px;
     2    padding: 0 15px;
    33    background: white;
    44    border: 1px solid #aaa;
    5     -moz-box-shadow: 0 0 16px rgba( 0, 0, 0, 0.1 );
    6     -webkit-box-shadow: 0 0 16px rgba( 0, 0, 0, 0.1 );
    7     box-shadow: 0 0 16px rgba( 0, 0, 0, 0.1 );
     5
     6    -webkit-border-radius: 3px;
     7    border-radius: 3px;
     8
     9    -moz-box-shadow: 1px 1px 2px rgba( 0, 0, 0, 0.4 );
     10    -webkit-box-shadow: 1px 1px 2px rgba( 0, 0, 0, 0.4 );
     11    box-shadow: 1px 1px 2px rgba( 0, 0, 0, 0.4 );
    812}
    913.wp-pointer-buttons {
    10     padding: 0 0 10px 0;
     14    margin: 0 -15px;
     15    padding: 1em 15px;
    1116    overflow: auto;
     17    background: #f5f5f5;
     18    border-top: 1px solid #ccc;
     19
     20    -webkit-border-bottom-right-radius: 3px;
     21    -webkit-border-bottom-left-radius: 3px;
     22    border-bottom-right-radius: 3px;
     23    border-bottom-left-radius: 3px;
     24
    1225}
    1326.wp-pointer-buttons a {
    1427    float: right;
    1528    display: inline-block;
     29    text-decoration: none;
    1630}
    1731/* The arrow base class must take up no space, even with transparent borders. */
  • trunk/wp-includes/js/wp-pointer.dev.js

    r18970 r18971  
    1414            buttons: function( event, t ) {
    1515                var close  = ( wpPointerL10n ) ? wpPointerL10n.close : 'Close',
    16                     button = $('<a class="button-secondary">' + close + '</a>');
     16                    button = $('<a>' + close + '</a>');
    1717
    1818                return button.bind( 'click.pointer', function() {
  • trunk/wp-includes/js/wp-pointer.js

    r18970 r18971  
    1 (function(c){var a=0,b=9999;c.widget("wp.pointer",{options:{pointerClass:"wp-pointer",content:function(f,e,d){return c(this).text()},buttons:function(f,e){var g=(wpPointerL10n)?wpPointerL10n.close:"Close",d=c('<a class="button-secondary">'+g+"</a>");return d.bind("click.pointer",function(){e.element.pointer("close")})},position:"top",show:function(e,d){d.pointer.show();d.opened()},hide:function(e,d){d.pointer.hide();d.closed()},document:document},_create:function(){var e,d;this.content=c('<div class="wp-pointer-content"></div>');this.arrow=c('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>');d=this.element.parents().add(this.element);e="absolute";if(d.filter(function(){return"fixed"===c(this).css("position")}).length){e="fixed"}this.pointer=c("<div />").append(this.content).append(this.arrow).attr("id","wp-pointer-"+a++).addClass(this.options.pointerClass).css("position",e).hide().appendTo(this.options.document.body)},_setOption:function(d,f){var g=this.options,e=this.pointer;if(d==="document"&&f!==g.document){e.detach().appendTo(f.body)}else{if(d==="pointerClass"){e.removeClass(g.pointerClass).addClass(f)}}c.Widget.prototype._setOption.apply(this,arguments);if(d==="position"){this.reposition()}else{if(d==="content"&&this.active){this.update()}}},destroy:function(){this.pointer.remove();c.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(g){var e=this,h=this.options,d=c.Deferred(),f;if(h.disabled){return}d.done(function(i){e._update(g,i)});if(typeof h.content==="string"){f=h.content}else{f=h.content.call(this.element[0],d.resolve,g,this._handoff())}if(f){d.resolve(f)}return d.promise()},_update:function(f,e){var d,g=this.options;if(!e){return}this.pointer.stop();this.content.html(e);d=g.buttons.call(this.element[0],f,this._handoff());if(d){d.wrap('<div class="wp-pointer-buttons" />').parent().appendTo(this.content)}this.reposition()},reposition:function(){var d;if(this.options.disabled){return}d=this._processPosition(this.options.position);this.pointer.css({top:0,left:0,zIndex:b++}).show().position(c.extend({of:this.element},d));this.repoint()},repoint:function(){var f=this.options,e,d;if(f.disabled){return}e=c.extend(this._processPosition(f.position),{of:this.pointer,offset:""});d=e.at+"";e.at=e.my;e.my=d;if(e.align!="center"){e.offset=(e.align=="top"||e.align=="left")?15:-15;if(e.align=="top"||e.align=="bottom"){e.offset="0 "+e.offset}else{e.offset=e.offset+" 0"}}this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,"");this.pointer.addClass("wp-pointer-"+e.edge);this.arrow.position(e)},_processPosition:function(e){var f={top:"bottom",bottom:"top",left:"right",right:"left"},d;if(typeof e=="string"){d={edge:e+""}}else{d=c.extend({},e)}if(!d.edge){return d}if(d.edge=="top"||d.edge=="bottom"){d.align=d.align||"left";d.at=d.at||d.align+" "+f[d.edge];d.my=d.my||d.align+" "+d.edge}else{d.align=d.align||"top";d.at=d.at||f[d.edge]+" "+d.align;d.my=d.my||d.edge+" "+d.align}return d},open:function(e){var d=this,f=this.options;if(this.active||f.disabled){return}this.update().done(function(){d._open(e)})},_open:function(e){var d=this,f=this.options;if(this.active||f.disabled){return}this.active=true;this._trigger("open",e,this._handoff());this._trigger("show",e,this._handoff({opened:function(){d._trigger("opened",e,d._handoff())}}))},close:function(e){if(!this.active||this.options.disabled){return}var d=this;this.active=false;this._trigger("close",e,this._handoff());this._trigger("hide",e,this._handoff({closed:function(){d._trigger("closed",e,d._handoff())}}))},sendToTop:function(d){if(this.active){this.pointer.css("z-index",b++)}},toggle:function(d){if(this.pointer.is(":hidden")){this.open(d)}else{this.close(d)}},_handoff:function(d){return c.extend({pointer:this.pointer,element:this.element},d)}})})(jQuery);
     1(function(c){var a=0,b=9999;c.widget("wp.pointer",{options:{pointerClass:"wp-pointer",content:function(f,e,d){return c(this).text()},buttons:function(f,e){var g=(wpPointerL10n)?wpPointerL10n.close:"Close",d=c("<a>"+g+"</a>");return d.bind("click.pointer",function(){e.element.pointer("close")})},position:"top",show:function(e,d){d.pointer.show();d.opened()},hide:function(e,d){d.pointer.hide();d.closed()},document:document},_create:function(){var e,d;this.content=c('<div class="wp-pointer-content"></div>');this.arrow=c('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>');d=this.element.parents().add(this.element);e="absolute";if(d.filter(function(){return"fixed"===c(this).css("position")}).length){e="fixed"}this.pointer=c("<div />").append(this.content).append(this.arrow).attr("id","wp-pointer-"+a++).addClass(this.options.pointerClass).css("position",e).hide().appendTo(this.options.document.body)},_setOption:function(d,f){var g=this.options,e=this.pointer;if(d==="document"&&f!==g.document){e.detach().appendTo(f.body)}else{if(d==="pointerClass"){e.removeClass(g.pointerClass).addClass(f)}}c.Widget.prototype._setOption.apply(this,arguments);if(d==="position"){this.reposition()}else{if(d==="content"&&this.active){this.update()}}},destroy:function(){this.pointer.remove();c.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(g){var e=this,h=this.options,d=c.Deferred(),f;if(h.disabled){return}d.done(function(i){e._update(g,i)});if(typeof h.content==="string"){f=h.content}else{f=h.content.call(this.element[0],d.resolve,g,this._handoff())}if(f){d.resolve(f)}return d.promise()},_update:function(f,e){var d,g=this.options;if(!e){return}this.pointer.stop();this.content.html(e);d=g.buttons.call(this.element[0],f,this._handoff());if(d){d.wrap('<div class="wp-pointer-buttons" />').parent().appendTo(this.content)}this.reposition()},reposition:function(){var d;if(this.options.disabled){return}d=this._processPosition(this.options.position);this.pointer.css({top:0,left:0,zIndex:b++}).show().position(c.extend({of:this.element},d));this.repoint()},repoint:function(){var f=this.options,e,d;if(f.disabled){return}e=c.extend(this._processPosition(f.position),{of:this.pointer,offset:""});d=e.at+"";e.at=e.my;e.my=d;if(e.align!="center"){e.offset=(e.align=="top"||e.align=="left")?15:-15;if(e.align=="top"||e.align=="bottom"){e.offset="0 "+e.offset}else{e.offset=e.offset+" 0"}}this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,"");this.pointer.addClass("wp-pointer-"+e.edge);this.arrow.position(e)},_processPosition:function(e){var f={top:"bottom",bottom:"top",left:"right",right:"left"},d;if(typeof e=="string"){d={edge:e+""}}else{d=c.extend({},e)}if(!d.edge){return d}if(d.edge=="top"||d.edge=="bottom"){d.align=d.align||"left";d.at=d.at||d.align+" "+f[d.edge];d.my=d.my||d.align+" "+d.edge}else{d.align=d.align||"top";d.at=d.at||f[d.edge]+" "+d.align;d.my=d.my||d.edge+" "+d.align}return d},open:function(e){var d=this,f=this.options;if(this.active||f.disabled){return}this.update().done(function(){d._open(e)})},_open:function(e){var d=this,f=this.options;if(this.active||f.disabled){return}this.active=true;this._trigger("open",e,this._handoff());this._trigger("show",e,this._handoff({opened:function(){d._trigger("opened",e,d._handoff())}}))},close:function(e){if(!this.active||this.options.disabled){return}var d=this;this.active=false;this._trigger("close",e,this._handoff());this._trigger("hide",e,this._handoff({closed:function(){d._trigger("closed",e,d._handoff())}}))},sendToTop:function(d){if(this.active){this.pointer.css("z-index",b++)}},toggle:function(d){if(this.pointer.is(":hidden")){this.open(d)}else{this.close(d)}},_handoff:function(d){return c.extend({pointer:this.pointer,element:this.element},d)}})})(jQuery);
  • trunk/wp-includes/script-loader.php

    r18970 r18971  
    9797    ) );
    9898
    99     $scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111013a', 1 );
     99    $scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111013b', 1 );
    100100    $scripts->add_script_data( 'wp-pointer', 'wpPointerL10n', array(
    101101        'close' => __('Close'),
     
    456456    $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20101224' );
    457457    $styles->add( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css", array(), '20111010' );
    458     $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array(), '20111013' );
     458    $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array(), '20111013a' );
    459459
    460460    foreach ( $rtl_styles as $rtl_style ) {
Note: See TracChangeset for help on using the changeset viewer.