noodall-ui 0.3.20 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. data/Gemfile +8 -3
  2. data/Rakefile +2 -2
  3. data/app/controllers/noodall/admin/nodes_controller.rb +31 -14
  4. data/app/controllers/noodall/admin/versions_controller.rb +13 -0
  5. data/app/controllers/noodall/nodes_controller.rb +11 -1
  6. data/app/views/noodall/admin/nodes/index.html.erb +28 -13
  7. data/app/views/noodall/admin/nodes/show.html.erb +34 -23
  8. data/app/views/noodall/admin/versions/index.html.erb +17 -0
  9. data/config/application.rb +1 -1
  10. data/config/environments/development.rb +2 -5
  11. data/config/environments/test.rb +29 -0
  12. data/demo/initializers/zdragonfly.rb +5 -0
  13. data/demo/models/page_a.rb +1 -1
  14. data/features/choose_node_title.feature +24 -0
  15. data/features/node_filtering.feature +20 -0
  16. data/features/publish_content.feature +1 -1
  17. data/features/save_draft.feature +34 -0
  18. data/features/step_definitions/choose_node_title_steps.rb +7 -0
  19. data/features/step_definitions/cms_node_steps.rb +1 -1
  20. data/features/step_definitions/content_steps.rb +8 -0
  21. data/features/step_definitions/draft_steps.rb +39 -0
  22. data/features/step_definitions/node_steps.rb +4 -1
  23. data/features/step_definitions/pubish_content_steps.rb +3 -3
  24. data/features/step_definitions/web_steps.rb +4 -0
  25. data/features/support/env.rb +3 -1
  26. data/features/support/paths.rb +6 -3
  27. data/lib/noodall/routes.rb +4 -1
  28. data/lib/noodall/ui/version.rb +1 -1
  29. data/noodall-ui.gemspec +2 -2
  30. data/public/images/admin/{draft.png → hidden.png} +0 -0
  31. data/public/images/admin/hide.gif +0 -0
  32. data/public/images/admin/versions.gif +0 -0
  33. data/public/javascripts/admin/application.js +2 -0
  34. data/public/stylesheets/admin/forms.css +32 -2
  35. data/public/stylesheets/admin/layout.css +41 -9
  36. data/public/stylesheets/admin/skin.css +32 -23
  37. data/public/stylesheets/admin/typography.css +3 -0
  38. metadata +112 -76
  39. data/demo/initializers/dragonfly.rb +0 -1
  40. data/lib/noodall/dragonfly.rb +0 -23
  41. data/public/javascripts/tiny_mce/plugins/addvideo/dialog.htm +0 -19
  42. data/public/javascripts/tiny_mce/plugins/addvideo/js/dialog.js +0 -34
  43. data/public/javascripts/tiny_mce/plugins/example/dialog.htm +0 -22
  44. data/public/javascripts/tiny_mce/plugins/example/editor_plugin.js +0 -1
  45. data/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +0 -84
  46. data/public/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
  47. data/public/javascripts/tiny_mce/plugins/example/js/dialog.js +0 -19
  48. data/public/javascripts/tiny_mce/plugins/example/langs/en.js +0 -3
  49. data/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +0 -3
  50. data/public/stylesheets/sass/forms.scss +0 -7
  51. data/public/stylesheets/sass/ie.scss +0 -12
  52. data/public/stylesheets/sass/ie8.scss +0 -8
  53. data/public/stylesheets/sass/layout.scss +0 -45
  54. data/public/stylesheets/sass/skin.scss +0 -35
  55. data/public/stylesheets/sass/typography.scss +0 -162
@@ -1 +0,0 @@
1
- require 'noodall/dragonfly'
@@ -1,23 +0,0 @@
1
- require 'dragonfly'
2
- #require 'noodall/video_thumbnail_encoder'
3
-
4
- module Noodall
5
- class DragonflyDataStorage < Dragonfly::DataStorage::MongoDataStore
6
- def db
7
- MongoMapper.database
8
- end
9
- end
10
- end
11
-
12
- # Configuration for processing and encoding
13
- app = Dragonfly::App[:noodall_assets]
14
- app.configure_with(:rmagick)
15
- app.configure_with(:rails)
16
- #app.encoder.register(VideoThumbnailEncoder)
17
- app.configure do |c|
18
- c.datastore = Noodall::DragonflyDataStorage.new
19
- c.secret = '2406b0d72aaf812659babdf53eb49d4812c2cc59' unless Rails.env.test?
20
- end
21
- app.url_suffix = proc{|job|
22
- "/#{job.uid_basename}#{job.encoded_extname || job.uid_extname}"
23
- }
@@ -1,19 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#addvideo_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="js/dialog.js"></script>
7
- </head>
8
- <body>
9
- <form onsubmit="AddvideoDialog.insert();return false;" action="#">
10
- <p>Please enter the details of your video</p>
11
- <p>Video Title: <input id="videotitle" name="videotitle" type="text" class="text" /></p>
12
- <p>Video URL: <input id="videourl" name="videourl" type="text" class="text" /></p>
13
- <div class="mceActionPanel">
14
- <input type="button" id="insert" name="insert" value="{#insert}" onclick="AddvideoDialog.insert();" />
15
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
16
- </div>
17
- </form>
18
- </body>
19
- </html>
@@ -1,34 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var AddvideoDialog = {
4
- init : function() {
5
- var f = document.forms[0];
6
-
7
- // Get the selected contents as text and place it in the input
8
- f.videourl.value = tinyMCEPopup.editor.selection.getContent({format : 'text'});
9
- f.videtitle.value = tinyMCEPopup.editor.selection.getContent({format : 'text'});
10
- },
11
-
12
- insert : function() {
13
- // Insert the contents from the input into the document
14
-
15
- // VIDEO URL
16
- var url = document.forms[0].videourl.value;
17
-
18
- // VIDEO Title
19
- var title = document.forms[0].videotitle.value;
20
-
21
- // REGEXP
22
- var re=new RegExp(/http:\/\/([^\s\.]+).(youtube.com\/watch\?v=)([A-Za-z0-9\-]+)([^\s]*)/);
23
-
24
- // VIDEO ID
25
- var videoid = re.exec(url);
26
-
27
- // Add Link and img to the body
28
-
29
- tinyMCEPopup.editor.execCommand('mceInsertContent', false, "<a href='" + url + "' title='" + title + "' class='fancy-youtube'><img src='http://img.youtube.com/vi/" + videoid[3] + videoid[4] + "/1.jpg' alt='" + title + "' /></a>");
30
- tinyMCEPopup.close();
31
- }
32
- };
33
-
34
- tinyMCEPopup.onInit.add(AddvideoDialog.init, AddvideoDialog);
@@ -1,22 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#example_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="js/dialog.js"></script>
7
- </head>
8
- <body>
9
-
10
- <form onsubmit="ExampleDialog.insert();return false;" action="#">
11
- <p>Here is a example dialog.</p>
12
- <p>Selected text: <input id="someval" name="someval" type="text" class="text" /></p>
13
- <p>Custom arg: <input id="somearg" name="somearg" type="text" class="text" /></p>
14
-
15
- <div class="mceActionPanel">
16
- <input type="button" id="insert" name="insert" value="{#insert}" onclick="ExampleDialog.insert();" />
17
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
18
- </div>
19
- </form>
20
-
21
- </body>
22
- </html>
@@ -1 +0,0 @@
1
- (function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})();
@@ -1,84 +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
- // Load plugin specific language pack
13
- tinymce.PluginManager.requireLangPack('example');
14
-
15
- tinymce.create('tinymce.plugins.ExamplePlugin', {
16
- /**
17
- * Initializes the plugin, this will be executed after the plugin has been created.
18
- * This call is done before the editor instance has finished it's initialization so use the onInit event
19
- * of the editor instance to intercept that event.
20
- *
21
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
22
- * @param {string} url Absolute URL to where the plugin is located.
23
- */
24
- init : function(ed, url) {
25
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
26
- ed.addCommand('mceExample', function() {
27
- ed.windowManager.open({
28
- file : url + '/dialog.htm',
29
- width : 320 + parseInt(ed.getLang('example.delta_width', 0)),
30
- height : 120 + parseInt(ed.getLang('example.delta_height', 0)),
31
- inline : 1
32
- }, {
33
- plugin_url : url, // Plugin absolute URL
34
- some_custom_arg : 'custom arg' // Custom argument
35
- });
36
- });
37
-
38
- // Register example button
39
- ed.addButton('example', {
40
- title : 'example.desc',
41
- cmd : 'mceExample',
42
- image : url + '/img/example.gif'
43
- });
44
-
45
- // Add a node change handler, selects the button in the UI when a image is selected
46
- ed.onNodeChange.add(function(ed, cm, n) {
47
- cm.setActive('example', n.nodeName == 'IMG');
48
- });
49
- },
50
-
51
- /**
52
- * Creates control instances based in the incomming name. This method is normally not
53
- * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
54
- * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
55
- * method can be used to create those.
56
- *
57
- * @param {String} n Name of the control to create.
58
- * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
59
- * @return {tinymce.ui.Control} New control instance or null if no control was created.
60
- */
61
- createControl : function(n, cm) {
62
- return null;
63
- },
64
-
65
- /**
66
- * Returns information about the plugin as a name/value array.
67
- * The current keys are longname, author, authorurl, infourl and version.
68
- *
69
- * @return {Object} Name/value array containing information about the plugin.
70
- */
71
- getInfo : function() {
72
- return {
73
- longname : 'Example plugin',
74
- author : 'Some author',
75
- authorurl : 'http://tinymce.moxiecode.com',
76
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',
77
- version : "1.0"
78
- };
79
- }
80
- });
81
-
82
- // Register plugin
83
- tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);
84
- })();
@@ -1,19 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var ExampleDialog = {
4
- init : function() {
5
- var f = document.forms[0];
6
-
7
- // Get the selected contents as text and place it in the input
8
- f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'});
9
- f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg');
10
- },
11
-
12
- insert : function() {
13
- // Insert the contents from the input into the document
14
- tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value);
15
- tinyMCEPopup.close();
16
- }
17
- };
18
-
19
- tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog);
@@ -1,3 +0,0 @@
1
- tinyMCE.addI18n('en.example',{
2
- desc : 'This is just a template button'
3
- });
@@ -1,3 +0,0 @@
1
- tinyMCE.addI18n('en.example_dlg',{
2
- title : 'This is just a example title'
3
- });
@@ -1,7 +0,0 @@
1
- /* -------------- FORMS -------------- */
2
- /* inputs, textareas etc */
3
-
4
- /* align checkboxes, radios, text inputs with their label - UNTESTED!
5
- by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */
6
- input[type="radio"] { vertical-align: text-bottom; }
7
- input[type="checkbox"] { vertical-align: bottom; *vertical-align: baseline; }
@@ -1,12 +0,0 @@
1
- /* -------------- IE -------------- */
2
- /* for IE 7 and bellow */
3
-
4
- /* -------------- COMMON FIX'S -------------- */
5
- button { width: auto; overflow: visible; }
6
- img { -ms-interpolation-mode: bicubic; }
7
-
8
- /* -------------- CLEARFIX -------------- */
9
- {
10
- height: 1%;
11
- }
12
-
@@ -1,8 +0,0 @@
1
- /* -------------- IE8 -------------- */
2
- /* for IE8 */
3
-
4
-
5
- /* -------------- CLEARFIX -------------- */
6
- {
7
- height: 1%;
8
- }
@@ -1,45 +0,0 @@
1
- /* -------------- LAYOUT -------------- */
2
- /* margin, height, width etc */
3
-
4
- /*Hidden*/
5
- a.skip {display:none;}
6
-
7
- /* -------------- HEADER -------------- */
8
- #wrapper{
9
- width: 960px;
10
- margin: 0 auto;
11
- }
12
-
13
- /* -------------- HEADER -------------- */
14
-
15
- /* -------------- NAVIGATION -------------- */
16
-
17
- /* -------------- MAIN CONTENT -------------- */
18
-
19
- /* -------------- SUPPORTING CONTENT -------------- */
20
-
21
- /* -------------- TEMPLATES -------------- */
22
-
23
- /* -------------- COMPONENTS -------------- */
24
-
25
- /* -------------- FOOTER -------------- */
26
-
27
- /* -------------- ARTICLES -------------- */
28
-
29
- /* Comments */
30
-
31
- /* Pagination */
32
-
33
- /* -------------- ERRORS -------------- */
34
-
35
- /* -------------- JQUERY and CSS3 -------------- */
36
-
37
- /* -------------- CLEARFIX -------------- */
38
-
39
- /*{
40
- content: ".";
41
- display: block;
42
- height: 0;
43
- clear: both;
44
- visibility: hidden;
45
- }*/
@@ -1,35 +0,0 @@
1
- /* -------------- SKIN -------------- */
2
- /* color, background etc */
3
-
4
- /* -------------- HEADER -------------- */
5
-
6
- /* -------------- NAVIGATION -------------- */
7
-
8
- /* -------------- MAIN CONTENT -------------- */
9
-
10
- /* -------------- SUPPORTING CONTENT -------------- */
11
-
12
- /* -------------- TEMPLATES -------------- */
13
-
14
- /* -------------- COMPONENTS -------------- */
15
-
16
- /* -------------- FOOTER -------------- */
17
-
18
- /* -------------- ARTICLES -------------- */
19
-
20
- /* Comments */
21
-
22
- /* Pagination */
23
-
24
- /* -------------- ERRORS -------------- */
25
-
26
- /* -------------- JQUERY and CSS3 -------------- */
27
-
28
- /* ------------- IMAGE REPLACEMENT --------------- */
29
- /* {
30
- overflow: hidden;
31
- text-align: left;
32
- display: block;
33
- line-height:0;
34
- text-indent: -1000em;
35
- }*/
@@ -1,162 +0,0 @@
1
- /* -------------- TYPOGRAPHY -------------- */
2
- /* Font size, family, style etc */
3
-
4
- /* -------------- FONT FAMILY -------------- */
5
-
6
- body, textarea, input {
7
- font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
8
- font-size: 62.5%;
9
- word-spacing:2px;
10
- }
11
-
12
- /* -------------- FONT SIZES -------------- */
13
-
14
- /*9px*/
15
- {font-size:0.9em;}
16
-
17
- /* 10px */
18
- {font-size:1.0em;}
19
-
20
- /* 11px */
21
- {font-size:1.0em;}
22
-
23
- /* 12px */
24
- p{font-size:1.2em;}
25
-
26
- /* 13px */
27
- {font-size:1.3em;}
28
-
29
- /* 14px */
30
- {font-size:1.4em;}
31
-
32
- /* 15px */
33
- {font-size:1.5em;}
34
-
35
- /* 16px */
36
- {font-size:1.6em;}
37
-
38
- /* 17px */
39
- {font-size:1.7em;}
40
-
41
- /* 18px */
42
- {font-size:1.8em;}
43
-
44
- /* 19px */
45
- {font-size:1.9em;}
46
-
47
- /* 20px */
48
- h4, h5, h6{font-size:2.0em;}
49
-
50
- /* 21px */
51
- {font-size:2.1em;}
52
-
53
- /* 22px */
54
- {font-size:2.2em;}
55
-
56
- /* 23px */
57
- {font-size:2.3em;}
58
-
59
- /* 24px */
60
- h3{font-size:2.4em;}
61
-
62
- /* 30px */
63
- h2{font-size:3em;}
64
-
65
- /*36px */
66
- h1{font-size:3.6em;}
67
-
68
- /* -------------- FONT STYLING -------------- */
69
-
70
- /* Bold */
71
- {font-weight: bold;}
72
-
73
- /* Italic */
74
- {font-style: italic;}
75
-
76
- /* Underline */
77
- {text-decoration: underline;}
78
-
79
- /* Normal */
80
- {font-weight: normal !important;font-style: normal !important;}
81
-
82
- {font-weight: normal !important;}
83
-
84
- {font-style: normal !important;}
85
-
86
- /* -------------- LINE HEIGHT -------------- */
87
-
88
- /* -------------- LETTER SPACING -------------- */
89
-
90
- /* -------------- WORD SPACING -------------- */
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- /* Font stack options - Taken from Starkers by Elliot Jay Stocks - http://starkerstheme.com
101
-
102
- The following represents a list of font stacks, as recommended by Nathan Ford in
103
- http://unitinteractive.com/blog/2008/06/26/better-css-font-stacks/
104
-
105
- I've added inverted commas around the relevant family names to ensure compatibility.
106
- p = balanced for paragraphs or body copy
107
- t = balanced for headlines or titles
108
-
109
- - - - -
110
-
111
- Arial, "Helvetica Neue", Helvetica, sans-serif - p, t
112
-
113
- Baskerville, "Times New Roman", Times, serif - p
114
- Baskerville, "Times, Times New Roman", serif - t
115
-
116
- Cambria, Georgia, Times, "Times New Roman", serif - p, t
117
- "Century Gothic", "Apple Gothic", sans-serif - p, t
118
-
119
- Consolas, "Lucida Console", Monaco, monospace - p, t
120
-
121
- "Copperplate Light", "Copperplate Gothic Light", serif - p, t
122
-
123
- "Courier New", Courier, monospace - p, t
124
-
125
- "Franklin Gothic Medium", "Arial Narrow Bold", Arial, sans-serif - p, t
126
-
127
- Futura, "Century Gothic", "Apple Gothic", sans-serif - p, t
128
-
129
- Garamond, "Hoefler Text", "Times New Roman", Times, serif - p
130
- Garamond, "Hoefler Text", Palatino, "Palatino Linotype", serif - t
131
-
132
- Geneva, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif - p
133
- Geneva, Verdana, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif - t
134
-
135
- Georgia, Palatino, "Palatino Linotype", Times, "Times New Roman", serif - p
136
- Georgia, Times, "Times New Roman", serif - t
137
-
138
- GillSans, Calibri, Trebuchet, sans-serif - p
139
- GillSans, Trebuchet, Calibri, sans-serif - t
140
-
141
- "Helvetica Neue", Arial, Helvetica, sans-serif - p
142
- Helvetica, "Helvetica Neue", Arial, sans-serif - t
143
-
144
- Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif - p, t
145
-
146
- "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif - p, t
147
-
148
- Palatino, "Palatino Linotype", Georgia, Times, "Times New Roman", serif - p
149
- Palatino, "Palatino Linotype", "Hoefler Text", Times, "Times New Roman", serif - t
150
-
151
- Tahoma, Geneva, Verdana - p
152
- Tahoma, Verdana, Geneva - t
153
-
154
- Times, "Times New Roman", Georgia, serif - p, t
155
-
156
- Trebuchet, "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif - p
157
- Trebuchet, Tahoma, Arial, sans-serif - t
158
-
159
- Verdana, Geneva, Tahoma, sans-serif - p
160
- Verdana, Tahoma, Geneva, sans-serif - t
161
-
162
- */