Ticket #24804: 24804.pin-to-top.diff
File 24804.pin-to-top.diff, 5.2 KB (added by , 11 years ago) |
---|
-
wp-admin/css/colors-classic.css
table.diff .diff-addedline ins { 1485 1485 border: 1px solid #d1e5ee; 1486 1486 } 1487 1487 1488 .revisions-controls { 1489 background: #fff; 1490 background: -moz-linear-gradient(bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%); 1491 background: -webkit-gradient(linear, left bottom, left top, color-stop(0%,rgba(255,255,255,1)), color-stop(30px,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1))); 1492 background: -webkit-linear-gradient(bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px,rgba(255,255,255,1) 100%); 1493 background: -o-linear-gradient(bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px,rgba(255,255,255,1) 100%); 1494 background: -ms-linear-gradient(bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px,rgba(255,255,255,1) 100%); 1495 background: linear-gradient(to top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px,rgba(255,255,255,1) 100%); 1496 } 1497 1488 1498 .revisions-tooltip, 1489 1499 .revisions-tooltip-arrow span { 1490 1500 border-color: #d1e5ee; -
wp-admin/css/colors-fresh.css
table.diff .diff-addedline ins { 1379 1379 border: 1px solid #dfdfdf; 1380 1380 } 1381 1381 1382 .revisions-controls { 1383 background: #fff; 1384 background: -moz-linear-gradient(bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%); 1385 background: -webkit-gradient(linear, left bottom, left top, color-stop(0%,rgba(255,255,255,1)), color-stop(30px,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1))); 1386 background: -webkit-linear-gradient(bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px,rgba(255,255,255,1) 100%); 1387 background: -o-linear-gradient(bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px,rgba(255,255,255,1) 100%); 1388 background: -ms-linear-gradient(bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px,rgba(255,255,255,1) 100%); 1389 background: linear-gradient(to top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px,rgba(255,255,255,1) 100%); 1390 } 1391 1382 1392 .revisions-tooltip, 1383 1393 .revisions-tooltip-arrow span { 1384 1394 border-color: #d7d7d7; -
wp-admin/css/wp-admin.css
td.plugin-title p { 3511 3511 /*------------------------------------------------------------------------------ 3512 3512 11.2 - Post Revisions 3513 3513 ------------------------------------------------------------------------------*/ 3514 .revisions { 3515 position: relative; 3516 } 3517 3514 3518 .revisions-control-frame, 3515 3519 .revisions-diff-frame { 3516 3520 position: relative; … … td.plugin-title p { 3519 3523 .revisions-controls { 3520 3524 padding-top: 40px; 3521 3525 height: 100px; 3526 z-index: 1; 3522 3527 } 3523 3528 3524 3529 .revisions-controls input[type="checkbox"] { … … td.plugin-title p { 3527 3532 vertical-align: text-bottom; 3528 3533 } 3529 3534 3535 .revisions.pinned .revisions-controls { 3536 position: fixed; 3537 top: 0; 3538 padding-bottom: 10px; 3539 } 3540 3530 3541 .revisions-tickmarks { 3531 3542 position: relative; 3532 3543 margin: 0 auto; … … table.diff .diff-addedline ins { 3754 3765 transition: left 15ms; 3755 3766 } 3756 3767 3768 .revisions.pinned .revisions-tooltip { 3769 display: none !important; 3770 } 3771 3757 3772 .comparing-two-revisions .revisions-tooltip { 3758 3773 bottom: 145px; 3759 3774 } -
wp-admin/js/revisions.js
window.wp = window.wp || {}; 531 531 className: 'revisions-controls', 532 532 533 533 initialize: function() { 534 _.bindAll( this, 'setWidth' ); 535 534 536 // Add the button view 535 537 this.views.add( new revisions.view.Buttons({ 536 538 model: this.model … … window.wp = window.wp || {}; 573 575 this.views.add( new revisions.view.Meta({ 574 576 model: this.model 575 577 }) ); 578 }, 579 580 ready: function() { 581 this.top = this.$el.offset().top; 582 this.window = $(window); 583 this.window.on( 'scroll.wp.revisions', {controls: this}, function(e) { 584 var controls = e.data.controls; 585 var container = controls.$el.parent(); 586 var scrolled = controls.window.scrollTop(); 587 var frame = controls.views.parent; 588 589 if ( scrolled >= controls.top ) { 590 if ( ! frame.$el.hasClass('pinned') ) { 591 controls.setWidth(); 592 container.css('height', container.height() + 'px' ); 593 controls.window.on('resize.wp.revisions.pinning click.wp.revisions.pinning', {controls: controls}, function(e) { 594 e.data.controls.setWidth(); 595 }); 596 } 597 frame.$el.addClass('pinned'); 598 } else if ( frame.$el.hasClass('pinned') ) { 599 controls.window.off('.wp.revisions.pinning'); 600 controls.$el.css('width', 'auto'); 601 frame.$el.removeClass('pinned'); 602 container.css('height', 'auto'); 603 controls.top = controls.$el.offset().top; 604 } else { 605 controls.top = controls.$el.offset().top; 606 } 607 }); 608 }, 576 609 610 setWidth: function() { 611 this.$el.css('width', this.$el.parent().width() + 'px'); 577 612 } 578 613 }); 579 614