homeland 0.0.9 → 1.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +139 -43
  4. data/Rakefile +23 -0
  5. data/app/assets/javascripts/homeland/application.coffee +31 -0
  6. data/app/assets/javascripts/homeland/bootstrap.min.js +7 -0
  7. data/{lib/generators/homeland/install/templates/javascripts → app/assets/javascripts/homeland}/jquery.timeago.js +13 -13
  8. data/app/assets/javascripts/homeland/tether.min.js +1 -0
  9. data/app/assets/stylesheets/homeland/application.scss +114 -0
  10. data/app/assets/stylesheets/homeland/bootstrap-theme.scss +165 -0
  11. data/app/assets/stylesheets/homeland/bootstrap.min.css +5 -0
  12. data/app/assets/stylesheets/homeland/markdown.scss +13 -0
  13. data/app/assets/stylesheets/homeland/tether.min.css +1 -0
  14. data/app/controllers/homeland/application_controller.rb +37 -12
  15. data/app/controllers/homeland/replies_controller.rb +25 -11
  16. data/app/controllers/homeland/topics_controller.rb +50 -58
  17. data/app/helpers/homeland/application_helper.rb +45 -13
  18. data/app/models/homeland/concerns/markdown_body.rb +17 -0
  19. data/app/models/homeland/concerns/pagination.rb +14 -0
  20. data/app/models/homeland/concerns/soft_delete.rb +29 -0
  21. data/app/models/homeland/concerns/user_methods.rb +23 -0
  22. data/app/models/homeland/node.rb +10 -25
  23. data/app/models/homeland/reply.rb +16 -17
  24. data/app/models/homeland/topic.rb +19 -29
  25. data/app/views/homeland/replies/_reply.html.erb +35 -0
  26. data/app/views/homeland/replies/edit.html.erb +17 -27
  27. data/app/views/homeland/shared/_error_messages.html.erb +2 -4
  28. data/app/views/homeland/topics/_form.html.erb +21 -24
  29. data/app/views/homeland/topics/_node_info.html.erb +9 -0
  30. data/app/views/homeland/topics/_reply_form.html.erb +16 -0
  31. data/app/views/homeland/topics/_topic.html.erb +17 -26
  32. data/app/views/homeland/topics/edit.html.erb +6 -10
  33. data/app/views/homeland/topics/index.html.erb +28 -51
  34. data/app/views/homeland/topics/new.html.erb +5 -10
  35. data/app/views/homeland/topics/show.html.erb +16 -89
  36. data/app/views/layouts/homeland/application.html.erb +42 -0
  37. data/config/locales/homeland.en.yml +40 -0
  38. data/config/locales/homeland.zh-CN.yml +8 -0
  39. data/config/routes.rb +6 -8
  40. data/db/migrate/20160321125035_create_homeland_nodes.rb +15 -0
  41. data/db/migrate/20160321125610_create_homeland_topics.rb +25 -0
  42. data/db/migrate/20160321125920_create_homeland_replies.rb +16 -0
  43. data/db/migrate/20160322062228_add_reply_to_id_to_replies.rb +7 -0
  44. data/lib/generators/homeland/controllers_generator.rb +14 -0
  45. data/lib/generators/homeland/i18n_generator.rb +22 -0
  46. data/lib/generators/homeland/install_generator.rb +8 -54
  47. data/lib/generators/homeland/templates/config/initializers/homeland.rb +34 -0
  48. data/lib/generators/homeland/views_generator.rb +3 -10
  49. data/lib/homeland.rb +29 -3
  50. data/lib/homeland/action_view/will_paginate.rb +38 -0
  51. data/lib/homeland/configuration.rb +66 -0
  52. data/lib/homeland/engine.rb +4 -27
  53. data/lib/homeland/markup.rb +17 -0
  54. data/lib/homeland/markup/base.rb +11 -0
  55. data/lib/homeland/markup/html.rb +12 -0
  56. data/lib/homeland/markup/markdown.rb +17 -0
  57. data/lib/homeland/markup/simple.rb +14 -0
  58. data/lib/homeland/version.rb +3 -0
  59. data/lib/tasks/homeland_tasks.rake +4 -0
  60. metadata +119 -38
  61. data/Changelogs.md +0 -29
  62. data/app/assets/images/reply.png +0 -0
  63. data/app/assets/javascripts/homeland.coffee +0 -51
  64. data/app/assets/stylesheets/homeland.scss +0 -100
  65. data/app/helpers/homeland/topics_helper.rb +0 -14
  66. data/app/models/homeland/section.rb +0 -21
  67. data/app/views/homeland/topics/_base.html.erb +0 -4
  68. data/app/views/homeland/topics/_sidebar.html.erb +0 -49
  69. data/app/views/homeland/topics/feed.builder +0 -20
  70. data/lib/generators/homeland/install/templates/images/jquery.chosen.png +0 -0
  71. data/lib/generators/homeland/install/templates/initializer.rb +0 -8
  72. data/lib/generators/homeland/install/templates/javascripts/jquery.chosen.js +0 -898
  73. data/lib/generators/homeland/install/templates/javascripts/jquery.hotkeys.js +0 -99
  74. data/lib/generators/homeland/install/templates/locales/homeland.zh-CN.yml +0 -14
  75. data/lib/generators/homeland/install/templates/stylesheets/jquery.chosen.scss +0 -367
  76. data/lib/homeland/setting.rb +0 -37
@@ -1,99 +0,0 @@
1
- /*
2
- * jQuery Hotkeys Plugin
3
- * Copyright 2010, John Resig
4
- * Dual licensed under the MIT or GPL Version 2 licenses.
5
- *
6
- * Based upon the plugin by Tzury Bar Yochay:
7
- * http://github.com/tzuryby/hotkeys
8
- *
9
- * Original idea by:
10
- * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
11
- */
12
-
13
- (function(jQuery){
14
-
15
- jQuery.hotkeys = {
16
- version: "0.8",
17
-
18
- specialKeys: {
19
- 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
20
- 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
21
- 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
22
- 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
23
- 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
24
- 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
25
- 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
26
- },
27
-
28
- shiftNums: {
29
- "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
30
- "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
31
- ".": ">", "/": "?", "\\": "|"
32
- }
33
- };
34
-
35
- function keyHandler( handleObj ) {
36
- // Only care when a possible input has been specified
37
- if ( typeof handleObj.data !== "string" ) {
38
- return;
39
- }
40
-
41
- var origHandler = handleObj.handler,
42
- keys = handleObj.data.toLowerCase().split(" ");
43
-
44
- handleObj.handler = function( event ) {
45
- // Don't fire in text-accepting inputs that we didn't directly bind to
46
- if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
47
- event.target.type === "text") ) {
48
- return;
49
- }
50
-
51
- // Keypress represents characters, not special keys
52
- var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
53
- character = String.fromCharCode( event.which ).toLowerCase(),
54
- key, modif = "", possible = {};
55
-
56
- // check combinations (alt|ctrl|shift+anything)
57
- if ( event.altKey && special !== "alt" ) {
58
- modif += "alt+";
59
- }
60
-
61
- if ( event.ctrlKey && special !== "ctrl" ) {
62
- modif += "ctrl+";
63
- }
64
-
65
- // TODO: Need to make sure this works consistently across platforms
66
- if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
67
- modif += "meta+";
68
- }
69
-
70
- if ( event.shiftKey && special !== "shift" ) {
71
- modif += "shift+";
72
- }
73
-
74
- if ( special ) {
75
- possible[ modif + special ] = true;
76
-
77
- } else {
78
- possible[ modif + character ] = true;
79
- possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
80
-
81
- // "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
82
- if ( modif === "shift+" ) {
83
- possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
84
- }
85
- }
86
-
87
- for ( var i = 0, l = keys.length; i < l; i++ ) {
88
- if ( possible[ keys[i] ] ) {
89
- return origHandler.apply( this, arguments );
90
- }
91
- }
92
- };
93
- }
94
-
95
- jQuery.each([ "keydown", "keyup", "keypress" ], function() {
96
- jQuery.event.special[ this ] = { add: keyHandler };
97
- });
98
-
99
- })( jQuery );
@@ -1,14 +0,0 @@
1
- 'zh-CN':
2
- mongoid:
3
- models:
4
- homeland/topic: "话题"
5
- homeland/reply: "回复"
6
- homeland/section: "大节点"
7
- homeland/node: "节点"
8
- attributes:
9
- homeland/topic:
10
- title: "标题"
11
- body: "正文"
12
- user_id: "用户"
13
- homeland/reply:
14
- body: "回复内容"
@@ -1,367 +0,0 @@
1
- /* @group Base */
2
- .chzn-container {
3
- font-size: 13px;
4
- position: relative;
5
- display: inline-block;
6
- zoom: 1;
7
- *display: inline;
8
- }
9
- .chzn-container .chzn-drop {
10
- background: #fff;
11
- border: 1px solid #aaa;
12
- border-top: 0;
13
- position: absolute;
14
- top: 29px;
15
- left: 0;
16
- -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
17
- -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
18
- -o-box-shadow : 0 4px 5px rgba(0,0,0,.15);
19
- box-shadow : 0 4px 5px rgba(0,0,0,.15);
20
- z-index: 999;
21
- }
22
- /* @end */
23
-
24
- /* @group Single Chosen */
25
- .chzn-container-single .chzn-single {
26
- background-color: #fff;
27
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
28
- background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
29
- background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
30
- background-image: -o-linear-gradient(top, #eeeeee 0%,#ffffff 50%);
31
- background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 50%);
32
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
33
- background-image: linear-gradient(top, #eeeeee 0%,#ffffff 50%);
34
- -webkit-border-radius: 4px;
35
- -moz-border-radius : 4px;
36
- border-radius : 4px;
37
- -moz-background-clip : padding;
38
- -webkit-background-clip: padding-box;
39
- background-clip : padding-box;
40
- border: 1px solid #aaa;
41
- display: block;
42
- overflow: hidden;
43
- white-space: nowrap;
44
- position: relative;
45
- height: 26px;
46
- line-height: 26px;
47
- padding: 0 0 0 8px;
48
- color: #444;
49
- text-decoration: none;
50
- }
51
- .chzn-container-single .chzn-single span {
52
- margin-right: 26px;
53
- display: block;
54
- overflow: hidden;
55
- white-space: nowrap;
56
- -o-text-overflow: ellipsis;
57
- -ms-text-overflow: ellipsis;
58
- text-overflow: ellipsis;
59
- }
60
- .chzn-container-single .chzn-single abbr {
61
- display: block;
62
- position: absolute;
63
- right: 26px;
64
- top: 8px;
65
- width: 12px;
66
- height: 13px;
67
- font-size: 1px;
68
- background: image_url("jquery.chosen.png") right top no-repeat;
69
- }
70
- .chzn-container-single .chzn-single abbr:hover {
71
- background-position: right -11px;
72
- }
73
- .chzn-container-single .chzn-single div {
74
- -webkit-border-radius: 0 4px 4px 0;
75
- -moz-border-radius : 0 4px 4px 0;
76
- border-radius : 0 4px 4px 0;
77
- -moz-background-clip : padding;
78
- -webkit-background-clip: padding-box;
79
- background-clip : padding-box;
80
- background: #ccc;
81
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
82
- background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
83
- background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
84
- background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
85
- background-image: -ms-linear-gradient(top, #cccccc 0%,#eeeeee 60%);
86
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#eeeeee',GradientType=0 );
87
- background-image: linear-gradient(top, #cccccc 0%,#eeeeee 60%);
88
- border-left: 1px solid #aaa;
89
- position: absolute;
90
- right: 0;
91
- top: 0;
92
- display: block;
93
- height: 100%;
94
- width: 18px;
95
- }
96
- .chzn-container-single .chzn-single div b {
97
- background: image_url("jquery.chosen.png") no-repeat 0 1px;
98
- display: block;
99
- width: 100%;
100
- height: 100%;
101
- }
102
- .chzn-container-single .chzn-search {
103
- padding: 3px 4px;
104
- position: relative;
105
- margin: 0;
106
- white-space: nowrap;
107
- z-index: 1010;
108
- }
109
- .chzn-container-single .chzn-search input {
110
- background: #fff image_url("jquery.chosen.png") no-repeat 100% -22px;
111
- background: image_url("jquery.chosen.png") no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
112
- background: image_url("jquery.chosen.png") no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
113
- background: image_url("jquery.chosen.png") no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
114
- background: image_url("jquery.chosen.png") no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
115
- background: image_url("jquery.chosen.png") no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
116
- background: image_url("jquery.chosen.png") no-repeat 100% -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
117
- margin: 1px 0;
118
- padding: 4px 20px 4px 5px;
119
- outline: 0;
120
- border: 1px solid #aaa;
121
- font-family: sans-serif;
122
- font-size: 1em;
123
- }
124
- .chzn-container-single .chzn-drop {
125
- -webkit-border-radius: 0 0 4px 4px;
126
- -moz-border-radius : 0 0 4px 4px;
127
- border-radius : 0 0 4px 4px;
128
- -moz-background-clip : padding;
129
- -webkit-background-clip: padding-box;
130
- background-clip : padding-box;
131
- }
132
- /* @end */
133
-
134
- .chzn-container-single-nosearch .chzn-search input {
135
- position: absolute;
136
- left: -9000px;
137
- }
138
-
139
- /* @group Multi Chosen */
140
- .chzn-container-multi .chzn-choices {
141
- background-color: #fff;
142
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
143
- background-image: -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
144
- background-image: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
145
- background-image: -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
146
- background-image: -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
147
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
148
- background-image: linear-gradient(top, #ffffff 85%,#eeeeee 99%);
149
- border: 1px solid #aaa;
150
- margin: 0;
151
- padding: 0;
152
- cursor: text;
153
- overflow: hidden;
154
- height: auto !important;
155
- height: 1%;
156
- position: relative;
157
- }
158
- .chzn-container-multi .chzn-choices li {
159
- float: left;
160
- list-style: none;
161
- }
162
- .chzn-container-multi .chzn-choices .search-field {
163
- white-space: nowrap;
164
- margin: 0;
165
- padding: 0;
166
- }
167
- .chzn-container-multi .chzn-choices .search-field input {
168
- color: #666;
169
- background: transparent !important;
170
- border: 0 !important;
171
- padding: 5px;
172
- margin: 1px 0;
173
- outline: 0;
174
- -webkit-box-shadow: none;
175
- -moz-box-shadow : none;
176
- -o-box-shadow : none;
177
- box-shadow : none;
178
- }
179
- .chzn-container-multi .chzn-choices .search-field .default {
180
- color: #999;
181
- }
182
- .chzn-container-multi .chzn-choices .search-choice {
183
- -webkit-border-radius: 3px;
184
- -moz-border-radius : 3px;
185
- border-radius : 3px;
186
- -moz-background-clip : padding;
187
- -webkit-background-clip: padding-box;
188
- background-clip : padding-box;
189
- background-color: #e4e4e4;
190
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #e4e4e4), color-stop(0.7, #eeeeee));
191
- background-image: -webkit-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
192
- background-image: -moz-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
193
- background-image: -o-linear-gradient(bottom, #e4e4e4 0%, #eeeeee 70%);
194
- background-image: -ms-linear-gradient(top, #e4e4e4 0%,#eeeeee 70%);
195
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e4e4e4', endColorstr='#eeeeee',GradientType=0 );
196
- background-image: linear-gradient(top, #e4e4e4 0%,#eeeeee 70%);
197
- color: #333;
198
- border: 1px solid #b4b4b4;
199
- line-height: 13px;
200
- padding: 3px 19px 3px 6px;
201
- margin: 3px 0 3px 5px;
202
- position: relative;
203
- }
204
- .chzn-container-multi .chzn-choices .search-choice span {
205
- cursor: default;
206
- }
207
- .chzn-container-multi .chzn-choices .search-choice-focus {
208
- background: #d4d4d4;
209
- }
210
- .chzn-container-multi .chzn-choices .search-choice .search-choice-close {
211
- display: block;
212
- position: absolute;
213
- right: 3px;
214
- top: 4px;
215
- width: 12px;
216
- height: 13px;
217
- font-size: 1px;
218
- background: image_url("jquery.chosen.png") right top no-repeat;
219
- }
220
- .chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
221
- background-position: right -11px;
222
- }
223
- .chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
224
- background-position: right -11px;
225
- }
226
- /* @end */
227
-
228
- /* @group Results */
229
- .chzn-container .chzn-results {
230
- margin: 0 4px 4px 0;
231
- max-height: 190px;
232
- padding: 0 0 0 4px;
233
- position: relative;
234
- overflow-x: hidden;
235
- overflow-y: auto;
236
- }
237
- .chzn-container-multi .chzn-results {
238
- margin: -1px 0 0;
239
- padding: 0;
240
- }
241
- .chzn-container .chzn-results li {
242
- display: none;
243
- line-height: 80%;
244
- padding: 7px 7px 8px;
245
- margin: 0;
246
- list-style: none;
247
- }
248
- .chzn-container .chzn-results .active-result {
249
- cursor: pointer;
250
- display: list-item;
251
- }
252
- .chzn-container .chzn-results .highlighted {
253
- background: #3875d7;
254
- color: #fff;
255
- }
256
- .chzn-container .chzn-results li em {
257
- background: #feffde;
258
- font-style: normal;
259
- }
260
- .chzn-container .chzn-results .highlighted em {
261
- background: transparent;
262
- }
263
- .chzn-container .chzn-results .no-results {
264
- background: #f4f4f4;
265
- display: list-item;
266
- }
267
- .chzn-container .chzn-results .group-result {
268
- cursor: default;
269
- color: #999;
270
- font-weight: bold;
271
- }
272
- .chzn-container .chzn-results .group-option {
273
- padding-left: 20px;
274
- }
275
- .chzn-container-multi .chzn-drop .result-selected {
276
- display: none;
277
- }
278
- /* @end */
279
-
280
- /* @group Active */
281
- .chzn-container-active .chzn-single {
282
- -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
283
- -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
284
- -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
285
- box-shadow : 0 0 5px rgba(0,0,0,.3);
286
- border: 1px solid #5897fb;
287
- }
288
- .chzn-container-active .chzn-single-with-drop {
289
- border: 1px solid #aaa;
290
- -webkit-box-shadow: 0 1px 0 #fff inset;
291
- -moz-box-shadow : 0 1px 0 #fff inset;
292
- -o-box-shadow : 0 1px 0 #fff inset;
293
- box-shadow : 0 1px 0 #fff inset;
294
- background-color: #eee;
295
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
296
- background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
297
- background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
298
- background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
299
- background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
300
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
301
- background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
302
- -webkit-border-bottom-left-radius : 0;
303
- -webkit-border-bottom-right-radius: 0;
304
- -moz-border-radius-bottomleft : 0;
305
- -moz-border-radius-bottomright: 0;
306
- border-bottom-left-radius : 0;
307
- border-bottom-right-radius: 0;
308
- }
309
- .chzn-container-active .chzn-single-with-drop div {
310
- background: transparent;
311
- border-left: none;
312
- }
313
- .chzn-container-active .chzn-single-with-drop div b {
314
- background-position: -18px 1px;
315
- }
316
- .chzn-container-active .chzn-choices {
317
- -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
318
- -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
319
- -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
320
- box-shadow : 0 0 5px rgba(0,0,0,.3);
321
- border: 1px solid #5897fb;
322
- }
323
- .chzn-container-active .chzn-choices .search-field input {
324
- color: #111 !important;
325
- }
326
- /* @end */
327
-
328
- /* @group Disabled Support */
329
- .chzn-disabled {
330
- cursor: default;
331
- opacity:0.5 !important;
332
- }
333
- .chzn-disabled .chzn-single {
334
- cursor: default;
335
- }
336
- .chzn-disabled .chzn-choices .search-choice .search-choice-close {
337
- cursor: default;
338
- }
339
-
340
- /* @group Right to Left */
341
- .chzn-rtl { direction:rtl;text-align: right; }
342
- .chzn-rtl .chzn-single { padding-left: 0; padding-right: 8px; }
343
- .chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; }
344
- .chzn-rtl .chzn-single div {
345
- left: 0; right: auto;
346
- border-left: none; border-right: 1px solid #aaaaaa;
347
- -webkit-border-radius: 4px 0 0 4px;
348
- -moz-border-radius : 4px 0 0 4px;
349
- border-radius : 4px 0 0 4px;
350
- }
351
- .chzn-rtl .chzn-choices li { float: right; }
352
- .chzn-rtl .chzn-choices .search-choice { padding: 3px 6px 3px 19px; margin: 3px 5px 3px 0; }
353
- .chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 5px; right: auto; background-position: right top;}
354
- .chzn-rtl.chzn-container-single .chzn-results { margin-left: 4px; margin-right: 0; padding-left: 0; padding-right: 4px; }
355
- .chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 20px; }
356
- .chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
357
- .chzn-rtl .chzn-search input {
358
- background: image_url("jquery.chosen.png") no-repeat -38px -22px, #ffffff;
359
- background: image_url("jquery.chosen.png") no-repeat -38px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
360
- background: image_url("jquery.chosen.png") no-repeat -38px -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
361
- background: image_url("jquery.chosen.png") no-repeat -38px -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
362
- background: image_url("jquery.chosen.png") no-repeat -38px -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
363
- background: image_url("jquery.chosen.png") no-repeat -38px -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
364
- background: image_url("jquery.chosen.png") no-repeat -38px -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
365
- padding: 4px 5px 4px 20px;
366
- }
367
- /* @end */