spud_core 0.8.28 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. data/app/assets/javascripts/spud/admin/application.js +80 -39
  2. data/app/assets/javascripts/spud/admin/editor.js +91 -0
  3. data/app/assets/libs/bootstrap/css/bootstrap-responsive.css +799 -397
  4. data/app/assets/libs/bootstrap/css/bootstrap.css +3275 -1372
  5. data/app/assets/libs/bootstrap/img/glyphicons-halflings-white.png +0 -0
  6. data/app/assets/libs/bootstrap/img/glyphicons-halflings.png +0 -0
  7. data/app/assets/libs/bootstrap/js/bootstrap.js +716 -417
  8. data/app/assets/libs/datepicker/css/datepicker.css +223 -0
  9. data/app/assets/libs/datepicker/js/bootstrap-datepicker.js +779 -0
  10. data/app/assets/libs/datepicker/less/datepicker.less +122 -0
  11. data/app/assets/libs/jquery-ui/css/flick/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  12. data/app/assets/libs/jquery-ui/css/flick/images/ui-bg_flat_0_eeeeee_40x100.png +0 -0
  13. data/app/assets/libs/jquery-ui/css/flick/images/ui-bg_flat_55_ffffff_40x100.png +0 -0
  14. data/app/assets/libs/jquery-ui/css/flick/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  15. data/app/assets/libs/jquery-ui/css/flick/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  16. data/app/assets/libs/jquery-ui/css/flick/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
  17. data/app/assets/libs/jquery-ui/css/flick/images/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
  18. data/app/assets/libs/jquery-ui/css/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
  19. data/app/assets/libs/jquery-ui/css/flick/images/ui-icons_0073ea_256x240.png +0 -0
  20. data/app/assets/libs/jquery-ui/css/flick/images/ui-icons_454545_256x240.png +0 -0
  21. data/app/assets/libs/jquery-ui/css/flick/images/ui-icons_666666_256x240.png +0 -0
  22. data/app/assets/libs/jquery-ui/css/flick/images/ui-icons_ff0084_256x240.png +0 -0
  23. data/app/assets/libs/jquery-ui/css/flick/images/ui-icons_ffffff_256x240.png +0 -0
  24. data/app/assets/libs/jquery-ui/css/flick/jquery-ui-1.9.1.custom.css +297 -0
  25. data/app/assets/libs/jquery-ui/css/flick/jquery-ui-1.9.1.custom.min.css +5 -0
  26. data/app/assets/libs/jquery-ui/js/jquery-ui-1.9.1.custom.js +4870 -0
  27. data/app/assets/libs/jquery-ui/js/jquery-ui-1.9.1.custom.min.js +6 -0
  28. data/app/assets/stylesheets/spud/admin/application.css +22 -4
  29. data/app/controllers/spud/admin/application_controller.rb +13 -4
  30. data/app/controllers/spud/admin/dashboard_controller.rb +1 -1
  31. data/app/controllers/spud/admin/users_controller.rb +4 -9
  32. data/app/controllers/spud/setup_controller.rb +3 -4
  33. data/app/models/spud_admin_permission.rb +1 -1
  34. data/app/models/spud_user.rb +4 -2
  35. data/app/views/layouts/spud/admin/application.html.erb +24 -5
  36. data/app/views/spud/admin/users/_edit.html.erb +2 -4
  37. data/app/views/spud/admin/users/_new.html.erb +3 -5
  38. data/app/views/spud/admin/users/index.html.erb +6 -5
  39. data/lib/spud_core/belongs_to_app.rb +9 -6
  40. data/lib/spud_core/configuration.rb +23 -1
  41. data/lib/spud_core/engine.rb +20 -28
  42. data/lib/spud_core/version.rb +1 -1
  43. data/spec/dummy/log/development.log +15 -37
  44. data/spec/dummy/log/test.log +72841 -25918
  45. metadata +25 -101
  46. data/app/assets/libs/bootstrap/css/bootstrap-responsive.min.css +0 -12
  47. data/app/assets/libs/bootstrap/css/bootstrap.min.css +0 -689
  48. data/app/assets/libs/bootstrap/js/bootstrap.min.js +0 -6
  49. data/app/assets/libs/tiny_mce/plugins/autosave/editor_plugin.js +0 -1
  50. data/app/assets/libs/tiny_mce/plugins/autosave/editor_plugin_src.js +0 -431
  51. data/app/assets/libs/tiny_mce/plugins/autosave/langs/en.js +0 -4
  52. data/app/assets/libs/tiny_mce/plugins/bbcode/editor_plugin.js +0 -1
  53. data/app/assets/libs/tiny_mce/plugins/bbcode/editor_plugin_src.js +0 -120
  54. data/app/assets/libs/tiny_mce/plugins/emotions/editor_plugin.js +0 -1
  55. data/app/assets/libs/tiny_mce/plugins/emotions/editor_plugin_src.js +0 -43
  56. data/app/assets/libs/tiny_mce/plugins/emotions/emotions.htm +0 -42
  57. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  58. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  59. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  60. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  61. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  62. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  63. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  64. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  65. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  66. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  67. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  68. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  69. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  70. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  71. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  72. data/app/assets/libs/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  73. data/app/assets/libs/tiny_mce/plugins/emotions/js/emotions.js +0 -43
  74. data/app/assets/libs/tiny_mce/plugins/emotions/langs/en_dlg.js +0 -1
  75. data/app/assets/libs/tiny_mce/plugins/fullpage/css/fullpage.css +0 -143
  76. data/app/assets/libs/tiny_mce/plugins/fullpage/editor_plugin.js +0 -1
  77. data/app/assets/libs/tiny_mce/plugins/fullpage/editor_plugin_src.js +0 -405
  78. data/app/assets/libs/tiny_mce/plugins/fullpage/fullpage.htm +0 -259
  79. data/app/assets/libs/tiny_mce/plugins/fullpage/js/fullpage.js +0 -232
  80. data/app/assets/libs/tiny_mce/plugins/fullpage/langs/en_dlg.js +0 -1
  81. data/app/assets/libs/tiny_mce/plugins/fullscreen/editor_plugin.js +0 -1
  82. data/app/assets/libs/tiny_mce/plugins/fullscreen/editor_plugin_src.js +0 -159
  83. data/app/assets/libs/tiny_mce/plugins/fullscreen/fullscreen.htm +0 -110
  84. data/app/assets/libs/tiny_mce/plugins/insertdatetime/editor_plugin.js +0 -1
  85. data/app/assets/libs/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +0 -83
  86. data/app/assets/libs/tiny_mce/plugins/legacyoutput/editor_plugin.js +0 -1
  87. data/app/assets/libs/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +0 -139
  88. data/app/assets/libs/tiny_mce/plugins/nonbreaking/editor_plugin.js +0 -1
  89. data/app/assets/libs/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +0 -54
  90. data/app/assets/libs/tiny_mce/plugins/noneditable/editor_plugin.js +0 -1
  91. data/app/assets/libs/tiny_mce/plugins/noneditable/editor_plugin_src.js +0 -454
  92. data/app/assets/libs/tiny_mce/plugins/pagebreak/editor_plugin.js +0 -1
  93. data/app/assets/libs/tiny_mce/plugins/pagebreak/editor_plugin_src.js +0 -74
  94. data/app/assets/libs/tiny_mce/plugins/preview/editor_plugin.js +0 -1
  95. data/app/assets/libs/tiny_mce/plugins/preview/editor_plugin_src.js +0 -53
  96. data/app/assets/libs/tiny_mce/plugins/preview/example.html +0 -28
  97. data/app/assets/libs/tiny_mce/plugins/preview/jscripts/embed.js +0 -73
  98. data/app/assets/libs/tiny_mce/plugins/preview/preview.html +0 -17
  99. data/app/assets/libs/tiny_mce/plugins/print/editor_plugin.js +0 -1
  100. data/app/assets/libs/tiny_mce/plugins/print/editor_plugin_src.js +0 -34
  101. data/app/assets/libs/tiny_mce/plugins/save/editor_plugin.js +0 -1
  102. data/app/assets/libs/tiny_mce/plugins/save/editor_plugin_src.js +0 -101
  103. data/app/assets/libs/tiny_mce/plugins/searchreplace/css/searchreplace.css +0 -6
  104. data/app/assets/libs/tiny_mce/plugins/searchreplace/editor_plugin.js +0 -1
  105. data/app/assets/libs/tiny_mce/plugins/searchreplace/editor_plugin_src.js +0 -61
  106. data/app/assets/libs/tiny_mce/plugins/searchreplace/js/searchreplace.js +0 -142
  107. data/app/assets/libs/tiny_mce/plugins/searchreplace/langs/en_dlg.js +0 -1
  108. data/app/assets/libs/tiny_mce/plugins/searchreplace/searchreplace.htm +0 -100
  109. data/app/assets/libs/tiny_mce/plugins/tabfocus/editor_plugin.js +0 -1
  110. data/app/assets/libs/tiny_mce/plugins/tabfocus/editor_plugin_src.js +0 -122
  111. data/app/assets/libs/tiny_mce/plugins/template/blank.htm +0 -12
  112. data/app/assets/libs/tiny_mce/plugins/template/css/template.css +0 -23
  113. data/app/assets/libs/tiny_mce/plugins/template/editor_plugin.js +0 -1
  114. data/app/assets/libs/tiny_mce/plugins/template/editor_plugin_src.js +0 -159
  115. data/app/assets/libs/tiny_mce/plugins/template/js/template.js +0 -106
  116. data/app/assets/libs/tiny_mce/plugins/template/langs/en_dlg.js +0 -1
  117. data/app/assets/libs/tiny_mce/plugins/template/template.htm +0 -31
  118. data/app/assets/libs/tiny_mce/plugins/visualblocks/css/visualblocks.css +0 -21
  119. data/app/assets/libs/tiny_mce/plugins/visualblocks/editor_plugin.js +0 -1
  120. data/app/assets/libs/tiny_mce/plugins/visualblocks/editor_plugin_src.js +0 -63
  121. data/app/assets/libs/tiny_mce/plugins/visualchars/editor_plugin.js +0 -1
  122. data/app/assets/libs/tiny_mce/plugins/visualchars/editor_plugin_src.js +0 -83
  123. data/app/assets/libs/tiny_mce/plugins/wordcount/editor_plugin.js +0 -1
  124. data/app/assets/libs/tiny_mce/plugins/wordcount/editor_plugin_src.js +0 -122
  125. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/abbr.htm +0 -142
  126. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/acronym.htm +0 -142
  127. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/attributes.htm +0 -149
  128. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/cite.htm +0 -142
  129. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/css/attributes.css +0 -11
  130. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/css/popup.css +0 -9
  131. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/del.htm +0 -162
  132. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +0 -1
  133. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
  134. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/ins.htm +0 -162
  135. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/js/abbr.js +0 -28
  136. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/js/acronym.js +0 -28
  137. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/js/attributes.js +0 -111
  138. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/js/cite.js +0 -28
  139. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/js/del.js +0 -53
  140. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/js/element_common.js +0 -229
  141. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/js/ins.js +0 -53
  142. data/app/assets/libs/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +0 -1
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"});
@@ -1 +0,0 @@
1
- (function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().firstChild);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
@@ -1,159 +0,0 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- var DOM = tinymce.DOM;
13
-
14
- tinymce.create('tinymce.plugins.FullScreenPlugin', {
15
- init : function(ed, url) {
16
- var t = this, s = {}, vp, posCss;
17
-
18
- t.editor = ed;
19
-
20
- // Register commands
21
- ed.addCommand('mceFullScreen', function() {
22
- var win, de = DOM.doc.documentElement;
23
-
24
- if (ed.getParam('fullscreen_is_enabled')) {
25
- if (ed.getParam('fullscreen_new_window'))
26
- closeFullscreen(); // Call to close in new window
27
- else {
28
- DOM.win.setTimeout(function() {
29
- tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
30
- tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
31
- tinyMCE.remove(ed);
32
- DOM.remove('mce_fullscreen_container');
33
- de.style.overflow = ed.getParam('fullscreen_html_overflow');
34
- DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
35
- DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
36
- tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
37
- }, 10);
38
- }
39
-
40
- return;
41
- }
42
-
43
- if (ed.getParam('fullscreen_new_window')) {
44
- win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
45
- try {
46
- win.resizeTo(screen.availWidth, screen.availHeight);
47
- } catch (e) {
48
- // Ignore
49
- }
50
- } else {
51
- tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
52
- s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
53
- s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
54
- vp = DOM.getViewPort();
55
- s.fullscreen_scrollx = vp.x;
56
- s.fullscreen_scrolly = vp.y;
57
-
58
- // Fixes an Opera bug where the scrollbars doesn't reappear
59
- if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
60
- s.fullscreen_overflow = 'auto';
61
-
62
- // Fixes an IE bug where horizontal scrollbars would appear
63
- if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
64
- s.fullscreen_overflow = 'auto';
65
-
66
- // Fixes an IE bug where the scrollbars doesn't reappear
67
- if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
68
- s.fullscreen_html_overflow = 'auto';
69
-
70
- if (s.fullscreen_overflow == '0px')
71
- s.fullscreen_overflow = '';
72
-
73
- DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
74
- de.style.overflow = 'hidden'; //Fix for IE6/7
75
- vp = DOM.getViewPort();
76
- DOM.win.scrollTo(0, 0);
77
-
78
- if (tinymce.isIE)
79
- vp.h -= 1;
80
-
81
- // Use fixed position if it exists
82
- if (tinymce.isIE6)
83
- posCss = 'absolute;top:' + vp.y;
84
- else
85
- posCss = 'fixed;top:0';
86
-
87
- n = DOM.add(DOM.doc.body, 'div', {
88
- id : 'mce_fullscreen_container',
89
- style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
90
- DOM.add(n, 'div', {id : 'mce_fullscreen'});
91
-
92
- tinymce.each(ed.settings, function(v, n) {
93
- s[n] = v;
94
- });
95
-
96
- s.id = 'mce_fullscreen';
97
- s.width = n.clientWidth;
98
- s.height = n.clientHeight - 15;
99
- s.fullscreen_is_enabled = true;
100
- s.fullscreen_editor_id = ed.id;
101
- s.theme_advanced_resizing = false;
102
- s.save_onsavecallback = function() {
103
- ed.setContent(tinyMCE.get(s.id).getContent());
104
- ed.execCommand('mceSave');
105
- };
106
-
107
- tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
108
- s[k] = v;
109
- });
110
-
111
- if (s.theme_advanced_toolbar_location === 'external')
112
- s.theme_advanced_toolbar_location = 'top';
113
-
114
- t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
115
- t.fullscreenEditor.onInit.add(function() {
116
- t.fullscreenEditor.setContent(ed.getContent());
117
- t.fullscreenEditor.focus();
118
- });
119
-
120
- t.fullscreenEditor.render();
121
-
122
- t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
123
- t.fullscreenElement.update();
124
- //document.body.overflow = 'hidden';
125
-
126
- t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
127
- var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
128
-
129
- // Get outer/inner size to get a delta size that can be used to calc the new iframe size
130
- outerSize = fed.dom.getSize(fed.getContainer().firstChild);
131
- innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
132
-
133
- fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
134
- });
135
- }
136
- });
137
-
138
- // Register buttons
139
- ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
140
-
141
- ed.onNodeChange.add(function(ed, cm) {
142
- cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
143
- });
144
- },
145
-
146
- getInfo : function() {
147
- return {
148
- longname : 'Fullscreen',
149
- author : 'Moxiecode Systems AB',
150
- authorurl : 'http://tinymce.moxiecode.com',
151
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
152
- version : tinymce.majorVersion + "." + tinymce.minorVersion
153
- };
154
- }
155
- });
156
-
157
- // Register plugin
158
- tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
159
- })();
@@ -1,110 +0,0 @@
1
- <!DOCTYPE html>
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title></title>
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
- <script type="text/javascript" src="../../tiny_mce.js"></script>
7
- <script type="text/javascript">
8
- function patchCallback(settings, key) {
9
- if (settings[key])
10
- settings[key] = "window.opener." + settings[key];
11
- }
12
-
13
- var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
14
-
15
- // Clone array
16
- for (var n in paSe)
17
- settings[n] = paSe[n];
18
-
19
- // Override options for fullscreen
20
- for (var n in paSe.fullscreen_settings)
21
- settings[n] = paSe.fullscreen_settings[n];
22
-
23
- // Patch callbacks, make them point to window.opener
24
- patchCallback(settings, 'urlconverter_callback');
25
- patchCallback(settings, 'insertlink_callback');
26
- patchCallback(settings, 'insertimage_callback');
27
- patchCallback(settings, 'setupcontent_callback');
28
- patchCallback(settings, 'save_callback');
29
- patchCallback(settings, 'onchange_callback');
30
- patchCallback(settings, 'init_instance_callback');
31
- patchCallback(settings, 'file_browser_callback');
32
- patchCallback(settings, 'cleanup_callback');
33
- patchCallback(settings, 'execcommand_callback');
34
- patchCallback(settings, 'oninit');
35
-
36
- // Set options
37
- delete settings.id;
38
- settings['mode'] = 'exact';
39
- settings['elements'] = 'fullscreenarea';
40
- settings['add_unload_trigger'] = false;
41
- settings['ask'] = false;
42
- settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
43
- settings['fullscreen_is_enabled'] = true;
44
- settings['fullscreen_editor_id'] = oeID;
45
- settings['theme_advanced_resizing'] = false;
46
- settings['strict_loading_mode'] = true;
47
-
48
- settings.save_onsavecallback = function() {
49
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
50
- window.opener.tinyMCE.get(oeID).execCommand('mceSave');
51
- window.close();
52
- };
53
-
54
- function unloadHandler(e) {
55
- moveContent();
56
- }
57
-
58
- function moveContent() {
59
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
60
- }
61
-
62
- function closeFullscreen() {
63
- moveContent();
64
- window.close();
65
- }
66
-
67
- function doParentSubmit() {
68
- moveContent();
69
-
70
- if (window.opener.tinyMCE.selectedInstance.formElement.form)
71
- window.opener.tinyMCE.selectedInstance.formElement.form.submit();
72
-
73
- window.close();
74
-
75
- return false;
76
- }
77
-
78
- function render() {
79
- var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
80
-
81
- e.value = window.opener.tinyMCE.get(oeID).getContent();
82
-
83
- vp = dom.getViewPort();
84
- settings.width = vp.w;
85
- settings.height = vp.h - 15;
86
-
87
- tinymce.dom.Event.add(window, 'resize', function() {
88
- var vp = dom.getViewPort();
89
-
90
- tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
91
- });
92
-
93
- tinyMCE.init(settings);
94
- }
95
-
96
- // Add onunload
97
- tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
98
- </script>
99
- </head>
100
- <body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
101
- <form onsubmit="doParentSubmit();">
102
- <textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
103
- </form>
104
-
105
- <script type="text/javascript">
106
- render();
107
- </script>
108
-
109
- </body>
110
- </html>
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length<d){for(var f=0;f<(d-g.length);f++){g="0"+g}}return g}a=a.replace("%D","%m/%d/%y");a=a.replace("%r","%I:%M:%S %p");a=a.replace("%Y",""+e.getFullYear());a=a.replace("%y",""+e.getYear());a=a.replace("%m",b(e.getMonth()+1,2));a=a.replace("%d",b(e.getDate(),2));a=a.replace("%H",""+b(e.getHours(),2));a=a.replace("%M",""+b(e.getMinutes(),2));a=a.replace("%S",""+b(e.getSeconds(),2));a=a.replace("%I",""+((e.getHours()+11)%12+1));a=a.replace("%p",""+(e.getHours()<12?"AM":"PM"));a=a.replace("%B",""+c.getLang("insertdatetime.months_long").split(",")[e.getMonth()]);a=a.replace("%b",""+c.getLang("insertdatetime.months_short").split(",")[e.getMonth()]);a=a.replace("%A",""+c.getLang("insertdatetime.day_long").split(",")[e.getDay()]);a=a.replace("%a",""+c.getLang("insertdatetime.day_short").split(",")[e.getDay()]);a=a.replace("%%","%");return a}});tinymce.PluginManager.add("insertdatetime",tinymce.plugins.InsertDateTime)})();
@@ -1,83 +0,0 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- tinymce.create('tinymce.plugins.InsertDateTime', {
13
- init : function(ed, url) {
14
- var t = this;
15
-
16
- t.editor = ed;
17
-
18
- ed.addCommand('mceInsertDate', function() {
19
- var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_dateFormat", ed.getLang('insertdatetime.date_fmt')));
20
-
21
- ed.execCommand('mceInsertContent', false, str);
22
- });
23
-
24
- ed.addCommand('mceInsertTime', function() {
25
- var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_timeFormat", ed.getLang('insertdatetime.time_fmt')));
26
-
27
- ed.execCommand('mceInsertContent', false, str);
28
- });
29
-
30
- ed.addButton('insertdate', {title : 'insertdatetime.insertdate_desc', cmd : 'mceInsertDate'});
31
- ed.addButton('inserttime', {title : 'insertdatetime.inserttime_desc', cmd : 'mceInsertTime'});
32
- },
33
-
34
- getInfo : function() {
35
- return {
36
- longname : 'Insert date/time',
37
- author : 'Moxiecode Systems AB',
38
- authorurl : 'http://tinymce.moxiecode.com',
39
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',
40
- version : tinymce.majorVersion + "." + tinymce.minorVersion
41
- };
42
- },
43
-
44
- // Private methods
45
-
46
- _getDateTime : function(d, fmt) {
47
- var ed = this.editor;
48
-
49
- function addZeros(value, len) {
50
- value = "" + value;
51
-
52
- if (value.length < len) {
53
- for (var i=0; i<(len-value.length); i++)
54
- value = "0" + value;
55
- }
56
-
57
- return value;
58
- };
59
-
60
- fmt = fmt.replace("%D", "%m/%d/%y");
61
- fmt = fmt.replace("%r", "%I:%M:%S %p");
62
- fmt = fmt.replace("%Y", "" + d.getFullYear());
63
- fmt = fmt.replace("%y", "" + d.getYear());
64
- fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
65
- fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
66
- fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
67
- fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
68
- fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
69
- fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
70
- fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
71
- fmt = fmt.replace("%B", "" + ed.getLang("insertdatetime.months_long").split(',')[d.getMonth()]);
72
- fmt = fmt.replace("%b", "" + ed.getLang("insertdatetime.months_short").split(',')[d.getMonth()]);
73
- fmt = fmt.replace("%A", "" + ed.getLang("insertdatetime.day_long").split(',')[d.getDay()]);
74
- fmt = fmt.replace("%a", "" + ed.getLang("insertdatetime.day_short").split(',')[d.getDay()]);
75
- fmt = fmt.replace("%%", "%");
76
-
77
- return fmt;
78
- }
79
- });
80
-
81
- // Register plugin
82
- tinymce.PluginManager.add('insertdatetime', tinymce.plugins.InsertDateTime);
83
- })();
@@ -1 +0,0 @@
1
- (function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce);
@@ -1,139 +0,0 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- *
10
- * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align
11
- * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash
12
- *
13
- * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are
14
- * not apart of the newer specifications for HTML and XHTML.
15
- */
16
-
17
- (function(tinymce) {
18
- // Override inline_styles setting to force TinyMCE to produce deprecated contents
19
- tinymce.onAddEditor.addToTop(function(tinymce, editor) {
20
- editor.settings.inline_styles = false;
21
- });
22
-
23
- // Create the legacy ouput plugin
24
- tinymce.create('tinymce.plugins.LegacyOutput', {
25
- init : function(editor) {
26
- editor.onInit.add(function() {
27
- var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
28
- fontSizes = tinymce.explode(editor.settings.font_size_style_values),
29
- schema = editor.schema;
30
-
31
- // Override some internal formats to produce legacy elements and attributes
32
- editor.formatter.register({
33
- // Change alignment formats to use the deprecated align attribute
34
- alignleft : {selector : alignElements, attributes : {align : 'left'}},
35
- aligncenter : {selector : alignElements, attributes : {align : 'center'}},
36
- alignright : {selector : alignElements, attributes : {align : 'right'}},
37
- alignfull : {selector : alignElements, attributes : {align : 'justify'}},
38
-
39
- // Change the basic formatting elements to use deprecated element types
40
- bold : [
41
- {inline : 'b', remove : 'all'},
42
- {inline : 'strong', remove : 'all'},
43
- {inline : 'span', styles : {fontWeight : 'bold'}}
44
- ],
45
- italic : [
46
- {inline : 'i', remove : 'all'},
47
- {inline : 'em', remove : 'all'},
48
- {inline : 'span', styles : {fontStyle : 'italic'}}
49
- ],
50
- underline : [
51
- {inline : 'u', remove : 'all'},
52
- {inline : 'span', styles : {textDecoration : 'underline'}, exact : true}
53
- ],
54
- strikethrough : [
55
- {inline : 'strike', remove : 'all'},
56
- {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
57
- ],
58
-
59
- // Change font size and font family to use the deprecated font element
60
- fontname : {inline : 'font', attributes : {face : '%value'}},
61
- fontsize : {
62
- inline : 'font',
63
- attributes : {
64
- size : function(vars) {
65
- return tinymce.inArray(fontSizes, vars.value) + 1;
66
- }
67
- }
68
- },
69
-
70
- // Setup font elements for colors as well
71
- forecolor : {inline : 'font', styles : {color : '%value'}},
72
- hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}}
73
- });
74
-
75
- // Check that deprecated elements are allowed if not add them
76
- tinymce.each('b,i,u,strike'.split(','), function(name) {
77
- schema.addValidElements(name + '[*]');
78
- });
79
-
80
- // Add font element if it's missing
81
- if (!schema.getElementRule("font"))
82
- schema.addValidElements("font[face|size|color|style]");
83
-
84
- // Add the missing and depreacted align attribute for the serialization engine
85
- tinymce.each(alignElements.split(','), function(name) {
86
- var rule = schema.getElementRule(name), found;
87
-
88
- if (rule) {
89
- if (!rule.attributes.align) {
90
- rule.attributes.align = {};
91
- rule.attributesOrder.push('align');
92
- }
93
- }
94
- });
95
-
96
- // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes
97
- editor.onNodeChange.add(function(editor, control_manager) {
98
- var control, fontElm, fontName, fontSize;
99
-
100
- // Find font element get it's name and size
101
- fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
102
- if (fontElm) {
103
- fontName = fontElm.face;
104
- fontSize = fontElm.size;
105
- }
106
-
107
- // Select/unselect the font name in droplist
108
- if (control = control_manager.get('fontselect')) {
109
- control.select(function(value) {
110
- return value == fontName;
111
- });
112
- }
113
-
114
- // Select/unselect the font size in droplist
115
- if (control = control_manager.get('fontsizeselect')) {
116
- control.select(function(value) {
117
- var index = tinymce.inArray(fontSizes, value.fontSize);
118
-
119
- return index + 1 == fontSize;
120
- });
121
- }
122
- });
123
- });
124
- },
125
-
126
- getInfo : function() {
127
- return {
128
- longname : 'LegacyOutput',
129
- author : 'Moxiecode Systems AB',
130
- authorurl : 'http://tinymce.moxiecode.com',
131
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput',
132
- version : tinymce.majorVersion + "." + tinymce.minorVersion
133
- };
134
- }
135
- });
136
-
137
- // Register plugin
138
- tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput);
139
- })(tinymce);