skinny_forum 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/Gemfile +14 -0
  4. data/Gemfile.lock +92 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.md +29 -0
  7. data/README.rdoc +3 -0
  8. data/Rakefile +34 -0
  9. data/app/assets/images/.keep +0 -0
  10. data/app/assets/images/skinny_forum/.keep +0 -0
  11. data/app/assets/images/skinny_forum/internet.png +0 -0
  12. data/app/assets/images/skinny_forum/myphoto.jpg +0 -0
  13. data/app/assets/images/skinny_forum/silver_selector.png +0 -0
  14. data/app/assets/javascripts/skinnyforum/application.js +22 -0
  15. data/app/assets/javascripts/skinnyforum/forum_admin.js.coffee +433 -0
  16. data/app/assets/javascripts/skinnyforum/forum_basic.js.coffee +269 -0
  17. data/app/assets/javascripts/skinnyforum/forum_translator.js.coffee +113 -0
  18. data/app/assets/javascripts/skinnyforum/forum_user.js.coffee +394 -0
  19. data/app/assets/javascripts/skinnyforum/global_java.js +141 -0
  20. data/app/assets/stylesheets/skinnyforum/application.css.scss +25 -0
  21. data/app/assets/stylesheets/skinnyforum/custom.css.scss +289 -0
  22. data/app/controllers/skinnyforum/application_controller.rb +24 -0
  23. data/app/controllers/skinnyforum/forums_controller.rb +130 -0
  24. data/app/helpers/skinnyforum/application_helper.rb +4 -0
  25. data/app/mailers/.keep +0 -0
  26. data/app/mailers/skinnyforum/user_mailer.rb +13 -0
  27. data/app/models/.keep +0 -0
  28. data/app/models/skinnyforum/forum.rb +251 -0
  29. data/app/models/skinnyforum/forum_category.rb +70 -0
  30. data/app/models/skinnyforum/forum_hyperlink.rb +50 -0
  31. data/app/models/skinnyforum/forum_language.rb +86 -0
  32. data/app/models/skinnyforum/forum_people_list.rb +183 -0
  33. data/app/models/skinnyforum/forum_photo.rb +62 -0
  34. data/app/models/skinnyforum/forum_topic.rb +137 -0
  35. data/app/models/skinnyforum/forum_translation.rb +109 -0
  36. data/app/views/layouts/skinnyforum/application.html.erb +14 -0
  37. data/app/views/skinnyforum/forums/_dummy.html.erb +0 -0
  38. data/app/views/skinnyforum/forums/_forum.html.erb +107 -0
  39. data/app/views/skinnyforum/forums/_forum_admin.html.erb +133 -0
  40. data/app/views/skinnyforum/forums/newforum_photo.js.erb +1 -0
  41. data/app/views/skinnyforum/user_mailer/note_to_forum_users.html.erb +32 -0
  42. data/app_data/forum_base.csv +8 -0
  43. data/app_data/forum_help.csv +24 -0
  44. data/app_data/reset cmds +13 -0
  45. data/config/locales/skinnyforum/forum_de.yml +88 -0
  46. data/config/locales/skinnyforum/forum_en.yml +88 -0
  47. data/config/locales/skinnyforum/forum_es.yml +88 -0
  48. data/config/locales/skinnyforum/forum_fr.yml +88 -0
  49. data/config/routes.rb +2 -0
  50. data/db/migrate/20130100_add_users.rb +11 -0
  51. data/db/migrate/20140601_add_forums.rb +164 -0
  52. data/lib/skinny_forum.rb +4 -0
  53. data/lib/skinny_forum/engine.rb +5 -0
  54. data/lib/skinny_forum/forum_shared_code.rb +94 -0
  55. data/lib/skinny_forum/version.rb +3 -0
  56. data/lib/tasks/forum_tasks.rake +52 -0
  57. data/lib/tasks/skinny_forum_tasks.rake +4 -0
  58. data/skinny_forum.gemspec +28 -0
  59. data/test/dummy/README.rdoc +28 -0
  60. data/test/dummy/Rakefile +6 -0
  61. data/test/dummy/app/assets/images/.keep +0 -0
  62. data/test/dummy/app/assets/javascripts/application.js +13 -0
  63. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  64. data/test/dummy/app/controllers/application_controller.rb +5 -0
  65. data/test/dummy/app/controllers/concerns/.keep +0 -0
  66. data/test/dummy/app/helpers/application_helper.rb +2 -0
  67. data/test/dummy/app/mailers/.keep +0 -0
  68. data/test/dummy/app/models/.keep +0 -0
  69. data/test/dummy/app/models/concerns/.keep +0 -0
  70. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  71. data/test/dummy/bin/bundle +3 -0
  72. data/test/dummy/bin/rails +4 -0
  73. data/test/dummy/bin/rake +4 -0
  74. data/test/dummy/config.ru +4 -0
  75. data/test/dummy/config/application.rb +23 -0
  76. data/test/dummy/config/boot.rb +5 -0
  77. data/test/dummy/config/database.yml +25 -0
  78. data/test/dummy/config/environment.rb +5 -0
  79. data/test/dummy/config/environments/development.rb +37 -0
  80. data/test/dummy/config/environments/production.rb +83 -0
  81. data/test/dummy/config/environments/test.rb +39 -0
  82. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  83. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  84. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  85. data/test/dummy/config/initializers/inflections.rb +16 -0
  86. data/test/dummy/config/initializers/mime_types.rb +4 -0
  87. data/test/dummy/config/initializers/session_store.rb +3 -0
  88. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  89. data/test/dummy/config/locales/en.yml +23 -0
  90. data/test/dummy/config/routes.rb +4 -0
  91. data/test/dummy/config/secrets.yml +22 -0
  92. data/test/dummy/lib/assets/.keep +0 -0
  93. data/test/dummy/public/404.html +67 -0
  94. data/test/dummy/public/422.html +67 -0
  95. data/test/dummy/public/500.html +66 -0
  96. data/test/dummy/public/favicon.ico +0 -0
  97. data/test/integration/navigation_test.rb +10 -0
  98. data/test/skinny_forum_test.rb +7 -0
  99. data/test/test_helper.rb +15 -0
  100. metadata +234 -0
@@ -0,0 +1,141 @@
1
+ /*jslint browser:true */
2
+ /*global $, jQuery, alert*/
3
+
4
+ function getHomeName() {
5
+ "use strict";
6
+ return 'magic';
7
+ }
8
+
9
+ function showPageName() {
10
+ "use strict";
11
+ return 'magic-page';
12
+ }
13
+
14
+ function checkPage(page) {
15
+ "use strict";
16
+ var path;
17
+ path = window.location.href.split("/").pop();
18
+ return (path === "" || path === page || path === page + '#' || path.length === 2);
19
+ }
20
+
21
+ function whatsup1(message) {
22
+ "use strict";
23
+ document.getElementById('whatsup1').innerHTML = message;
24
+ }
25
+
26
+ function whatsup2(message) {
27
+ "use strict";
28
+ document.getElementById('whatsup2').innerHTML = message;
29
+ }
30
+
31
+ function getSelectValues(params) {
32
+ "use strict";
33
+ var select, result = [], options, opt, i, iLen;
34
+ if (params.id !== undefined && params.id !== null) {
35
+ select = document.getElementById(params.id);
36
+ } else if (params.name !== undefined && params.name !== null) {
37
+ select = $('[name =' + params.name + ']').get()[0];
38
+ } else if (params.obj !== undefined && params.obj !== null) {
39
+ select = params.obj;
40
+ }
41
+ options = select && select.options;
42
+ if (options !== null) {
43
+ for (i = 0, iLen = options.length; i < iLen; i += 1) {
44
+ opt = options[i];
45
+ if (opt.selected) {
46
+ if (params.ref) {
47
+ result.push(opt.text || opt.value);
48
+ } else {
49
+ result.push(opt.value || opt.text);
50
+ }
51
+ }
52
+ }
53
+ }
54
+ return result;
55
+ }
56
+
57
+ function showMe(params) {
58
+ "use strict";
59
+ var me, test;
60
+ if (params.id !== undefined && params.id !== null) {
61
+ me = document.getElementById(params.id);
62
+ } else if (params.name !== undefined && params.name !== null) {
63
+ test = "[name=" + params.name + "]";
64
+ me = $(test).get()[0];
65
+ } else if (params.obj !== undefined && params.obj !== null) {
66
+ me = params.obj;
67
+ }
68
+ if (me !== null && me !== undefined) {
69
+ me.style.display = 'inline';
70
+ }
71
+ return true;
72
+ }
73
+
74
+ function blockMe(params) {
75
+ "use strict";
76
+ var me, test;
77
+ if (params.id !== undefined && params.id !== null) {
78
+ me = document.getElementById(params.id);
79
+ } else if (params.name !== undefined && params.name !== null) {
80
+ test = "[name=" + params.name + "]";
81
+ me = $(test).get()[0];
82
+ } else if (params.obj !== undefined && params.obj !== null) {
83
+ me = params.obj;
84
+ }
85
+ if (me !== null && me !== undefined) {me.style.display = 'block'; }
86
+ return true;
87
+ }
88
+ function hideMe(params) {
89
+ "use strict";
90
+ var me, test;
91
+ if (params.id !== undefined && params.id !== null) {
92
+ me = document.getElementById(params.id);
93
+ } else if (params.name !== undefined && params.name !== null) {
94
+ test = "[name=" + params.name + "]";
95
+ me = $(test).get()[0];
96
+ } else if (params.obj !== undefined && params.obj !== null) {
97
+ me = params.obj;
98
+ }
99
+ if (me !== null && me !== undefined) {me.style.display = 'none'; }
100
+ return true;
101
+ }
102
+ function removeMe(params) {
103
+ "use strict";
104
+ var me, test;
105
+ if (params.id !== undefined && params.id !== null) {
106
+ me = document.getElementById(params.id);
107
+ } else if (params.name !== undefined && params.name !== null) {
108
+ test = "[name=" + params.name + "]";
109
+ me = $(test).get()[0];
110
+ } else if (params.obj !== undefined && params.obj !== null) {
111
+ me = params.obj;
112
+ }
113
+ if (me !== null && me !== undefined) {me.parentNode.removeChild(me); }
114
+ return true;
115
+ }
116
+
117
+ function removeIt(obj) {
118
+ "use strict";
119
+ obj.parentNode.removeChild(obj);
120
+ return true;
121
+ }
122
+ function setMyValue(id, value) {
123
+ "use strict";
124
+ document.getElementById(id).value = value;
125
+ return true;
126
+ }
127
+
128
+ function getMyValue(id) {
129
+ "use strict";
130
+ return document.getElementById(id).value.trim();
131
+ }
132
+
133
+ function deleteMyData(obj) {
134
+ 'use strict';
135
+ var the_keys, ref, i;
136
+ the_keys = Object.keys(obj.dataset);
137
+ for (i = 0; i < the_keys.length; i += 1) {
138
+ ref = 'data-' + the_keys[i];
139
+ obj.removeAttribute(ref);
140
+ }
141
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
14
+ @import "bootstrap";
15
+ .special_content {
16
+ background-color: #eee;
17
+ padding: 20px;
18
+ margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
19
+ -webkit-border-radius: 0 0 6px 6px;
20
+ -moz-border-radius: 0 0 6px 6px;
21
+ border-radius: 0 0 6px 6px;
22
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
23
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
24
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
25
+ }
@@ -0,0 +1,289 @@
1
+
2
+ /* mixins, variables, etc. */
3
+
4
+ $grayMediumLight: #eaeaea;
5
+ $grayLighter: #f0f0f0;
6
+ $grayLight: #c0c0c0;
7
+ $blue: #a0a0ff;
8
+ @mixin box_sizing {
9
+ -moz-box-sizing: border-box;
10
+ -webkit-box-sizing: border-box;
11
+ box-sizing: border-box;
12
+ }
13
+ .forum-comment {
14
+ margin-bottom:0;
15
+ margin-top:-5px;
16
+ width:100%;
17
+ word-wrap: normal;
18
+ }
19
+
20
+ .comment-new{
21
+ @extend .forum-comment;
22
+ background:rgb(235,255,240);
23
+ }
24
+ .comment-reject{
25
+ @extend .forum-comment;
26
+ background:rgb(255,235,235);
27
+ }
28
+
29
+ .senate-row{
30
+ padding:0;
31
+ }
32
+
33
+ .forum-email-subject{
34
+ width:75%;
35
+ margin-top:20px;
36
+ margin-left:40px;
37
+ }
38
+ .forum-email-body{
39
+ width:75%;
40
+ margin-top:20px;
41
+ margin-left:40px;
42
+ min-height:250px;
43
+ }
44
+ .forum-select{
45
+ width:auto;
46
+ }
47
+ .forum-select-multiple{
48
+ width:auto;
49
+ max-height:35px;
50
+ padding:7px;
51
+ }
52
+
53
+ .forum-translation-choice{
54
+ cursor: arrow;
55
+ margin-left: 15px;
56
+ }
57
+ .forum-senate{
58
+ width:100%;
59
+ height:570px;
60
+ background:rgb(235,235,240);
61
+ overflow-y: scroll;
62
+ padding:20px;
63
+ }
64
+
65
+ .forum-closed{
66
+ background:rgb(200,200,245);
67
+ color: rgb(180, 0, 0)
68
+ }
69
+ .forum-add-photo,.forum-add-internet{
70
+ width:40px;
71
+ height:25px;
72
+ }
73
+
74
+ .forum-photo{
75
+ max-width:150;
76
+ max-height:100px;
77
+ padding-left:20px;
78
+ }
79
+ .forum-big-photo{
80
+ max-width:600px;
81
+ max-height:400;
82
+ }
83
+ .forum-tab{
84
+ width:20px;
85
+ display:inline;
86
+ }
87
+ .comment-new-span{
88
+ position:aboslute;
89
+ min-width:500px;
90
+ max-width:850px;
91
+ background-color:white;
92
+ padding:5px;
93
+ }
94
+ .gap{
95
+ }
96
+ .senate-new{
97
+ max-width:710px;
98
+ max-height:75px;
99
+ margin: 5px 20px 20px;
100
+ overflow-y: scroll;
101
+ word-wrap: normal;
102
+ }
103
+ .forum-topic{
104
+ font-size: 1.5em;
105
+ font-weight:bold;
106
+ }
107
+ .comment-btn{
108
+ width:auto;
109
+ margin-top:5px;
110
+ margin-left:5px;
111
+ padding-left:15px;
112
+ padding-right:15px;
113
+ height:22px;
114
+ }
115
+ .pad-10L{
116
+ padding-left:10px;
117
+ }
118
+ .pad-10R{
119
+ margin-right:10px;
120
+ margin-top:5px;
121
+ }
122
+
123
+ .button-image{
124
+ max-width:40px;
125
+ max-height:25px;
126
+ padding:0;
127
+ }
128
+
129
+ .needy{
130
+ background-color: rgb(220, 150, 150);
131
+ }
132
+
133
+ .vote-green{
134
+ background:rgb(0,180,0);
135
+ }
136
+ .vote-red{
137
+ background:rgb(180,0,0);
138
+ }
139
+ .forum-vote {
140
+ min-width: 60px;
141
+ }
142
+
143
+ .forum-vote-down {
144
+ @extend .forum-vote;
145
+ color:rgb(200,0,0);
146
+ }
147
+
148
+ .forum-vote-up {
149
+ @extend .forum-vote;
150
+ color:rgb(0,200,0) ;
151
+ }
152
+
153
+ .cool-selector{
154
+ background: Transparent no-repeat;
155
+ border: none;
156
+ width:automatic;
157
+ }
158
+ .silver-selector{
159
+ border: none;
160
+ width:automatic;
161
+ min-width:150px;
162
+ min-height:25px;
163
+ background: Transparent url(silver_selector.png) no-repeat;
164
+ padding-top:0px;
165
+ padding-bottom:0px;
166
+ vertical-align:text-top;
167
+ margin:0;
168
+ }
169
+ .silver-elipse {
170
+ -moz-box-shadow:inset 0px 1px 0px 0px white;
171
+ -webkit-box-shadow:inset 0px 1px 0px 0px white;
172
+ box-shadow:inset 0px 1px 0px 0px white;
173
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #c7c7c7) );
174
+ background:-moz-linear-gradient( center top, #f9f9f9 5%, #c7c7c7 100% );
175
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#c7c7c7');
176
+ background-color: rgb(249, 249, 249);
177
+ -webkit-border-radius: 33px;
178
+ -moz-border-radius: 33px;
179
+ border-radius: 33px;
180
+ text-indent:0;
181
+ border:1px solid rgb(220, 220, 220);
182
+ display:inline-block;
183
+ color: rgb(102, 102, 102);
184
+ font-family:Arial;
185
+ font-size:12px;
186
+ font-weight:bold;
187
+ font-style:normal;
188
+ height:2px;
189
+ line-height:2px;
190
+ width:auto;
191
+ text-decoration:none;
192
+ text-align:center;
193
+ text-shadow:1px 1px 0px white;
194
+ }
195
+
196
+ .forum-translation-scroll{
197
+ max-height:200px;
198
+ overflow-y:scroll;
199
+ }
200
+
201
+ .drop-menus{
202
+ position:absolute;
203
+ width:200px;
204
+ background-color:$grayMediumLight;
205
+ list-style-type: none;
206
+ z-index:0
207
+ }
208
+ .drop-menu {
209
+ cursor: arrow;
210
+ margin-left: 20px;
211
+ }
212
+ .drop-menu:hover{
213
+ padding: 3px;
214
+ border: 1px rgb(255, 255, 255) outset;
215
+ }
216
+ .drop-menu:active{
217
+ color: rgb(0, 0, 249);
218
+ }
219
+
220
+ .silver-elipse:hover {
221
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, rgb(199, 199, 199)), color-stop(1, rgb(249, 249, 249)) );
222
+ background:-moz-linear-gradient( center top, rgb(199, 199, 199) 5%, rgb(249, 249, 249) 100% );
223
+ background-color: rgb(199, 199, 199);
224
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#c7c7c7');
225
+ }
226
+
227
+ .silver-elipse:active {
228
+ position:relative;
229
+ top:1px;
230
+ }
231
+ .red-elipse{
232
+ @extend .silver-elipse ;
233
+ color: rgb(180, 0, 0);
234
+ }
235
+ .red-elipse:hover{
236
+ @extend .silver-elipse:hover;
237
+ }
238
+
239
+ .hot{
240
+ border: 3px crimson;
241
+ }
242
+
243
+ .red-elisps:active {
244
+ @extend .silver-elipse:active;
245
+ }
246
+
247
+ .green-elipse {
248
+ @extend .silver-elipse;
249
+ color: rgb(0, 180, 0);
250
+
251
+ }
252
+ .green-elipse:hover {
253
+ @extend .silver-elipse:hover;
254
+ }
255
+
256
+ .green-elipse:active {
257
+ @extend .silver-elipse:active;
258
+ }
259
+
260
+ .blue-elipse {
261
+ @extend .silver-elipse;
262
+ color: rgb(0, 0, 180);
263
+
264
+ }
265
+ .blue-elipse:hover {
266
+ @extend .silver-elipse:hover;
267
+ }
268
+
269
+ .blue-elipse:active {
270
+ @extend .silver-elipse:active;
271
+ }
272
+
273
+ .left{
274
+ float:left;
275
+ }
276
+ .right{
277
+ float:right;
278
+ }
279
+ /* users index */
280
+ /* miscellaneous */
281
+
282
+ .debug_dump {
283
+ clear: both;
284
+ float: left;
285
+ width: 100%;
286
+ margin-top: 45px;
287
+ @include box_sizing;
288
+ }
289
+