Development

/plugins/sfNiftyPlugin/README

You must first sign up to be able to contribute.

root/plugins/sfNiftyPlugin/README

Revision 3724, 3.0 kB (checked in by Jonathan.Wage, 6 years ago)

Initial import.

Line 
1 = sfNifty plugin =
2
3 sfNifty provide some helper to use the '''Nifty Corner Cube''' javascript library (http://www.html.it/articoli/niftycube/index.html) of '''Alessandro Fulciniti'''(a.fulciniti@html.it)[[BR]]
4 The concept of this library is to '''rounded corners of DOM Elements without images'''.
5
6 == Installation ==
7
8   * Install the plugin
9  
10   {{{
11     $ symfony plugin-install http://plugins.symfony-project.com/sfNiftyPlugin
12   }}}
13  
14   * Clear your cache
15
16   {{{
17     $symfony cc
18   }}} 
19  
20 === Use the helpers ===
21
22 To round corners :
23
24   ''function nifty_round_elements( $element, $options = "" )''
25
26   * $element
27  
28     '''tag selector'''
29       - "p"[[BR]]
30       - "h2"
31      
32     '''id selector'''
33       - "div#header"[[BR]]
34       - "h2#about"
35      
36     '''class selector'''
37       - "div.news"[[BR]]
38       - "span.date"[[BR]]
39       - "p.comment"
40      
41     '''descendant selector (with id)'''
42       - "div#content h2"[[BR]]
43       - "div#menu a"
44      
45     '''descendant selector (with class)'''
46       - "ul.news li"[[BR]]
47       - "div.entry h4"
48      
49     '''grouping (any number and combination of the previous selectors)'''
50       - "h2,h3"[[BR]]
51       - "div#header,div#content,div#footer"[[BR]]
52       - "ul#menu li,div.entry li" 
53
54   * $options
55  
56     '''tl'''   
57       top left corner
58      
59     '''tr'''
60       top right corner
61      
62     '''bl'''
63       bottom left corner
64      
65     '''br'''
66       bottom right corner
67
68     '''top'''
69       upper corners
70    
71     '''bottom'''
72       lower corners
73    
74     '''left'''
75       left corners
76    
77     '''right'''
78       right corners
79    
80     '''all'''
81       (default) all the four corners
82    
83     '''none'''
84       no corners will be rounded (to use for nifty columns)
85    
86     '''small'''
87       small corners (2px)
88    
89     '''normal'''
90       (default) normal size corners (5px)
91    
92     '''big'''
93       big size corners (10px)
94    
95     '''transparent'''
96       inner transparent, alias corners will be obtained. This option activates automatically if the element to round does not have a background-color specified.
97    
98     '''fixed-height'''
99       to be applied when a fixed height is set via CSS
100    
101     '''same-height'''
102       Parameter for nifty columns: all elements identified by the CSS selector of the first parameter will have the same height. If the effect is needed without rounded corners, simply use this parameter in conjuction with the keyword none. 
103      
104   * Exemples
105   {{{
106      <?php echo javascript_tag( nifty_round_elements( "div#content_div", "big") ) ?>
107      <?php echo javascript_tag( nifty_round_elements( "div.menu", "top") ) ?>
108      <?php echo javascript_tag( nifty_round_elements( "div.encart", "small br tl") ) ?>
109      <?php echo javascript_tag( nifty_round_elements( "h2, h3, div#content" ) ) ?>
110   }}}
111
112      
113 === Read the complete documentation === 
114
115 ...of Nifty Library, here : http://www.html.it/articoli/niftycube/index.html
116
117 === Versions ===
118
119 1.0.0 => First version
120 1.0.1 => correcting link bug in niftyHelper.php
121 1.0.2 => refactoring, use Prototype for adding window.onload events
Note: See TracBrowser for help on using the browser.