Changeset 26985


Ignore:
Timestamp:
Jan 26, 2014, 7:21:38 PM (7 years ago)
Author:
mistic100
Message:

remove is_adviser(), use core javascript, update themes

Location:
extensions/lightbox
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/lightbox/admin/admin.php

    r6373 r26985  
    1111
    1212// Mise a jour de la base de donnee
    13 if (isset($_POST['submit']) and !is_adviser())
     13if (isset($_POST['submit']))
    1414{
    1515  $params  = array(
     
    3838
    3939// Restaurer les paramètres par défaut
    40 if (isset($_POST['restore']) and !is_adviser())
     40if (isset($_POST['restore']))
    4141{
    4242  $params  = $config_default;
  • extensions/lightbox/lightbox.php

    r26984 r26985  
    88$selector = 'a[rel=colorbox'.$conf['lightbox_rel'].']';
    99
    10 $template->func_combine_script(array('id'=>'jquery.colorbox', 'path'=>'plugins/lightbox/js/jquery.colorbox.js'));
    11 $template->func_combine_script(array('id'=>'core.scripts', 'path'=>'themes/default/js/scripts.js'));
     10$template->func_combine_script(array('id'=>'jquery.colorbox', 'path'=>'themes/default/js/plugins/jquery.colorbox.min.js'));
    1211$template->func_combine_css(array('id'=>'colorbox','path'=>'plugins/lightbox/theme/'.$params['theme'].'/colorbox.css'));
    13 $template->block_html_head('','
    14 <script type="text/javascript">
     12$template->block_footer_script('','
    1513function PWG_Colorbox() {
    1614  jQuery("'.$selector.'").attr("href", function () {
     
    3735jQuery(document).ready(PWG_Colorbox);
    3836jQuery(window).bind("RVTS_loaded", PWG_Colorbox);
    39 </script>
    40 <style type="text/css">img.cboxPhoto { max-width: none; }</style>
    4137');
     38$template->block_html_style('', 'img.cboxPhoto { max-width: none; }');
    4239
    4340foreach($tpl_thumbnails_var as $key => $tpl_var)
  • extensions/lightbox/theme/clear/colorbox.css

    r9976 r26985  
    11/*
    2     ColorBox Core Style:
     2    Colorbox Core Style:
    33    The following CSS is consistent between example themes and should not be altered.
    44*/
    55#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
     6#cboxWrapper {max-width:none;}
    67#cboxOverlay{position:fixed; width:100%; height:100%;}
    78#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
    89#cboxContent{position:relative;}
    9 #cboxLoadedContent{overflow:auto;}
     10#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
    1011#cboxTitle{margin:0;}
    11 #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
     12#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
    1213#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
    13 .cboxPhoto{float:left; margin:auto; border:0; display:block;}
     14.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
    1415.cboxIframe{width:100%; height:100%; display:block; border:0;}
     16#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
    1517
    1618/*
    1719    User Style:
    18     Change the following styles to modify the appearance of ColorBox.  They are
     20    Change the following styles to modify the appearance of Colorbox.  They are
    1921    ordered & tabbed in a way that represents the nesting of the generated HTML.
    2022*/
    2123#cboxOverlay{background:url(images/overlay.png) repeat 0 0;}
    22 #colorbox{}
    23     #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -100px 0;}
    24     #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -129px 0;}
    25     #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -100px -29px;}
    26     #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -129px -29px;}
     24#colorbox{outline:0;}
     25    #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;}
     26    #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;}
     27    #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;}
     28    #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px -29px;}
    2729    #cboxMiddleLeft{width:21px; background:url(images/controls.png) left top repeat-y;}
    2830    #cboxMiddleRight{width:21px; background:url(images/controls.png) right top repeat-y;}
     
    3032    #cboxBottomCenter{height:21px; background:url(images/border.png) 0 -29px repeat-x;}
    3133    #cboxContent{background:#fff; overflow:hidden;}
     34        .cboxIframe{background:#fff;}
    3235        #cboxError{padding:50px; border:1px solid #ccc;}
    3336        #cboxLoadedContent{margin-bottom:28px;}
    3437        #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
    3538        #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
     39        #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
     40        #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
     41
     42        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
     43        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
     44       
     45        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
     46        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
     47
    3648        #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
    3749        #cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
    38         #cboxPrevious.hover{background-position:-75px -25px;}
     50        #cboxPrevious:hover{background-position:-75px -25px;}
    3951        #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
    40         #cboxNext.hover{background-position:-50px -25px;}
    41         #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
    42         #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
     52        #cboxNext:hover{background-position:-50px -25px;}
    4353        #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
    44         #cboxClose.hover{background-position:-25px -25px;}
     54        #cboxClose:hover{background-position:-25px -25px;}
    4555
    4656/*
    47   The following fixes a problem where IE7+ replaces a PNG's alpha transparency with a black fill
    48   when an alpha filter (opacity change) is set on the element or ancestor element.
     57  The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
     58  when an alpha filter (opacity change) is set on the element or ancestor element.  This style is not applied to or needed in IE9.
     59  See: http://jacklmoore.com/notes/ie-transparency-problems/
    4960*/
    5061.cboxIE #cboxTopLeft,
     
    5869    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
    5970}
    60 
    61 /*
    62   The following provides PNG transparency support for IE6
    63 */
    64 .cboxIE6 #cboxTopLeft{background:url(plugins/lightbox/theme/clear/images/borderTopLeft.png);}
    65 .cboxIE6 #cboxTopCenter{background:url(plugins/lightbox/theme/clear/images/borderTopCenter.png);}
    66 .cboxIE6 #cboxTopRight{background:url(plugins/lightbox/theme/clear/images/borderTopRight.png);}
    67 .cboxIE6 #cboxBottomLeft{background:url(plugins/lightbox/theme/clear/images/borderBottomLeft.png);}
    68 .cboxIE6 #cboxBottomCenter{background:url(plugins/lightbox/theme/clear/images/borderBottomCenter.png);}
    69 .cboxIE6 #cboxBottomRight{background:url(plugins/lightbox/theme/clear/images/borderBottomRight.png);}
    70 .cboxIE6 #cboxMiddleLeft{background:url(plugins/lightbox/theme/clear/images/borderMiddleLeft.png);}
    71 .cboxIE6 #cboxMiddleRight{background:url(plugins/lightbox/theme/clear/images/borderMiddleRight.png);}
    72 
    73 .cboxIE6 #cboxTopLeft,
    74 .cboxIE6 #cboxTopCenter,
    75 .cboxIE6 #cboxTopRight,
    76 .cboxIE6 #cboxBottomLeft,
    77 .cboxIE6 #cboxBottomCenter,
    78 .cboxIE6 #cboxBottomRight,
    79 .cboxIE6 #cboxMiddleLeft,
    80 .cboxIE6 #cboxMiddleRight {
    81     _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')");
    82 }
    83 
    84 #cboxTitle a {color:#222; border-bottom: 0 none;}
  • extensions/lightbox/theme/dark/colorbox.css

    r9976 r26985  
    11/*
    2     ColorBox Core Style:
     2    Colorbox Core Style:
    33    The following CSS is consistent between example themes and should not be altered.
    44*/
    55#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
     6#cboxWrapper {max-width:none;}
    67#cboxOverlay{position:fixed; width:100%; height:100%;}
    78#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
    89#cboxContent{position:relative;}
    9 #cboxLoadedContent{overflow:auto;}
     10#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
    1011#cboxTitle{margin:0;}
    11 #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
     12#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
    1213#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
    13 .cboxPhoto{float:left; margin:auto; border:0; display:block;}
     14.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
    1415.cboxIframe{width:100%; height:100%; display:block; border:0;}
     16#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
    1517
    1618/*
    1719    User Style:
    18     Change the following styles to modify the appearance of ColorBox.  They are
     20    Change the following styles to modify the appearance of Colorbox.  They are
    1921    ordered & tabbed in a way that represents the nesting of the generated HTML.
    2022*/
    2123#cboxOverlay{background:#000;}
    22 #colorbox{}
    23     #cboxContent{margin-top:20px;}
     24#colorbox{outline:0;}
     25    #cboxContent{margin-top:20px;background:#000;}
     26        .cboxIframe{background:#fff;}
    2427        #cboxError{padding:50px; border:1px solid #ccc;}
    2528        #cboxLoadedContent{border:5px solid #000; background:#fff;}
    2629        #cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;}
    2730        #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;}
     31        #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
     32
     33        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
     34        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
     35       
     36        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
     37        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
     38       
    2839        #cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
    2940        #cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;}
    30         #cboxPrevious.hover{background-position:bottom left;}
     41        #cboxPrevious:hover{background-position:bottom left;}
    3142        #cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;}
    32         #cboxNext.hover{background-position:bottom right;}
    33         #cboxLoadingOverlay{background:#000;}
    34         #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
     43        #cboxNext:hover{background-position:bottom right;}
    3544        #cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(images/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;}
    36         #cboxClose.hover{background-position:bottom center;}
    37 
    38 #cboxTitle a {color:#fff; border-bottom: 0 none;}
     45        #cboxClose:hover{background-position:bottom center;}
  • extensions/lightbox/theme/grey/colorbox.css

    r9976 r26985  
    11/*
    2     ColorBox Core Style:
     2    Colorbox Core Style:
    33    The following CSS is consistent between example themes and should not be altered.
    44*/
    55#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
     6#cboxWrapper {max-width:none;}
    67#cboxOverlay{position:fixed; width:100%; height:100%;}
    78#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
    89#cboxContent{position:relative;}
    9 #cboxLoadedContent{overflow:auto;}
     10#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
    1011#cboxTitle{margin:0;}
    11 #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
     12#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
    1213#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
    13 .cboxPhoto{float:left; margin:auto; border:0; display:block;}
     14.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
    1415.cboxIframe{width:100%; height:100%; display:block; border:0;}
     16#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
    1517
    1618/*
    1719    User Style:
    18     Change the following styles to modify the appearance of ColorBox.  They are
     20    Change the following styles to modify the appearance of Colorbox.  They are
    1921    ordered & tabbed in a way that represents the nesting of the generated HTML.
    2022*/
    2123#cboxOverlay{background:#fff;}
    22 #colorbox{}
    23     #cboxContent{margin-top:32px; overflow:visible;}
     24#colorbox{outline:0;}
     25    #cboxContent{margin-top:32px; overflow:visible; background:#000;}
     26        .cboxIframe{background:#fff;}
    2427        #cboxError{padding:50px; border:1px solid #ccc;}
    2528        #cboxLoadedContent{background:#000; padding:1px;}
     
    2831        #cboxTitle{position:absolute; top:-22px; left:0; color:#000;}
    2932        #cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;}
    30         #cboxSlideshow, #cboxPrevious, #cboxNext, #cboxClose{text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(images/controls.png) no-repeat 0 0;}
     33
     34        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
     35        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(images/controls.png) no-repeat 0 0;}
     36       
     37        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
     38        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
     39
    3140        #cboxPrevious{background-position:0px 0px; right:44px;}
    32         #cboxPrevious.hover{background-position:0px -25px;}
     41        #cboxPrevious:hover{background-position:0px -25px;}
    3342        #cboxNext{background-position:-25px 0px; right:22px;}
    34         #cboxNext.hover{background-position:-25px -25px;}
     43        #cboxNext:hover{background-position:-25px -25px;}
    3544        #cboxClose{background-position:-50px 0px; right:0;}
    36         #cboxClose.hover{background-position:-50px -25px;}
     45        #cboxClose:hover{background-position:-50px -25px;}
    3746        .cboxSlideshow_on #cboxPrevious, .cboxSlideshow_off #cboxPrevious{right:66px;}
    3847        .cboxSlideshow_on #cboxSlideshow{background-position:-75px -25px; right:44px;}
    39         .cboxSlideshow_on #cboxSlideshow.hover{background-position:-100px -25px;}
     48        .cboxSlideshow_on #cboxSlideshow:hover{background-position:-100px -25px;}
    4049        .cboxSlideshow_off #cboxSlideshow{background-position:-100px 0px; right:44px;}
    41         .cboxSlideshow_off #cboxSlideshow.hover{background-position:-75px -25px;}
    42 
    43 #cboxTitle a {color:#222; border-bottom: 0 none;}
     50        .cboxSlideshow_off #cboxSlideshow:hover{background-position:-75px -25px;}
  • extensions/lightbox/theme/grey2/colorbox.css

    r9976 r26985  
    11/*
    2     ColorBox Core Style:
     2    Colorbox Core Style:
    33    The following CSS is consistent between example themes and should not be altered.
    44*/
    55#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
     6#cboxWrapper {max-width:none;}
    67#cboxOverlay{position:fixed; width:100%; height:100%;}
    78#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
    89#cboxContent{position:relative;}
    9 #cboxLoadedContent{overflow:auto;}
     10#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
    1011#cboxTitle{margin:0;}
    11 #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
     12#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
    1213#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
    13 .cboxPhoto{float:left; margin:auto; border:0; display:block;}
     14.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
    1415.cboxIframe{width:100%; height:100%; display:block; border:0;}
     16#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
    1517
    1618/*
    1719    User Style:
    18     Change the following styles to modify the appearance of ColorBox.  They are
     20    Change the following styles to modify the appearance of Colorbox.  They are
    1921    ordered & tabbed in a way that represents the nesting of the generated HTML.
    2022*/
    2123#cboxOverlay{background:#000;}
    22 #colorbox{}
     24#colorbox{outline:0;}
    2325    #cboxTopLeft{width:14px; height:14px; background:url(images/controls.png) no-repeat 0 0;}
    2426    #cboxTopCenter{height:14px; background:url(images/border.png) repeat-x top left;}
     
    3032    #cboxMiddleRight{width:14px; background:url(images/controls.png) repeat-y -211px 0;}
    3133    #cboxContent{background:#fff; overflow:visible;}
     34        .cboxIframe{background:#fff;}
     35        #cboxError{padding:50px; border:1px solid #ccc;}
    3236        #cboxLoadedContent{margin-bottom:5px;}
    3337        #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
     
    3539        #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
    3640        #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
     41
     42        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
     43        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible;  position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
    3744       
    38         #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
     45        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
     46        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
     47
    3948        #cboxPrevious{left:0px; background-position: -51px -25px;}
    40         #cboxPrevious.hover{background-position:-51px 0px;}
     49        #cboxPrevious:hover{background-position:-51px 0px;}
    4150        #cboxNext{left:27px; background-position:-75px -25px;}
    42         #cboxNext.hover{background-position:-75px 0px;}
     51        #cboxNext:hover{background-position:-75px 0px;}
    4352        #cboxClose{right:0; background-position:-100px -25px;}
    44         #cboxClose.hover{background-position:-100px 0px;}
    45        
     53        #cboxClose:hover{background-position:-100px 0px;}
     54
    4655        .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;}
    47         .cboxSlideshow_on #cboxSlideshow.hover{background-position:-150px 0px;}
     56        .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;}
    4857        .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;}
    49         .cboxSlideshow_off #cboxSlideshow.hover{background-position:-125px 0px;}
    50 #cboxTitle a {color:#555; border-bottom: 0 none;}
     58        .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;}
Note: See TracChangeset for help on using the changeset viewer.