Development

Changeset 7456

You must first sign up to be able to contribute.

Changeset 7456

Show
Ignore:
Timestamp:
02/11/08 02:32:25 (10 months ago)
Author:
Mark.Quezada
Message:

Updated the plugin documentation to show how to change the default look of the thickbox.
Updated the css to use the thickbox 3.1 definitions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/mqThickboxPlugin/README

    r5605 r7456  
    55== Requirements == 
    66 
    7 This requires jQuery.js available via [wiki:sfUJSPlugin] or you can download it seperately.  This README assumes  %SF_JQUERY_WEB_DIR%/js/jquery.js 
     7This requires jQuery.js available via [wiki:sfUJSPlugin] or you can download it separately.  This README assumes  %SF_JQUERY_WEB_DIR%/js/jquery.js 
     8 
     9NOTE: jQuery does NOT come with this plugin, but *IS* required for it to work. You can either download it via the jQuery website or use the sfUJSPlugin as mentioned above. If you've downloaded it, place it in your web/js/ directory and then edit yourapp/config/view.yml to include it: 
     10 
     11{{{ 
     12default: 
     13... 
     14  javascripts:    [jquery] 
     15 
     16}}} 
    817 
    918== Install == 
     
    96105Also, as can be seen in the ajax content example, any symfony routing rule can be used for a url. 
    97106 
     107You can now override the thickbox styles in your own css file by adding the appropriate css definitions to your stylesheet. For example, to change the overlay's background color, opacity and border, just redefine it in your main.css like so: 
     108 
     109{{{ 
     110.TB_overlayBG 
     111{ 
     112  background-color: #fff; 
     113  filter:alpha(opacity=65); 
     114  -moz-opacity: 0.65; 
     115  opacity: 0.65; 
     116} 
     117 
     118#TB_window { 
     119  border: 1px solid #ccc; 
     120} 
     121 
     122}}} 
     123 
     124You may also need to edit and include a version of the macFFBgHack.png file (located in mqThickboxPlugin/web/images/) that matches the above background color and redefine it in your stylesheet: 
     125 
     126{{{ 
     127.TB_overlayMacFFBGHack {background: url('/images/macFFBgHack_white.png') repeat;} 
     128}}} 
     129 
     130See the thickbox.css file for other styles that can be overridden. 
     131 
    98132== Developers == 
    99133 
  • plugins/mqThickboxPlugin/lib/helper/ThickboxHelper.php

    r5604 r7456  
    101101  use_javascript(sfConfig::get('sf_jquery_web_dir'). '/js/jquery'); 
    102102  use_javascript('/mqThickboxPlugin/js/thickbox'); 
    103   use_stylesheet('/mqThickboxPlugin/css/thickbox');  
     103  use_stylesheet('/mqThickboxPlugin/css/thickbox','first');  
    104104} 
  • plugins/mqThickboxPlugin/web/css/thickbox.css

    r5588 r7456  
    3131  top: 0px; 
    3232  left: 0px; 
     33  height:100%; 
     34  width:100%; 
     35} 
     36 
     37.TB_overlayMacFFBGHack {background: url('/mqThickboxPlugin/images/macFFBgHack.png') repeat;} 
     38.TB_overlayBG { 
    3339  background-color:#000; 
    3440  filter:alpha(opacity=75); 
    3541  -moz-opacity: 0.75; 
    3642  opacity: 0.75; 
    37   height:100%; 
    38   width:100%; 
    3943} 
    4044