qwik2md 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/lib/qwik2md/version.rb +1 -1
  3. data/vendor/qwik/lib/qwik/act-christel.rb +1 -1
  4. data/vendor/qwik/lib/qwik/page-get.rb +4 -4
  5. data/vendor/qwik/lib/qwik/util-filename.rb +2 -5
  6. data/vendor/qwik/lib/qwik/util-string.rb +7 -7
  7. data/vendor/qwik/share/super/FrontPage.txt +17 -0
  8. data/vendor/qwik/share/super/QwikWebPlugin.txt +0 -0
  9. data/vendor/qwik/share/super/QwikWebStructure.txt +0 -0
  10. data/vendor/qwik/share/super/RecentList.txt +2 -0
  11. data/vendor/qwik/share/super/SandBox.txt +3 -0
  12. data/vendor/qwik/share/super/TextFormat.txt +186 -0
  13. data/vendor/qwik/share/super/TextFormatSimple.txt +23 -0
  14. data/vendor/qwik/share/super/TitleList.txt +2 -0
  15. data/vendor/qwik/share/super/_AdminMenu.txt +11 -0
  16. data/vendor/qwik/share/super/_BookSearch.txt +3 -0
  17. data/vendor/qwik/share/super/_EditorFooter.txt +9 -0
  18. data/vendor/qwik/share/super/_EditorHelp.txt +9 -0
  19. data/vendor/qwik/share/super/_InterWikiName.txt +17 -0
  20. data/vendor/qwik/share/super/_IsbnLink.txt +8 -0
  21. data/vendor/qwik/share/super/_MemberAdd.txt +4 -0
  22. data/vendor/qwik/share/super/_MemberList.txt +2 -0
  23. data/vendor/qwik/share/super/_MemberListCSV.txt +2 -0
  24. data/vendor/qwik/share/super/_PageAttribute.txt +7 -0
  25. data/vendor/qwik/share/super/_SideMenu.txt +15 -0
  26. data/vendor/qwik/share/super/_SiteConfig.txt +30 -0
  27. data/vendor/qwik/share/super/_SiteFooter.txt +3 -0
  28. data/vendor/qwik/share/super/_SiteLog.txt +0 -0
  29. data/vendor/qwik/share/super/_SiteLogView.txt +2 -0
  30. data/vendor/qwik/share/super/_SiteMember.txt +0 -0
  31. data/vendor/qwik/share/super/_SiteMenu.txt +2 -0
  32. data/vendor/qwik/share/super/_SiteSearch.txt +3 -0
  33. data/vendor/qwik/share/super/_SiteTheme.txt +9 -0
  34. data/vendor/qwik/share/super/_textformat.txt +2 -0
  35. data/vendor/qwik/share/template/Makefile +10 -0
  36. data/vendor/qwik/share/template/edit.html +22 -0
  37. data/vendor/qwik/share/template/edit.rb +40 -0
  38. data/vendor/qwik/share/template/editor.html +23 -0
  39. data/vendor/qwik/share/template/editor.rb +47 -0
  40. data/vendor/qwik/share/template/notice.html +21 -0
  41. data/vendor/qwik/share/template/notice.rb +43 -0
  42. data/vendor/qwik/share/template/plain.html +19 -0
  43. data/vendor/qwik/share/template/plain.rb +43 -0
  44. data/vendor/qwik/share/template/surface.html +22 -0
  45. data/vendor/qwik/share/template/surface.rb +50 -0
  46. data/vendor/qwik/share/template/system.html +30 -0
  47. data/vendor/qwik/share/template/system.rb +46 -0
  48. data/vendor/qwik/share/template/view.html +20 -0
  49. data/vendor/qwik/share/template/view.rb +40 -0
  50. data/vendor/qwik/share/theme/css/Makefile +10 -0
  51. data/vendor/qwik/share/theme/css/base.css +779 -0
  52. data/vendor/qwik/share/theme/css/delete.png +0 -0
  53. data/vendor/qwik/share/theme/css/menu.css +77 -0
  54. data/vendor/qwik/share/theme/css/wema.css +141 -0
  55. data/vendor/qwik/share/theme/i/a.gif +0 -0
  56. data/vendor/qwik/share/theme/i/binary.gif +0 -0
  57. data/vendor/qwik/share/theme/i/broken.gif +0 -0
  58. data/vendor/qwik/share/theme/i/compressed.gif +0 -0
  59. data/vendor/qwik/share/theme/i/external.png +0 -0
  60. data/vendor/qwik/share/theme/i/external_hover.png +0 -0
  61. data/vendor/qwik/share/theme/i/favicon.ico +0 -0
  62. data/vendor/qwik/share/theme/i/favicon.png +0 -0
  63. data/vendor/qwik/share/theme/i/generic.gif +0 -0
  64. data/vendor/qwik/share/theme/i/image2.gif +0 -0
  65. data/vendor/qwik/share/theme/i/login_bg.gif +0 -0
  66. data/vendor/qwik/share/theme/i/login_inputform_bg.gif +0 -0
  67. data/vendor/qwik/share/theme/i/login_inputform_bg_footer.gif +0 -0
  68. data/vendor/qwik/share/theme/i/login_inputform_bg_header.gif +0 -0
  69. data/vendor/qwik/share/theme/i/login_li.gif +0 -0
  70. data/vendor/qwik/share/theme/i/login_qwik_logo.gif +0 -0
  71. data/vendor/qwik/share/theme/i/movie.gif +0 -0
  72. data/vendor/qwik/share/theme/i/new.png +0 -0
  73. data/vendor/qwik/share/theme/i/pdf.gif +0 -0
  74. data/vendor/qwik/share/theme/i/ps.gif +0 -0
  75. data/vendor/qwik/share/theme/i/sound2.gif +0 -0
  76. data/vendor/qwik/share/theme/i/sphere2.gif +0 -0
  77. data/vendor/qwik/share/theme/i/tar.gif +0 -0
  78. data/vendor/qwik/share/theme/i/text.gif +0 -0
  79. data/vendor/qwik/share/theme/js/Makefile +23 -0
  80. data/vendor/qwik/share/theme/js/base.js +176 -0
  81. data/vendor/qwik/share/theme/js/builder.js +101 -0
  82. data/vendor/qwik/share/theme/js/controls.js +750 -0
  83. data/vendor/qwik/share/theme/js/debugwindow-test.html +60 -0
  84. data/vendor/qwik/share/theme/js/debugwindow.html +24 -0
  85. data/vendor/qwik/share/theme/js/debugwindow.js +476 -0
  86. data/vendor/qwik/share/theme/js/dragdrop.js +559 -0
  87. data/vendor/qwik/share/theme/js/effects.js +904 -0
  88. data/vendor/qwik/share/theme/js/event.js +98 -0
  89. data/vendor/qwik/share/theme/js/history.js +110 -0
  90. data/vendor/qwik/share/theme/js/menu.js +27 -0
  91. data/vendor/qwik/share/theme/js/monitor.js +96 -0
  92. data/vendor/qwik/share/theme/js/niftypp.js +272 -0
  93. data/vendor/qwik/share/theme/js/prototype.js +1758 -0
  94. data/vendor/qwik/share/theme/js/scriptaculous.js +48 -0
  95. data/vendor/qwik/share/theme/js/se_hilite_jp.js +234 -0
  96. data/vendor/qwik/share/theme/js/slider.js +275 -0
  97. data/vendor/qwik/share/theme/js/test-all.html +24 -0
  98. data/vendor/qwik/share/theme/js/test-debug.html +56 -0
  99. data/vendor/qwik/share/theme/js/test-wema.html +304 -0
  100. data/vendor/qwik/share/theme/js/test-xp.html +99 -0
  101. data/vendor/qwik/share/theme/js/unittest.js +363 -0
  102. data/vendor/qwik/share/theme/js/watch.js +109 -0
  103. data/vendor/qwik/share/theme/js/wema.js +580 -0
  104. data/vendor/qwik/share/theme/js/wysiwyg.js +143 -0
  105. data/vendor/qwik/share/theme/qwikborder/qwikborder.css +277 -0
  106. data/vendor/qwik/share/theme/qwikborder/qwikborder_ball.png +0 -0
  107. data/vendor/qwik/share/theme/qwikborder/qwikborder_h2.png +0 -0
  108. data/vendor/qwik/share/theme/qwikborder/qwikborder_li.png +0 -0
  109. data/vendor/qwik/share/theme/qwikcyan/qwikcyan.css +216 -0
  110. data/vendor/qwik/share/theme/qwikcyan/qwikcyan_li.png +0 -0
  111. data/vendor/qwik/share/theme/qwikeditor/command.gif +0 -0
  112. data/vendor/qwik/share/theme/qwikeditor/edit_form_bg.jpg +0 -0
  113. data/vendor/qwik/share/theme/qwikeditor/edit_qwik_logo.gif +0 -0
  114. data/vendor/qwik/share/theme/qwikeditor/edit_title_bg.jpg +0 -0
  115. data/vendor/qwik/share/theme/qwikeditor/login_bg.gif +0 -0
  116. data/vendor/qwik/share/theme/qwikeditor/login_qwik_logo.gif +0 -0
  117. data/vendor/qwik/share/theme/qwikeditor/qwikeditor.css +336 -0
  118. data/vendor/qwik/share/theme/qwikeditor/sidebar_bg.gif +0 -0
  119. data/vendor/qwik/share/theme/qwikgreen/qwikgreen.css +306 -0
  120. data/vendor/qwik/share/theme/qwiknotice/qwiknotice.css +246 -0
  121. data/vendor/qwik/share/theme/qwiknotice/qwiknotice_body_bg.gif +0 -0
  122. data/vendor/qwik/share/theme/qwiknotice/qwiknotice_inputform_bg.gif +0 -0
  123. data/vendor/qwik/share/theme/qwiknotice/qwiknotice_inputform_bg_footer.gif +0 -0
  124. data/vendor/qwik/share/theme/qwiknotice/qwiknotice_inputform_bg_header.gif +0 -0
  125. data/vendor/qwik/share/theme/qwiknotice/qwiknotice_li.gif +0 -0
  126. data/vendor/qwik/share/theme/qwiknotice/qwiknotice_qwik_logo.gif +0 -0
  127. data/vendor/qwik/share/theme/qwikplain/command.gif +0 -0
  128. data/vendor/qwik/share/theme/qwikplain/edit_form_bg.jpg +0 -0
  129. data/vendor/qwik/share/theme/qwikplain/edit_qwik_logo.gif +0 -0
  130. data/vendor/qwik/share/theme/qwikplain/edit_title_bg.jpg +0 -0
  131. data/vendor/qwik/share/theme/qwikplain/login_bg.gif +0 -0
  132. data/vendor/qwik/share/theme/qwikplain/login_qwik_logo.gif +0 -0
  133. data/vendor/qwik/share/theme/qwikplain/qwikplain.css +223 -0
  134. data/vendor/qwik/share/theme/qwikplain/sidebar_bg.gif +0 -0
  135. data/vendor/qwik/share/theme/qwikskelton/qwikskelton.css +224 -0
  136. data/vendor/qwik/share/theme/qwiksystem/qwiksystem.css +323 -0
  137. data/vendor/qwik/share/theme/qwiksystem/qwiksystem_bg.png +0 -0
  138. data/vendor/qwik/share/theme/qwiksystem/qwiksystem_header.png +0 -0
  139. data/vendor/qwik/share/theme/qwiksystem/qwiksystem_headerbar.png +0 -0
  140. data/vendor/qwik/share/theme/qwiksystem/qwiksystem_qwikweb.png +0 -0
  141. data/vendor/qwik/share/theme/qwikviridian/qwikviridian.css +413 -0
  142. data/vendor/qwik/share/theme/qwikviridian/qwikviridian_adminmenu_bg.gif +0 -0
  143. data/vendor/qwik/share/theme/qwikviridian/qwikviridian_bg.gif +0 -0
  144. data/vendor/qwik/share/theme/qwikviridian/qwikviridian_bg_shade.gif +0 -0
  145. data/vendor/qwik/share/theme/qwikviridian/qwikviridian_sidebar_a_bg.gif +0 -0
  146. data/vendor/qwik/share/theme/qwikviridian/qwikviridian_siderbar_li_a.gif +0 -0
  147. data/vendor/qwik/share/theme/s5/blue/bluebg.gif +0 -0
  148. data/vendor/qwik/share/theme/s5/blue/bluebottom.gif +0 -0
  149. data/vendor/qwik/share/theme/s5/blue/bluefooter.gif +0 -0
  150. data/vendor/qwik/share/theme/s5/blue/framing.css +25 -0
  151. data/vendor/qwik/share/theme/s5/blue/pretty.css +91 -0
  152. data/vendor/qwik/share/theme/s5/blue/s5-core.css +11 -0
  153. data/vendor/qwik/share/theme/s5/blue/slides.css +3 -0
  154. data/vendor/qwik/share/theme/s5/default/iepngfix.htc +42 -0
  155. data/vendor/qwik/share/theme/s5/default/opera.css +7 -0
  156. data/vendor/qwik/share/theme/s5/default/outline.css +15 -0
  157. data/vendor/qwik/share/theme/s5/default/print.css +24 -0
  158. data/vendor/qwik/share/theme/s5/default/slides.js +558 -0
  159. data/vendor/qwik/share/theme/s5/flower/blume.jpg +0 -0
  160. data/vendor/qwik/share/theme/s5/flower/blumerechts.jpg +0 -0
  161. data/vendor/qwik/share/theme/s5/flower/framing.css +25 -0
  162. data/vendor/qwik/share/theme/s5/flower/pretty.css +83 -0
  163. data/vendor/qwik/share/theme/s5/flower/s5-core.css +11 -0
  164. data/vendor/qwik/share/theme/s5/flower/slides.css +3 -0
  165. data/vendor/qwik/share/theme/s5/i18n/00_head.txt +8 -0
  166. data/vendor/qwik/share/theme/s5/i18n/bg-shade.png +0 -0
  167. data/vendor/qwik/share/theme/s5/i18n/bg-slide.jpg +0 -0
  168. data/vendor/qwik/share/theme/s5/i18n/framing.css +23 -0
  169. data/vendor/qwik/share/theme/s5/i18n/pretty.css +44 -0
  170. data/vendor/qwik/share/theme/s5/i18n/s5-core.css +9 -0
  171. data/vendor/qwik/share/theme/s5/i18n/slides.css +3 -0
  172. data/vendor/qwik/share/theme/s5/pixel/framing.css +25 -0
  173. data/vendor/qwik/share/theme/s5/pixel/pixelbg.gif +0 -0
  174. data/vendor/qwik/share/theme/s5/pixel/pixelheader.jpg +0 -0
  175. data/vendor/qwik/share/theme/s5/pixel/pixelslide0bg.gif +0 -0
  176. data/vendor/qwik/share/theme/s5/pixel/pretty.css +80 -0
  177. data/vendor/qwik/share/theme/s5/pixel/s5-core.css +11 -0
  178. data/vendor/qwik/share/theme/s5/pixel/slides.css +3 -0
  179. data/vendor/qwik/share/theme/s5/qwikblack/framing.css +23 -0
  180. data/vendor/qwik/share/theme/s5/qwikblack/pretty.css +245 -0
  181. data/vendor/qwik/share/theme/s5/qwikblack/s5-core.css +9 -0
  182. data/vendor/qwik/share/theme/s5/qwikblack/slides.css +3 -0
  183. data/vendor/qwik/share/theme/s5/qwikworld/bg-shade.png +0 -0
  184. data/vendor/qwik/share/theme/s5/qwikworld/bg-slide.jpg +0 -0
  185. data/vendor/qwik/share/theme/s5/qwikworld/framing.css +61 -0
  186. data/vendor/qwik/share/theme/s5/qwikworld/pretty.css +250 -0
  187. data/vendor/qwik/share/theme/s5/qwikworld/qwikcyan_li.png +0 -0
  188. data/vendor/qwik/share/theme/s5/qwikworld/s5-core.css +28 -0
  189. data/vendor/qwik/share/theme/s5/qwikworld/slides.css +3 -0
  190. data/vendor/qwik/share/theme/s5/shell/blank.gif +0 -0
  191. data/vendor/qwik/share/theme/s5/shell/bodybg.gif +0 -0
  192. data/vendor/qwik/share/theme/s5/shell/framing.css +23 -0
  193. data/vendor/qwik/share/theme/s5/shell/pretty.css +86 -0
  194. data/vendor/qwik/share/theme/s5/shell/s5-core.css +9 -0
  195. data/vendor/qwik/share/theme/s5/shell/slides.css +3 -0
  196. metadata +190 -1
@@ -0,0 +1,77 @@
1
+ /* Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
2
+ This is free software with ABSOLUTELY NO WARRANTY.
3
+ You can redistribute it and/or modify it under the terms of the GNU GPL2. */
4
+
5
+ /* ============================== menu */
6
+ div.hmenu {
7
+ position: absolute;
8
+ width: 100%;
9
+ z-index: 100;
10
+ font-size: small;
11
+ }
12
+ div.hmenu a.external {
13
+ border-bottom: 0;
14
+ }
15
+ div.hmenu ul.m1 {
16
+ position: relative;
17
+ margin: 0;
18
+ padding: 0;
19
+ width: 100%;
20
+ text-align: center;
21
+ list-style: none;
22
+ }
23
+ div.hmenu ul.m1 li.off {
24
+ position: relative;
25
+ height: 1.2em;
26
+ width: 100px;
27
+ float: left;
28
+ overflow: hidden;
29
+ background-color: #fff;
30
+ border: 1px solid #090;
31
+ }
32
+ div.hmenu ul.m1 li.on {
33
+ width: 100px;
34
+ float: left;
35
+ overflow: hidden;
36
+ background-color: #efe;
37
+ border: 1px solid #090;
38
+ }
39
+ div.hmenu ul.m1>li.on {
40
+ overflow: visible;
41
+ }
42
+ div.hmenu ul.m1 a {
43
+ display: block;
44
+ text-decoration: none;
45
+ }
46
+ div.hmenu ul.m1 a:hover {
47
+ color: #900;
48
+ background-color: transparent;
49
+ }
50
+ div.hmenu ul.m2 {
51
+ margin: 0;
52
+ padding: 0;
53
+ position: relative;
54
+ left: 3px;
55
+ top: 3px;
56
+ width: 120px;
57
+ border: 1px solid #090;
58
+ border-bottom: 0px solid #090;
59
+ background-color: #ffe;
60
+ list-style: none;
61
+ text-align: left;
62
+ }
63
+
64
+ div.hmenu ul.m2 li {
65
+ }
66
+
67
+ div.hmenu ul.m2 a {
68
+ padding: 0 0 0 5px;
69
+ display: block;
70
+ border-bottom: 1px solid #090;
71
+ }
72
+
73
+ div.hmenu ul.m2 a:hover {
74
+ background-color: #fee;
75
+ }
76
+
77
+ /* end */
@@ -0,0 +1,141 @@
1
+ /* Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
2
+ This is free software with ABSOLUTELY NO WARRANTY.
3
+ You can redistribute it and/or modify it under the terms of the GNU GPL2. */
4
+
5
+ /* ===== use vml */
6
+ v\:* {
7
+ behavior: url(#default#vml);
8
+ }
9
+
10
+ /* ===== .wema */
11
+ .wema {
12
+ position: absolute;
13
+ border: 2px outset;
14
+ background: #eee;
15
+ color: #000;
16
+ font-family: Verdana,Arial,sans-serif;
17
+ font-size: small;
18
+ white-space: nowrap;
19
+ filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#cccccc');
20
+ z-index: 1;
21
+ }
22
+
23
+ /* ===== .wema .menubar */
24
+ .wema .menubar {
25
+ margin: 0 0 0.5em 0;
26
+ padding: 1px 0 0 0;
27
+ border-bottom: 1px solid #ccc;
28
+ background: #999;
29
+ color: #fff;
30
+ font-size: xx-small;
31
+ text-align: right;
32
+ }
33
+ .wema .menubar a {
34
+ margin: 0;
35
+ padding: 0 2px;
36
+ text-decoration: none;
37
+ border-bottom-width: 0;
38
+ }
39
+ .wema .menubar a:link { color: #fff; }
40
+ .wema .menubar a:visited { color: #ccc; }
41
+ .wema .menubar a:active,
42
+ .wema .menubar a:hover { color: #fff; background: #c00; }
43
+ .wema .menubar .handle {
44
+ float: left;
45
+ padding: 0 10px 0 10px;
46
+ }
47
+
48
+ /* ===== .wema .menubar .close */
49
+ .wema .menubar .close {
50
+ margin: 0;
51
+ padding: 0;
52
+ background: #ccc;
53
+ border: 1px outset;
54
+ }
55
+ .wema .menubar .close a {
56
+ padding: 0 0.2em;
57
+ font-family: verdana, sans-serif;
58
+ font-size: x-small;
59
+ font-weight: bold;
60
+ text-decoration: none;
61
+ border-bottom-width: 0;
62
+ color: #000;
63
+ }
64
+ .wema .menubar .close a:link { color: #000; }
65
+ .wema .menubar .close a:visited { color: #000; }
66
+ .wema .menubar .close a:active,
67
+ .wema .menubar .close a:hover { color: #fff; background: #c00; }
68
+
69
+ /* ===== .wema .cont */
70
+ .wema .cont {
71
+ margin: 0.5em 1em;
72
+ }
73
+ .wema .cont p {
74
+ margin: 0;
75
+ }
76
+ .wema .cont pre {
77
+ margin: 0;
78
+ font-size: x-small;
79
+ }
80
+
81
+ .wema .cont textarea {
82
+ width: 95%;
83
+ margin: 5px 0;
84
+ padding: 0.1em;
85
+ height: 20em;
86
+ font-size: small;
87
+ border: 2px inset;
88
+ }
89
+ .wema .cont input {
90
+ padding: 0;
91
+ font-weight: normal;
92
+ font-size: small;
93
+ margin: 0 4px 0 0;
94
+ padding: 0 2px 0 2px;
95
+ border: 1px solid #666;
96
+ }
97
+
98
+ /* ===== #editor */
99
+ #editor {
100
+ left: 100px;
101
+ top: 100px;
102
+ z-index: 3;
103
+ width: 30em;
104
+ visibility: hidden;
105
+ padding: 0 0 0.5em 0;
106
+ }
107
+ #editor .cont {
108
+ margin: 5px;
109
+ }
110
+ #editor .cont p {
111
+ margin: 2px 0;
112
+ }
113
+ #editor .save input {
114
+ border: 2px outset #ccc;
115
+ background: #ccc;
116
+ font-size: x-small;
117
+ }
118
+ #editor .color {
119
+ margin: 0;
120
+ padding: 0;
121
+ border: 1px solid #999;
122
+ font-size: x-small;
123
+ text-decoration: none;
124
+ border-bottom-width: 0;
125
+ }
126
+
127
+ /* ===== #help */
128
+ #help {
129
+ left: 90px;
130
+ top: 80px;
131
+ z-index: 4;
132
+ visibility: hidden;
133
+ width: 30em;
134
+ }
135
+
136
+ @media print{
137
+ .wema .menubar { display:none !important; }
138
+ #editor, #help { display:none !important; }
139
+ }
140
+
141
+ /* end */
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
2
+ # This is free software with ABSOLUTELY NO WARRANTY.
3
+ # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
4
+
5
+ RUBY=ruby
6
+
7
+ all:
8
+ $(RUBY) -I../../../lib ../../../lib/qwik/dev-js-compressor.rb
9
+
10
+ clean:
11
+ rm ../all.js
12
+
13
+ x:
14
+ chmod -x *.js *.html .cvsignore Makefile
15
+
16
+ dist: debugwindow.tar.bz2
17
+
18
+ debugwindow.tar.bz2: debugwindow.js debugwindow.html debugwindow-test.html
19
+ mkdir debugwindow
20
+ mv debugwindow.js debugwindow.html debugwindow-test.html debugwindow
21
+ tar cvfj debugwindow.tar.bz2 debugwindow
22
+ mv debugwindow/* .
23
+ rmdir debugwindow
@@ -0,0 +1,176 @@
1
+ // -*- c++ -*-
2
+ //
3
+ // Copyright (C) 2003-2006 Kouichirou Eto
4
+ // All rights reserved.
5
+ // This is free software with ABSOLUTELY NO WARRANTY.
6
+ //
7
+ // You can redistribute it and/or modify it under the terms of
8
+ // the GNU General Public License version 2.
9
+ //
10
+
11
+ // ============================== common
12
+ function getById(id) {
13
+ if (document.getElementById) {
14
+ elem = document.getElementById(id);
15
+ return elem;
16
+ }
17
+ if (document.all) return document.all(id);
18
+ return null;
19
+ }
20
+
21
+ function getByName(name) {
22
+ if (document.getElementsByTagName)
23
+ return document.getElementsByTagName(name);
24
+ if (document.all) return document.all.tags(name);
25
+ return null;
26
+ }
27
+
28
+ function qwik_onload() {
29
+ if (typeof wema_init != 'undefined') {
30
+ //g_debug.pa("wema_init");
31
+ wema_init();
32
+ }
33
+
34
+ if (typeof g_toc == 'undefined') {
35
+ g_toc = new TOC();
36
+ g_toc.init();
37
+ }
38
+
39
+ if (typeof g_niftypp != 'undefined') {
40
+ g_niftypp.applyAll();
41
+ }
42
+
43
+ if (typeof g_focus != 'undefined') {
44
+ g_focus.apply();
45
+ }
46
+
47
+ /*
48
+ if (typeof g_menu == 'undefined') {
49
+ g_menu = new Menu();
50
+ g_menu.init();
51
+ }
52
+ */
53
+ }
54
+
55
+ // ============================== table edit
56
+ function show_new_col() {
57
+ ns = document.getElementsByClass("*", "new_col");
58
+ for (var i=0; i < ns.length; i++) {
59
+ ns[i].style.display = "block";
60
+ }
61
+
62
+ ns = document.getElementsByClass("*", "new_col_button");
63
+ for (var i=0; i < ns.length; i++) {
64
+ ns[i].style.display = "none";
65
+ }
66
+ }
67
+
68
+ function show_new_row() {
69
+ ns = document.getElementsByClass("*", "new_row");
70
+ for (var i=0; i < ns.length; i++) {
71
+ ns[i].style.display = "block";
72
+ }
73
+
74
+ ns = document.getElementsByClass("*", "new_row_button");
75
+ for (var i=0; i < ns.length; i++) {
76
+ ns[i].style.display = "none";
77
+ }
78
+ }
79
+
80
+ // ============================== common
81
+ document.getElements = function(tagname) {
82
+ if (document.getElementsByTagName) {
83
+ return document.getElementsByTagName(tagname);
84
+ }
85
+ if (document.all) {
86
+ return document.all.tags(tagname);
87
+ }
88
+ if (document.layers) {
89
+ return document.layers;
90
+ }
91
+ return null;
92
+ }
93
+
94
+ document.getElementsByClass = function(tagname, classname) {
95
+ var elements = document.getElements(tagname);
96
+ var newelements = [];
97
+ for (var i=0; i < elements.length; i++)
98
+ if (elements[i].className == classname) {
99
+ newelements.push(elements[i]);
100
+ }
101
+ return newelements;
102
+ }
103
+
104
+ document.getDivList = function() {
105
+ if (document.getElementsByTagName) {
106
+ return document.getElementsByTagName("div");
107
+ }
108
+ if (document.all) {
109
+ return document.all.tags("div");
110
+ }
111
+ if (document.layers) {
112
+ return document.layers;
113
+ }
114
+ return null;
115
+ }
116
+
117
+ document.getDivListByClass = function(cn) {
118
+ var div = document.getDivList();
119
+ var n = [];
120
+ for (var i=0; i < div.length; i++)
121
+ if (div[i].className == cn) n.push(div[i]);
122
+ return n;
123
+ }
124
+
125
+ // ============================== focus
126
+ function Focus() {
127
+ }
128
+
129
+ Focus.prototype = {
130
+ apply: function() {
131
+ ar = document.getElementsByTagName("input");
132
+ this.findFocus(ar);
133
+ ar = document.getElementsByTagName("textarea");
134
+ this.findFocus(ar);
135
+ },
136
+
137
+ findFocus: function(ar) {
138
+ for (var i=0; i < ar.length; i++) {
139
+ var e = ar[i];
140
+ if (e.className == "focus") {
141
+ e.focus();
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ var g_focus = new Focus();
148
+
149
+ // ============================== toc
150
+ var g_toc;
151
+
152
+ function TOC() {
153
+ this.init = function() {
154
+ var t = getById("toc");
155
+ if (!t) return;
156
+ var h = t.firstChild;
157
+ if (!h) return;
158
+ if (h.nodeName != "H5") return;
159
+ h.onmousedown = this.toggle;
160
+ this.toggle();
161
+ }
162
+
163
+ this.toggle = function() {
164
+ var t = getById("toc");
165
+ if (!t) return;
166
+ var i = getById("tocinside");
167
+ if (!i) return;
168
+ if (i.style.display == "none"){
169
+ i.style.display = "block";
170
+ }else{
171
+ var w = t.clientWidth;
172
+ i.style.display = "none";
173
+ t.style.width = w+"px";
174
+ }
175
+ }
176
+ }
@@ -0,0 +1,101 @@
1
+ // Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2
+ //
3
+ // See scriptaculous.js for full license.
4
+
5
+ var Builder = {
6
+ NODEMAP: {
7
+ AREA: 'map',
8
+ CAPTION: 'table',
9
+ COL: 'table',
10
+ COLGROUP: 'table',
11
+ LEGEND: 'fieldset',
12
+ OPTGROUP: 'select',
13
+ OPTION: 'select',
14
+ PARAM: 'object',
15
+ TBODY: 'table',
16
+ TD: 'table',
17
+ TFOOT: 'table',
18
+ TH: 'table',
19
+ THEAD: 'table',
20
+ TR: 'table'
21
+ },
22
+ // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
23
+ // due to a Firefox bug
24
+ node: function(elementName) {
25
+ elementName = elementName.toUpperCase();
26
+
27
+ // try innerHTML approach
28
+ var parentTag = this.NODEMAP[elementName] || 'div';
29
+ var parentElement = document.createElement(parentTag);
30
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
31
+ parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
32
+ } catch(e) {}
33
+ var element = parentElement.firstChild || null;
34
+
35
+ // see if browser added wrapping tags
36
+ if(element && (element.tagName != elementName))
37
+ element = element.getElementsByTagName(elementName)[0];
38
+
39
+ // fallback to createElement approach
40
+ if(!element) element = document.createElement(elementName);
41
+
42
+ // abort if nothing could be created
43
+ if(!element) return;
44
+
45
+ // attributes (or text)
46
+ if(arguments[1])
47
+ if(this._isStringOrNumber(arguments[1]) ||
48
+ (arguments[1] instanceof Array)) {
49
+ this._children(element, arguments[1]);
50
+ } else {
51
+ var attrs = this._attributes(arguments[1]);
52
+ if(attrs.length) {
53
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
54
+ parentElement.innerHTML = "<" +elementName + " " +
55
+ attrs + "></" + elementName + ">";
56
+ } catch(e) {}
57
+ element = parentElement.firstChild || null;
58
+ // workaround firefox 1.0.X bug
59
+ if(!element) {
60
+ element = document.createElement(elementName);
61
+ for(attr in arguments[1])
62
+ element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
63
+ }
64
+ if(element.tagName != elementName)
65
+ element = parentElement.getElementsByTagName(elementName)[0];
66
+ }
67
+ }
68
+
69
+ // text, or array of children
70
+ if(arguments[2])
71
+ this._children(element, arguments[2]);
72
+
73
+ return element;
74
+ },
75
+ _text: function(text) {
76
+ return document.createTextNode(text);
77
+ },
78
+ _attributes: function(attributes) {
79
+ var attrs = [];
80
+ for(attribute in attributes)
81
+ attrs.push((attribute=='className' ? 'class' : attribute) +
82
+ '="' + attributes[attribute].toString().escapeHTML() + '"');
83
+ return attrs.join(" ");
84
+ },
85
+ _children: function(element, children) {
86
+ if(typeof children=='object') { // array can hold nodes and text
87
+ children.flatten().each( function(e) {
88
+ if(typeof e=='object')
89
+ element.appendChild(e)
90
+ else
91
+ if(Builder._isStringOrNumber(e))
92
+ element.appendChild(Builder._text(e));
93
+ });
94
+ } else
95
+ if(Builder._isStringOrNumber(children))
96
+ element.appendChild(Builder._text(children));
97
+ },
98
+ _isStringOrNumber: function(param) {
99
+ return(typeof param=='string' || typeof param=='number');
100
+ }
101
+ }