grandstand 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/.gitignore +2 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README +7 -0
  4. data/Rakefile +44 -0
  5. data/VERSION +1 -0
  6. data/app/controllers/admin/galleries_controller.rb +52 -0
  7. data/app/controllers/admin/images_controller.rb +68 -0
  8. data/app/controllers/admin/main_controller.rb +36 -0
  9. data/app/controllers/admin/pages_controller.rb +51 -0
  10. data/app/controllers/admin/posts_controller.rb +48 -0
  11. data/app/controllers/admin/sessions_controller.rb +41 -0
  12. data/app/controllers/admin/templates_controller.rb +6 -0
  13. data/app/controllers/admin/users_controller.rb +48 -0
  14. data/app/controllers/galleries_controller.rb +5 -0
  15. data/app/controllers/pages_controller.rb +5 -0
  16. data/app/controllers/posts_controller.rb +5 -0
  17. data/app/helpers/admin/main_helper.rb +31 -0
  18. data/app/helpers/admin/pages_helper.rb +2 -0
  19. data/app/helpers/admin/posts_helper.rb +2 -0
  20. data/app/helpers/admin/sessions_helper.rb +2 -0
  21. data/app/helpers/admin/templates_helper.rb +2 -0
  22. data/app/helpers/admin/users_helper.rb +2 -0
  23. data/app/helpers/pages_helper.rb +2 -0
  24. data/app/helpers/posts_helper.rb +2 -0
  25. data/app/helpers/site_helper.rb +2 -0
  26. data/app/models/gallery.rb +22 -0
  27. data/app/models/image.rb +61 -0
  28. data/app/models/page.rb +45 -0
  29. data/app/models/page_section.rb +6 -0
  30. data/app/models/post.rb +27 -0
  31. data/app/models/template.rb +33 -0
  32. data/app/models/user.rb +68 -0
  33. data/app/stylesheets/_buttons.less +76 -0
  34. data/app/stylesheets/_dialogs.less +85 -0
  35. data/app/stylesheets/application.less +238 -0
  36. data/app/stylesheets/global.less +435 -0
  37. data/app/stylesheets/login.less +30 -0
  38. data/app/stylesheets/wysiwyg.less +96 -0
  39. data/app/views/admin/galleries/_form.html.erb +11 -0
  40. data/app/views/admin/galleries/_gallery.html.erb +16 -0
  41. data/app/views/admin/galleries/_list.html.erb +17 -0
  42. data/app/views/admin/galleries/delete.html.erb +8 -0
  43. data/app/views/admin/galleries/edit.html.erb +8 -0
  44. data/app/views/admin/galleries/editor.html.erb +13 -0
  45. data/app/views/admin/galleries/editor_with_images.html.erb +19 -0
  46. data/app/views/admin/galleries/index.html.erb +13 -0
  47. data/app/views/admin/galleries/new.html.erb +8 -0
  48. data/app/views/admin/galleries/show.html.erb +15 -0
  49. data/app/views/admin/images/_form.html.erb +11 -0
  50. data/app/views/admin/images/delete.html.erb +8 -0
  51. data/app/views/admin/images/edit.html.erb +8 -0
  52. data/app/views/admin/images/new.html.erb +8 -0
  53. data/app/views/admin/images/upload.html.erb +11 -0
  54. data/app/views/admin/main/index.html.erb +10 -0
  55. data/app/views/admin/pages/_form.html.erb +33 -0
  56. data/app/views/admin/pages/_left.html.erb +3 -0
  57. data/app/views/admin/pages/_row.html.erb +9 -0
  58. data/app/views/admin/pages/delete.html.erb +8 -0
  59. data/app/views/admin/pages/edit.html.erb +8 -0
  60. data/app/views/admin/pages/index.html.erb +20 -0
  61. data/app/views/admin/pages/new.html.erb +8 -0
  62. data/app/views/admin/pages/show.html.erb +3 -0
  63. data/app/views/admin/posts/_form.html.erb +29 -0
  64. data/app/views/admin/posts/_left.html.erb +3 -0
  65. data/app/views/admin/posts/_list.html.erb +22 -0
  66. data/app/views/admin/posts/delete.html.erb +9 -0
  67. data/app/views/admin/posts/edit.html.erb +10 -0
  68. data/app/views/admin/posts/index.html.erb +10 -0
  69. data/app/views/admin/posts/new.html.erb +10 -0
  70. data/app/views/admin/posts/show.html.erb +4 -0
  71. data/app/views/admin/sessions/forgot.html.erb +8 -0
  72. data/app/views/admin/sessions/show.html.erb +12 -0
  73. data/app/views/admin/shared/_flash.html.erb +3 -0
  74. data/app/views/admin/users/_form.html.erb +16 -0
  75. data/app/views/admin/users/_left.html.erb +3 -0
  76. data/app/views/admin/users/delete.html.erb +10 -0
  77. data/app/views/admin/users/edit.html.erb +8 -0
  78. data/app/views/admin/users/index.html.erb +22 -0
  79. data/app/views/admin/users/new.html.erb +8 -0
  80. data/app/views/admin/users/show.html.erb +12 -0
  81. data/app/views/galleries/index.html.erb +0 -0
  82. data/app/views/galleries/show.html.erb +12 -0
  83. data/app/views/layouts/admin.html.erb +80 -0
  84. data/app/views/layouts/admin_login.html.erb +17 -0
  85. data/app/views/layouts/admin_xhr.html.erb +3 -0
  86. data/app/views/pages/show.html.erb +8 -0
  87. data/app/views/posts/show.html.erb +3 -0
  88. data/app/views/shared/404.html.erb +5 -0
  89. data/app/views/shared/gallery.html +14 -0
  90. data/app/views/shared/image.html +1 -0
  91. data/app/views/shared/page.html +0 -0
  92. data/app/views/shared/post.html +3 -0
  93. data/grandstand.gemspec +189 -0
  94. data/lib/grandstand/application.rb +50 -0
  95. data/lib/grandstand/controller/development.rb +15 -0
  96. data/lib/grandstand/controller.rb +104 -0
  97. data/lib/grandstand/helper.rb +117 -0
  98. data/lib/grandstand/routes.rb +59 -0
  99. data/lib/grandstand/session.rb +25 -0
  100. data/lib/grandstand.rb +27 -0
  101. data/public/.DS_Store +0 -0
  102. data/public/admin/.DS_Store +0 -0
  103. data/public/admin/images/.DS_Store +0 -0
  104. data/public/admin/images/background-input.gif +0 -0
  105. data/public/admin/images/background-progress-bar.png +0 -0
  106. data/public/admin/images/background-progress-complete.gif +0 -0
  107. data/public/admin/images/background-progress.gif +0 -0
  108. data/public/admin/images/icons/.DS_Store +0 -0
  109. data/public/admin/images/icons/add.png +0 -0
  110. data/public/admin/images/icons/collapse.png +0 -0
  111. data/public/admin/images/icons/delete.png +0 -0
  112. data/public/admin/images/icons/edit.png +0 -0
  113. data/public/admin/images/icons/editor/bold.png +0 -0
  114. data/public/admin/images/icons/editor/gallery.png +0 -0
  115. data/public/admin/images/icons/editor/image-center.png +0 -0
  116. data/public/admin/images/icons/editor/image-left.png +0 -0
  117. data/public/admin/images/icons/editor/image-right.png +0 -0
  118. data/public/admin/images/icons/editor/image.png +0 -0
  119. data/public/admin/images/icons/editor/italic.png +0 -0
  120. data/public/admin/images/icons/editor/ordered-list.png +0 -0
  121. data/public/admin/images/icons/editor/quote.png +0 -0
  122. data/public/admin/images/icons/editor/source.png +0 -0
  123. data/public/admin/images/icons/editor/strikethrough.png +0 -0
  124. data/public/admin/images/icons/editor/underline.png +0 -0
  125. data/public/admin/images/icons/editor/unordered-list.png +0 -0
  126. data/public/admin/images/icons/error.png +0 -0
  127. data/public/admin/images/icons/expand.png +0 -0
  128. data/public/admin/images/icons/galleries.png +0 -0
  129. data/public/admin/images/icons/gallery.png +0 -0
  130. data/public/admin/images/icons/image.png +0 -0
  131. data/public/admin/images/icons/okay.png +0 -0
  132. data/public/admin/images/icons/pages.png +0 -0
  133. data/public/admin/images/icons/posts.png +0 -0
  134. data/public/admin/images/icons/upload.png +0 -0
  135. data/public/admin/images/icons/users.png +0 -0
  136. data/public/admin/images/logo.png +0 -0
  137. data/public/admin/images/spinner-dark.gif +0 -0
  138. data/public/admin/images/uploader.swf +0 -0
  139. data/public/admin/javascripts/application.js +231 -0
  140. data/public/admin/javascripts/jquery.js +404 -0
  141. data/public/admin/javascripts/mustache.js +324 -0
  142. data/public/admin/javascripts/selection.js +280 -0
  143. data/public/admin/javascripts/string.js +264 -0
  144. data/public/admin/javascripts/wysiwyg.js +335 -0
  145. data/public/admin/stylesheets/application.css +1 -0
  146. data/public/admin/stylesheets/global.css +1 -0
  147. data/public/admin/stylesheets/login.css +1 -0
  148. data/public/admin/stylesheets/wysiwyg-content.css +20 -0
  149. data/public/admin/stylesheets/wysiwyg.css +1 -0
  150. data/vendor/cache/more-0.1.1.gem +0 -0
  151. metadata +216 -0
@@ -0,0 +1,264 @@
1
+ String.prototype.clean = function() {
2
+ var entities = {
3
+ 160: "nbsp",
4
+ 161: "iexcl",
5
+ 162: "cent",
6
+ 163: "pound",
7
+ 164: "curren",
8
+ 165: "yen",
9
+ 166: "brvbar",
10
+ 167: "sect",
11
+ 168: "uml",
12
+ 169: "copy",
13
+ 170: "ordf",
14
+ 171: "laquo",
15
+ 172: "not",
16
+ 173: "shy",
17
+ 174: "reg",
18
+ 175: "macr",
19
+ 176: "deg",
20
+ 177: "plusmn",
21
+ 178: "sup2",
22
+ 179: "sup3",
23
+ 180: "acute",
24
+ 181: "micro",
25
+ 182: "para",
26
+ 183: "middot",
27
+ 184: "cedil",
28
+ 185: "sup1",
29
+ 186: "ordm",
30
+ 187: "raquo",
31
+ 188: "frac14",
32
+ 189: "frac12",
33
+ 190: "frac34",
34
+ 191: "iquest",
35
+ 192: "Agrave",
36
+ 193: "Aacute",
37
+ 194: "Acirc",
38
+ 195: "Atilde",
39
+ 196: "Auml",
40
+ 197: "Aring",
41
+ 198: "AElig",
42
+ 199: "Ccedil",
43
+ 200: "Egrave",
44
+ 201: "Eacute",
45
+ 202: "Ecirc",
46
+ 203: "Euml",
47
+ 204: "Igrave",
48
+ 205: "Iacute",
49
+ 206: "Icirc",
50
+ 207: "Iuml",
51
+ 208: "ETH",
52
+ 209: "Ntilde",
53
+ 210: "Ograve",
54
+ 211: "Oacute",
55
+ 212: "Ocirc",
56
+ 213: "Otilde",
57
+ 214: "Ouml",
58
+ 215: "times",
59
+ 216: "Oslash",
60
+ 217: "Ugrave",
61
+ 218: "Uacute",
62
+ 219: "Ucirc",
63
+ 220: "Uuml",
64
+ 221: "Yacute",
65
+ 222: "THORN",
66
+ 223: "szlig",
67
+ 224: "agrave",
68
+ 225: "aacute",
69
+ 226: "acirc",
70
+ 227: "atilde",
71
+ 228: "auml",
72
+ 229: "aring",
73
+ 230: "aelig",
74
+ 231: "ccedil",
75
+ 232: "egrave",
76
+ 233: "eacute",
77
+ 234: "ecirc",
78
+ 235: "euml",
79
+ 236: "igrave",
80
+ 237: "iacute",
81
+ 238: "icirc",
82
+ 239: "iuml",
83
+ 240: "eth",
84
+ 241: "ntilde",
85
+ 242: "ograve",
86
+ 243: "oacute",
87
+ 244: "ocirc",
88
+ 245: "otilde",
89
+ 246: "ouml",
90
+ 247: "divide",
91
+ 248: "oslash",
92
+ 249: "ugrave",
93
+ 250: "uacute",
94
+ 251: "ucirc",
95
+ 252: "uuml",
96
+ 253: "yacute",
97
+ 254: "thorn",
98
+ 255: "yuml",
99
+ 402: "fnof",
100
+ 913: "Alpha",
101
+ 914: "Beta",
102
+ 915: "Gamma",
103
+ 916: "Delta",
104
+ 917: "Epsilon",
105
+ 918: "Zeta",
106
+ 919: "Eta",
107
+ 920: "Theta",
108
+ 921: "Iota",
109
+ 922: "Kappa",
110
+ 923: "Lambda",
111
+ 924: "Mu",
112
+ 925: "Nu",
113
+ 926: "Xi",
114
+ 927: "Omicron",
115
+ 928: "Pi",
116
+ 929: "Rho",
117
+ 931: "Sigma",
118
+ 932: "Tau",
119
+ 933: "Upsilon",
120
+ 934: "Phi",
121
+ 935: "Chi",
122
+ 936: "Psi",
123
+ 937: "Omega",
124
+ 945: "alpha",
125
+ 946: "beta",
126
+ 947: "gamma",
127
+ 948: "delta",
128
+ 949: "epsilon",
129
+ 950: "zeta",
130
+ 951: "eta",
131
+ 952: "theta",
132
+ 953: "iota",
133
+ 954: "kappa",
134
+ 955: "lambda",
135
+ 956: "mu",
136
+ 957: "nu",
137
+ 958: "xi",
138
+ 959: "omicron",
139
+ 960: "pi",
140
+ 961: "rho",
141
+ 962: "sigmaf",
142
+ 963: "sigma",
143
+ 964: "tau",
144
+ 965: "upsilon",
145
+ 966: "phi",
146
+ 967: "chi",
147
+ 968: "psi",
148
+ 969: "omega",
149
+ 977: "thetasym",
150
+ 978: "upsih",
151
+ 982: "piv",
152
+ 8226: "bull",
153
+ 8230: "hellip",
154
+ 8242: "prime",
155
+ 8243: "Prime",
156
+ 8254: "oline",
157
+ 8260: "frasl",
158
+ 8472: "weierp",
159
+ 8465: "image",
160
+ 8476: "real",
161
+ 8482: "trade",
162
+ 8501: "alefsym",
163
+ 8592: "larr",
164
+ 8593: "uarr",
165
+ 8594: "rarr",
166
+ 8595: "darr",
167
+ 8596: "harr",
168
+ 8629: "crarr",
169
+ 8656: "lArr",
170
+ 8657: "uArr",
171
+ 8658: "rArr",
172
+ 8659: "dArr",
173
+ 8660: "hArr",
174
+ 8704: "forall",
175
+ 8706: "part",
176
+ 8707: "exist",
177
+ 8709: "empty",
178
+ 8711: "nabla",
179
+ 8712: "isin",
180
+ 8713: "notin",
181
+ 8715: "ni",
182
+ 8719: "prod",
183
+ 8721: "sum",
184
+ 8722: "minus",
185
+ 8727: "lowast",
186
+ 8730: "radic",
187
+ 8733: "prop",
188
+ 8734: "infin",
189
+ 8736: "ang",
190
+ 8743: "and",
191
+ 8744: "or",
192
+ 8745: "cap",
193
+ 8746: "cup",
194
+ 8747: "int",
195
+ 8756: "there4",
196
+ 8764: "sim",
197
+ 8773: "cong",
198
+ 8776: "asymp",
199
+ 8800: "ne",
200
+ 8801: "equiv",
201
+ 8804: "le",
202
+ 8805: "ge",
203
+ 8834: "sub",
204
+ 8835: "sup",
205
+ 8836: "nsub",
206
+ 8838: "sube",
207
+ 8839: "supe",
208
+ 8853: "oplus",
209
+ 8855: "otimes",
210
+ 8869: "perp",
211
+ 8901: "sdot",
212
+ 8968: "lceil",
213
+ 8969: "rceil",
214
+ 8970: "lfloor",
215
+ 8971: "rfloor",
216
+ 9001: "lang",
217
+ 9002: "rang",
218
+ 9674: "loz",
219
+ 9824: "spades",
220
+ 9827: "clubs",
221
+ 9829: "hearts",
222
+ 9830: "diams",
223
+ 34: "quot",
224
+ 38: "amp",
225
+ 60: "lt",
226
+ 62: "gt",
227
+ 338: "OElig",
228
+ 339: "oelig",
229
+ 352: "Scaron",
230
+ 353: "scaron",
231
+ 376: "Yuml",
232
+ 710: "circ",
233
+ 732: "tilde",
234
+ 8194: "ensp",
235
+ 8195: "emsp",
236
+ 8201: "thinsp",
237
+ 8204: "zwnj",
238
+ 8205: "zwj",
239
+ 8206: "lrm",
240
+ 8207: "rlm",
241
+ 8211: "ndash",
242
+ 8212: "mdash",
243
+ 8216: "lsquo",
244
+ 8217: "rsquo",
245
+ 8218: "sbquo",
246
+ 8220: "ldquo",
247
+ 8221: "rdquo",
248
+ 8222: "bdquo",
249
+ 8224: "dagger",
250
+ 8225: "Dagger",
251
+ 8240: "permil",
252
+ 8249: "lsaquo",
253
+ 8250: "rsaquo",
254
+ 8364: "euro"
255
+ };
256
+ return this.replace(/[^\x00-\x7F]|["'<>&]/igm, function(character) {
257
+ var entity = entities[character.charCodeAt(0)];
258
+ if (!entity) {
259
+ entity = 'foo';
260
+ alert('can\'t encode weirdness');
261
+ }
262
+ return '&' + entity + ';';
263
+ });
264
+ };
@@ -0,0 +1,335 @@
1
+ require('selection');
2
+ require('mustache');
3
+
4
+ jQuery.fn.wysiwyg = function(template, rootSelector) {
5
+ var editor;
6
+ this.each(function() {
7
+ editor = new Editor(this, template, rootSelector);
8
+ });
9
+ return editor;
10
+ };
11
+
12
+ var Editor = function(textarea, template, rootSelector) {
13
+ // Load up mustache
14
+ this.template = template;
15
+ // Find the element we should make editable. Defaults to the BODY element
16
+ // once we've rendered the template.
17
+ this.rootSelector = rootSelector || 'body';
18
+ this.textarea = $(textarea);
19
+ this.container = $('<div class="wysiwyg"></div>');
20
+ this.toolbar = $('<div class="toolbar"></div>').hide();
21
+ // this.container.append(this.toolbar);
22
+ var toolbarItems = [
23
+ {id: 'bold', alt: 'Make text bold'},
24
+ {id: 'italic', alt: 'Make text italic'},
25
+ {id: 'hyperlink', alt: 'Insert a link'},
26
+ {id: 'unordered_list', alt: 'Insert a bullet list'},
27
+ {id: 'ordered_list', alt: 'Insert a numbered list'},
28
+ {id: 'gallery', alt: 'Embed a gallery'},
29
+ {id: 'image', alt: 'Embed an image'}
30
+ ];
31
+ var editor = this;
32
+ // $.each(toolbarItems, function() {
33
+ // var button = $('<a class="button" rel="' + this.id + '" title="' + this.alt + '"><span class=" icon ' + this.id.replace('_', '-') + '"></span></a>');
34
+ // button.click(function() {
35
+ // editor.buttonClick(button);
36
+ // });
37
+ // editor.toolbar.append(button);
38
+ // });
39
+ this.iframe = $('<iframe frameBorder="0" id="' + textarea.id + '_editor"></iframe>').hide();
40
+ this.container.height(this.textarea.height() + 6.0);
41
+ this.textarea.height(this.textarea.height() + 5.0);
42
+ this.container.append(this.iframe);
43
+ this.startLoading();
44
+ this.textarea.after(this.container);
45
+ this.container.append(this.textarea);
46
+ $.get('/admin/templates/' + template, function(response) {
47
+ editor.template = response;
48
+ editor.initialize();
49
+ });
50
+ };
51
+
52
+ Editor.prototype = {
53
+ buttonClick: function(button) {
54
+ switch(button.attr('rel')) {
55
+ case 'bold':
56
+ var selection = this.selection();
57
+ if (selection.wrappedIn('strong')) {
58
+ selection.unwrap('strong');
59
+ } else {
60
+ selection.wrap('strong');
61
+ }
62
+ // this.document.execCommand('bold', false, null);
63
+ break;
64
+ case 'italic':
65
+ break;
66
+ case 'hyperlink':
67
+ this.document.execCommand('CreateLink', false, prompt("Please enter an URL:"));
68
+ break;
69
+ case 'unordered_list':
70
+ this.document.execCommand('InsertUnorderedList', false, null);
71
+ break;
72
+ case 'ordered_list':
73
+ this.document.execCommand('InsertOrderedList', false, null);
74
+ break;
75
+ case 'gallery':
76
+ this.dialog('/admin/galleries', function() {
77
+
78
+ }, function() {
79
+
80
+ });
81
+ break;
82
+ case 'image':
83
+ this.dialog('/admin/galleries?image=yup', function(dialog) {
84
+ var editor = this;
85
+ dialog.find('.image').click(function(event) {
86
+ event.preventDefault();
87
+ var image = $(this).find('img');
88
+ image = image.clone();
89
+ image.addClass('left');
90
+ editor.closeDialog();
91
+ var imageWrap = $('<div></div>');
92
+ imageWrap.append(image);
93
+ editor.selection().insert(imageWrap.html());
94
+ });
95
+ }, function() {
96
+
97
+ });
98
+ break;
99
+ }
100
+ },
101
+ closeDialog: function(block) {
102
+ var dialogs = this.container.find('.dialog');
103
+ if (dialogs.length === 0) {
104
+ if (block) {
105
+ block.call(this);
106
+ }
107
+ } else {
108
+ var editor = this;
109
+ dialogs.animate({top: -(dialogs.height())}, 300, function() {
110
+ $(this).remove();
111
+ if (block) {
112
+ block.call(editor);
113
+ }
114
+ });
115
+ }
116
+ },
117
+ // Loads up a dialog box using AJAX contents, and animates it in over top of the editor.
118
+ //
119
+ // `onLoad` will be called when the contents is loaded, and `this` will be the editor
120
+ // instance, and the only argument passed will be the dialog DIV. This allows you to
121
+ // define behavior for the dialog's controls.
122
+ //
123
+ // `onSubmit` is called when the user submits the form. `this` will be the editor instance
124
+ // (like onLoad), and the only argument passed will be an Object corresponding to the form
125
+ // elements. So a form like:
126
+ //
127
+ // "image[caption]=I am an image Caption&image[align]=left" will be:
128
+ //
129
+ // {image: {caption: "I am an image", align: "left"}}
130
+ //
131
+ dialog: function(url, onLoad, onSubmit) {
132
+ var editor = this;
133
+ // Setup a dialog container
134
+ var dialog = $('<div class="dialog"></div>');
135
+ // Setup a method to wrap the dialog. If the plugin passes a string, we'll render a
136
+ // dialog with the contents at that URL. If it passes an object, we'll just append it
137
+ // to `dialog` and display IT.
138
+ var processDialog = function() {
139
+ editor.container.append(dialog.hide());
140
+ var top = editor.toolbar.outerHeight();
141
+ dialog.css('height', editor.container.height() - top * 2);
142
+ if (onLoad && typeof(onLoad) == 'function') {
143
+ onLoad.call(editor, dialog);
144
+ }
145
+ dialog.css('top', -(dialog.height()) + top).show().animate({top: top}, 300);
146
+ dialog.find('form').submit(function(event) {
147
+ event.preventDefault();
148
+ if (onSubmit && typeof(onSubmit) == 'function') {
149
+ onSubmit.call(editor, $(this).serialize());
150
+ }
151
+ });
152
+ };
153
+ if (typeof(url) == 'string') {
154
+ editor.startLoading();
155
+ $.get(url, function(response) {
156
+ response = $(response);
157
+ dialog.append(response);
158
+ editor.closeDialog(function() {
159
+ editor.stopLoading();
160
+ processDialog.call(editor);
161
+ });
162
+ });
163
+ } else {
164
+ dialog.append(url);
165
+ editor.closeDialog(processDialog);
166
+ }
167
+ },
168
+ editImage: function(image) {
169
+ image = $(image);
170
+ var form = $('<form class="pad"></form>');
171
+ form.append(image.clone());
172
+ this.dialog(form, false, function() {
173
+ alert('okay!');
174
+ });
175
+ },
176
+ focus: function(selector, offset) {
177
+ var selection = this.selection();
178
+ selection.select(selector || ':block', offset || 0);
179
+ },
180
+ initialize: function() {
181
+ var editor = this;
182
+ try {
183
+ this.window = this.iframe[0].contentWindow;
184
+ this.document = this.window.document;
185
+ } catch(exception) {
186
+ return setTimeout(function(){ editor.initialize(); }, 10);
187
+ }
188
+ this.write(this.textarea.val());
189
+ this.body = this.document.body;
190
+ // Make sure all data is saved, no matter what.
191
+ this.textarea.parents('form').submit(function() {
192
+ editor.save();
193
+ });
194
+ this.textarea.hide();
195
+ this.toolbar.show();
196
+ this.iframe.height(this.textarea.height() - this.toolbar.height() - 4);
197
+ this.iframe.show();
198
+ this.root = $(this.document).find(this.rootSelector);
199
+ this.root.find('img').live('click', function(event) {
200
+ event.preventDefault();
201
+ event.stopPropagation();
202
+ editor.editImage(this);
203
+ });
204
+ $([this.iframe, this.root, this.document.body]).click(function(event) {
205
+ console.log(event.target);
206
+ if ($(event.target).childOf(editor.root)) {
207
+ return;
208
+ } else {
209
+ event.preventDefault();
210
+ editor.closeDialog();
211
+ editor.focus(':block:last', -1);
212
+ }
213
+ });
214
+ $([this.document, document]).keyup(function(event) {
215
+ if (event.keyCode == 27) {
216
+ editor.closeDialog();
217
+ editor.focus();
218
+ } else {
219
+ editor.selection().normalize();
220
+ }
221
+ });
222
+ var pasting;
223
+ this.root.keyup(function() {
224
+ clearTimeout(editor.timeout);
225
+ editor.timeout = setTimeout(function() { editor.save(); }, 100);
226
+ if (pasting) {
227
+ var before = $('<div></div>').html(pasting.shift()).html(), after = $('<div></div>').html(pasting.shift()).html();
228
+ console.log(after);
229
+ }
230
+ pasting = false;
231
+ }).keydown(function(event) {
232
+ if (event.keyCode == 13) {
233
+ // If a user hits "Enter", we'll hijack the event and clean it up just a little bit
234
+ var selection = editor.selection();
235
+ if (event.shiftKey) {
236
+ // If the user held shift and pressed enter, split it with a line break
237
+ selection.insert('<br />', true);
238
+ } else {
239
+ // If the selection is inside of a list, let the browser do its magic. In
240
+ // other words: don't interrupt anything; just leave well enough alone.
241
+ if (selection.wrappedIn('li, ol, ul')) {
242
+ return;
243
+ }
244
+ // If we're not inside of an li / ol / ul, default behavior is to split the
245
+ // selected content into two paragraphs, one with the content before the
246
+ // selection, and another with the content after it.
247
+ selection.split('p');
248
+ }
249
+
250
+ event.preventDefault();
251
+ event.stopPropagation();
252
+
253
+ } else if (event.keyCode == 86 && (event.metaKey || event.ctrlKey) && !pasting) {
254
+ // If the user is pasting, we'll prep keyUp for the past event. This means we'll
255
+ // set the pasting variable to the HTML content before and after the current selection.
256
+ // Once the content is pasted, we'll parse out WHAT was pasted in, clean it up, and viola!
257
+ // Better content.
258
+ pasting = [editor.selection().beforeAll(), editor.selection().afterAll()];
259
+ }
260
+ });
261
+ this.root.attr('contentEditable', 'true').css('outline', '0');
262
+ // this.document.body.contentEditable = 'true';
263
+ this.focus();
264
+ this.stopLoading();
265
+ },
266
+ // Called when the editor is loaded up for the first time and off finding dependencies / etc.
267
+ // Just puts a white cover over the textarea and waits for everything to load before saying,
268
+ // "okay, now you can edit"
269
+ startLoading: function() {
270
+ if (!this.cover) {
271
+ this.cover = $('<div class="cover"></div>');
272
+ this.loading = $('<div class="loading"></div>');
273
+ this.cover.append(this.loading);
274
+ this.container.append(this.cover);
275
+ }
276
+ this.cover.show();
277
+ },
278
+ stopLoading: function() {
279
+ if (this.cover) {
280
+ var cover = this.cover;
281
+ setTimeout(function() {
282
+ cover.fadeOut();
283
+ }, 100);
284
+ }
285
+ },
286
+ save: function() {
287
+ var html = this.root.html();
288
+
289
+ // Clean that HTML good
290
+ html = html.replace(/<DIV><BR class="khtml-block-placeholder"><\/DIV>/ig, '<br />');
291
+ html = html.replace(/<[^> ]*/ig, function(match) {
292
+ return match.toLowerCase();
293
+ });
294
+ html = html.replace(/<[^>]*>/ig, function(match) {
295
+ match = match.replace(/ [^=]+=/ig, function(match2) {
296
+ return match2.toLowerCase();
297
+ });
298
+ return match;
299
+ });
300
+ html = html.replace(/<[^>]*>/ig, function(match) {
301
+ match = match.replace(/( [^=]+=)([^"][^ >]*)/ig, "$1\"$2\"");
302
+ return match;
303
+ });
304
+ html = html.replace(/^\s+/, "");
305
+ html = html.replace(/\s+$/, "");
306
+ html = html.replace(/<br>/ig, "<br />");
307
+ html = html.replace(/<br \/>\s*<\/(h1|h2|h3|h4|h5|h6|li|p)/ig, "</$1");
308
+ html = html.replace(/(<img [^>]+[^\/])>/ig, "$1 />");
309
+ html = html.replace(/(<[^\/]>|<[^\/][^>]*[^\/]>)\s*<\/[^>]*>/ig, "");
310
+
311
+ this.textarea.val(html);
312
+ },
313
+ selection: function() {
314
+ return $(this.window).selection(this.rootSelector);
315
+ },
316
+ write: function(content) {
317
+ if (content == '') {
318
+ content = '<p>&nbsp;</p>';
319
+ }
320
+ var rendered = Mustache.to_html(this.template, {body: content});
321
+ var html = '<html><head><link href="/admin/stylesheets/wysiwyg-content.css" rel="stylesheet" type="text/css" /></head>';
322
+ html += '<body class="wysiwyg">';
323
+ html += rendered;
324
+ html += '</body>';
325
+ html += '</html>';
326
+ this.document.open();
327
+ this.document.write(html);
328
+ this.document.close();
329
+ }
330
+ };
331
+
332
+ jQuery.fn.childOf = function(a){
333
+ a = (typeof a=='string')?$(a):a;
334
+ return (a.length == 1 && this.length === this.map(function(){if($.inArray(this,a.children())!=-1){return this;}}).length);
335
+ };
@@ -0,0 +1 @@
1
+ #grandstand .styled-toolbar { background-color: #a7a7a7; background-image: -moz-linear-gradient(top, #cacaca, #a7a7a7); background-image: -webkit-gradient(linear, left top, left bottom, from(#cacaca), to(#a7a7a7)); overflow: hidden; padding: 5px;}#grandstand .button-default { background-color: #ececec; background-image: -moz-linear-gradient(top, #f4f4f4, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec)); border: 1px solid #d4d4d4; color: #333333; cursor: pointer; display: inline-block; font-size: 12px; font-weight: bold; line-height: 16px; margin: 0; overflow: hidden; padding: 4px 10px; text-decoration: none; text-shadow: #ffffff 0 1px 0; vertical-align: baseline; vertical-align: middle; -moz-border-radius: 2px; -webkit-border-radius: 2px;}#grandstand .button-hover { background-color: #3072b3; background-image: -moz-linear-gradient(top, #599bdc, #3072b3); background-image: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3)); border-color: #518cc6; border-bottom-color: #2a65a0; color: #ffffff; text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;}#grandstand .button-active { background-color: #599bdc; background-image: -moz-linear-gradient(top, #3072b3, #599bdc); background-image: -webkit-gradient(linear, left top, left bottom, from(#3072b3), to(#599bdc)); border-bottom-color: #518cc6; border-top-color: #2a65a0; -moz-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px; -webkit-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px;}#grandstand .button-grey { background-color: #333333; background-image: -moz-linear-gradient(top, #333333, #444444); background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#333333)); border-color: #000000; color: #ffffff; text-shadow: #000000 0 -1px 0;}#grandstand .button-grey-hover { background-color: #444444; background-image: -moz-linear-gradient(top, #333333, #444444); background-image: -webkit-gradient(linear, left top, left bottom, from(#333333), to(#444444));}#grandstand .button-grey-active { -moz-box-shadow: inset #000000 0 0px 1px; -webkit-box-shadow: inset #000000 0 0px 1px;}body { overflow: hidden; }#header { background-color: #eeeeee; background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd)); border-bottom: 1px solid #eeeeee; border-top: 1px solid #ffffff; height: 32px; left: 0; padding: 0 10px; position: absolute; width: 100%; z-index: 2; box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-shadow: #111111 0 2px 2px; -webkit-box-shadow: #999999 0 1px 2px;}#header .float-right { line-height: 30px; }#header .float-right a { color: #000000; display: inline-block; padding: 0 7px;}#header .float-right a:hover { background-color: rgba(255, 255, 255, 0.3); text-decoration: underline;}#logo { display: inline-block; padding-top: 0;}#content { height: 100%; overflow: hidden; padding: 31px 0 0 0; position: absolute; width: 100%; box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box;}#left { left: 20px; position: absolute; top: 51px; width: 150px;}#left .button { display: block; margin-bottom: 10px;}#left ul { background-color: #ececec; background-image: -moz-linear-gradient(top, #f4f4f4, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec)); list-style-type: none; margin: 0; padding: 0; -moz-border-radius: 2px; -webkit-border-radius: 2px;}#left ul li.first > a { border-top-color: #d4d4d4; -webkit-border-top-left-radius: 2px;}#left ul li.first a.expand { -webkit-border-top-left-radius: 0; -webkit-border-top-right-radius: 2px;}#left ul li { margin: 0; padding: 0;}#left ul li a { background-color: #ececec; background-image: -moz-linear-gradient(top, #f4f4f4, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec)); border: 1px solid #d4d4d4; color: #333333; cursor: pointer; display: inline-block; font-size: 12px; font-weight: bold; line-height: 16px; margin: 0; overflow: hidden; padding: 4px 10px; text-decoration: none; text-shadow: #ffffff 0 1px 0; vertical-align: baseline; vertical-align: middle; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-top-color: #f4f4f4; display: block; padding: 5px; -moz-border-radius: 0; -webkit-border-radius: 0;}#left ul li a:hover { background-color: #3072b3; background-image: -moz-linear-gradient(top, #599bdc, #3072b3); background-image: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3)); border-color: #518cc6; border-bottom-color: #2a65a0; color: #ffffff; text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;}#left ul li a:active { background-color: #599bdc; background-image: -moz-linear-gradient(top, #3072b3, #599bdc); background-image: -webkit-gradient(linear, left top, left bottom, from(#3072b3), to(#599bdc)); border-bottom-color: #518cc6; border-top-color: #2a65a0; -moz-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px; -webkit-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px;}#left ul li a.expand { float: right; margin-right: 0; height: 26px; line-height: 26px; padding: 0; width: 15px;}#left ul li a.expand span { background: url(../images/icons/expand.png) center bottom no-repeat; display: block; height: 16px; margin-top: 4px; width: 16px;}#left ul li ul { display: none; }#left ul li ul li a { font-size: 10px; padding-left: 20px;}#left ul li.expandable > a { border-right-width: 0; }#left ul li.expandable > a.expand { border-right-width: 1px; }#left ul li.last a { -webkit-border-bottom-left-radius: 2px; -webkit-border-bottom-right-radius: 2px;}#left ul li.expanded a.expand span { background-image: url(../images/icons/collapse.png); }#left ul li.expanded ul { display: block; }#main { height: 100%; padding: 20px 20px 20px 190px; overflow-x: hidden; overflow-y: auto; box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box;}#cover { background-color: #000000; height: 100%; left: 0; opacity: 0.6; position: fixed; top: 0; width: 100%; z-index: 2;}#pulldown { left: 50%; margin-left: -200px; position: fixed; top: 0; width: 400px; z-index: 3;}#pulldown h2 { background: #fafafa; border-bottom: 1px solid #dddddd; color: #555555; font-size: 10pt; margin-bottom: 0; padding: 5px; text-shadow: #ffffff 0 1px 0;}#pulldown form { border-top: 1px solid #ffffff; margin: 0;}#pulldown form .field { background: #f0f0f0; padding: 10px;}#pulldown .toolbar { background-color: #a7a7a7; background-image: -moz-linear-gradient(top, #cacaca, #a7a7a7); background-image: -webkit-gradient(linear, left top, left bottom, from(#cacaca), to(#a7a7a7)); overflow: hidden; padding: 5px; border-top: 1px solid #888888; text-align: right; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px;}#pulldown .toolbar .button { border-color: #888888; }
@@ -0,0 +1 @@
1
+ #grandstand .styled-toolbar { background-color: #a7a7a7; background-image: -moz-linear-gradient(top, #cacaca, #a7a7a7); background-image: -webkit-gradient(linear, left top, left bottom, from(#cacaca), to(#a7a7a7)); overflow: hidden; padding: 5px;}#grandstand .button-default { background-color: #ececec; background-image: -moz-linear-gradient(top, #f4f4f4, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec)); border: 1px solid #d4d4d4; color: #333333; cursor: pointer; display: inline-block; font-size: 12px; font-weight: bold; line-height: 16px; margin: 0; overflow: hidden; padding: 4px 10px; text-decoration: none; text-shadow: #ffffff 0 1px 0; vertical-align: baseline; vertical-align: middle; -moz-border-radius: 2px; -webkit-border-radius: 2px;}#grandstand .button-hover { background-color: #3072b3; background-image: -moz-linear-gradient(top, #599bdc, #3072b3); background-image: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3)); border-color: #518cc6; border-bottom-color: #2a65a0; color: #ffffff; text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;}#grandstand .button-active { background-color: #599bdc; background-image: -moz-linear-gradient(top, #3072b3, #599bdc); background-image: -webkit-gradient(linear, left top, left bottom, from(#3072b3), to(#599bdc)); border-bottom-color: #518cc6; border-top-color: #2a65a0; -moz-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px; -webkit-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px;}#grandstand .button-grey { background-color: #333333; background-image: -moz-linear-gradient(top, #333333, #444444); background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#333333)); border-color: #000000; color: #ffffff; text-shadow: #000000 0 -1px 0;}#grandstand .button-grey-hover { background-color: #444444; background-image: -moz-linear-gradient(top, #333333, #444444); background-image: -webkit-gradient(linear, left top, left bottom, from(#333333), to(#444444));}#grandstand .button-grey-active { -moz-box-shadow: inset #000000 0 0px 1px; -webkit-box-shadow: inset #000000 0 0px 1px;}body, html { min-height: 100%; }body.admin { background-color: #ffffff; background-image: -moz-linear-gradient(top, #ffffff, #eeeeee); background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee)); font: 12px Arial, sans-serif; margin: 0; padding: 0;}.admin a { cursor: pointer; text-decoration: none;}.admin a img { border-width: 0; }.admin form label { color: #666666; display: block; font: bold 12px Arial; margin-bottom: 3px;}.admin form .field { margin: 0; padding: 10px 5px;}.admin h1 { font-family: 'Calibiri', 'Helvetica Neue', Helvetica, Arial, sans-serif; }.admin h1 .button { margin-left: 10px; vertical-align: center;}.admin h2 { font-family: 'Calibiri', 'Helvetica Neue', Helvetica, Arial, sans-serif; }.admin h2 .button { margin-left: 10px; vertical-align: center;}.admin h1 { margin: 0 0 10px 0; font-size: 16pt;}.admin h2 { margin: 0 0 5px 0; font-size: 14pt;}.admin table { border-collapse: collapse; border-spacing: 0; width: 100%;}.admin table tbody { width: 100%; }.admin table tr { width: 100%; }.admin select.error { border: 1px solid #ff0000; }.admin select.multiple { min-height: 55px; min-width: 150px;}.admin select.small { width: 50px; }.admin textarea.small { height: 32px; width: 180px;}.admin textarea.wysiwyg { display: block; height: 400px; width: 100%;}.admin textarea.error { border: 1px solid #ff0000 !important; }.admin input.error { border: 1px solid #ff0000 !important; }.admin tr.item { background-color: #ffffff; }.admin tr.item.odd { background-color: #edf3fe; }.admin tr.item td { padding: 5px; }.admin tr.item td.icon { background-position: 5px 2px; padding-left: 25px;}.admin .container { float: left; margin: 0 0 10px 10px; padding: 0 !important; width: 220px;}.admin .container.gallery img { display: none; }.admin .container.gallery a img { display: block; padding: 10px;}.admin .container.image img { display: block; padding: 10px;}.admin .container:hover { background-color: #ececec; }.admin .dropdown { -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; -moz-box-shadow: #444444 0 2px 2px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -webkit-box-shadow: #444444 0 2px 2px;}.admin .grid { border-collapse: collapse; border: 1px solid #aaaaaa;}.admin .grid thead th { background: #eeeeee; padding: 5px; text-align: left;}.admin .grid tbody tr.row td { border-top: 1px solid #aaaaaa; padding: 5px;}.admin .grid tbody tr.row td.actions { text-align: right; }.admin .grid tbody tr.one { background-color: #ffffff; }.admin .grid tbody tr.two { background-color: #edf3fe; }.admin .grey { color: #666666; }.admin .header { background-color: #a7a7a7; background-image: -moz-linear-gradient(top, #cacaca, #a7a7a7); background-image: -webkit-gradient(linear, left top, left bottom, from(#cacaca), to(#a7a7a7)); border-bottom: 1px solid #888888; overflow: hidden; padding: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px;}.admin .header .float-left { cursor: move; font-weight: bold;}.admin .button { background-color: #ececec; background-image: -moz-linear-gradient(top, #f4f4f4, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec)); border: 1px solid #d4d4d4; color: #333333; cursor: pointer; display: inline-block; font-size: 12px; font-weight: bold; line-height: 16px; margin: 0; overflow: hidden; padding: 4px 10px; text-decoration: none; text-shadow: #ffffff 0 1px 0; vertical-align: baseline; vertical-align: middle; -moz-border-radius: 2px; -webkit-border-radius: 2px;}.admin .button::-moz-focus-inner { border: none; padding: 0 !important;}.admin .button:hover { background-color: #3072b3; background-image: -moz-linear-gradient(top, #599bdc, #3072b3); background-image: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3)); border-color: #518cc6; border-bottom-color: #2a65a0; color: #ffffff; text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;}.admin .button:active { background-color: #599bdc; background-image: -moz-linear-gradient(top, #3072b3, #599bdc); background-image: -webkit-gradient(linear, left top, left bottom, from(#3072b3), to(#599bdc)); border-bottom-color: #518cc6; border-top-color: #2a65a0; -moz-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px; -webkit-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px;}.admin .button.grey { background-color: #333333; background-image: -moz-linear-gradient(top, #333333, #444444); background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#333333)); border-color: #000000; color: #ffffff; text-shadow: #000000 0 -1px 0;}.admin .button.grey:hover { background-color: #444444; background-image: -moz-linear-gradient(top, #333333, #444444); background-image: -webkit-gradient(linear, left top, left bottom, from(#333333), to(#444444));}.admin .button.grey:active { -moz-box-shadow: inset #000000 0 0px 1px; -webkit-box-shadow: inset #000000 0 0px 1px;}.admin .error { margin-top: 5px; }.admin .errors label { color: #ff0000; }.admin .errors input.text { border: 1px solid #ff0000; }.admin .errors select { border: 1px solid #ff0000; }.admin .errors textarea { border: 1px solid #ff0000; }.admin .flash { bottom: 20px; position: fixed; text-align: center; width: 100%; z-index: 4;}.admin .flash .inner { background: rgba(0, 0, 0, 0.7); color: #ffffff; display: inline-block; font-size: 24pt; margin: 0 auto; padding: 10px 20px; -moz-border-radius: 70px; -webkit-border-radius: 70px;}.admin .float-left { float: left; }.admin .float-right { float: right; }.admin .icon { background-position: left top; background-repeat: no-repeat; display: inline-block; min-height: 16px; padding-left: 20px;}.admin .button:hover .icon { background-position: left bottom; }.admin .icon:hover { background-position: left bottom; }.admin .button.has-icon { padding-left: 5px; }.admin .icon.add { background-image: url(../images/icons/add.png); }.admin .icon.delete { background-image: url(../images/icons/delete.png); }.admin .icon.edit { background-image: url(../images/icons/edit.png); }.admin .icon.error { background-image: url(../images/icons/error.png); }.admin .icon.gallery { background-image: url(../images/icons/gallery.png); }.admin .icon.galleries { background-image: url(../images/icons/galleries.png); }.admin .icon.image { background-image: url(../images/icons/image.png); }.admin .icon.okay { background-image: url(../images/icons/okay.png); }.admin .icon.pages { background-image: url(../images/icons/pages.png); }.admin .icon.posts { background-image: url(../images/icons/posts.png); }.admin .icon.upload { background-image: url(../images/icons/upload.png); }.admin .icon.users { background-image: url(../images/icons/users.png); }.admin h1.icon { line-height: 48px; padding-left: 58px;}.admin .inset { background-color: #f0f0f0; padding: 10px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -moz-box-shadow: inset #888888 0 1px 2px; -webkit-box-shadow: inset #888888 0 1px 2px;}.admin .inset.icon { background-position: 5px 5px; display: block; padding-left: 68px;}.admin .progress-bar { background: url(../images/background-progress-bar.png) repeat-x left center; margin: 0; padding: 0 !important; width: 200px;}.admin .progress-bar .progress { background: url(../images/background-progress.gif) repeat-x; height: 11px; width: 0;}.admin .progress-bar.complete .progress { background-image: url(../images/background-progress-complete.gif); width: 100%;}.admin .right { text-align: right; }.admin select { padding: 2px; }.admin textarea { height: 50px; }.admin input.text { background: #ffffff url(../images/background-input.gif) repeat-x; border-bottom: 1px solid #dddddd; border-left: 1px solid #c3c3c3; border-right: 1px solid #c3c3c3; border-top: 1px solid #7d7d7d; padding: 3px; width: 370px; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box;}.admin textarea { background: #ffffff url(../images/background-input.gif) repeat-x; border-bottom: 1px solid #dddddd; border-left: 1px solid #c3c3c3; border-right: 1px solid #c3c3c3; border-top: 1px solid #7d7d7d; padding: 3px; width: 370px; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box;}.admin input.text.medium { width: 180px; }.admin input.text.oversized { font-size: 18px; width: 100%;}.admin input.half.text.oversized { width: 183px; }.admin input.text.small { width: 94px; }.admin input.text.tiny { width: 50px; }.admin input.replace.unedited { color: #777777 !important; }.admin textarea.replace.unedited { color: #777777 !important; }.admin .ui-tabs-hide { display: none; }
@@ -0,0 +1 @@
1
+ #logo { left: 50%; margin-left: -190px; position: absolute; top: 100px;}#login { border-bottom: 1px solid #ffffff; left: 50%; margin: 0 0 0 -200px; position: absolute; padding: 2em; top: 130px; width: 400px; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-border-radius: 5px; -webkit-border-radius: 5px;}
@@ -0,0 +1,20 @@
1
+ /*
2
+ wysiwyg-content.css is the stylesheet that is loaded INSIDE OF the WYSIWYG editors' iframe.
3
+ This only happens if 'iFrame' mode is enabled. It imports what we assume is the stylesheet
4
+ the user has set up for the application in an attempt to render in a similar font to what
5
+ is expected in the application. IF a user
6
+ */
7
+ @import url(/stylesheets/screen.css);
8
+
9
+ body {
10
+ background-color:#fff !important;
11
+ color:#000 !important;
12
+ margin:0;
13
+ padding:3px;
14
+ text-align:left !important;
15
+ width:auto;
16
+ }
17
+
18
+ img {
19
+ cursor:pointer;
20
+ }
@@ -0,0 +1 @@
1
+ #grandstand .styled-toolbar { background-color: #a7a7a7; background-image: -moz-linear-gradient(top, #cacaca, #a7a7a7); background-image: -webkit-gradient(linear, left top, left bottom, from(#cacaca), to(#a7a7a7)); overflow: hidden; padding: 5px;}#grandstand .button-default { background-color: #ececec; background-image: -moz-linear-gradient(top, #f4f4f4, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec)); border: 1px solid #d4d4d4; color: #333333; cursor: pointer; display: inline-block; font-size: 12px; font-weight: bold; line-height: 16px; margin: 0; overflow: hidden; padding: 4px 10px; text-decoration: none; text-shadow: #ffffff 0 1px 0; vertical-align: baseline; vertical-align: middle; -moz-border-radius: 2px; -webkit-border-radius: 2px;}#grandstand .button-hover { background-color: #3072b3; background-image: -moz-linear-gradient(top, #599bdc, #3072b3); background-image: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3)); border-color: #518cc6; border-bottom-color: #2a65a0; color: #ffffff; text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;}#grandstand .button-active { background-color: #599bdc; background-image: -moz-linear-gradient(top, #3072b3, #599bdc); background-image: -webkit-gradient(linear, left top, left bottom, from(#3072b3), to(#599bdc)); border-bottom-color: #518cc6; border-top-color: #2a65a0; -moz-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px; -webkit-box-shadow: inset rgba(0, 0, 0, 0.2) 0 0 1px;}#grandstand .button-grey { background-color: #333333; background-image: -moz-linear-gradient(top, #333333, #444444); background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#333333)); border-color: #000000; color: #ffffff; text-shadow: #000000 0 -1px 0;}#grandstand .button-grey-hover { background-color: #444444; background-image: -moz-linear-gradient(top, #333333, #444444); background-image: -webkit-gradient(linear, left top, left bottom, from(#333333), to(#444444));}#grandstand .button-grey-active { -moz-box-shadow: inset #000000 0 0px 1px; -webkit-box-shadow: inset #000000 0 0px 1px;}.admin .wysiwyg .dialog > form { background: #ffffff; left: 50%; margin-left: -40%; position: absolute; top: 0; width: 80%; z-index: 3; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; -moz-box-shadow: #444444 0 2px 2px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -webkit-box-shadow: #444444 0 2px 2px;}.admin .wysiwyg .dialog .pad { padding: 10px; }.admin .wysiwyg .dialog .source { background: #d9dfe8; border-right: 1px solid #aaaaaa; float: left; overflow-x: hidden; overflow-y: auto; width: 200px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px;}.admin .wysiwyg .dialog .source .header { background-image: none !important; border-width: 0 !important; color: #505d81; font-weight: bold; padding: 10px 10px 5px 10px; text-shadow: #f1f5f8 0 1px 0; text-transform: uppercase;}.admin .wysiwyg .dialog .source a { border-top: 1px solid #d9dfe8; color: #000000; display: block; padding: 5px 5px 5px 20px; text-decoration: none;}.admin .wysiwyg .dialog .source a.active { background: -webkit-gradient(linear, left top, left bottom, from(#63a4e2), to(#0066c0)); border-top: 1px solid #4691d6; color: #ffffff; text-shadow: #000000 0 1px 0;}.admin .wysiwyg .dialog .destination { margin-left: 201px; }.admin .wysiwyg .dialog .image { cursor: pointer; }.admin .wysiwyg .dialog .scrollable { overflow-x: hidden; overflow-y: auto; padding: 10px 0; width: 100%; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box;}.admin .wysiwyg { border: 1px solid #888888; overflow: hidden; position: relative; -webkit-border-radius: 3px;}.admin .wysiwyg .toolbar { background-color: #a7a7a7; background-image: -moz-linear-gradient(top, #cacaca, #a7a7a7); background-image: -webkit-gradient(linear, left top, left bottom, from(#cacaca), to(#a7a7a7)); overflow: hidden; padding: 5px; border-bottom: 1px solid #444444; position: relative; z-index: 4;}.admin .wysiwyg .toolbar .button { line-height: 0; padding: 3px;}.admin .wysiwyg .toolbar .button .icon { background-position: center top; }.admin .wysiwyg .toolbar .button .icon.bold { background-image: url(../images/icons/editor/bold.png); }.admin .wysiwyg .toolbar .button .icon.italic { background-image: url(../images/icons/editor/italic.png); }.admin .wysiwyg .toolbar .button .icon.ordered-list { background-image: url(../images/icons/editor/ordered-list.png); }.admin .wysiwyg .toolbar .button .icon.unordered-list { background-image: url(../images/icons/editor/unordered-list.png); }.admin .wysiwyg .toolbar .button:hover .icon { background-position: center bottom; }.admin .wysiwyg iframe { background: #ffffff url(../images/background-input.gif) repeat-x; display: block; height: 400px; width: 100%; -webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-right-radius: 3px;}.admin .wysiwyg textarea { border-width: 0; }.admin .wysiwyg .cover { background-color: rgba(255, 255, 255, 0.9); height: 100%; left: 0; position: absolute; top: 0; width: 100%; z-index: 1; -webkit-border-radius: 3px;}.admin .wysiwyg .loading { background: rgba(0, 0, 0, 0.7) url(../images/spinner-dark.gif) center center no-repeat; height: 50px; left: 50%; margin: -25px 0 0 -25px; position: absolute; top: 50%; width: 50px; z-index: 2; -moz-border-radius: 5px; -webkit-border-radius: 5px;}
Binary file