cable 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. data/app/controllers/cable/admin_controller.rb +8 -0
  2. data/app/helpers/admin_helper.rb +7 -0
  3. data/app/models/cable/global_setting.rb +3 -0
  4. data/app/views/cable/admin/index.html.erb +2 -0
  5. data/app/views/cable/layouts/_messages.html.erb +12 -0
  6. data/app/views/cable/layouts/admin.html.erb +49 -0
  7. data/config/routes.rb +4 -0
  8. data/lib/cable.rb +3 -0
  9. data/lib/cable/engine.rb +10 -0
  10. data/lib/generators/cable/controllers_generator.rb +21 -0
  11. data/lib/generators/cable/install_generator.rb +35 -0
  12. data/lib/generators/cable/templates/admin_navigation.rb +5 -0
  13. data/lib/generators/cable/templates/javascripts/admin.js +24 -0
  14. data/lib/generators/cable/templates/javascripts/wymeditor/GPL-license.txt +278 -0
  15. data/lib/generators/cable/templates/javascripts/wymeditor/MIT-license.txt +20 -0
  16. data/lib/generators/cable/templates/javascripts/wymeditor/README +33 -0
  17. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-blockquote.png +0 -0
  18. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-h1.png +0 -0
  19. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-h2.png +0 -0
  20. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-h3.png +0 -0
  21. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-h4.png +0 -0
  22. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-h5.png +0 -0
  23. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-h6.png +0 -0
  24. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-p.png +0 -0
  25. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/lbl-pre.png +0 -0
  26. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/wymiframe.css +93 -0
  27. data/lib/generators/cable/templates/javascripts/wymeditor/iframe/default/wymiframe.html +26 -0
  28. data/lib/generators/cable/templates/javascripts/wymeditor/jquery.wymeditor.js +4724 -0
  29. data/lib/generators/cable/templates/javascripts/wymeditor/jquery.wymeditor.min.js +1 -0
  30. data/lib/generators/cable/templates/javascripts/wymeditor/jquery.wymeditor.pack.js +1 -0
  31. data/lib/generators/cable/templates/javascripts/wymeditor/lang/bg.js +45 -0
  32. data/lib/generators/cable/templates/javascripts/wymeditor/lang/ca.js +45 -0
  33. data/lib/generators/cable/templates/javascripts/wymeditor/lang/cs.js +45 -0
  34. data/lib/generators/cable/templates/javascripts/wymeditor/lang/cy.js +45 -0
  35. data/lib/generators/cable/templates/javascripts/wymeditor/lang/de.js +45 -0
  36. data/lib/generators/cable/templates/javascripts/wymeditor/lang/en.js +46 -0
  37. data/lib/generators/cable/templates/javascripts/wymeditor/lang/es.js +45 -0
  38. data/lib/generators/cable/templates/javascripts/wymeditor/lang/fa.js +46 -0
  39. data/lib/generators/cable/templates/javascripts/wymeditor/lang/fi.js +44 -0
  40. data/lib/generators/cable/templates/javascripts/wymeditor/lang/fr.js +45 -0
  41. data/lib/generators/cable/templates/javascripts/wymeditor/lang/gl.js +45 -0
  42. data/lib/generators/cable/templates/javascripts/wymeditor/lang/he.js +45 -0
  43. data/lib/generators/cable/templates/javascripts/wymeditor/lang/hr.js +45 -0
  44. data/lib/generators/cable/templates/javascripts/wymeditor/lang/hu.js +45 -0
  45. data/lib/generators/cable/templates/javascripts/wymeditor/lang/it.js +45 -0
  46. data/lib/generators/cable/templates/javascripts/wymeditor/lang/ja.js +44 -0
  47. data/lib/generators/cable/templates/javascripts/wymeditor/lang/nb.js +45 -0
  48. data/lib/generators/cable/templates/javascripts/wymeditor/lang/nl.js +45 -0
  49. data/lib/generators/cable/templates/javascripts/wymeditor/lang/nn.js +45 -0
  50. data/lib/generators/cable/templates/javascripts/wymeditor/lang/pl.js +45 -0
  51. data/lib/generators/cable/templates/javascripts/wymeditor/lang/pt-br.js +45 -0
  52. data/lib/generators/cable/templates/javascripts/wymeditor/lang/pt.js +45 -0
  53. data/lib/generators/cable/templates/javascripts/wymeditor/lang/ru.js +45 -0
  54. data/lib/generators/cable/templates/javascripts/wymeditor/lang/sv.js +46 -0
  55. data/lib/generators/cable/templates/javascripts/wymeditor/lang/tr.js +45 -0
  56. data/lib/generators/cable/templates/javascripts/wymeditor/lang/zh_cn.js +47 -0
  57. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/embed/jquery.wymeditor.embed.js +52 -0
  58. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
  59. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +127 -0
  60. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +57 -0
  61. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/mediabrowser/browser.png +0 -0
  62. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/mediabrowser/jquery.wymeditor.mediabrowser.js +115 -0
  63. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
  64. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/resizable/readme.txt +124 -0
  65. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/tidy/README +19 -0
  66. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +82 -0
  67. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/tidy/tidy.php +36 -0
  68. data/lib/generators/cable/templates/javascripts/wymeditor/plugins/tidy/wand.png +0 -0
  69. data/lib/generators/cable/templates/javascripts/wymeditor/skins/compact/icons.png +0 -0
  70. data/lib/generators/cable/templates/javascripts/wymeditor/skins/compact/skin.css +134 -0
  71. data/lib/generators/cable/templates/javascripts/wymeditor/skins/compact/skin.js +35 -0
  72. data/lib/generators/cable/templates/javascripts/wymeditor/skins/default/icons.png +0 -0
  73. data/lib/generators/cable/templates/javascripts/wymeditor/skins/default/skin.css +158 -0
  74. data/lib/generators/cable/templates/javascripts/wymeditor/skins/default/skin.js +40 -0
  75. data/lib/generators/cable/templates/javascripts/wymeditor/skins/minimal/images/bg.header.gif +0 -0
  76. data/lib/generators/cable/templates/javascripts/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
  77. data/lib/generators/cable/templates/javascripts/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
  78. data/lib/generators/cable/templates/javascripts/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
  79. data/lib/generators/cable/templates/javascripts/wymeditor/skins/minimal/skin.css +131 -0
  80. data/lib/generators/cable/templates/javascripts/wymeditor/skins/minimal/skin.js +30 -0
  81. data/lib/generators/cable/templates/javascripts/wymeditor/skins/silver/COPYING +674 -0
  82. data/lib/generators/cable/templates/javascripts/wymeditor/skins/silver/README +27 -0
  83. data/lib/generators/cable/templates/javascripts/wymeditor/skins/silver/images/bg.header.gif +0 -0
  84. data/lib/generators/cable/templates/javascripts/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
  85. data/lib/generators/cable/templates/javascripts/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
  86. data/lib/generators/cable/templates/javascripts/wymeditor/skins/silver/images/icons.silver.gif +0 -0
  87. data/lib/generators/cable/templates/javascripts/wymeditor/skins/silver/skin.css +297 -0
  88. data/lib/generators/cable/templates/javascripts/wymeditor/skins/silver/skin.js +61 -0
  89. data/lib/generators/cable/templates/javascripts/wymeditor/skins/twopanels/icons.png +0 -0
  90. data/lib/generators/cable/templates/javascripts/wymeditor/skins/twopanels/skin.css +134 -0
  91. data/lib/generators/cable/templates/javascripts/wymeditor/skins/twopanels/skin.js +39 -0
  92. data/lib/generators/cable/templates/javascripts/wymeditor/skins/wymeditor_icon.png +0 -0
  93. data/lib/generators/cable/templates/stylesheets/admin.css +417 -0
  94. data/lib/generators/cable/templates/stylesheets/admin/blueprint/ie.css +36 -0
  95. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/buttons/icons/cross.png +0 -0
  96. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/buttons/icons/key.png +0 -0
  97. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/buttons/icons/tick.png +0 -0
  98. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/buttons/readme.txt +32 -0
  99. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/buttons/screen.css +97 -0
  100. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/fancy-type/readme.txt +14 -0
  101. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/fancy-type/screen.css +71 -0
  102. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/icons/doc.png +0 -0
  103. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/icons/email.png +0 -0
  104. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/icons/external.png +0 -0
  105. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/icons/feed.png +0 -0
  106. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/icons/im.png +0 -0
  107. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  108. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/icons/visited.png +0 -0
  109. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/icons/xls.png +0 -0
  110. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/readme.txt +18 -0
  111. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/link-icons/screen.css +40 -0
  112. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/rtl/readme.txt +10 -0
  113. data/lib/generators/cable/templates/stylesheets/admin/blueprint/plugins/rtl/screen.css +110 -0
  114. data/lib/generators/cable/templates/stylesheets/admin/blueprint/print.css +29 -0
  115. data/lib/generators/cable/templates/stylesheets/admin/blueprint/screen.css +260 -0
  116. data/lib/generators/cable/templates/stylesheets/admin/blueprint/src/forms.css +73 -0
  117. data/lib/generators/cable/templates/stylesheets/admin/blueprint/src/grid.css +280 -0
  118. data/lib/generators/cable/templates/stylesheets/admin/blueprint/src/grid.png +0 -0
  119. data/lib/generators/cable/templates/stylesheets/admin/blueprint/src/ie.css +77 -0
  120. data/lib/generators/cable/templates/stylesheets/admin/blueprint/src/print.css +85 -0
  121. data/lib/generators/cable/templates/stylesheets/admin/blueprint/src/reset.css +67 -0
  122. data/lib/generators/cable/templates/stylesheets/admin/blueprint/src/typography.css +121 -0
  123. data/lib/railties/tasks.rake +6 -0
  124. metadata +187 -0
@@ -0,0 +1,36 @@
1
+ <?php
2
+
3
+ if (get_magic_quotes_gpc()) $html = stripslashes($_REQUEST['html']);
4
+ else $html = $_REQUEST['html'];
5
+
6
+ if(strlen($html) > 0) {
7
+
8
+ // Specify configuration
9
+ $config = array(
10
+ 'bare' => true,
11
+ 'clean' => true,
12
+ 'doctype' => 'strict',
13
+ 'drop-empty-paras' => true,
14
+ 'drop-font-tags' => true,
15
+ 'drop-proprietary-attributes' => true,
16
+ 'enclose-block-text' => true,
17
+ 'indent' => false,
18
+ 'join-classes' => true,
19
+ 'join-styles' => true,
20
+ 'logical-emphasis' => true,
21
+ 'output-xhtml' => true,
22
+ 'show-body-only' => true,
23
+ 'wrap' => 0);
24
+
25
+ // Tidy
26
+ $tidy = new tidy;
27
+ $tidy->parseString($html, $config, 'utf8');
28
+ $tidy->cleanRepair();
29
+
30
+ // Output
31
+ echo $tidy;
32
+ } else {
33
+
34
+ echo ('0');
35
+ }
36
+ ?>
@@ -0,0 +1,134 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * screen.css
12
+ * main stylesheet for the WYMeditor skin
13
+ * See the documentation for more info.
14
+ *
15
+ * File Authors:
16
+ * Daniel Reszka (d.reszka a-t wymeditor dotorg)
17
+ * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
18
+ */
19
+
20
+ /*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
21
+ .wym_skin_compact p, .wym_skin_compact h2, .wym_skin_compact h3,
22
+ .wym_skin_compact ul, .wym_skin_compact li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; }
23
+
24
+
25
+ /*HIDDEN BY DEFAULT*/
26
+ .wym_skin_compact .wym_area_left { display: none; }
27
+ .wym_skin_compact .wym_area_right { display: none; }
28
+
29
+
30
+ /*TYPO*/
31
+ .wym_skin_compact { font-size: 10px; font-family: Verdana, Arial, sans-serif; }
32
+ .wym_skin_compact h2 { font-size: 110%; /* = 11px */}
33
+ .wym_skin_compact h3 { font-size: 100%; /* = 10px */}
34
+ .wym_skin_compact li { font-size: 100%; /* = 10px */}
35
+
36
+
37
+ /*WYM_BOX*/
38
+ .wym_skin_compact { border: 1px solid gray; padding: 5px}
39
+
40
+ /*auto-clear the wym_box*/
41
+ .wym_skin_compact:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
42
+ * html .wym_skin_compact { height: 1%;}
43
+
44
+
45
+ /*WYM_HTML*/
46
+ .wym_skin_compact .wym_html { width: 98%;}
47
+ .wym_skin_compact .wym_html textarea { font-size: 120%; width: 100%; height: 200px; border: 1px solid gray; background: white; }
48
+
49
+
50
+ /*WYM_IFRAME*/
51
+ .wym_skin_compact .wym_iframe { width: 98%;}
52
+ .wym_skin_compact .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white }
53
+
54
+
55
+ /*AREAS*/
56
+ .wym_skin_compact .wym_area_left { width: 100px; float: left;}
57
+ .wym_skin_compact .wym_area_right { width: 150px; float: right;}
58
+ .wym_skin_compact .wym_area_bottom { height: 1%; clear: both;}
59
+ * html .wym_skin_compact .wym_area_main { height: 1%;}
60
+ * html .wym_skin_compact .wym_area_top { height: 1%;}
61
+ *+html .wym_skin_compact .wym_area_top { height: 1%;}
62
+
63
+ /*SECTIONS SYSTEM*/
64
+
65
+ /*common defaults for all sections*/
66
+ .wym_skin_compact .wym_section { margin-bottom: 5px; }
67
+ .wym_skin_compact .wym_section h2,
68
+ .wym_skin_compact .wym_section h3 { padding: 1px 3px; margin: 0; }
69
+ .wym_skin_compact .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; }
70
+ .wym_skin_compact .wym_section a:hover { background-color: yellow; }
71
+ /*hide section titles by default*/
72
+ .wym_skin_compact .wym_section h2 { display: none; }
73
+ /*disable any margin-collapse*/
74
+ .wym_skin_compact .wym_section { padding-top: 1px; padding-bottom: 1px; }
75
+ /*auto-clear sections*/
76
+ .wym_skin_compact .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
77
+ * html .wym_skin_compact .wym_section ul { height: 1%;}
78
+
79
+ /*option: add this class to a section to make it render as a panel*/
80
+ .wym_skin_compact .wym_panel { }
81
+ .wym_skin_compact .wym_panel h2 { display: block; }
82
+
83
+ /*option: add this class to a section to make it render as a dropdown menu*/
84
+ .wym_skin_compact .wym_dropdown h2 { display: block; }
85
+ .wym_skin_compact .wym_dropdown ul { display: none; position: absolute; background: white; }
86
+ .wym_skin_compact .wym_dropdown:hover ul,
87
+ .wym_skin_compact .wym_dropdown.hover ul { display: block; }
88
+
89
+ /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/
90
+ .wym_skin_compact .wym_buttons li { float:left;}
91
+ .wym_skin_compact .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px }
92
+ /*image replacements*/
93
+ .wym_skin_compact .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;}
94
+ .wym_skin_compact .wym_buttons li.wym_tools_strong a { background-position: 0 -382px;}
95
+ .wym_skin_compact .wym_buttons li.wym_tools_emphasis a { background-position: 0 -22px;}
96
+ .wym_skin_compact .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;}
97
+ .wym_skin_compact .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;}
98
+ .wym_skin_compact .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;}
99
+ .wym_skin_compact .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;}
100
+ .wym_skin_compact .wym_buttons li.wym_tools_indent a { background-position: 0 -574px;}
101
+ .wym_skin_compact .wym_buttons li.wym_tools_outdent a { background-position: 0 -598px;}
102
+ .wym_skin_compact .wym_buttons li.wym_tools_undo a { background-position: 0 -502px;}
103
+ .wym_skin_compact .wym_buttons li.wym_tools_redo a { background-position: 0 -526px;}
104
+ .wym_skin_compact .wym_buttons li.wym_tools_link a { background-position: 0 -96px;}
105
+ .wym_skin_compact .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;}
106
+ .wym_skin_compact .wym_buttons li.wym_tools_image a { background-position: 0 -121px;}
107
+ .wym_skin_compact .wym_buttons li.wym_tools_table a { background-position: 0 -144px;}
108
+ .wym_skin_compact .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;}
109
+ .wym_skin_compact .wym_buttons li.wym_tools_html a { background-position: 0 -193px;}
110
+ .wym_skin_compact .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;}
111
+
112
+ /*DECORATION*/
113
+ .wym_skin_compact .wym_section h2 { background: #f0f0f0; border: solid gray; border-width: 0 0 1px;}
114
+ .wym_skin_compact .wym_section h2 span { color: gray;}
115
+ .wym_skin_compact .wym_panel { padding: 0; border: solid gray; border-width: 1px; background: white;}
116
+ .wym_skin_compact .wym_panel ul { margin: 2px 0 5px; }
117
+ .wym_skin_compact .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; }
118
+ .wym_skin_compact .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;}
119
+
120
+ /*DIALOGS*/
121
+ .wym_dialog div.row { margin-bottom: 5px;}
122
+ .wym_dialog div.row input { margin-right: 5px;}
123
+ .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; }
124
+ .wym_dialog div.row-indent { padding-left: 160px; }
125
+ /*autoclearing*/
126
+ .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
127
+ .wym_dialog div.row { display: inline-block; }
128
+ /* Hides from IE-mac \*/
129
+ * html .wym_dialog div.row { height: 1%; }
130
+ .wym_dialog div.row { display: block; }
131
+ /* End hide from IE-mac */
132
+
133
+ /*WYMEDITOR_LINK*/
134
+ a.wym_wymeditor_link { text-indent: -9999px; float: right; display: block; width: 50px; height: 15px; background: url(../wymeditor_icon.png); overflow: hidden; text-decoration: none; }
@@ -0,0 +1,35 @@
1
+ WYMeditor.SKINS['compact'] = {
2
+
3
+ init: function(wym) {
4
+
5
+ //move the containers panel to the top area
6
+ jQuery(wym._options.containersSelector + ', '
7
+ + wym._options.classesSelector, wym._box)
8
+ .appendTo( jQuery("div.wym_area_top", wym._box) )
9
+ .addClass("wym_dropdown")
10
+ .css({"margin-right": "10px", "width": "120px", "float": "left"});
11
+
12
+ //render following sections as buttons
13
+ jQuery(wym._options.toolsSelector, wym._box)
14
+ .addClass("wym_buttons")
15
+ .css({"margin-right": "10px", "float": "left"});
16
+
17
+ //make hover work under IE < 7
18
+ jQuery(".wym_section", wym._box).hover(function(){
19
+ jQuery(this).addClass("hover");
20
+ },function(){
21
+ jQuery(this).removeClass("hover");
22
+ });
23
+
24
+ var postInit = wym._options.postInit;
25
+ wym._options.postInit = function(wym) {
26
+
27
+ if(postInit) postInit.call(wym, wym);
28
+ var rule = {
29
+ name: 'body',
30
+ css: 'background-color: #f0f0f0;'
31
+ };
32
+ wym.addCssRule( wym._doc.styleSheets[0], rule);
33
+ };
34
+ }
35
+ };
@@ -0,0 +1,158 @@
1
+ /* @override http://localhost:3000/javascripts/wymeditor/skins/default/skin.css */
2
+
3
+ /*
4
+ * WYMeditor : what you see is What You Mean web-based editor
5
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
6
+ * Dual licensed under the MIT (MIT-license.txt)
7
+ * and GPL (GPL-license.txt) licenses.
8
+ *
9
+ * For further information visit:
10
+ * http://www.wymeditor.org/
11
+ *
12
+ * File Name:
13
+ * skin.css
14
+ * main stylesheet for the default WYMeditor skin
15
+ * See the documentation for more info.
16
+ *
17
+ * File Authors:
18
+ * Daniel Reszka (d.reszka a-t wymeditor dotorg)
19
+ */
20
+
21
+ /*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
22
+ .wym_skin_default p, .wym_skin_default h2, .wym_skin_default h3,
23
+ .wym_skin_default ul, .wym_skin_default li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; }
24
+
25
+
26
+ /*HIDDEN BY DEFAULT*/
27
+ .wym_skin_default .wym_area_left { display: none; }
28
+ .wym_skin_default .wym_area_right { display: block; }
29
+
30
+
31
+ /*TYPO*/
32
+ .wym_skin_default { font-size: 62.5%; font-family: Verdana, Arial, sans-serif; }
33
+ .wym_skin_default h2 { font-size: 110%; /* = 11px */}
34
+ .wym_skin_default h3 { font-size: 100%; /* = 10px */}
35
+ .wym_skin_default li { font-size: 100%; /* = 10px */}
36
+
37
+
38
+ /*WYM_BOX*/
39
+ .wym_skin_default { border: 1px none gray;
40
+ background-image: none;
41
+ }
42
+
43
+ /*auto-clear the wym_box*/
44
+ .wym_skin_default:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
45
+ * html .wym_skin_default { height: 1%;}
46
+
47
+
48
+ /*WYM_HTML*/
49
+ .wym_skin_default .wym_html { width: 98%;}
50
+ .wym_skin_default .wym_html textarea { width: 100%; height: 200px; border: 1px solid gray; background: white; }
51
+
52
+
53
+ /*WYM_IFRAME*/
54
+ .wym_skin_default .wym_iframe { width: 98%;}
55
+ .wym_skin_default .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid #424242; background: white }
56
+
57
+
58
+ /*AREAS*/
59
+ .wym_skin_default .wym_area_left { width: 150px; float: left;}
60
+ .wym_skin_default .wym_area_right { width: 150px; float: right;}
61
+ .wym_skin_default .wym_area_bottom { height: 1%; clear: both;}
62
+ * html .wym_skin_default .wym_area_main { height: 1%;}
63
+ * html .wym_skin_default .wym_area_top { height: 1%;}
64
+ *+html .wym_skin_default .wym_area_top { height: 1%;}
65
+
66
+ /*SECTIONS SYSTEM*/
67
+
68
+ /*common defaults for all sections*/
69
+ .wym_skin_default .wym_section { margin-bottom: 5px; }
70
+ .wym_skin_default .wym_section h2,
71
+ .wym_skin_default .wym_section h3 { padding: 1px 3px; margin: 0; }
72
+ .wym_skin_default .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; }
73
+ .wym_skin_default .wym_section a:hover { background-color: yellow; }
74
+ /*hide section titles by default*/
75
+ .wym_skin_default .wym_section h2 { display: none; }
76
+ /*disable any margin-collapse*/
77
+ .wym_skin_default .wym_section { padding-top: 1px; padding-bottom: 1px; }
78
+ /*auto-clear sections*/
79
+ .wym_skin_default .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
80
+ * html .wym_skin_default .wym_section ul { height: 1%;}
81
+
82
+ /*option: add this class to a section to make it render as a panel*/
83
+ .wym_skin_default .wym_panel { }
84
+ .wym_skin_default .wym_panel h2 { display: block; }
85
+
86
+ /*option: add this class to a section to make it render as a dropdown menu*/
87
+ .wym_skin_default .wym_dropdown h2 { display: block; }
88
+ .wym_skin_default .wym_dropdown ul { display: none; position: absolute; background: white; }
89
+ .wym_skin_default .wym_dropdown:hover ul,
90
+ .wym_skin_default .wym_dropdown.hover ul { display: block; }
91
+
92
+ /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/
93
+ .wym_skin_default .wym_buttons li { float:left;}
94
+ .wym_skin_default .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px }
95
+ /*image replacements*/
96
+ .wym_skin_default .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;}
97
+ .wym_skin_default .wym_buttons li.wym_tools_strong a { background-position: 0 -382px;}
98
+ .wym_skin_default .wym_buttons li.wym_tools_emphasis a { background-position: 0 -22px;}
99
+ .wym_skin_default .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;}
100
+ .wym_skin_default .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;}
101
+ .wym_skin_default .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;}
102
+ .wym_skin_default .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;}
103
+ .wym_skin_default .wym_buttons li.wym_tools_indent a { background-position: 0 -574px;}
104
+ .wym_skin_default .wym_buttons li.wym_tools_outdent a { background-position: 0 -598px;}
105
+ .wym_skin_default .wym_buttons li.wym_tools_undo a { background-position: 0 -502px;}
106
+ .wym_skin_default .wym_buttons li.wym_tools_redo a { background-position: 0 -526px;}
107
+ .wym_skin_default .wym_buttons li.wym_tools_link a { background-position: 0 -96px;}
108
+ .wym_skin_default .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;}
109
+ .wym_skin_default .wym_buttons li.wym_tools_image a { background-position: 0 -121px;}
110
+ .wym_skin_default .wym_buttons li.wym_tools_table a { background-position: 0 -144px;}
111
+ .wym_skin_default .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;}
112
+ .wym_skin_default .wym_buttons li.wym_tools_html a { background-position: 0 -193px;}
113
+ .wym_skin_default .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;}
114
+
115
+ /*DECORATION*/
116
+ .wym_skin_default .wym_section h2 { background: #ddd url(/stylesheets/ui/aristo/images/button_bg.png); border: solid gray; border-width: 0 0 1px;}
117
+ .wym_skin_default .wym_section h2 span { color: gray;}
118
+ .wym_skin_default .wym_panel { padding: 0; border: solid gray; border-width: 1px; background: white;}
119
+ .wym_skin_default .wym_panel ul { margin: 2px 0 5px; }
120
+ .wym_skin_default .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; }
121
+ .wym_skin_default .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;}
122
+
123
+ /*DIALOGS*/
124
+ .wym_dialog div.row { margin-bottom: 5px;}
125
+ .wym_dialog div.row input { margin-right: 5px;}
126
+ .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; }
127
+ .wym_dialog div.row-indent { padding-left: 160px; }
128
+ /*autoclearing*/
129
+ .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
130
+ .wym_dialog div.row { display: inline-block; }
131
+ /* Hides from IE-mac \*/
132
+ * html .wym_dialog div.row { height: 1%; }
133
+ .wym_dialog div.row { display: block; }
134
+ /* End hide from IE-mac */
135
+
136
+ /*WYMEDITOR_LINK*/
137
+ a.wym_wymeditor_link { display: none;}
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+ * {font-family: "Lucida Grande", Lucida, Verdana, sans-serif;}
152
+
153
+
154
+
155
+
156
+
157
+
158
+
@@ -0,0 +1,40 @@
1
+ WYMeditor.SKINS['default'] = {
2
+
3
+ init: function(wym) {
4
+
5
+ //render following sections as panels
6
+ jQuery(wym._box).find(wym._options.classesSelector)
7
+ .addClass("wym_panel");
8
+
9
+ //render following sections as buttons
10
+ jQuery(wym._box).find(wym._options.toolsSelector)
11
+ .addClass("wym_buttons");
12
+
13
+ //render following sections as dropdown menus
14
+ jQuery(wym._box).find(wym._options.containersSelector)
15
+ .addClass("wym_dropdown")
16
+ .find(WYMeditor.H2)
17
+ .append("<span> ></span>");
18
+
19
+ // auto add some margin to the main area sides if left area
20
+ // or right area are not empty (if they contain sections)
21
+ jQuery(wym._box).find("div.wym_area_right ul")
22
+ .parents("div.wym_area_right").show()
23
+ .parents(wym._options.boxSelector)
24
+ .find("div.wym_area_main")
25
+ .css({"margin-right": "155px"});
26
+
27
+ jQuery(wym._box).find("div.wym_area_left ul")
28
+ .parents("div.wym_area_left").show()
29
+ .parents(wym._options.boxSelector)
30
+ .find("div.wym_area_main")
31
+ .css({"margin-left": "155px"});
32
+
33
+ //make hover work under IE < 7
34
+ jQuery(wym._box).find(".wym_section").hover(function(){
35
+ jQuery(this).addClass("hover");
36
+ },function(){
37
+ jQuery(this).removeClass("hover");
38
+ });
39
+ }
40
+ };
@@ -0,0 +1,131 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * skin.css
12
+ * main stylesheet for the minimal WYMeditor skin
13
+ * See the documentation for more info.
14
+ *
15
+ * File Authors:
16
+ * Jean-Francois Hovinne
17
+ * Scott Lewis (see Silver skin)
18
+ */
19
+
20
+ /* Set iframe */
21
+ .wym_skin_minimal div.wym_iframe iframe {
22
+ width: 90%;
23
+ height: 200px;
24
+ }
25
+
26
+ /* Hide h2 by default */
27
+ .wym_skin_minimal h2 {
28
+ display: none;
29
+ }
30
+
31
+ /* Show specific h2 */
32
+ .wym_skin_minimal div.wym_tools h2,
33
+ .wym_skin_minimal div.wym_containers h2,
34
+ .wym_skin_minimal div.wym_classes h2 {
35
+ display: block;
36
+ }
37
+
38
+ .wym_skin_minimal div.wym_section ul {
39
+ margin: 0;
40
+ }
41
+
42
+ .wym_skin_minimal div.wym_section ul li {
43
+ float: left;
44
+ list-style-type: none;
45
+ margin-right: 5px;
46
+ }
47
+
48
+ .wym_skin_minimal div.wym_area_top,
49
+ .wym_skin_minimal div.wym_area_right,
50
+ .wym_skin_minimal div.wym_containers,
51
+ .wym_skin_minimal div.wym_classes {
52
+ float: left;
53
+ }
54
+
55
+ .wym_skin_minimal div.wym_area_main {
56
+ clear: both;
57
+ }
58
+
59
+ .wym_skin_minimal div.wym_html {
60
+ width: 90%;
61
+ }
62
+
63
+ .wym_skin_minimal textarea.wym_html_val {
64
+ width: 100%;
65
+ height: 100px;
66
+ }
67
+
68
+ /* DROPDOWNS (see Silver skin) */
69
+ .wym_skin_minimal div.wym_dropdown {
70
+ cursor: pointer;
71
+ margin: 0px 4px 10px 0px;
72
+ padding: 0px;
73
+ z-index: 1001;
74
+ display: block;
75
+ }
76
+
77
+ .wym_skin_minimal div.wym_dropdown ul {
78
+ display: none;
79
+ width: 124px;
80
+ padding: 0px;
81
+ margin: 0px;
82
+ list-style-type: none;
83
+ list-style-image: none;
84
+ z-index: 1002;
85
+ position: absolute;
86
+ border-top: 1px solid #AAA;
87
+ }
88
+
89
+ .wym_skin_minimal div.wym_dropdown ul li {
90
+ width: 146px;
91
+ height: 20px;
92
+ padding: 0px;
93
+ margin: 0px;
94
+ border: 1px solid #777;
95
+ border-top: none;
96
+ background: #EEE;
97
+ list-style-image: none;
98
+ }
99
+
100
+ .wym_skin_minimal div.wym_dropdown h2 {
101
+ width: 138px;
102
+ height: 16px;
103
+ color: #000;
104
+ background-image: url(images/bg.selector.silver.gif);
105
+ background-position: 0px -18px;
106
+ background-repeat: no-repeat;
107
+ border: none;
108
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, Sanserif;
109
+ font-size: 12px;
110
+ font-weight: bold;
111
+ padding: 2px 0px 0px 10px;
112
+ margin: 0px;
113
+ }
114
+
115
+ .wym_skin_minimal div.wym_dropdown a {
116
+ text-decoration: none;
117
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, Sanserif;
118
+ font-size: 12px;
119
+ padding: 5px 0px 0px 10px;
120
+ display: block;
121
+ width: 136px;
122
+ height: 15px;
123
+ color: #000;
124
+ text-align: left;
125
+ margin-left: 0px;
126
+ }
127
+
128
+ .wym_skin_minimal div.wym_dropdown a:hover {
129
+ background: #BBB;
130
+ border-bottom: none;
131
+ }