beef-admin_area 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/VERSION +1 -1
  2. data/app/views/admin/users/index.html.erb +1 -1
  3. data/app/views/layouts/admin.html.erb +1 -2
  4. data/beef-admin_area.gemspec +54 -4
  5. data/generators/admin_area_files/admin_area_files_generator.rb +74 -2
  6. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/langs/en.js +1 -0
  7. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
  8. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  9. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  10. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  11. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  12. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  13. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +1 -0
  14. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/template.htm +387 -0
  15. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/editor_plugin.js +1 -0
  16. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/js/pastetext.js +1 -0
  17. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/js/pasteword.js +1 -0
  18. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/langs/en_dlg.js +1 -0
  19. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/pastetext.htm +33 -0
  20. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/pasteword.htm +27 -0
  21. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/safari/blank.htm +1 -0
  22. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/safari/editor_plugin.js +1 -0
  23. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/blank.htm +12 -0
  24. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/css/template.css +1 -0
  25. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/editor_plugin.js +1 -0
  26. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/js/template.js +1 -0
  27. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/langs/en_dlg.js +1 -0
  28. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/template.htm +38 -0
  29. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/anchor.htm +31 -0
  30. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/color_picker.htm +75 -0
  31. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/editor_template.js +1 -0
  32. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  33. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/img/icons.gif +0 -0
  34. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/anchor.js +1 -0
  35. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/color_picker.js +1 -0
  36. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/link.js +1 -0
  37. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/langs/en.js +1 -0
  38. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/langs/en_dlg.js +1 -0
  39. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/link.htm +63 -0
  40. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/content.css +1 -0
  41. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/dialog.css +1 -0
  42. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  43. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  44. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  45. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  46. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  47. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  48. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/ui.css +1 -0
  49. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce.js +1 -0
  50. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce_popup.js +1 -0
  51. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/form_utils.js +1 -0
  52. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/mctabs.js +1 -0
  53. data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/validate.js +1 -0
  54. data/generators/admin_area_files/templates/public/javascripts/tiny-mce-config.js +78 -0
  55. data/generators/admin_area_files/templates/public/stylesheets/admin/screen.css +2 -2
  56. metadata +51 -2
@@ -0,0 +1,78 @@
1
+ document.observe("dom:loaded", function(){
2
+ tinyMCE.init({
3
+ theme : "advanced",
4
+ mode : "specific_textareas",
5
+ editor_selector : "editor",
6
+ strict_loading_mode : 1,
7
+ convert_urls : false,
8
+ plugins : "safari,inlinepopups",
9
+ //"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
10
+ // Theme options
11
+ theme_advanced_blockformats : "h2,h3,h4",
12
+ theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,formatselect,|,bullist,numlist,|,link,unlink,|,indent,outdent,|,justifyleft,justifycenter,justifyright,justifyfull",
13
+ theme_advanced_buttons2 : "",
14
+ theme_advanced_buttons3 : "",
15
+ theme_advanced_buttons4 : "",
16
+ theme_advanced_path : false,
17
+ theme_advanced_toolbar_location : "top",
18
+ theme_advanced_toolbar_align : "left",
19
+ theme_advanced_statusbar_location : "bottom",
20
+ theme_advanced_resizing : true,
21
+
22
+ // Drop lists for link/image/media/template dialogs
23
+ external_link_list_url : false,
24
+ remove_redundant_brs : false,
25
+ onchange_callback : "saveEditorToElement"
26
+ });
27
+ });
28
+
29
+ saveEditorToElement = function(inst){
30
+ inst.save();
31
+ }
32
+
33
+
34
+
35
+
36
+ // Add image. insertAtCursor function in apllcation.js
37
+ addImage = function(imageurl,alt) {
38
+ // alt = alt.replace("(","").replace(")","");
39
+ // insertAtCursor(tinyMCE.activeEditor.getContainer(), '\n\n!'+imageurl+'('+alt+')!\n\n');
40
+ tinyMCE.execInstanceCommand(tinyMCE.activeEditor.id,"mceInsertContent",false, '<img src="' + imageurl + '" alt="' + alt + '" />');
41
+ };
42
+
43
+ addLinkedImage = function(imageurl,alt) {
44
+ // alt = alt.replace("(","").replace(")","");
45
+ // insertAtCursor(tinyMCE.activeEditor.getContainer(), '\n\n!'+imageurl+'('+alt+')!:'+imageurl+'\n\n');
46
+
47
+ tinyMCE.execInstanceCommand(tinyMCE.activeEditor.id,"mceInsertContent",false, '<a href="' + imageurl + '"><img src="' + imageurl + '" alt="' + alt + '" /></a>');
48
+ };
49
+
50
+ addLink = function(text, url) {
51
+ //insertAtCursor(tinyMCE.activeEditor.getContainer(), '"'+ text +'":'+ url + ' ');
52
+
53
+ tinyMCE.execInstanceCommand(tinyMCE.activeEditor.id,"mceInsertContent",false,'<a href="' + url + '">' + text + '</a>');
54
+ };
55
+
56
+ addAsset = function(asset_id, size) {
57
+ if(size && size=='small')
58
+ size = 'thumb';
59
+
60
+ new Ajax.Request('/admin/assets/' + asset_id + '.json', { method:'get',
61
+ asynchronous:true,
62
+ onSuccess: function(response){
63
+ asset = response.responseJSON[Object.keys(response.responseJSON)[0]];
64
+ filename = asset.public_filename;
65
+
66
+ if(/^image\//.test(asset.content_type)){
67
+ for(var i=0,j=asset.sizes.length;i < j;i++){
68
+ if(asset.sizes[i][0] == size)
69
+ filename = asset.sizes[i][1];
70
+ }
71
+ addImage(filename, asset.description);
72
+ }else{
73
+ addLink(asset.description, filename);
74
+ }
75
+ }
76
+ });
77
+
78
+ };
@@ -374,8 +374,8 @@ a.featured {
374
374
  width: 16px;
375
375
  }
376
376
 
377
- .choices a {background: url('../../images/admin/add.png') no-repeat; padding: 2px 0 0 20px; width:100px;}
378
- #subscribers .choices a {background: url('../../images/admin/arrow_down.gif') no-repeat; padding: 2px 0 0 20px; width:100px;}
377
+ .choices a {background: url('../../images/admin/add.png') no-repeat; padding: 2px 0 0 20px; width:auto; white-space:nowrap;}
378
+ #subscribers .choices a {background: url('../../images/admin/arrow_down.gif') no-repeat;}
379
379
 
380
380
  a.left {
381
381
  float: left;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beef-admin_area
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve England
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-28 00:00:00 +00:00
12
+ date: 2009-11-19 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -154,9 +154,58 @@ files:
154
154
  - generators/admin_area_files/templates/public/images/textile-editor/strikethrough.png
155
155
  - generators/admin_area_files/templates/public/images/textile-editor/underline.png
156
156
  - generators/admin_area_files/templates/public/javascripts/admin/application.js
157
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/langs/en.js
158
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/editor_plugin.js
159
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
160
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
161
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
162
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
163
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
164
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
165
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/template.htm
166
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/editor_plugin.js
167
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/js/pastetext.js
168
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/js/pasteword.js
169
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/langs/en_dlg.js
170
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/pastetext.htm
171
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/pasteword.htm
172
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/safari/blank.htm
173
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/safari/editor_plugin.js
174
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/blank.htm
175
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/css/template.css
176
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/editor_plugin.js
177
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/js/template.js
178
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/langs/en_dlg.js
179
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/template.htm
180
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/anchor.htm
181
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/color_picker.htm
182
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/editor_template.js
183
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/img/colorpicker.jpg
184
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/img/icons.gif
185
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/anchor.js
186
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/color_picker.js
187
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/link.js
188
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/langs/en.js
189
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/langs/en_dlg.js
190
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/link.htm
191
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/content.css
192
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/dialog.css
193
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/buttons.png
194
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/items.gif
195
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
196
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/menu_check.gif
197
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/progress.gif
198
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/img/tabs.gif
199
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/ui.css
200
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce.js
201
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce_popup.js
202
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/form_utils.js
203
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/mctabs.js
204
+ - generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/validate.js
157
205
  - generators/admin_area_files/templates/public/javascripts/lightwindow.js
158
206
  - generators/admin_area_files/templates/public/javascripts/textile-editor-config.js
159
207
  - generators/admin_area_files/templates/public/javascripts/textile-editor.js
208
+ - generators/admin_area_files/templates/public/javascripts/tiny-mce-config.js
160
209
  - generators/admin_area_files/templates/public/stylesheets/admin/handheld.css
161
210
  - generators/admin_area_files/templates/public/stylesheets/admin/ie.css
162
211
  - generators/admin_area_files/templates/public/stylesheets/admin/print.css