Dotclear

Changeset 3368:bb25979b0371


Ignore:
Timestamp:
10/29/16 07:39:57 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Replace old jQuery modal js code by the Magnific-Popup responsive jQuery plugin ( http://dimsemenov.com/plugins/magnific-popup/, MIT Licence)

Files:
2 added
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_post.js

    r3241 r3368  
    6363          if (window.location.protocol == $preview_url.substring(0,window.location.protocol.length)) { 
    6464               // Open preview in a modal iframe 
    65                $('#post-preview').modalWeb($(window).width()-40,$(window).height()-40); 
     65               $('#post-preview').magnificPopup({ 
     66                    type:'iframe', 
     67                    iframe: { 
     68                         patterns: { 
     69                              dotclear: { 
     70                                   index: $preview_url, 
     71                                   id: 1, 
     72                                   src: $preview_url 
     73                              } 
     74                         } 
     75                    } 
     76               }); 
    6677          } else { 
    6778               // Open preview on antother window 
  • admin/style/default.css

    r3365 r3368  
    927927 
    928928code { 
    929   color: #fefacd; } 
     929  background: #fefacd; } 
    930930 
    931931pre { 
     
    33783378  .pseudo-tabs li:first-child { 
    33793379    border-top: none; } } 
     3380/** -------------------------------------------------- 
     3381     3rd parties 
     3382--------------------------------------------------- */ 
     3383/* Magnific Popup CSS */ 
     3384.mfp-bg { 
     3385  top: 0; 
     3386  left: 0; 
     3387  width: 100%; 
     3388  height: 100%; 
     3389  z-index: 1042; 
     3390  overflow: hidden; 
     3391  position: fixed; 
     3392  background: #0b0b0b; 
     3393  opacity: 0.8; } 
     3394 
     3395.mfp-wrap { 
     3396  top: 0; 
     3397  left: 0; 
     3398  width: 100%; 
     3399  height: 100%; 
     3400  z-index: 1043; 
     3401  position: fixed; 
     3402  outline: none !important; 
     3403  -webkit-backface-visibility: hidden; } 
     3404 
     3405.mfp-container { 
     3406  text-align: center; 
     3407  position: absolute; 
     3408  width: 100%; 
     3409  height: 100%; 
     3410  left: 0; 
     3411  top: 0; 
     3412  padding: 0 8px; 
     3413  box-sizing: border-box; } 
     3414 
     3415.mfp-container:before { 
     3416  content: ''; 
     3417  display: inline-block; 
     3418  height: 100%; 
     3419  vertical-align: middle; } 
     3420 
     3421.mfp-align-top .mfp-container:before { 
     3422  display: none; } 
     3423 
     3424.mfp-content { 
     3425  position: relative; 
     3426  display: inline-block; 
     3427  vertical-align: middle; 
     3428  margin: 0 auto; 
     3429  text-align: left; 
     3430  z-index: 1045; } 
     3431 
     3432.mfp-inline-holder .mfp-content, 
     3433.mfp-ajax-holder .mfp-content { 
     3434  width: 100%; 
     3435  cursor: auto; } 
     3436 
     3437.mfp-ajax-cur { 
     3438  cursor: progress; } 
     3439 
     3440.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { 
     3441  cursor: -moz-zoom-out; 
     3442  cursor: -webkit-zoom-out; 
     3443  cursor: zoom-out; } 
     3444 
     3445.mfp-zoom { 
     3446  cursor: pointer; 
     3447  cursor: -webkit-zoom-in; 
     3448  cursor: -moz-zoom-in; 
     3449  cursor: zoom-in; } 
     3450 
     3451.mfp-auto-cursor .mfp-content { 
     3452  cursor: auto; } 
     3453 
     3454.mfp-close, 
     3455.mfp-arrow, 
     3456.mfp-preloader, 
     3457.mfp-counter { 
     3458  -webkit-user-select: none; 
     3459  -moz-user-select: none; 
     3460  user-select: none; } 
     3461 
     3462.mfp-loading.mfp-figure { 
     3463  display: none; } 
     3464 
     3465.mfp-hide { 
     3466  display: none !important; } 
     3467 
     3468.mfp-preloader { 
     3469  color: #CCC; 
     3470  position: absolute; 
     3471  top: 50%; 
     3472  width: auto; 
     3473  text-align: center; 
     3474  margin-top: -0.8em; 
     3475  left: 8px; 
     3476  right: 8px; 
     3477  z-index: 1044; } 
     3478 
     3479.mfp-preloader a { 
     3480  color: #CCC; } 
     3481 
     3482.mfp-preloader a:hover { 
     3483  color: #FFF; } 
     3484 
     3485.mfp-s-ready .mfp-preloader { 
     3486  display: none; } 
     3487 
     3488.mfp-s-error .mfp-content { 
     3489  display: none; } 
     3490 
     3491button.mfp-close, 
     3492button.mfp-arrow { 
     3493  overflow: visible; 
     3494  cursor: pointer; 
     3495  background: transparent; 
     3496  border: 0; 
     3497  -webkit-appearance: none; 
     3498  display: block; 
     3499  outline: none; 
     3500  padding: 0; 
     3501  z-index: 1046; 
     3502  box-shadow: none; 
     3503  touch-action: manipulation; } 
     3504 
     3505button::-moz-focus-inner { 
     3506  padding: 0; 
     3507  border: 0; } 
     3508 
     3509.mfp-close { 
     3510  width: 44px; 
     3511  height: 44px; 
     3512  line-height: 44px; 
     3513  position: absolute; 
     3514  right: 0; 
     3515  top: 0; 
     3516  text-decoration: none; 
     3517  text-align: center; 
     3518  opacity: 0.65; 
     3519  padding: 0 0 18px 10px; 
     3520  color: #FFF; 
     3521  font-style: normal; 
     3522  font-size: 28px; 
     3523  font-family: Arial, Baskerville, monospace; } 
     3524 
     3525.mfp-close:hover, 
     3526.mfp-close:focus { 
     3527  opacity: 1; } 
     3528 
     3529.mfp-close:active { 
     3530  top: 1px; } 
     3531 
     3532.mfp-close-btn-in .mfp-close { 
     3533  color: #333; } 
     3534 
     3535.mfp-image-holder .mfp-close, 
     3536.mfp-iframe-holder .mfp-close { 
     3537  color: #FFF; 
     3538  right: -6px; 
     3539  text-align: right; 
     3540  padding-right: 6px; 
     3541  width: 100%; } 
     3542 
     3543.mfp-counter { 
     3544  position: absolute; 
     3545  top: 0; 
     3546  right: 0; 
     3547  color: #CCC; 
     3548  font-size: 12px; 
     3549  line-height: 18px; 
     3550  white-space: nowrap; } 
     3551 
     3552.mfp-arrow { 
     3553  position: absolute; 
     3554  opacity: 0.65; 
     3555  margin: 0; 
     3556  top: 50%; 
     3557  margin-top: -55px; 
     3558  padding: 0; 
     3559  width: 90px; 
     3560  height: 110px; 
     3561  -webkit-tap-highlight-color: transparent; } 
     3562 
     3563.mfp-arrow:active { 
     3564  margin-top: -54px; } 
     3565 
     3566.mfp-arrow:hover, 
     3567.mfp-arrow:focus { 
     3568  opacity: 1; } 
     3569 
     3570.mfp-arrow:before, 
     3571.mfp-arrow:after { 
     3572  content: ''; 
     3573  display: block; 
     3574  width: 0; 
     3575  height: 0; 
     3576  position: absolute; 
     3577  left: 0; 
     3578  top: 0; 
     3579  margin-top: 35px; 
     3580  margin-left: 35px; 
     3581  border: medium inset transparent; } 
     3582 
     3583.mfp-arrow:after { 
     3584  border-top-width: 13px; 
     3585  border-bottom-width: 13px; 
     3586  top: 8px; } 
     3587 
     3588.mfp-arrow:before { 
     3589  border-top-width: 21px; 
     3590  border-bottom-width: 21px; 
     3591  opacity: 0.7; } 
     3592 
     3593.mfp-arrow-left { 
     3594  left: 0; } 
     3595 
     3596.mfp-arrow-left:after { 
     3597  border-right: 17px solid #FFF; 
     3598  margin-left: 31px; } 
     3599 
     3600.mfp-arrow-left:before { 
     3601  margin-left: 25px; 
     3602  border-right: 27px solid #3F3F3F; } 
     3603 
     3604.mfp-arrow-right { 
     3605  right: 0; } 
     3606 
     3607.mfp-arrow-right:after { 
     3608  border-left: 17px solid #FFF; 
     3609  margin-left: 39px; } 
     3610 
     3611.mfp-arrow-right:before { 
     3612  border-left: 27px solid #3F3F3F; } 
     3613 
     3614.mfp-iframe-holder { 
     3615  padding-top: 40px; 
     3616  padding-bottom: 40px; } 
     3617 
     3618.mfp-iframe-holder .mfp-content { 
     3619  line-height: 0; 
     3620  width: 100%; 
     3621  max-width: 98%; } 
     3622 
     3623.mfp-iframe-holder .mfp-close { 
     3624  top: -40px; } 
     3625 
     3626.mfp-iframe-scaler { 
     3627  width: 100%; 
     3628  height: 0; 
     3629  overflow: hidden; 
     3630  padding-top: 56.25%; } 
     3631 
     3632.mfp-iframe-scaler iframe { 
     3633  position: absolute; 
     3634  display: block; 
     3635  top: 0; 
     3636  left: 0; 
     3637  width: 100%; 
     3638  height: 100%; 
     3639  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 
     3640  background: #000; } 
     3641 
     3642/* Main image in popup */ 
     3643img.mfp-img { 
     3644  width: auto; 
     3645  max-width: 100%; 
     3646  height: auto; 
     3647  display: block; 
     3648  line-height: 0; 
     3649  box-sizing: border-box; 
     3650  padding: 40px 0 40px; 
     3651  margin: 0 auto; } 
     3652 
     3653/* The shadow behind the image */ 
     3654.mfp-figure { 
     3655  line-height: 0; } 
     3656 
     3657.mfp-figure:after { 
     3658  content: ''; 
     3659  position: absolute; 
     3660  left: 0; 
     3661  top: 40px; 
     3662  bottom: 40px; 
     3663  display: block; 
     3664  right: 0; 
     3665  width: auto; 
     3666  height: auto; 
     3667  z-index: -1; 
     3668  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 
     3669  background: #444; } 
     3670 
     3671.mfp-figure small { 
     3672  color: #BDBDBD; 
     3673  display: block; 
     3674  font-size: 12px; 
     3675  line-height: 14px; } 
     3676 
     3677.mfp-figure figure { 
     3678  margin: 0; } 
     3679 
     3680.mfp-bottom-bar { 
     3681  margin-top: -36px; 
     3682  position: absolute; 
     3683  top: 100%; 
     3684  left: 0; 
     3685  width: 100%; 
     3686  cursor: auto; } 
     3687 
     3688.mfp-title { 
     3689  text-align: left; 
     3690  line-height: 18px; 
     3691  color: #F3F3F3; 
     3692  word-wrap: break-word; 
     3693  padding-right: 36px; } 
     3694 
     3695.mfp-image-holder .mfp-content { 
     3696  max-width: 100%; } 
     3697 
     3698.mfp-gallery .mfp-image-holder .mfp-figure { 
     3699  cursor: pointer; } 
     3700 
     3701@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { 
     3702  /** 
     3703       * Remove all paddings around the image on small screen 
     3704       */ 
     3705  .mfp-img-mobile .mfp-image-holder { 
     3706    padding-left: 0; 
     3707    padding-right: 0; } 
     3708 
     3709  .mfp-img-mobile img.mfp-img { 
     3710    padding: 0; } 
     3711 
     3712  .mfp-img-mobile .mfp-figure:after { 
     3713    top: 0; 
     3714    bottom: 0; } 
     3715 
     3716  .mfp-img-mobile .mfp-figure small { 
     3717    display: inline; 
     3718    margin-left: 5px; } 
     3719 
     3720  .mfp-img-mobile .mfp-bottom-bar { 
     3721    background: rgba(0, 0, 0, 0.6); 
     3722    bottom: 0; 
     3723    margin: 0; 
     3724    top: auto; 
     3725    padding: 3px 5px; 
     3726    position: fixed; 
     3727    box-sizing: border-box; } 
     3728 
     3729  .mfp-img-mobile .mfp-bottom-bar:empty { 
     3730    padding: 0; } 
     3731 
     3732  .mfp-img-mobile .mfp-counter { 
     3733    right: 5px; 
     3734    top: 3px; } 
     3735 
     3736  .mfp-img-mobile .mfp-close { 
     3737    top: 0; 
     3738    right: 0; 
     3739    width: 35px; 
     3740    height: 35px; 
     3741    line-height: 35px; 
     3742    background: rgba(0, 0, 0, 0.6); 
     3743    position: fixed; 
     3744    text-align: center; 
     3745    padding: 0; } } 
     3746@media all and (max-width: 900px) { 
     3747  .mfp-arrow { 
     3748    -webkit-transform: scale(0.75); 
     3749    transform: scale(0.75); } 
     3750 
     3751  .mfp-arrow-left { 
     3752    -webkit-transform-origin: 0; 
     3753    transform-origin: 0; } 
     3754 
     3755  .mfp-arrow-right { 
     3756    -webkit-transform-origin: 100%; 
     3757    transform-origin: 100%; } 
     3758 
     3759  .mfp-container { 
     3760    padding-left: 6px; 
     3761    padding-right: 6px; } } 
  • admin/style/scss/default.scss

    r3365 r3368  
    7676@import "partials/utils"; 
    7777@import "partials/mediaqueries"; 
     78 
     79/** -------------------------------------------------- 
     80     3rd parties 
     81--------------------------------------------------- */ 
     82@import "vendor/magnific-popup"; 
  • inc/admin/lib.dc.page.php

    r3357 r3368  
    865865     { 
    866866          return 
    867           self::cssLoad('style/modal/modal.css'). 
    868           self::jsLoad('js/jquery/jquery.modal.js'). 
    869           '<script type="text/javascript">'."\n". 
    870           "//<![CDATA[\n". 
    871           self::jsVar('$.modal.prototype.params.loader_img','style/modal/loader.gif'). 
    872           self::jsVar('$.modal.prototype.params.close_img','style/modal/close.png'). 
    873           "\n//]]>\n". 
    874           "</script>\n"; 
     867          self::jsLoad('js/jquery/jquery.magnific-popup.js'); 
    875868     } 
    876869 
Note: See TracChangeset for help on using the changeset viewer.

Sites map