Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.css |
— | — | @@ -16,10 +16,6 @@ |
17 | 17 | width: 100%; |
18 | 18 | margin: -1px; |
19 | 19 | } |
20 | | -/* This class is used by jQuery UI*/ |
21 | | -.ui-widget { |
22 | | - font-size: 13px !important; |
23 | | -} |
24 | 20 | .wikiEditor-ui .wikiEditor-ui-text > textarea#wpTextbox1 { |
25 | 21 | margin: 0; |
26 | 22 | } |
— | — | @@ -35,7 +31,6 @@ |
36 | 32 | float: right; |
37 | 33 | } |
38 | 34 | .wikiEditor-ui .wikiEditor-ui-bottom { |
39 | | - position: relative; |
40 | 35 | border: solid silver 1px; |
41 | 36 | border-top-width: 0; |
42 | 37 | width: 100%; |
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css |
— | — | @@ -166,17 +166,83 @@ |
167 | 167 | body.rtl .wikiEditor-ui-toolbar .group > img.tool { |
168 | 168 | float: right; |
169 | 169 | } |
170 | | -.wikiEditor-ui-toolbar .group select { |
| 170 | +.wikiEditor-ui-toolbar .group .tool-select { |
171 | 171 | float: left; |
172 | 172 | margin: 2px; |
173 | 173 | height: 22px; |
174 | 174 | cursor: pointer; |
| 175 | + border: solid 1px silver; |
| 176 | + padding: 0; |
| 177 | + margin-right: 0; |
| 178 | + cursor: pointer; |
| 179 | + background-color: #ffffff; |
175 | 180 | } |
176 | 181 | /* IGNORED BY IE6 */ |
177 | | -body.rtl .wikiEditor-ui-toolbar .group > select { |
| 182 | +body.rtl .wikiEditor-ui-toolbar .group > .tool-select { |
178 | 183 | float: right; |
179 | | - font-size: 0.9em; |
180 | 184 | } |
| 185 | +.wikiEditor-ui-toolbar .group .tool-select .label { |
| 186 | + background-image: url(../images/wikiEditor/toolbar/arrow-down.png); |
| 187 | + background-position: center right; |
| 188 | + background-repeat: no-repeat; |
| 189 | + padding: 0; |
| 190 | + margin: 0; |
| 191 | + padding-left: 4px; |
| 192 | + padding-right: 22px; |
| 193 | + margin-right: 4px; |
| 194 | + cursor: pointer; |
| 195 | +} |
| 196 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .label { |
| 197 | + background-position: center left; |
| 198 | + padding-right: 4px; |
| 199 | + padding-left: 22px; |
| 200 | + margin-left: 4px; |
| 201 | + margin-right: 0; |
| 202 | +} |
| 203 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu { |
| 204 | + clear: both; |
| 205 | +} |
| 206 | +.wikiEditor-ui-toolbar .group .tool-select .menu .options { |
| 207 | + position: absolute; |
| 208 | + display: none; |
| 209 | + margin-left: -1px; |
| 210 | + border: solid 1px silver; |
| 211 | + background-color: #ffffff; |
| 212 | +} |
| 213 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu { |
| 214 | + margin-left: -1px; |
| 215 | + margin-right: -1px; |
| 216 | +} |
| 217 | +/* IGNORED BY IE6 */ |
| 218 | +.wikiEditor-ui-toolbar .group .tool-select .options { |
| 219 | + margin-top: 22px; |
| 220 | +} |
| 221 | +.wikiEditor-ui-toolbar .group .tool-select .options .option { |
| 222 | + display: block; |
| 223 | + padding: 0.5em; |
| 224 | + text-decoration: none; |
| 225 | + color: black; |
| 226 | + whitespace: nowrap; |
| 227 | +} |
| 228 | +.wikiEditor-ui-toolbar .group .tool-select .options .option:hover { |
| 229 | + background-color: #f3f3f3; |
| 230 | +} |
| 231 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-2] { |
| 232 | + font-size: 150%; |
| 233 | + font-weight: normal; |
| 234 | +} |
| 235 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-3] { |
| 236 | + font-size: 132%; |
| 237 | + font-weight: normal; |
| 238 | +} |
| 239 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-4] { |
| 240 | + font-size: 116%; |
| 241 | + font-weight: normal; |
| 242 | +} |
| 243 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-5] { |
| 244 | + font-size: 100%; |
| 245 | + font-weight: bold; |
| 246 | +} |
181 | 247 | /* Booklet */ |
182 | 248 | .wikiEditor-ui-toolbar .booklet .index { |
183 | 249 | float: left; |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -16,10 +16,6 @@ |
17 | 17 | width: 100%; |
18 | 18 | margin: -1px; |
19 | 19 | } |
20 | | -/* This class is used by jQuery UI*/ |
21 | | -.ui-widget { |
22 | | - font-size: 13px !important; |
23 | | -} |
24 | 20 | .wikiEditor-ui .wikiEditor-ui-text > textarea#wpTextbox1 { |
25 | 21 | margin: 0; |
26 | 22 | } |
— | — | @@ -35,7 +31,6 @@ |
36 | 32 | float: right; |
37 | 33 | } |
38 | 34 | .wikiEditor-ui .wikiEditor-ui-bottom { |
39 | | - position: relative; |
40 | 35 | border: solid silver 1px; |
41 | 36 | border-top-width: 0; |
42 | 37 | width: 100%; |
— | — | @@ -257,17 +252,83 @@ |
258 | 253 | body.rtl .wikiEditor-ui-toolbar .group > img.tool { |
259 | 254 | float: right; |
260 | 255 | } |
261 | | -.wikiEditor-ui-toolbar .group select { |
| 256 | +.wikiEditor-ui-toolbar .group .tool-select { |
262 | 257 | float: left; |
263 | 258 | margin: 2px; |
264 | 259 | height: 22px; |
265 | 260 | cursor: pointer; |
| 261 | + border: solid 1px silver; |
| 262 | + padding: 0; |
| 263 | + margin-right: 0; |
| 264 | + cursor: pointer; |
| 265 | + background-color: #ffffff; |
266 | 266 | } |
267 | 267 | /* IGNORED BY IE6 */ |
268 | | -body.rtl .wikiEditor-ui-toolbar .group > select { |
| 268 | +body.rtl .wikiEditor-ui-toolbar .group > .tool-select { |
269 | 269 | float: right; |
270 | | - font-size: 0.9em; |
271 | 270 | } |
| 271 | +.wikiEditor-ui-toolbar .group .tool-select .label { |
| 272 | + background-image: url(../images/wikiEditor/toolbar/arrow-down.png); |
| 273 | + background-position: center right; |
| 274 | + background-repeat: no-repeat; |
| 275 | + padding: 0; |
| 276 | + margin: 0; |
| 277 | + padding-left: 4px; |
| 278 | + padding-right: 22px; |
| 279 | + margin-right: 4px; |
| 280 | + cursor: pointer; |
| 281 | +} |
| 282 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .label { |
| 283 | + background-position: center left; |
| 284 | + padding-right: 4px; |
| 285 | + padding-left: 22px; |
| 286 | + margin-left: 4px; |
| 287 | + margin-right: 0; |
| 288 | +} |
| 289 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu { |
| 290 | + clear: both; |
| 291 | +} |
| 292 | +.wikiEditor-ui-toolbar .group .tool-select .menu .options { |
| 293 | + position: absolute; |
| 294 | + display: none; |
| 295 | + margin-left: -1px; |
| 296 | + border: solid 1px silver; |
| 297 | + background-color: #ffffff; |
| 298 | +} |
| 299 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu { |
| 300 | + margin-left: -1px; |
| 301 | + margin-right: -1px; |
| 302 | +} |
| 303 | +/* IGNORED BY IE6 */ |
| 304 | +.wikiEditor-ui-toolbar .group .tool-select .options { |
| 305 | + margin-top: 22px; |
| 306 | +} |
| 307 | +.wikiEditor-ui-toolbar .group .tool-select .options .option { |
| 308 | + display: block; |
| 309 | + padding: 0.5em; |
| 310 | + text-decoration: none; |
| 311 | + color: black; |
| 312 | + whitespace: nowrap; |
| 313 | +} |
| 314 | +.wikiEditor-ui-toolbar .group .tool-select .options .option:hover { |
| 315 | + background-color: #f3f3f3; |
| 316 | +} |
| 317 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-2] { |
| 318 | + font-size: 150%; |
| 319 | + font-weight: normal; |
| 320 | +} |
| 321 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-3] { |
| 322 | + font-size: 132%; |
| 323 | + font-weight: normal; |
| 324 | +} |
| 325 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-4] { |
| 326 | + font-size: 116%; |
| 327 | + font-weight: normal; |
| 328 | +} |
| 329 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-5] { |
| 330 | + font-size: 100%; |
| 331 | + font-weight: bold; |
| 332 | +} |
272 | 333 | /* Booklet */ |
273 | 334 | .wikiEditor-ui-toolbar .booklet .index { |
274 | 335 | float: left; |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -11,9 +11,6 @@ |
12 | 12 | width:100%; |
13 | 13 | margin:-1px; |
14 | 14 | } |
15 | | -.ui-widget{ |
16 | | -font-size:13px !important; |
17 | | -} |
18 | 15 | .wikiEditor-ui .wikiEditor-ui-text > textarea#wpTextbox1{ |
19 | 16 | margin:0; |
20 | 17 | } |
— | — | @@ -29,7 +26,6 @@ |
30 | 27 | float:right; |
31 | 28 | } |
32 | 29 | .wikiEditor-ui .wikiEditor-ui-bottom{ |
33 | | -position:relative; |
34 | 30 | border:solid silver 1px; |
35 | 31 | border-top-width:0; |
36 | 32 | width:100%; |
— | — | @@ -235,16 +231,81 @@ |
236 | 232 | body.rtl .wikiEditor-ui-toolbar .group > img.tool{ |
237 | 233 | float:right; |
238 | 234 | } |
239 | | -.wikiEditor-ui-toolbar .group select{ |
| 235 | +.wikiEditor-ui-toolbar .group .tool-select{ |
240 | 236 | float:left; |
241 | 237 | margin:2px; |
242 | 238 | height:22px; |
243 | 239 | cursor:pointer; |
| 240 | +border:solid 1px silver; |
| 241 | +padding:0; |
| 242 | +margin-right:0; |
| 243 | +cursor:pointer; |
| 244 | +background-color:#ffffff; |
244 | 245 | } |
245 | | -body.rtl .wikiEditor-ui-toolbar .group > select{ |
| 246 | +body.rtl .wikiEditor-ui-toolbar .group > .tool-select{ |
246 | 247 | float:right; |
247 | | -font-size:0.9em; |
248 | 248 | } |
| 249 | +.wikiEditor-ui-toolbar .group .tool-select .label{ |
| 250 | +background-image:url(../images/wikiEditor/toolbar/arrow-down.png); |
| 251 | +background-position:center right; |
| 252 | +background-repeat:no-repeat; |
| 253 | +padding:0; |
| 254 | +margin:0; |
| 255 | +padding-left:4px; |
| 256 | +padding-right:22px; |
| 257 | +margin-right:4px; |
| 258 | +cursor:pointer; |
| 259 | +} |
| 260 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .label{ |
| 261 | +background-position:center left; |
| 262 | +padding-right:4px; |
| 263 | +padding-left:22px; |
| 264 | +margin-left:4px; |
| 265 | +margin-right:0; |
| 266 | +} |
| 267 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu{ |
| 268 | +clear:both; |
| 269 | +} |
| 270 | +.wikiEditor-ui-toolbar .group .tool-select .menu .options{ |
| 271 | +position:absolute; |
| 272 | +display:none; |
| 273 | +margin-left:-1px; |
| 274 | +border:solid 1px silver; |
| 275 | +background-color:#ffffff; |
| 276 | +} |
| 277 | +body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu{ |
| 278 | +margin-left:-1px; |
| 279 | +margin-right:-1px; |
| 280 | +} |
| 281 | +.wikiEditor-ui-toolbar .group .tool-select .options { |
| 282 | +margin-top:22px; |
| 283 | +} |
| 284 | +.wikiEditor-ui-toolbar .group .tool-select .options .option{ |
| 285 | +display:block; |
| 286 | +padding:0.5em; |
| 287 | +text-decoration:none; |
| 288 | +color:black; |
| 289 | +whitespace:nowrap; |
| 290 | +} |
| 291 | +.wikiEditor-ui-toolbar .group .tool-select .options .option:hover{ |
| 292 | +background-color:#f3f3f3; |
| 293 | +} |
| 294 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-2]{ |
| 295 | +font-size:150%; |
| 296 | +font-weight:normal; |
| 297 | +} |
| 298 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-3]{ |
| 299 | +font-size:132%; |
| 300 | +font-weight:normal; |
| 301 | +} |
| 302 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-4]{ |
| 303 | +font-size:116%; |
| 304 | +font-weight:normal; |
| 305 | +} |
| 306 | +.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-5]{ |
| 307 | +font-size:100%; |
| 308 | +font-weight:bold; |
| 309 | +} |
249 | 310 | .wikiEditor-ui-toolbar .booklet .index{ |
250 | 311 | float:left; |
251 | 312 | width:20%; |
— | — | @@ -335,4 +396,4 @@ |
336 | 397 | background-color:white; |
337 | 398 | text-decoration:none; |
338 | 399 | border-color:#a8d7f9; |
339 | | -} |
\ No newline at end of file |
| 400 | +} |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -277,7 +277,7 @@ |
278 | 278 | 'alt' : label, |
279 | 279 | 'title' : label, |
280 | 280 | 'rel' : id, |
281 | | - 'class' : 'tool tool-' + id |
| 281 | + 'class' : 'tool tool-button' |
282 | 282 | } ); |
283 | 283 | if ( 'action' in tool ) { |
284 | 284 | $button |
— | — | @@ -292,32 +292,33 @@ |
293 | 293 | } |
294 | 294 | return $button; |
295 | 295 | case 'select': |
296 | | - var $select = $( '<select />' ).attr( { 'rel' : id, 'class' : 'tool tool-' + id } ); |
297 | | - $select.append( $( '<option />' ).text( label ) ) |
| 296 | + var $select = $( '<div />' ) |
| 297 | + .attr( { 'rel' : id, 'class' : 'tool tool-select' } ) |
| 298 | + .click( function() { |
| 299 | + var $options = $(this).find( '.options' ); |
| 300 | + $options.animate( { 'opacity': 'toggle' }, 'fast' ); |
| 301 | + } ); |
| 302 | + $options = $( '<div />' ).addClass( 'options' ); |
298 | 303 | if ( 'list' in tool ) { |
299 | | - $select |
300 | | - .data( 'list', tool.list ) |
301 | | - .data( 'context', context ) |
302 | | - .click( function() { |
303 | | - var list = $(this).data( 'list' ); |
304 | | - var val = $(this).val(); |
305 | | - if ( val in list && 'action' in list[val] ) { |
306 | | - $.wikiEditor.modules.toolbar.fn.doAction( |
307 | | - $(this).data( 'context' ), list[val].action |
308 | | - ); |
309 | | - } |
310 | | - $(this) |
311 | | - .find( ":selected" ) |
312 | | - .attr( 'selected', false ) |
313 | | - .find( ":first" ) |
314 | | - .attr( 'selected', true ); |
315 | | - return false; |
316 | | - } ); |
317 | 304 | for ( option in tool.list ) { |
318 | 305 | var optionLabel = $.wikiEditor.modules.toolbar.fn.autoMsg( tool.list[option], 'label' ); |
319 | | - $select.append( $( '<option />' ).text( optionLabel ).attr( 'value', option ) ); |
| 306 | + $options.append( |
| 307 | + $( '<a />' ) |
| 308 | + .data( 'action', tool.list[option].action ) |
| 309 | + .data( 'context', context ) |
| 310 | + .click( function() { |
| 311 | + $.wikiEditor.modules.toolbar.fn.doAction( |
| 312 | + $(this).data( 'context' ), $(this).data( 'action' ) |
| 313 | + ); |
| 314 | + } ) |
| 315 | + .text( optionLabel ) |
| 316 | + .addClass( 'option' ) |
| 317 | + .attr( 'rel', option ) |
| 318 | + ); |
320 | 319 | } |
321 | 320 | } |
| 321 | + $select.append( $( '<div />' ).addClass( 'menu' ).append( $options ) ); |
| 322 | + $select.append( $( '<div />' ).addClass( 'label' ).text( label ) ); |
322 | 323 | return $select; |
323 | 324 | default: |
324 | 325 | return null; |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1634,7 +1634,7 @@ |
1635 | 1635 | 'alt' : label, |
1636 | 1636 | 'title' : label, |
1637 | 1637 | 'rel' : id, |
1638 | | - 'class' : 'tool tool-' + id |
| 1638 | + 'class' : 'tool tool-button' |
1639 | 1639 | } ); |
1640 | 1640 | if ( 'action' in tool ) { |
1641 | 1641 | $button |
— | — | @@ -1649,32 +1649,33 @@ |
1650 | 1650 | } |
1651 | 1651 | return $button; |
1652 | 1652 | case 'select': |
1653 | | - var $select = $( '<select />' ).attr( { 'rel' : id, 'class' : 'tool tool-' + id } ); |
1654 | | - $select.append( $( '<option />' ).text( label ) ) |
| 1653 | + var $select = $( '<div />' ) |
| 1654 | + .attr( { 'rel' : id, 'class' : 'tool tool-select' } ) |
| 1655 | + .click( function() { |
| 1656 | + var $options = $(this).find( '.options' ); |
| 1657 | + $options.animate( { 'opacity': 'toggle' }, 'fast' ); |
| 1658 | + } ); |
| 1659 | + $options = $( '<div />' ).addClass( 'options' ); |
1655 | 1660 | if ( 'list' in tool ) { |
1656 | | - $select |
1657 | | - .data( 'list', tool.list ) |
1658 | | - .data( 'context', context ) |
1659 | | - .click( function() { |
1660 | | - var list = $(this).data( 'list' ); |
1661 | | - var val = $(this).val(); |
1662 | | - if ( val in list && 'action' in list[val] ) { |
1663 | | - $.wikiEditor.modules.toolbar.fn.doAction( |
1664 | | - $(this).data( 'context' ), list[val].action |
1665 | | - ); |
1666 | | - } |
1667 | | - $(this) |
1668 | | - .find( ":selected" ) |
1669 | | - .attr( 'selected', false ) |
1670 | | - .find( ":first" ) |
1671 | | - .attr( 'selected', true ); |
1672 | | - return false; |
1673 | | - } ); |
1674 | 1661 | for ( option in tool.list ) { |
1675 | 1662 | var optionLabel = $.wikiEditor.modules.toolbar.fn.autoMsg( tool.list[option], 'label' ); |
1676 | | - $select.append( $( '<option />' ).text( optionLabel ).attr( 'value', option ) ); |
| 1663 | + $options.append( |
| 1664 | + $( '<a />' ) |
| 1665 | + .data( 'action', tool.list[option].action ) |
| 1666 | + .data( 'context', context ) |
| 1667 | + .click( function() { |
| 1668 | + $.wikiEditor.modules.toolbar.fn.doAction( |
| 1669 | + $(this).data( 'context' ), $(this).data( 'action' ) |
| 1670 | + ); |
| 1671 | + } ) |
| 1672 | + .text( optionLabel ) |
| 1673 | + .addClass( 'option' ) |
| 1674 | + .attr( 'rel', option ) |
| 1675 | + ); |
1677 | 1676 | } |
1678 | 1677 | } |
| 1678 | + $select.append( $( '<div />' ).addClass( 'menu' ).append( $options ) ); |
| 1679 | + $select.append( $( '<div />' ).addClass( 'label' ).text( label ) ); |
1679 | 1680 | return $select; |
1680 | 1681 | default: |
1681 | 1682 | return null; |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -152,11 +152,9 @@ |
153 | 153 | if('tools'in group){for(tool in group.tools){$group.append($.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]));}} |
154 | 154 | return $group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}} |
155 | 155 | var label=$.wikiEditor.modules.toolbar.fn.autoMsg(tool,'label');switch(tool.type){case'button':var src=tool.icon;if(src.indexOf('http://')!==0&&src.indexOf('https://')!==0){src=$.wikiEditor.modules.toolbar.imgPath+src;} |
156 | | -$button=$('<img />').attr({'src':src,'width':22,'height':22,'alt':label,'title':label,'rel':id,'class':'tool tool-'+id});if('action'in tool){$button.data('action',tool.action).data('context',context).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'));return false;});} |
157 | | -return $button;case'select':var $select=$('<select />').attr({'rel':id,'class':'tool tool-'+id});$select.append($('<option />').text(label)) |
158 | | -if('list'in tool){$select.data('list',tool.list).data('context',context).click(function(){var list=$(this).data('list');var val=$(this).val();if(val in list&&'action'in list[val]){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),list[val].action);} |
159 | | -$(this).find(":selected").attr('selected',false).find(":first").attr('selected',true);return false;});for(option in tool.list){var optionLabel=$.wikiEditor.modules.toolbar.fn.autoMsg(tool.list[option],'label');$select.append($('<option />').text(optionLabel).attr('value',option));}} |
160 | | -return $select;default:return null;}},buildBookmark:function(context,id,page){var label=$.wikiEditor.modules.toolbar.fn.autoMsg(page,'label');return $('<div />').text(label).attr('rel',id).data('context',context).click(function(){$(this).parent().parent().find('.page').hide();$(this).parent().parent().find('.page-'+$(this).attr('rel')).show();$(this).siblings().removeClass('current');$(this).addClass('current');var section=$(this).parent().parent().attr('rel');$.cookie('wikiEditor-'+$(this).data('context').instance+'-booklet-'+section+'-page',$(this).attr('rel'));});},buildPage:function(context,id,page){var $page=$('<div />').attr({'class':'page page-'+id,'rel':id});switch(page.layout){case'table':$page.addClass('page-table');var html='<table cellpadding=0 cellspacing=0 '+'border=0 width="100%" class="table table-"'+id+'">';if('headings'in page){html+=$.wikiEditor.modules.toolbar.fn.buildHeading(context,page.headings)} |
| 156 | +$button=$('<img />').attr({'src':src,'width':22,'height':22,'alt':label,'title':label,'rel':id,'class':'tool tool-button'});if('action'in tool){$button.data('action',tool.action).data('context',context).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'));return false;});} |
| 157 | +return $button;case'select':var $select=$('<div />').attr({'rel':id,'class':'tool tool-select'}).click(function(){var $options=$(this).find('.options');$options.animate({'opacity':'toggle'},'fast');});$options=$('<div />').addClass('options');if('list'in tool){for(option in tool.list){var optionLabel=$.wikiEditor.modules.toolbar.fn.autoMsg(tool.list[option],'label');$options.append($('<a />').data('action',tool.list[option].action).data('context',context).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'));}).text(optionLabel).addClass('option').attr('rel',option));}} |
| 158 | +$select.append($('<div />').addClass('menu').append($options));$select.append($('<div />').addClass('label').text(label));return $select;default:return null;}},buildBookmark:function(context,id,page){var label=$.wikiEditor.modules.toolbar.fn.autoMsg(page,'label');return $('<div />').text(label).attr('rel',id).data('context',context).click(function(){$(this).parent().parent().find('.page').hide();$(this).parent().parent().find('.page-'+$(this).attr('rel')).show();$(this).siblings().removeClass('current');$(this).addClass('current');var section=$(this).parent().parent().attr('rel');$.cookie('wikiEditor-'+$(this).data('context').instance+'-booklet-'+section+'-page',$(this).attr('rel'));});},buildPage:function(context,id,page){var $page=$('<div />').attr({'class':'page page-'+id,'rel':id});switch(page.layout){case'table':$page.addClass('page-table');var html='<table cellpadding=0 cellspacing=0 '+'border=0 width="100%" class="table table-"'+id+'">';if('headings'in page){html+=$.wikiEditor.modules.toolbar.fn.buildHeading(context,page.headings)} |
161 | 159 | if('rows'in page){for(row in page.rows){html+=$.wikiEditor.modules.toolbar.fn.buildRow(context,page.rows[row])}} |
162 | 160 | $page.html(html);break;case'characters':$page.addClass('page-characters');$characters=$('<div />').data('context',context).data('actions',{});var actions=$characters.data('actions');if('language'in page){$characters.attr('lang',page.language);} |
163 | 161 | if('direction'in page){$characters.attr('dir',page.direction);} |