Projet

Général

Profil

Paste
Télécharger (53,7 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / modules / sweaver / sweaver.registry.inc @ a5572547

1
<?php
2

    
3
/**
4
 * @file
5
 * Registry for Sweaver.
6
 */
7

    
8
/**
9
 * Menu items.
10
 */
11
function _sweaver_menu() {
12
  $weight = 0;
13
  $items = array();
14

    
15
  // The sweaver plugins administration.
16
  $items['admin/config/user-interface/sweaver/plugins'] = array(
17
    'title' => 'Plugins',
18
    'type' => MENU_LOCAL_TASK,
19
    'weight' => 2,
20
    'access arguments' => array('configure sweaver'),
21
    'page callback' => 'drupal_get_form',
22
    'page arguments' => array('sweaver_plugin_config_plugins'),
23
    'file' => 'sweaver.admin.inc'
24
  );
25

    
26
  $base = array(
27
    'access arguments' => array('configure sweaver'),
28
    'page callback' => 'sweaver_menu_callback',
29
  );
30

    
31
  $sweaver = Sweaver::get_instance();
32
  foreach (array_keys($sweaver->get_plugins_registry(TRUE)) as $plugin_name) {
33
    $sweaver_plugin = $sweaver->get_plugin($plugin_name);
34
    $page_arguments = array(
35
      'plugin' => $plugin_name,
36
    );
37
    $item = $sweaver_plugin->sweaver_menu($weight, $page_arguments, $base);
38

    
39
    $items += $item;
40
  }
41
  return $items;
42
}
43

    
44
/**
45
 * Theming functions.
46
 */
47
function _sweaver_theme() {
48

    
49
  $skin = variable_get('sweaver_skin', SWEAVER_SKIN);
50
  $theme_functions = array(
51
    'sweaver_plugin' => array(
52
      'template' => $skin,
53
      'file' => $skin . '.theme.inc',
54
      'path' => drupal_get_path('module', 'sweaver') .'/skins/'. $skin,
55
      'render element' => 'form',
56
    ),
57
    'sweaver_plugin_config_plugins' => array(
58
      'template' => 'sweaver-plugin-config-plugins',
59
      'file' => 'sweaver_plugin.theme.inc',
60
      'path' => drupal_get_path('module', 'sweaver'),
61
      'render element' => 'form',
62
    ),
63
  );
64

    
65
  $sweaver = Sweaver::get_instance();
66
  foreach (array_keys($sweaver->get_plugins_registry(TRUE)) as $plugin_name) {
67
    $sweaver_plugin = $sweaver->get_plugin($plugin_name);
68
    $theme_function = $sweaver_plugin->sweaver_theme();
69
    $theme_functions += $theme_function;
70
  }
71

    
72
  return $theme_functions;
73
}
74

    
75
/**
76
 * Sweaver plugins.
77
 */
78
function _sweaver_sweaver_plugins() {
79
  $plugins = array();
80

    
81
  $plugins['sweaver_plugin_editor'] = array(
82
    'handler' => array(
83
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_editor',
84
      'file' => 'sweaver_plugin_editor.inc',
85
      'class' => 'sweaver_plugin_editor',
86
      'parent' => 'sweaver_plugin',
87
    ),
88
    'tab' => t('Style'),
89
    'tab_description' => t('Click on the element you want to theme.'),
90
  );
91
  $plugins['sweaver_plugin_styles'] = array(
92
    'handler' => array(
93
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_styles',
94
      'file' => 'sweaver_plugin_styles.inc',
95
      'class' => 'sweaver_plugin_styles',
96
      'parent' => 'sweaver_plugin',
97
    ),
98
    'tab' => t('Manage styles'),
99
  );
100
  $plugins['sweaver_plugin_palettes'] = array(
101
    'handler' => array(
102
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_palettes',
103
      'file' => 'sweaver_plugin_palettes.inc',
104
      'class' => 'sweaver_plugin_palettes',
105
      'parent' => 'sweaver_plugin',
106
    ),
107
    'tab' => t('Palettes'),
108
    'tab_description' => t('Change all settings in one click'),
109
  );
110
  $plugins['sweaver_plugin_advanced'] = array(
111
    'handler' => array(
112
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_advanced',
113
      'file' => 'sweaver_plugin_advanced.inc',
114
      'class' => 'sweaver_plugin_advanced',
115
      'parent' => 'sweaver_plugin',
116
    ),
117
    'tab' => t('Advanced'),
118
    'tab_description' => t('Advanced options for managing css'),
119
  );  
120
  $plugins['sweaver_plugin_images'] = array(
121
    'handler' => array(
122
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_images',
123
      'file' => 'sweaver_plugin_images.inc',
124
      'class' => 'sweaver_plugin_images',
125
      'parent' => 'sweaver_plugin',
126
    ),
127
    'tab' => t('Images'),
128
    'tab_description' => t('Upload images to use as a background image.'),
129
  );
130
  $plugins['sweaver_plugin_themeswitch'] = array(
131
    'handler' => array(
132
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_themeswitch',
133
      'file' => 'sweaver_plugin_themeswitch.inc',
134
      'class' => 'sweaver_plugin_themeswitch',
135
      'parent' => 'sweaver_plugin',
136
    ),
137
    'tab' => t('Switch theme'),
138
    'tab_description' => t('Switch and style another theme.'),
139
  );
140
  $plugins['sweaver_plugin_themesettings'] = array(
141
    'handler' => array(
142
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_themesettings',
143
      'file' => 'sweaver_plugin_themesettings.inc',
144
      'class' => 'sweaver_plugin_themesettings',
145
      'parent' => 'sweaver_plugin',
146
    ),
147
    'tab' => t('Theme settings'),
148
    'tab_description' => t('Configure the settings for this theme.'),
149
  );
150
  $plugins['sweaver_plugin_themeclasses'] = array(
151
    'handler' => array(
152
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_themeclasses',
153
      'file' => 'sweaver_plugin_themeclasses.inc',
154
      'class' => 'sweaver_plugin_themeclasses',
155
      'parent' => 'sweaver_plugin',
156
    ),
157
    'tab' => t('Theme styles'),
158
    'tab_description' => t('Select an item - if any - to style it. Clicking will switch to the style editor form.'),
159
  );
160
  $plugins['sweaver_plugin_fontface'] = array(
161
    'handler' => array(
162
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_fontface',
163
      'file' => 'sweaver_plugin_fontface.inc',
164
      'class' => 'sweaver_plugin_fontface',
165
      'parent' => 'sweaver_plugin',
166
    ),
167
    'tab' => t('Font face'),
168
  );
169
  $plugins['sweaver_plugin_kb'] = array(
170
    'handler' => array(
171
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_kb',
172
      'file' => 'sweaver_plugin_kb.inc',
173
      'class' => 'sweaver_plugin_kb',
174
      'parent' => 'sweaver_plugin',
175
    ),
176
    'tab' => t('Key bindings'),
177
  );
178
  $plugins['sweaver_plugin_toolbar'] = array(
179
    'handler' => array(
180
      'path' => drupal_get_path('module', 'sweaver') .'/plugins/sweaver_plugin_toolbar',
181
      'file' => 'sweaver_plugin_toolbar.inc',
182
      'class' => 'sweaver_plugin_toolbar',
183
      'parent' => 'sweaver_plugin',
184
    ),
185
    'tab' => t('Toolbar'),
186
  );
187

    
188
  return $plugins;
189
}
190

    
191
/**
192
 * Default selectors.
193
 */
194
function _sweaver_default_sweaver_selector() {
195
  $selectors = array();
196

    
197
  $selector = new stdClass;
198
  $selector->api_version = 1;
199
  $selector->disabled = FALSE;
200
  $selector->name = 'body';
201
  $selector->description = t('Body');
202
  $selector->selector_selector = 'body';
203
  $selector->selector_highlight = FALSE;
204
  $selector->weight = 0;
205
  $selectors['body'] = $selector;
206
  
207
  $selector = new stdClass;
208
  $selector->api_version = 1;
209
  $selector->disabled = FALSE;
210
  $selector->name = 'menu';
211
  $selector->description = t('Menu');
212
  $selector->selector_selector = '.menu';
213
  $selector->selector_highlight = TRUE;
214
  $selector->weight = 50;
215
  $selectors['menu'] = $selector;
216
  
217
  $selector = new stdClass;
218
  $selector->api_version = 1;
219
  $selector->disabled = FALSE;
220
  $selector->name = 'navigation';
221
  $selector->description = t('Navigation');
222
  $selector->selector_selector = '.navigation';
223
  $selector->selector_highlight = TRUE;
224
  $selector->weight = 50;
225
  $selectors['navigation'] = $selector;
226
  
227
  $selector = new stdClass;
228
  $selector->api_version = 1;
229
  $selector->disabled = FALSE;
230
  $selector->name = 'read_more';
231
  $selector->description = t('Read more');
232
  $selector->selector_selector = '.node-readmore';
233
  $selector->selector_highlight = TRUE;
234
  $selector->weight = 51;
235
  $selectors['read_more'] = $selector;
236
  
237
  $selector = new stdClass;
238
  $selector->api_version = 1;
239
  $selector->disabled = FALSE;
240
  $selector->name = 'h1';
241
  $selector->description = t('Heading 1');
242
  $selector->selector_selector = 'h1';
243
  $selector->selector_highlight = FALSE;
244
  $selector->weight = 52;
245
  $selectors['h1'] = $selector;
246

    
247
  $selector = new stdClass;
248
  $selector->api_version = 1;
249
  $selector->disabled = FALSE;
250
  $selector->name = 'h2';
251
  $selector->description = t('Heading 2');
252
  $selector->selector_selector = 'h2';
253
  $selector->selector_highlight = FALSE;
254
  $selector->weight = 53;
255
  $selectors['h2'] = $selector;
256

    
257
  $selector = new stdClass;
258
  $selector->api_version = 1;
259
  $selector->disabled = FALSE;
260
  $selector->name = 'h3';
261
  $selector->description = t('Heading 3');
262
  $selector->selector_selector = 'h3';
263
  $selector->selector_highlight = FALSE;
264
  $selector->weight = 54;
265
  $selectors['h3'] = $selector;
266

    
267
  $selector = new stdClass;
268
  $selector->api_version = 1;
269
  $selector->disabled = FALSE;
270
  $selector->name = 'li';
271
  $selector->description = t('a list item');
272
  $selector->selector_selector = 'li';
273
  $selector->selector_highlight = FALSE;
274
  $selector->weight = 55;
275
  $selectors['li'] = $selector;
276
  
277
  $selector = new stdClass;
278
  $selector->api_version = 1;
279
  $selector->disabled = FALSE;
280
  $selector->name = 'link';
281
  $selector->description = t('a link');
282
  $selector->selector_selector = 'a';
283
  $selector->selector_highlight = FALSE;
284
  $selector->weight = 56;
285
  $selectors['link'] = $selector;
286
  
287
  $selector = new stdClass;
288
  $selector->api_version = 1;
289
  $selector->disabled = FALSE;
290
  $selector->name = 'ol';
291
  $selector->description = t('an ordered list');
292
  $selector->selector_selector = 'ol';
293
  $selector->selector_highlight = FALSE;
294
  $selector->weight = 57;
295
  $selectors['ol'] = $selector;
296

    
297
  $selector = new stdClass;
298
  $selector->api_version = 1;
299
  $selector->disabled = FALSE;
300
  $selector->name = 'p';
301
  $selector->description = t('a paragraph');
302
  $selector->selector_selector = 'p';
303
  $selector->selector_highlight = FALSE;
304
  $selector->weight = 58;
305
  $selectors['p'] = $selector;
306

    
307
  $selector = new stdClass;
308
  $selector->api_version = 1;
309
  $selector->disabled = FALSE;
310
  $selector->name = 'ul';
311
  $selector->description = t('an unordered list');
312
  $selector->selector_selector = 'ul';
313
  $selector->selector_highlight = FALSE;
314
  $selector->weight = 59;
315
  $selectors['ul'] = $selector;
316

    
317
  $selector = new stdClass;
318
  $selector->api_version = 1;
319
  $selector->disabled = FALSE;
320
  $selector->name = 'form';
321
  $selector->description = t('a form');
322
  $selector->selector_selector = 'form';
323
  $selector->selector_highlight = FALSE;
324
  $selector->weight = 60;
325
  $selectors['form'] = $selector;
326

    
327
  $selector = new stdClass;
328
  $selector->api_version = 1;
329
  $selector->disabled = FALSE;
330
  $selector->name = 'label';
331
  $selector->description = t('a label');
332
  $selector->selector_selector = 'label';
333
  $selector->selector_highlight = FALSE;
334
  $selector->weight = 61;
335
  $selectors['label'] = $selector;
336

    
337
  $selector = new stdClass;
338
  $selector->api_version = 1;
339
  $selector->disabled = FALSE;
340
  $selector->name = 'input';
341
  $selector->description = t('an input field');
342
  $selector->selector_selector = '.form-text';
343
  $selector->selector_highlight = FALSE;
344
  $selector->weight = 62;
345
  $selectors['input'] = $selector;
346

    
347
  $selector = new stdClass;
348
  $selector->api_version = 1;
349
  $selector->disabled = FALSE;
350
  $selector->name = 'textarea';
351
  $selector->description = t('a textarea');
352
  $selector->selector_selector = '.form-textarea';
353
  $selector->selector_highlight = FALSE;
354
  $selector->weight = 63;
355
  $selectors['textarea'] = $selector;
356

    
357
  $selector = new stdClass;
358
  $selector->api_version = 1;
359
  $selector->disabled = FALSE;
360
  $selector->name = 'submit';
361
  $selector->description = t('a submit button');
362
  $selector->selector_selector = '.form-submit';
363
  $selector->selector_highlight = FALSE;
364
  $selector->weight = 64;
365
  $selectors['submit'] = $selector;
366
  
367
  $selector = new stdClass;
368
  $selector->api_version = 1;
369
  $selector->disabled = FALSE;
370
  $selector->name = 'allids';
371
  $selector->description = t('All other id\'s');
372
  $selector->selector_selector = '';
373
  $selector->selector_highlight = FALSE;
374
  $selector->weight = 97;
375
  $selectors['allids'] = $selector;
376
  
377
  $selector = new stdClass;
378
  $selector->api_version = 1;
379
  $selector->disabled = FALSE;
380
  $selector->name = 'allclasses';
381
  $selector->description = t('All other classes');
382
  $selector->selector_selector = '';
383
  $selector->selector_highlight = FALSE;
384
  $selector->weight = 98;
385
  $selectors['allclasses'] = $selector;
386

    
387
  $selector = new stdClass;
388
  $selector->api_version = 1;
389
  $selector->disabled = FALSE;
390
  $selector->name = 'alltags';
391
  $selector->description = t('All other tags');
392
  $selector->selector_selector = '';
393
  $selector->selector_highlight = FALSE;
394
  $selector->weight = 99;
395
  $selectors['alltags'] = $selector;
396

    
397
  $selector = new stdClass;
398
  $selector->api_version = 1;
399
  $selector->disabled = FALSE;
400
  $selector->name = 'span';
401
  $selector->description = t('an item');
402
  $selector->selector_selector = 'span';
403
  $selector->selector_highlight = FALSE;
404
  $selector->weight = 100;
405
  $selectors['span'] = $selector;
406

    
407
  $selector = new stdClass;
408
  $selector->api_version = 1;
409
  $selector->disabled = FALSE;
410
  $selector->name = 'div';
411
  $selector->description = t('a region');
412
  $selector->selector_selector = 'div';
413
  $selector->selector_highlight = FALSE;
414
  $selector->weight = 100;
415
  $selectors['div'] = $selector;
416

    
417
  return $selectors + sweaver_load_theme_selectors();
418
}
419

    
420
/**
421
 * Default properties.
422
 */
423
function _sweaver_default_sweaver_property() {
424
  $propertys = array();
425

    
426
  // Font family.
427
  $property = new stdClass;
428
  $property->api_version = 1;
429
  $property->disabled = FALSE;
430
  $property->name = 'font-family';
431
  $property->description = t('Font family');
432
  $property->property = 'font-family';
433
  $property->property_parent = '';
434
  $property->property_type = 'select';
435
  $property->property_prefix = '';
436
  $property->property_suffix = '';
437
  $property->property_slider_min = '';
438
  $property->property_slider_max = '';
439
  $property->property_options = array(
440
    '' => 'Theme default',
441
    'Arial, Helvetica,Sans-Serif' => 'Arial',
442
    '\'Arial Black\',Sans-Serif' => 'Arial Black',
443
    '\'Comic Sans MS\',Cursive' => 'Comic Sans MS',
444
    '\'Courier New\',Courier,Monospace' => 'Courier',
445
    'Georgia,Serif' => 'Georgia',
446
    'Helvetica,Arial,Sans-Serif' => 'Helvetica',
447
    'Impact,Charcoal,Sans-Serif' => 'Impact',
448
    '\'Lucida Sans\',\'Lucida Grande\',Sans-Serif' => 'Lucida',
449
    '\'Palatino Linotype\',Palatino,Serif' => 'Palatino',
450
    'Tahoma,Geneva,Sans-Serif' => 'Tahoma',
451
    '\'Times New Roman\',Times,Serif' => 'Times New Roman',
452
    '\'Trebuchet\',Helvetica,Sans-Serif' => 'Trebuchet',
453
    'Verdana,Geneva,Sans-Serif' => 'Verdana',
454
  );
455
  $property->css_prefix = '<fieldset>';
456
  $property->css_suffix = '</fieldset>';
457
  $propertys['font-family'] = $property;  
458
  
459
  // Font size group
460
  $property = new stdClass;
461
  $property->api_version = 1;
462
  $property->disabled = FALSE;
463
  $property->name = 'font-properties-wrapper';
464
  $property->description = t('Font properties');
465
  $property->property = '';
466
  $property->property_parent = '';
467
  $property->property_type = 'parent';
468
  $property->property_prefix = '';
469
  $property->property_suffix = '';
470
  $property->property_slider_min = '';
471
  $property->property_slider_max = '';
472
  $property->property_options = array(
473
    '#attributes' => array(
474
      'id' => 'sweaver-font'
475
    ),
476
    '#rows' => array(
477
      array(
478
        array(
479
          'data' => '{font-size}',
480
        ),
481
        array(
482
          'data' => '{line-height}',
483
          'class' => 'close-container',
484
        ),
485
        array(
486
          'data' => '{color}',
487
          'class' => array('open-container', 'close-container'),
488
        ),
489
        array(
490
          'data' => '{font-style}',
491
          'class' => 'open-container',
492
        ),
493
        array(
494
          'data' => '{font-weight}',
495
          'class' => 'close-container',
496
        ),
497
        array(
498
          'data' => '{text-decoration}',
499
          'class' => array('open-container', 'close-container'),
500
        ),
501
        array(
502
          'data' => '{text-align}',
503
          'class' => 'open-container',
504
        ),
505
      ),
506
    )
507
  );
508
  $propertys['font-properties-wrapper'] = $property;
509
  
510
  // Font size
511
  $property = new stdClass;
512
  $property->api_version = 1;
513
  $property->disabled = FALSE;
514
  $property->name = 'font-size';
515
  $property->description = t('Size');
516
  $property->property = 'font-size';
517
  $property->property_parent = 'font-properties-wrapper';
518
  $property->property_type = 'slider';
519
  $property->property_prefix = '';
520
  $property->property_suffix = 'px';
521
  $property->property_slider_min = 1;
522
  $property->property_slider_max = 75;
523
  $property->css_prefix = '<div id="logo-font-size" class="editor_logos"></div>';
524
  $property->css_suffix = '';
525
  $property->property_options = array();
526
  $propertys['font-size'] = $property;
527
  
528
  // Line height
529
  $property = new stdClass;
530
  $property->api_version = 1;
531
  $property->disabled = FALSE;
532
  $property->name = 'line-height';
533
  $property->description = t('Line height');
534
  $property->property = 'line-height';
535
  $property->property_parent = 'font-properties-wrapper';
536
  $property->property_type = 'slider';
537
  $property->property_prefix = '';
538
  $property->property_suffix = 'px';
539
  $property->property_slider_min = 1;
540
  $property->property_slider_max = 100;
541
  $property->css_prefix = '<div id="logo-line-height" class="editor_logos"></div>';
542
  $property->css_suffix = '';
543
  $property->property_options = array();
544
  $propertys['line-height'] = $property;
545
  
546
  // Color.
547
  $property = new stdClass;
548
  $property->api_version = 1;
549
  $property->disabled = FALSE;
550
  $property->name = 'color';
551
  $property->description = t('Font color');
552
  $property->property = 'color';
553
  $property->property_parent = 'font-properties-wrapper';
554
  $property->property_type = 'color';
555
  $property->property_prefix = '#';
556
  $property->property_suffix = '';
557
  $property->property_slider_min = '';
558
  $property->property_slider_max = '';
559
  $property->property_options = array();
560
  $propertys['color'] = $property;
561
  
562
  // Font style.
563
  $property = new stdClass;
564
  $property->api_version = 1;
565
  $property->disabled = FALSE;
566
  $property->name = 'font-style';
567
  $property->description = t('Font style');
568
  $property->property = 'font-style';
569
  $property->property_parent = 'font-properties-wrapper';
570
  $property->property_type = 'checkbox';
571
  $property->property_prefix = '';
572
  $property->property_suffix = '';
573
  $property->property_slider_min = '';
574
  $property->property_slider_max = '';
575
  $property->property_options = array(
576
    'normal' => false, // Not checked
577
    'italic' => true,
578
  );
579
  $propertys['font-style'] = $property;
580

    
581
  // Font weight.
582
  $property = new stdClass;
583
  $property->api_version = 1;
584
  $property->disabled = FALSE;
585
  $property->name = 'font-weight';
586
  $property->description = t('Font weight');
587
  $property->property = 'font-weight';
588
  $property->property_parent = 'font-properties-wrapper';
589
  $property->property_type = 'checkbox';
590
  $property->property_prefix = '';
591
  $property->property_suffix = '';
592
  $property->property_slider_min = '';
593
  $property->property_slider_max = '';
594
  $property->property_options = array(
595
    'normal' => false,
596
    'bold' => true,
597
    '700' => true,
598
    '800' => true,
599
    '900' => true,
600
  );
601
  $propertys['font-weight'] = $property;
602
  
603
  // Text-decoration.
604
  $property = new stdClass;
605
  $property->api_version = 1;
606
  $property->disabled = FALSE;
607
  $property->name = 'text-decoration';
608
  $property->description = t('Text decoration');
609
  $property->property = 'text-decoration';
610
  $property->property_parent = 'font-properties-wrapper';
611
  $property->property_type = 'radio';
612
  $property->property_prefix = '';
613
  $property->property_suffix = '';
614
  $property->property_slider_min = '';
615
  $property->property_slider_max = '';
616
  $property->property_options = array(
617
    'none' => t('None'),
618
    'underline' => t('Underline'),
619
    'line-through' => t('Line through'),
620
  );
621
  $propertys['text-decoration'] = $property;
622

    
623
  // Text alignment.
624
  $property = new stdClass;
625
  $property->api_version = 1;
626
  $property->disabled = FALSE;
627
  $property->name = 'text-align';
628
  $property->description = t('Text alignment');
629
  $property->property = 'text-align';
630
  $property->property_parent = 'font-properties-wrapper';
631
  $property->property_type = 'radio';
632
  $property->property_prefix = '';
633
  $property->property_suffix = '';
634
  $property->property_slider_min = '';
635
  $property->property_slider_max = '';
636
  $property->property_options = array(
637
    'left' => t('Left'),
638
    'center' => t('Center'),
639
    'right' => t('Right'),
640
    'justify' => t('Justified'),
641
  );
642
  $propertys['text-align'] = $property;
643

    
644
  // Background.
645
  $property = new stdClass;
646
  $property->api_version = 1;
647
  $property->disabled = FALSE;
648
  $property->name = 'background-color';
649
  $property->description = t('Color');
650
  $property->property = 'background-color';
651
  $property->property_parent = '';
652
  $property->property_type = 'color';
653
  $property->property_prefix = '#';
654
  $property->property_suffix = '';
655
  $property->property_slider_min = '';
656
  $property->property_slider_max = '';
657
  $property->property_options = array();
658
  $propertys['background-color'] = $property;
659

    
660
  $property = new stdClass;
661
  $property->api_version = 1;
662
  $property->disabled = FALSE;
663
  $property->name = 'background-image';
664
  $property->description = t('Image');
665
  $property->property = 'background-image';
666
  $property->property_parent = '';
667
  $property->property_type = 'image';
668
  $property->property_prefix = 'url(';
669
  $property->property_suffix = ')';
670
  $property->property_slider_min = '';
671
  $property->property_slider_max = '';
672
  $property->property_options = array();
673
  $propertys['background-image'] = $property;
674

    
675
  $property = new stdClass;
676
  $property->api_version = 1;
677
  $property->disabled = FALSE;
678
  $property->name = 'background-repeat';
679
  $property->description = t('Repeat');
680
  $property->property = 'background-repeat';
681
  $property->property_parent = '';
682
  $property->property_type = 'radio';
683
  $property->property_prefix = '';
684
  $property->property_suffix = '';
685
  $property->property_slider_min = '';
686
  $property->property_slider_max = '';
687
  $property->property_options = array(
688
    'no-repeat' => 'None',
689
    'repeat-x' => 'Horizontally',
690
    'repeat-y' => 'Vertically',
691
    'repeat' => 'Both',
692
  );
693
  $propertys['background-repeat'] = $property;
694

    
695
  // Background position.
696
  $property = new stdClass;
697
  $property->api_version = 1;
698
  $property->disabled = FALSE;
699
  $property->name = 'background-position';
700
  $property->description = t('Position');
701
  $property->property = 'background-position';
702
  $property->property_parent = '';
703
  $property->property_type = 'select';
704
  $property->property_prefix = '';
705
  $property->property_suffix = '';
706
  $property->property_slider_min = '';
707
  $property->property_slider_max = '';
708
  $property->property_options = array(
709
    '0% 0%' => 'left top',
710
    '100% 0%' => 'right top',
711
    '0% 100%' => 'left bottom',
712
    '100% 100%' => 'right bottom',
713
    '50% 50%' => 'center center',
714
    '50% 100%' => 'center bottom',
715
    '50% 0%' => 'center top',
716
  );
717
  $propertys['background-position'] = $property;
718

    
719
  // Background-attachment
720
  $property = new stdClass;
721
  $property->api_version = 1;
722
  $property->disabled = FALSE;
723
  $property->name = 'background-attachment';
724
  $property->description = t('Attachment', array(), array('context' => 'sweaver'));
725
  $property->property = 'background-attachment';
726
  $property->property_parent = '';
727
  $property->property_type = 'radio';
728
  $property->property_prefix = '';
729
  $property->property_suffix = '';
730
  $property->property_slider_min = '';
731
  $property->property_slider_max = '';
732
  $property->property_options = array(
733
    'scroll' => 'Scroll',
734
    'fixed' => 'Fixed',
735
  );
736
  $propertys['background-attachment'] = $property;  
737

    
738
  // Padding.
739
  $property = new stdClass;
740
  $property->api_version = 1;
741
  $property->disabled = FALSE;
742
  $property->name = 'padding-top';
743
  $property->description = t('Top');
744
  $property->property = 'padding-top';
745
  $property->property_parent = 'position-settings';
746
  $property->property_type = 'slider';
747
  $property->property_prefix = '';
748
  $property->property_suffix = 'px';
749
  $property->property_slider_min = 0;
750
  $property->property_slider_max = 150;
751
  $property->property_options = array(
752
    'title_display' => 'invisible',
753
  );
754
  $propertys['padding-top'] = $property;
755

    
756
  $property = new stdClass;
757
  $property->api_version = 1;
758
  $property->disabled = FALSE;
759
  $property->name = 'padding-right';
760
  $property->description = t('Right');
761
  $property->property = 'padding-right';
762
  $property->property_parent = 'position-settings';
763
  $property->property_type = 'slider';
764
  $property->property_prefix = '';
765
  $property->property_suffix = 'px';
766
  $property->property_slider_min = 0;
767
  $property->property_slider_max = 150;
768
  $property->property_options = array(
769
    'title_display' => 'invisible',
770
  );
771
  $propertys['padding-right'] = $property;
772

    
773
  $property = new stdClass;
774
  $property->api_version = 1;
775
  $property->disabled = FALSE;
776
  $property->name = 'padding-bottom';
777
  $property->description = t('Bottom');
778
  $property->property = 'padding-bottom';
779
  $property->property_parent = 'position-settings';
780
  $property->property_type = 'slider';
781
  $property->property_prefix = '';
782
  $property->property_suffix = 'px';
783
  $property->property_slider_min = 0;
784
  $property->property_slider_max = 150;
785
  $property->property_options = array(
786
    'title_display' => 'invisible',
787
  );
788
  $propertys['padding-bottom'] = $property;
789

    
790
  $property = new stdClass;
791
  $property->api_version = 1;
792
  $property->disabled = FALSE;
793
  $property->name = 'padding-left';
794
  $property->description = t('Left');
795
  $property->property = 'padding-left';
796
  $property->property_parent = 'position-settings';
797
  $property->property_type = 'slider';
798
  $property->property_prefix = '';
799
  $property->property_suffix = 'px';
800
  $property->property_slider_min = 0;
801
  $property->property_slider_max = 150;
802
  $property->property_options = array(
803
    'title_display' => 'invisible',
804
  );
805
  $propertys['padding-left'] = $property;
806

    
807
  // Position Settings.
808
  $property = new stdClass;
809
  $property->api_version = 1;
810
  $property->disabled = FALSE;
811
  $property->name = 'position-settings';
812
  $property->description = t('Position settings');
813
  $property->property = '';
814
  $property->property_parent = '';
815
  $property->property_type = 'parent';
816
  $property->property_prefix = '';
817
  $property->property_suffix = '';
818
  $property->property_slider_min = '';
819
  $property->property_slider_max = '';
820
  $property->property_options = array(
821
    '#attributes' => array('id' => 'sweaver-style-margin'),
822
    '#rows' => array( // Margin & Border & Padding
823
        array(
824
            array(
825
                'data' => '<span>'.t('Margin').'</span>',
826
                'class' => array('corner', 'label'),
827
            ), 
828
            array(
829
                'data' => '{margin-top}',
830
                'class' => 'side',
831
            ),
832
            array(
833
                'class' => 'corner',
834
            ),
835
        ),
836
        array(
837
            array(
838
                'data' => '{margin-left}',
839
                'class' => 'side',
840
            ),
841
            array( // Border & Padding
842
                'data' => array(
843
                    '#theme' => 'table',
844
                    '#rows' => array(
845
                        array(
846
                            array(
847
                                'data' => '<span>'.t('Border').'</span>',
848
                                'class' => array('corner', 'label'),
849
                            ),
850
                            array(
851
                                'data' => '{border-top-width}',
852
                                'class' => 'side',
853
                            ),
854
                            array(
855
                                'class' => 'corner',
856
                            ),
857
                        ),
858
                        array(
859
                            array(
860
                                'data' => '{border-left-width}',
861
                                'class' => 'side',
862
                            ),
863
                            array( // Padding
864
                                'data' => array(
865
                                    '#theme' => 'table',
866
                                    '#rows' => array(
867
                                        array(
868
                                            array(
869
                                                'data' => '<span>'.t('Padding').'</span>',
870
                                                'class' => array('corner', 'label'),
871
                                            ),
872
                                            array(
873
                                                'data' => '{padding-top}',
874
                                                'class' => 'side',
875
                                            ),
876
                                            array(
877
                                                'class' => 'corner',
878
                                            ),
879
                                        ),
880
                                        array(
881
                                            array(
882
                                                'data' => '{padding-left}',
883
                                                'class' => 'side',
884
                                            ),
885
                                            array(
886
                                                'data' => t('Content'),
887
                                                'class' => 'table-center',    
888
                                            ),
889
                                            array(
890
                                                'data' => '{padding-right}',
891
                                                'class' => 'side',
892
                                            ),
893
                                        ),
894
                                        array(
895
                                            array(
896
                                                'class' => 'corner',
897
                                            ),
898
                                            array(
899
                                                'data' => '{padding-bottom}',
900
                                                'class' => 'side',
901
                                            ),
902
                                            array(
903
                                                'class' => 'corner',
904
                                            ),
905
                                        ),    
906
                                    ),
907
                                    '#attributes' => array('id' => 'sweaver-style-padding'),
908
                                )
909
                            ), 
910
                            array(
911
                                'data' => '{border-right-width}',
912
                                'class' => 'side',
913
                            ),
914
                        ),
915
                        array(
916
                            array(
917
                                'class' => 'corner',
918
                            ), 
919
                            array(
920
                                'data' => '{border-bottom-width}',
921
                                'class' => 'side',
922
                            ),
923
                            array(
924
                                'class' => 'corner',
925
                            ),
926
                        ),
927
                    ),
928
                    '#attributes' => array('id' => 'sweaver-style-border'),
929
                ), 
930
            ),
931
            array(
932
                'data' => '{margin-right}',
933
                'class' => 'side',
934
            ),
935
        ),
936
        array(
937
            array(
938
                'class' => 'corner',
939
            ), 
940
            array(
941
                'data' => '{margin-bottom}',
942
                'class' => 'side',
943
            ),
944
            array(
945
                'class' => 'corner',
946
            ),
947
        ),
948
    ),
949
  );
950
  $propertys['position-settings'] = $property;
951

    
952
  $property = new stdClass;
953
  $property->api_version = 1;
954
  $property->disabled = FALSE;
955
  $property->name = 'margin-top';
956
  $property->description = t('Top');
957
  $property->property = 'margin-top';
958
  $property->property_parent = 'position-settings';
959
  $property->property_type = 'slider';
960
  $property->property_prefix = '';
961
  $property->property_suffix = 'px';
962
  $property->property_slider_min = 0;
963
  $property->property_slider_max = 250;
964
  $property->property_options = array(
965
    'title_display' => 'invisible',
966
  );
967
  $propertys['margin-top'] = $property;
968

    
969
  $property = new stdClass;
970
  $property->api_version = 1;
971
  $property->disabled = FALSE;
972
  $property->name = 'margin-right';
973
  $property->description = t('Right');
974
  $property->property = 'margin-right';
975
  $property->property_parent = 'position-settings';
976
  $property->property_type = 'slider';
977
  $property->property_prefix = '';
978
  $property->property_suffix = 'px';
979
  $property->property_slider_min = 0;
980
  $property->property_slider_max = 250;
981
  $property->property_options = array(
982
    'title_display' => 'invisible',
983
  );
984
  $propertys['margin-right'] = $property;
985

    
986
  $property = new stdClass;
987
  $property->api_version = 1;
988
  $property->disabled = FALSE;
989
  $property->name = 'margin-bottom';
990
  $property->description = t('Bottom');
991
  $property->property = 'margin-bottom';
992
  $property->property_parent = 'position-settings';
993
  $property->property_type = 'slider';
994
  $property->property_prefix = '';
995
  $property->property_suffix = 'px';
996
  $property->property_slider_min = 0;
997
  $property->property_slider_max = 250;
998
  $property->property_options = array(
999
    'title_display' => 'invisible',
1000
  );
1001
  $propertys['margin-bottom'] = $property;
1002

    
1003
  $property = new stdClass;
1004
  $property->api_version = 1;
1005
  $property->disabled = FALSE;
1006
  $property->name = 'margin-left';
1007
  $property->description = t('Left');
1008
  $property->property = 'margin-left';
1009
  $property->property_parent = 'position-settings';
1010
  $property->property_type = 'slider';
1011
  $property->property_prefix = '';
1012
  $property->property_suffix = 'px';
1013
  $property->property_slider_min = 0;
1014
  $property->property_slider_max = 250;
1015
  $property->property_options = array(
1016
    'title_display' => 'invisible',
1017
  );
1018
  $propertys['margin-left'] = $property;
1019

    
1020
  // Border.
1021
  $property = new stdClass;
1022
  $property->api_version = 1;
1023
  $property->disabled = FALSE;
1024
  $property->name = 'border-top-width';
1025
  $property->description = t('Top');
1026
  $property->property = 'border-top-width';
1027
  $property->property_parent = 'position-settings';
1028
  $property->property_type = 'slider';
1029
  $property->property_prefix = '';
1030
  $property->property_suffix = 'px';
1031
  $property->property_slider_min = 0;
1032
  $property->property_slider_max = 20;
1033
  $property->property_options = array(
1034
    'title_display' => 'invisible',
1035
  );
1036
  $propertys['border-top-width'] = $property;
1037

    
1038
  $property = new stdClass;
1039
  $property->api_version = 1;
1040
  $property->disabled = FALSE;
1041
  $property->name = 'border-right-width';
1042
  $property->description = t('Right');
1043
  $property->property = 'border-right-width';
1044
  $property->property_parent = 'position-settings';
1045
  $property->property_type = 'slider';
1046
  $property->property_prefix = '';
1047
  $property->property_suffix = 'px';
1048
  $property->property_slider_min = 0;
1049
  $property->property_slider_max = 20;
1050
  $property->property_options = array(
1051
    'title_display' => 'invisible',
1052
  );
1053
  $propertys['border-right-width'] = $property;
1054

    
1055
  $property = new stdClass;
1056
  $property->api_version = 1;
1057
  $property->disabled = FALSE;
1058
  $property->name = 'border-bottom-width';
1059
  $property->description = t('Bottom');
1060
  $property->property = 'border-bottom-width';
1061
  $property->property_parent = 'position-settings';
1062
  $property->property_type = 'slider';
1063
  $property->property_prefix = '';
1064
  $property->property_suffix = 'px';
1065
  $property->property_slider_min = 0;
1066
  $property->property_slider_max = 20;
1067
  $property->property_options = array(
1068
    'title_display' => 'invisible',
1069
  );
1070
  $propertys['border-bottom-width'] = $property;
1071

    
1072
  $property = new stdClass;
1073
  $property->api_version = 1;
1074
  $property->disabled = FALSE;
1075
  $property->name = 'border-left-width';
1076
  $property->description = t('Left');
1077
  $property->property = 'border-left-width';
1078
  $property->property_parent = 'position-settings';
1079
  $property->property_type = 'slider';
1080
  $property->property_prefix = '';
1081
  $property->property_suffix = 'px';
1082
  $property->property_slider_min = 0;
1083
  $property->property_slider_max = 20;
1084
  $property->property_options = array(
1085
    'title_display' => 'invisible',
1086
  );
1087
  $propertys['border-left-width'] = $property;
1088

    
1089
  // Border color
1090
  $property = new stdClass;
1091
  $property->api_version = 1;
1092
  $property->disabled = FALSE;
1093
  $property->name = 'border-color';
1094
  $property->description = t('Border color');
1095
  $property->property = 'border-top-color border-right-color border-bottom-color border-left-color';
1096
  $property->property_parent = '';
1097
  $property->property_type = 'color';
1098
  $property->property_prefix = '#';
1099
  $property->property_suffix = '';
1100
  $property->property_slider_min = '';
1101
  $property->property_slider_max = '';
1102
  $property->property_options = array();
1103
  $propertys['border-color'] = $property;
1104

    
1105
  // Border style
1106
  $property = new stdClass;
1107
  $property->api_version = 1;
1108
  $property->disabled = FALSE;
1109
  $property->name = 'border-style';
1110
  $property->description = t('Border style');
1111
  $property->property = 'border-top-style border-right-style border-bottom-style border-left-style';
1112
  $property->property_parent = '';
1113
  $property->property_type = 'select';
1114
  $property->property_prefix = '';
1115
  $property->property_suffix = '';
1116
  $property->property_slider_min = '';
1117
  $property->property_slider_max = '';
1118
  $property->property_options = array(
1119
        'none' => t('None'),
1120
        'dashed' => t('Dashed'),
1121
        'dotted' => t('Dotted'),
1122
        'solid' => t('Solid'),
1123
        'double' => t('Double'),
1124
        'groove' => t('Groove'),
1125
        'inset' => t('Inset'),
1126
        'outset' => t('Outset'),
1127
        'ridge' => t('Ridge'),
1128
  );
1129
  $propertys['border-style'] = $property;
1130

    
1131
  // Table extras.
1132
  $property = new stdClass;
1133
  $property->api_version = 1;
1134
  $property->disabled = FALSE;
1135
  $property->name = 'border-collapse';
1136
  $property->description = t('Border collapse');
1137
  $property->property = 'border-collapse';
1138
  $property->property_parent = '';
1139
  $property->property_type = 'select';
1140
  $property->property_prefix = '';
1141
  $property->property_suffix = '';
1142
  $property->property_slider_min = '';
1143
  $property->property_slider_max = '';
1144
  $property->property_options = array(
1145
        'collapse' => 'Collapse',
1146
        'separate' => 'Separate',
1147
  );
1148
  $propertys['border-collapse'] = $property;
1149

    
1150
  $property = new stdClass;
1151
  $property->api_version = 1;
1152
  $property->disabled = FALSE;
1153
  $property->name = 'border-spacing';
1154
  $property->description = t('Border spacing');
1155
  $property->property = 'border-spacing';
1156
  $property->property_parent = '';
1157
  $property->property_type = 'slider';
1158
  $property->property_prefix = '';
1159
  $property->property_suffix = 'px';
1160
  $property->property_slider_min = 0;
1161
  $property->property_slider_max = 20;
1162
  $property->property_options = array();
1163
  $propertys['border-spacing'] = $property;
1164

    
1165
  $property = new stdClass;
1166
  $property->api_version = 1;
1167
  $property->disabled = FALSE;
1168
  $property->name = 'vertical-align';
1169
  $property->description = t('Vertical align');
1170
  $property->property = 'vertical-align';
1171
  $property->property_parent = '';
1172
  $property->property_type = 'select';
1173
  $property->property_prefix = '';
1174
  $property->property_suffix = '';
1175
  $property->property_slider_min = '';
1176
  $property->property_slider_max = '';
1177
  $property->property_options = array(
1178
        'top' => 'Top',
1179
        'bottom' => 'Bottom',
1180
        'middle' => 'Middle',
1181
  );
1182
  $propertys['vertical-align'] = $property;
1183

    
1184

    
1185
  // Width.
1186
  $property = new stdClass;
1187
  $property->api_version = 1;
1188
  $property->disabled = FALSE;
1189
  $property->name = 'width';
1190
  $property->description = t('Width');
1191
  $property->property = 'width';
1192
  $property->property_parent = '';
1193
  $property->property_type = 'slider';
1194
  $property->property_prefix = '';
1195
  $property->property_suffix = 'px';
1196
  $property->property_slider_min = 0;
1197
  $property->property_slider_max = 2000;
1198
  $property->property_options = array();
1199
  $propertys['width'] = $property;
1200

    
1201
  // Height
1202
  $property = new stdClass;
1203
  $property->api_version = 1;
1204
  $property->disabled = FALSE;
1205
  $property->name = 'height';
1206
  $property->description = t('Height');
1207
  $property->property = 'height';
1208
  $property->property_parent = '';
1209
  $property->property_type = 'slider';
1210
  $property->property_prefix = '';
1211
  $property->property_suffix = 'px';
1212
  $property->property_slider_min = 0;
1213
  $property->property_slider_max = 2000;
1214
  $property->property_options = array();
1215
  $propertys['height'] = $property;
1216

    
1217
  return $propertys;
1218
}
1219

    
1220
/**
1221
 * sweaver types.
1222
 */
1223
function _sweaver_default_sweaver_type() {
1224
  $types = array();
1225

    
1226
  $type = new stdClass;
1227
  $type->api_version = 1;
1228
  $type->disabled = FALSE;
1229
  $type->name = 'block';
1230
  $type->description = 'Block';
1231
  $type->type_options = array(
1232
    'font-family' => 'font-family',
1233
    'font-style' => 'font-style',
1234
    'font-weight' => 'font-weight',
1235
    'font-size' => 'font-size',
1236
    'line-height' => 'line-height',
1237
    'text-align' => 'text-align',
1238
    'color' => 'color',
1239
    'text-decoration' => 'text-decoration',
1240
    'background-color' => 'background-color',
1241
    'background-image' => 'background-image',
1242
    'background-repeat' => 'background-repeat',
1243
    'background-position' => 'background-position',
1244
    'background-attachment' => 'background-attachment',
1245
    'padding-top' => 'padding-top',
1246
    'padding-right' => 'padding-right',
1247
    'padding-bottom' => 'padding-bottom',
1248
    'padding-left' => 'padding-left',
1249
    'margin-top' => 'margin-top',
1250
    'margin-right' => 'margin-right',
1251
    'margin-bottom' => 'margin-bottom',
1252
    'margin-left' => 'margin-left',
1253
    'border-top-width' => 'border-top-width',
1254
    'border-right-width' => 'border-right-width',
1255
    'border-bottom-width' => 'border-bottom-width',
1256
    'border-left-width' => 'border-left-width',
1257
    'border-style' => 'border-style',
1258
    'border-color' => 'border-color',
1259
    'width' => 'width',
1260
    'height' => 'height',
1261
  );
1262
  $types['block'] = $type;
1263

    
1264
  $type = new stdClass;
1265
  $type->api_version = 1;
1266
  $type->disabled = FALSE;
1267
  $type->name = 'inline';
1268
  $type->description = 'Inline';
1269
  $type->type_options = array(
1270
    'font-family' => 'font-family',
1271
    'font-style' => 'font-style',
1272
    'font-weight' => 'font-weight',
1273
    'font-size' => 'font-size',
1274
    'line-height' => 'line-height',
1275
    'color' => 'color',
1276
    'text-decoration' => 'text-decoration',
1277
    'background-color' => 'background-color',
1278
    'background-image' => 'background-image',
1279
    'background-repeat' => 'background-repeat',
1280
    'background-position' => 'background-position',
1281
    'background-attachment' => 'background-attachment',
1282
    'padding-top' => 'padding-top',
1283
    'padding-right' => 'padding-right',
1284
    'padding-bottom' => 'padding-bottom',
1285
    'padding-left' => 'padding-left',
1286
    'margin-top' => 'margin-top',
1287
    'margin-right' => 'margin-right',
1288
    'margin-bottom' => 'margin-bottom',
1289
    'margin-left' => 'margin-left',
1290
    'border-top-width' => 'border-top-width',
1291
    'border-right-width' => 'border-right-width',
1292
    'border-bottom-width' => 'border-bottom-width',
1293
    'border-left-width' => 'border-left-width',
1294
    'border-style' => 'border-style',
1295
    'border-color' => 'border-color',
1296
  );
1297
  $types['inline'] = $type;
1298

    
1299
  $type = new stdClass;
1300
  $type->api_version = 1;
1301
  $type->disabled = FALSE;
1302
  $type->name = 'inline-block';
1303
  $type->description = 'Inline block';
1304
  $type->type_options = array(
1305
    'font-family' => 'font-family',
1306
    'font-style' => 'font-style',
1307
    'font-weight' => 'font-weight',
1308
    'font-size' => 'font-size',
1309
    'line-height' => 'line-height',
1310
    'text-align' => 'text-align',
1311
    'color' => 'color',
1312
    'text-decoration' => 'text-decoration',
1313
    'background-color' => 'background-color',
1314
    'background-image' => 'background-image',
1315
    'background-repeat' => 'background-repeat',
1316
    'background-position' => 'background-position',
1317
    'background-attachment' => 'background-attachment',
1318
    'padding-top' => 'padding-top',
1319
    'padding-right' => 'padding-right',
1320
    'padding-bottom' => 'padding-bottom',
1321
    'padding-left' => 'padding-left',
1322
    'margin-top' => 'margin-top',
1323
    'margin-right' => 'margin-right',
1324
    'margin-bottom' => 'margin-bottom',
1325
    'margin-left' => 'margin-left',
1326
    'border-top-width' => 'border-top-width',
1327
    'border-right-width' => 'border-right-width',
1328
    'border-bottom-width' => 'border-bottom-width',
1329
    'border-left-width' => 'border-left-width',
1330
    'border-style' => 'border-style',
1331
    'border-color' => 'border-color',
1332
    'width' => 'width',
1333
    'height' => 'height',
1334
  );
1335
  $types['inline-block'] = $type;
1336

    
1337
  $type = new stdClass;
1338
  $type->api_version = 1;
1339
  $type->disabled = FALSE;
1340
  $type->name = 'inline-table';
1341
  $type->description = 'Inline table';
1342
  $type->type_options = array(
1343
    'font-family' => 'font-family',
1344
    'font-style' => 'font-style',
1345
    'font-weight' => 'font-weight',
1346
    'font-size' => 'font-size',
1347
    'line-height' => 'line-height',
1348
    'text-align' => 'text-align',
1349
    'color' => 'color',
1350
    'text-decoration' => 'text-decoration',
1351
    'background-color' => 'background-color',
1352
    'background-image' => 'background-image',
1353
    'background-repeat' => 'background-repeat',
1354
    'background-position' => 'background-position',
1355
    'background-attachment' => 'background-attachment',
1356
    'margin-top' => 'margin-top',
1357
    'margin-right' => 'margin-right',
1358
    'margin-bottom' => 'margin-bottom',
1359
    'margin-left' => 'margin-left',
1360
    'border-top-width' => 'border-top-width',
1361
    'border-right-width' => 'border-right-width',
1362
    'border-bottom-width' => 'border-bottom-width',
1363
    'border-left-width' => 'border-left-width',
1364
    'border-style' => 'border-style',
1365
    'border-color' => 'border-color',
1366
    'width' => 'width',
1367
    'height' => 'height',
1368
  );
1369
  $types['inline-table'] = $type;
1370

    
1371
  $type = new stdClass;
1372
  $type->api_version = 1;
1373
  $type->disabled = FALSE;
1374
  $type->name = 'list-item';
1375
  $type->description = 'List item';
1376
  $type->type_options = array(
1377
    'font-family' => 'font-family',
1378
    'font-style' => 'font-style',
1379
    'font-weight' => 'font-weight',
1380
    'font-size' => 'font-size',
1381
    'line-height' => 'line-height',
1382
    'text-align' => 'text-align',
1383
    'color' => 'color',
1384
    'text-decoration' => 'text-decoration',
1385
    'background-color' => 'background-color',
1386
    'background-image' => 'background-image',
1387
    'background-repeat' => 'background-repeat',
1388
    'background-position' => 'background-position',
1389
    'background-attachment' => 'background-attachment',
1390
    'padding-top' => 'padding-top',
1391
    'padding-right' => 'padding-right',
1392
    'padding-bottom' => 'padding-bottom',
1393
    'padding-left' => 'padding-left',
1394
    'margin-top' => 'margin-top',
1395
    'margin-right' => 'margin-right',
1396
    'margin-bottom' => 'margin-bottom',
1397
    'margin-left' => 'margin-left',
1398
    'border-top-width' => 'border-top-width',
1399
    'border-right-width' => 'border-right-width',
1400
    'border-bottom-width' => 'border-bottom-width',
1401
    'border-left-width' => 'border-left-width',
1402
    'border-style' => 'border-style',
1403
    'border-color' => 'border-color',
1404
    'width' => 'width',
1405
    'height' => 'height',
1406
  );
1407
  $types['list-item'] = $type;
1408

    
1409
  $type = new stdClass;
1410
  $type->api_version = 1;
1411
  $type->disabled = FALSE;
1412
  $type->name = 'run-in';
1413
  $type->description = 'Run in';
1414
  $type->type_options = array(
1415
    'font-family' => 'font-family',
1416
    'font-style' => 'font-style',
1417
    'font-weight' => 'font-weight',
1418
    'font-size' => 'font-size',
1419
    'line-height' => 'line-height',
1420
    'text-align' => 'text-align',
1421
    'color' => 'color',
1422
    'text-decoration' => 'text-decoration',
1423
    'background-color' => 'background-color',
1424
    'background-image' => 'background-image',
1425
    'background-repeat' => 'background-repeat',
1426
    'background-position' => 'background-position',
1427
    'background-attachment' => 'background-attachment',
1428
    'padding-top' => 'padding-top',
1429
    'padding-right' => 'padding-right',
1430
    'padding-bottom' => 'padding-bottom',
1431
    'padding-left' => 'padding-left',
1432
    'margin-top' => 'margin-top',
1433
    'margin-right' => 'margin-right',
1434
    'margin-bottom' => 'margin-bottom',
1435
    'margin-left' => 'margin-left',
1436
    'border-top-width' => 'border-top-width',
1437
    'border-right-width' => 'border-right-width',
1438
    'border-bottom-width' => 'border-bottom-width',
1439
    'border-left-width' => 'border-left-width',
1440
    'border-style' => 'border-style',
1441
    'border-color' => 'border-color',
1442
    'width' => 'width',
1443
    'height' => 'height',
1444
  );
1445
  $types['run-in'] = $type;
1446

    
1447
  $type = new stdClass;
1448
  $type->api_version = 1;
1449
  $type->disabled = FALSE;
1450
  $type->name = 'table';
1451
  $type->description = 'Table';
1452
  $type->type_options = array(
1453
    'font-family' => 'font-family',
1454
    'font-style' => 'font-style',
1455
    'font-weight' => 'font-weight',
1456
    'font-size' => 'font-size',
1457
    'line-height' => 'line-height',
1458
    'text-align' => 'text-align',
1459
    'color' => 'color',
1460
    'text-decoration' => 'text-decoration',
1461
    'background-color' => 'background-color',
1462
    'background-image' => 'background-image',
1463
    'background-repeat' => 'background-repeat',
1464
    'background-position' => 'background-position',
1465
    'background-attachment' => 'background-attachment',
1466
    'margin-top' => 'margin-top',
1467
    'margin-right' => 'margin-right',
1468
    'margin-bottom' => 'margin-bottom',
1469
    'margin-left' => 'margin-left',
1470
    'border-top-width' => 'border-top-width',
1471
    'border-right-width' => 'border-right-width',
1472
    'border-bottom-width' => 'border-bottom-width',
1473
    'border-left-width' => 'border-left-width',
1474
    'border-style' => 'border-style',
1475
    'border-color' => 'border-color',
1476
    'border-collapse' => 'border-collapse',
1477
    'border-spacing' => 'border-spacing',
1478
    'width' => 'width',
1479
    'height' => 'height',
1480
  );
1481
  $types['table'] = $type;
1482

    
1483
  $type = new stdClass;
1484
  $type->api_version = 1;
1485
  $type->disabled = FALSE;
1486
  $type->name = 'table-caption';
1487
  $type->description = 'Table caption';
1488
  $type->type_options = array(
1489
    'font-family' => 'font-family',
1490
    'font-style' => 'font-style',
1491
    'font-weight' => 'font-weight',
1492
    'font-size' => 'font-size',
1493
    'line-height' => 'line-height',
1494
    'text-align' => 'text-align',
1495
    'color' => 'color',
1496
    'text-decoration' => 'text-decoration',
1497
    'background-color' => 'background-color',
1498
    'background-image' => 'background-image',
1499
    'background-repeat' => 'background-repeat',
1500
    'background-position' => 'background-position',
1501
    'background-attachment' => 'background-attachment',
1502
    'padding-top' => 'padding-top',
1503
    'padding-right' => 'padding-right',
1504
    'padding-bottom' => 'padding-bottom',
1505
    'padding-left' => 'padding-left',
1506
    'margin-top' => 'margin-top',
1507
    'margin-right' => 'margin-right',
1508
    'margin-bottom' => 'margin-bottom',
1509
    'margin-left' => 'margin-left',
1510
    'border-top-width' => 'border-top-width',
1511
    'border-right-width' => 'border-right-width',
1512
    'border-bottom-width' => 'border-bottom-width',
1513
    'border-left-width' => 'border-left-width',
1514
    'border-style' => 'border-style',
1515
    'border-color' => 'border-color',
1516
    'width' => 'width',
1517
    'height' => 'height',
1518
  );
1519
  $types['table-caption'] = $type;
1520

    
1521
  $type = new stdClass;
1522
  $type->api_version = 1;
1523
  $type->disabled = FALSE;
1524
  $type->name = 'table-cell';
1525
  $type->description = 'Table cell';
1526
  $type->type_options = array(
1527
    'font-family' => 'font-family',
1528
    'font-style' => 'font-style',
1529
    'font-weight' => 'font-weight',
1530
    'font-size' => 'font-size',
1531
    'line-height' => 'line-height',
1532
    'text-align' => 'text-align',
1533
    'vertical-align' => 'vertical-align',
1534
    'color' => 'color',
1535
    'text-decoration' => 'text-decoration',
1536
    'background-color' => 'background-color',
1537
    'background-image' => 'background-image',
1538
    'background-repeat' => 'background-repeat',
1539
    'background-position' => 'background-position',
1540
    'background-attachment' => 'background-attachment',
1541
    'padding-top' => 'padding-top',
1542
    'padding-right' => 'padding-right',
1543
    'padding-bottom' => 'padding-bottom',
1544
    'padding-left' => 'padding-left',
1545
    'height' => 'height',
1546
  );
1547
  $types['table-cell'] = $type;
1548

    
1549
  $type = new stdClass;
1550
  $type->api_version = 1;
1551
  $type->disabled = FALSE;
1552
  $type->name = 'table-header-group';
1553
  $type->description = 'Table header';
1554
  $type->type_options = array(
1555
    'font-family' => 'font-family',
1556
    'font-style' => 'font-style',
1557
    'font-weight' => 'font-weight',
1558
    'font-size' => 'font-size',
1559
    'line-height' => 'line-height',
1560
    'text-align' => 'text-align',
1561
    'vertical-align' => 'vertical-align',
1562
    'color' => 'color',
1563
    'text-decoration' => 'text-decoration',
1564
    'background-color' => 'background-color',
1565
    'background-image' => 'background-image',
1566
    'background-repeat' => 'background-repeat',
1567
    'background-position' => 'background-position',
1568
    'background-attachment' => 'background-attachment',
1569
    'padding-top' => 'padding-top',
1570
    'padding-right' => 'padding-right',
1571
    'padding-bottom' => 'padding-bottom',
1572
    'padding-left' => 'padding-left',
1573
    'height' => 'height',
1574
  );
1575
  $types['table-header-group'] = $type;
1576

    
1577
  $type = new stdClass;
1578
  $type->api_version = 1;
1579
  $type->disabled = FALSE;
1580
  $type->name = 'table-footer-group';
1581
  $type->description = 'Table footer';
1582
  $type->type_options = array(
1583
    'font-family' => 'font-family',
1584
    'font-style' => 'font-style',
1585
    'font-weight' => 'font-weight',
1586
    'font-size' => 'font-size',
1587
    'line-height' => 'line-height',
1588
    'text-align' => 'text-align',
1589
    'vertical-align' => 'vertical-align',
1590
    'color' => 'color',
1591
    'text-decoration' => 'text-decoration',
1592
    'background-color' => 'background-color',
1593
    'background-image' => 'background-image',
1594
    'background-repeat' => 'background-repeat',
1595
    'background-position' => 'background-position',
1596
    'background-attachment' => 'background-attachment',
1597
    'padding-top' => 'padding-top',
1598
    'padding-right' => 'padding-right',
1599
    'padding-bottom' => 'padding-bottom',
1600
    'padding-left' => 'padding-left',
1601
    'height' => 'height',
1602
  );
1603
  $types['table-footer-group'] = $type;
1604

    
1605
  $type = new stdClass;
1606
  $type->api_version = 1;
1607
  $type->disabled = FALSE;
1608
  $type->name = 'table-row';
1609
  $type->description = 'Table row';
1610
  $type->type_options = array(
1611
    'font-family' => 'font-family',
1612
    'font-style' => 'font-style',
1613
    'font-weight' => 'font-weight',
1614
    'font-size' => 'font-size',
1615
    'line-height' => 'line-height',
1616
    'text-align' => 'text-align',
1617
    'vertical-align' => 'vertical-align',
1618
    'color' => 'color',
1619
    'text-decoration' => 'text-decoration',
1620
    'background-color' => 'background-color',
1621
    'background-image' => 'background-image',
1622
    'background-repeat' => 'background-repeat',
1623
    'background-position' => 'background-position',
1624
    'background-attachment' => 'background-attachment',
1625
  );
1626
  $types['table-row'] = $type;
1627

    
1628
  return $types;
1629
}