discuss 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +153 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/javascripts/discuss/application.js +3 -0
  6. data/app/assets/javascripts/discuss/chosen.jquery.js +1104 -0
  7. data/app/assets/javascripts/discuss/compose.coffee +21 -0
  8. data/app/assets/javascripts/discuss/discuss.chosen.coffee +2 -0
  9. data/app/assets/javascripts/discuss/discuss.coffee +2 -0
  10. data/app/assets/javascripts/discuss/messages.coffee +0 -0
  11. data/app/assets/stylesheets/discuss/application.css +13 -0
  12. data/app/assets/stylesheets/discuss/chosen.css +439 -0
  13. data/app/controllers/discuss/application_controller.rb +11 -0
  14. data/app/controllers/discuss/mailboxes_controller.rb +30 -0
  15. data/app/controllers/discuss/messages_controller.rb +85 -0
  16. data/app/helpers/discuss/application_helper.rb +7 -0
  17. data/app/models/discuss/conversation.rb +29 -0
  18. data/app/models/discuss/mailbox.rb +33 -0
  19. data/app/models/discuss/message.rb +135 -0
  20. data/app/services/discuss/message_sender.rb +33 -0
  21. data/app/views/discuss/mailboxes/show.html.haml +24 -0
  22. data/app/views/discuss/messages/_form.html.haml +18 -0
  23. data/app/views/discuss/messages/edit.html.haml +1 -0
  24. data/app/views/discuss/messages/new.html.haml +1 -0
  25. data/app/views/discuss/messages/show.html.haml +28 -0
  26. data/app/views/discuss/shared/_nav.haml +8 -0
  27. data/config/routes.rb +15 -0
  28. data/db/migrate/20130419055252_setup_discuss.rb +22 -0
  29. data/lib/discuss.rb +4 -0
  30. data/lib/discuss/engine.rb +9 -0
  31. data/lib/discuss/models/discussable.rb +29 -0
  32. data/lib/discuss/version.rb +3 -0
  33. data/lib/generators/discuss/views_generator.rb +8 -0
  34. data/lib/tasks/discuss_tasks.rake +4 -0
  35. data/test/discuss_test.rb +7 -0
  36. data/test/dummy/README.rdoc +28 -0
  37. data/test/dummy/Rakefile +6 -0
  38. data/test/dummy/app/assets/javascripts/application.js +5 -0
  39. data/test/dummy/app/assets/javascripts/chosen.jquery.js +1104 -0
  40. data/test/dummy/app/assets/javascripts/compose.coffee +21 -0
  41. data/test/dummy/app/assets/javascripts/discuss.chosen.coffee +2 -0
  42. data/test/dummy/app/assets/javascripts/discuss.coffee +2 -0
  43. data/test/dummy/app/assets/javascripts/messages.coffee +0 -0
  44. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  45. data/test/dummy/app/assets/stylesheets/chosen.css +439 -0
  46. data/test/dummy/app/assets/stylesheets/discuss.css +41 -0
  47. data/test/dummy/app/controllers/application_controller.rb +5 -0
  48. data/test/dummy/app/helpers/application_helper.rb +2 -0
  49. data/test/dummy/app/models/user.rb +22 -0
  50. data/test/dummy/app/views/layouts/application.html.erb +17 -0
  51. data/test/dummy/bin/bundle +3 -0
  52. data/test/dummy/bin/rails +4 -0
  53. data/test/dummy/bin/rake +4 -0
  54. data/test/dummy/config.ru +4 -0
  55. data/test/dummy/config/application.rb +23 -0
  56. data/test/dummy/config/boot.rb +9 -0
  57. data/test/dummy/config/database.yml +25 -0
  58. data/test/dummy/config/environment.rb +5 -0
  59. data/test/dummy/config/environments/development.rb +27 -0
  60. data/test/dummy/config/environments/production.rb +80 -0
  61. data/test/dummy/config/environments/test.rb +36 -0
  62. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  63. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  64. data/test/dummy/config/initializers/inflections.rb +16 -0
  65. data/test/dummy/config/initializers/mime_types.rb +5 -0
  66. data/test/dummy/config/initializers/secret_token.rb +12 -0
  67. data/test/dummy/config/initializers/session_store.rb +3 -0
  68. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  69. data/test/dummy/config/locales/en.yml +23 -0
  70. data/test/dummy/config/routes.rb +4 -0
  71. data/test/dummy/db/development.sqlite3 +0 -0
  72. data/test/dummy/db/migrate/20130428235128_create_users.rb +11 -0
  73. data/test/dummy/db/schema.rb +24 -0
  74. data/test/dummy/db/test.sqlite3 +0 -0
  75. data/test/dummy/log/development.log +16219 -0
  76. data/test/dummy/log/test.log +191354 -0
  77. data/test/dummy/public/404.html +27 -0
  78. data/test/dummy/public/422.html +26 -0
  79. data/test/dummy/public/500.html +26 -0
  80. data/test/dummy/public/favicon.ico +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/0a28667732e1be8938cde061b6f996df +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/0ddd7cc29057a69bd29fde03bf0f4c00 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/0de2f69502366965bb7fae2623bc190c +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/0ee691067e6ec8f03df58bc94badd25d +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/1b77abb6bee52fa8d68ee7e81077ff20 +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/271bb8f72971af6089be8d1b85788bec +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/2a499e57eb2664f139ab0e74571faa77 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/32b6af14546cb11e773fb3799f041132 +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/4728f8b9616c35f685674fbeecaa3c47 +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/4e9a3e121da30d3a85273a5c283da214 +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/5620ff4659033b350ea3031ecaeb5127 +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/596293af7e4dcfa45880435ae753f876 +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/614995c5e7b1b4f5b12ce060404706cc +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/6b9e24a8aad25948823e1a93c8be731e +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/78a00003621b318a297e05cfedb0d1fd +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/794654d117cd2ec6a9a00e485d9f4485 +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/79ae3a9f48e9b9e8ef2922c844b1895f +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/9b5889bea21f2af8068646890752932c +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/9fd02d20091838d6411df2d23a5364d5 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/a02345b542298f25d3f701ee680c44c0 +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/a80359c0e09ddf510ce63de09a368d4c +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/ad2a9bfe4169e0a5bc66efd35c83fe38 +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/b1794788ec8ce362aceaffa31c7381e9 +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/b284f477944d67f25c0672dba1a2dab4 +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/b2b1f16cf54d69c151ca7f42fb2f8381 +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/b4767dfdb540517d26dc8c5365736f53 +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/bab78b46d2a6282e5df747dd8b6d5abf +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/c9a09977565da30179ad7fdb9f79ae0d +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  114. data/test/dummy/tmp/cache/assets/development/sprockets/d9c8047218dc90a46a6725543638de45 +0 -0
  115. data/test/dummy/tmp/cache/assets/development/sprockets/e5b181eb056bbd6ffad37ed146b0342e +0 -0
  116. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  117. data/test/dummy/tmp/cache/assets/test/sprockets/0a28667732e1be8938cde061b6f996df +0 -0
  118. data/test/dummy/tmp/cache/assets/test/sprockets/0ddd7cc29057a69bd29fde03bf0f4c00 +0 -0
  119. data/test/dummy/tmp/cache/assets/test/sprockets/0de2f69502366965bb7fae2623bc190c +0 -0
  120. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  121. data/test/dummy/tmp/cache/assets/test/sprockets/1b77abb6bee52fa8d68ee7e81077ff20 +0 -0
  122. data/test/dummy/tmp/cache/assets/test/sprockets/271bb8f72971af6089be8d1b85788bec +0 -0
  123. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  124. data/test/dummy/tmp/cache/assets/test/sprockets/32b6af14546cb11e773fb3799f041132 +0 -0
  125. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  126. data/test/dummy/tmp/cache/assets/test/sprockets/4728f8b9616c35f685674fbeecaa3c47 +0 -0
  127. data/test/dummy/tmp/cache/assets/test/sprockets/5620ff4659033b350ea3031ecaeb5127 +0 -0
  128. data/test/dummy/tmp/cache/assets/test/sprockets/596293af7e4dcfa45880435ae753f876 +0 -0
  129. data/test/dummy/tmp/cache/assets/test/sprockets/78a00003621b318a297e05cfedb0d1fd +0 -0
  130. data/test/dummy/tmp/cache/assets/test/sprockets/794654d117cd2ec6a9a00e485d9f4485 +0 -0
  131. data/test/dummy/tmp/cache/assets/test/sprockets/79ae3a9f48e9b9e8ef2922c844b1895f +0 -0
  132. data/test/dummy/tmp/cache/assets/test/sprockets/9b5889bea21f2af8068646890752932c +0 -0
  133. data/test/dummy/tmp/cache/assets/test/sprockets/9fd02d20091838d6411df2d23a5364d5 +0 -0
  134. data/test/dummy/tmp/cache/assets/test/sprockets/a02345b542298f25d3f701ee680c44c0 +0 -0
  135. data/test/dummy/tmp/cache/assets/test/sprockets/a80359c0e09ddf510ce63de09a368d4c +0 -0
  136. data/test/dummy/tmp/cache/assets/test/sprockets/ad2a9bfe4169e0a5bc66efd35c83fe38 +0 -0
  137. data/test/dummy/tmp/cache/assets/test/sprockets/bab78b46d2a6282e5df747dd8b6d5abf +0 -0
  138. data/test/dummy/tmp/cache/assets/test/sprockets/c9a09977565da30179ad7fdb9f79ae0d +0 -0
  139. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  140. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  141. data/test/dummy/tmp/cache/assets/test/sprockets/d9c8047218dc90a46a6725543638de45 +0 -0
  142. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  143. data/test/features/workflow_test.rb +182 -0
  144. data/test/test_helper.rb +68 -0
  145. data/test/unit/discuss/conversation_test.rb +79 -0
  146. data/test/unit/discuss/mailbox_test.rb +72 -0
  147. data/test/unit/discuss/message_test.rb +73 -0
  148. data/test/unit/discuss/recipient_test.rb +56 -0
  149. data/test/unit/discuss/sender_test.rb +106 -0
  150. data/test/unit/helpers/discuss/messages_helper_test.rb +6 -0
  151. metadata +422 -0
@@ -0,0 +1,21 @@
1
+ class Discuss.Compose
2
+ constructor: (form) ->
3
+ @form = $(form)
4
+ @checkbox = @form.find('#message_draft')
5
+ @setup()
6
+
7
+
8
+ setup: =>
9
+ @checkbox.parent().hide()
10
+ html = '<input name="save_draft" type="submit" value="Save as Draft" />'
11
+ @form.find('input[type=submit]').after(html)
12
+ @hijaxSubmit()
13
+
14
+
15
+ hijaxSubmit: =>
16
+ @save_draft_button = $('input[name=save_draft]')
17
+ @save_draft_button.on 'click', (e) =>
18
+ @checkbox.attr('checked', 'checked')
19
+
20
+ $ ->
21
+ $('.compose form').each -> $(@).data('composable', new Discuss.Compose(@))
@@ -0,0 +1,2 @@
1
+ $ ->
2
+ $('.chosen').chosen()
@@ -0,0 +1,2 @@
1
+ window.Discuss = {
2
+ }
File without changes
@@ -0,0 +1,13 @@
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
+ */
@@ -0,0 +1,439 @@
1
+ /* @group Base */
2
+ .chzn-container {
3
+ font-size: 13px;
4
+ position: relative;
5
+ display: inline-block;
6
+ vertical-align: middle;
7
+ zoom: 1;
8
+ *display: inline;
9
+ }
10
+ .chzn-container .chzn-drop {
11
+ background: #fff;
12
+ border: 1px solid #aaa;
13
+ border-top: 0;
14
+ position: absolute;
15
+ top: 100%;
16
+ left: -9999px;
17
+ -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
18
+ -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
19
+ box-shadow : 0 4px 5px rgba(0,0,0,.15);
20
+ z-index: 1010;
21
+ width: 100%;
22
+ -moz-box-sizing : border-box;
23
+ -ms-box-sizing : border-box;
24
+ -webkit-box-sizing: border-box;
25
+ -khtml-box-sizing : border-box;
26
+ box-sizing : border-box;
27
+ }
28
+
29
+ .chzn-container.chzn-with-drop .chzn-drop {
30
+ left: 0;
31
+ }
32
+
33
+ /* @end */
34
+
35
+ /* @group Single Chosen */
36
+ .chzn-container-single .chzn-single {
37
+ background-color: #ffffff;
38
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
39
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
40
+ background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
41
+ background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
42
+ background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
43
+ background-image: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
44
+ -webkit-border-radius: 5px;
45
+ -moz-border-radius : 5px;
46
+ border-radius : 5px;
47
+ -moz-background-clip : padding;
48
+ -webkit-background-clip: padding-box;
49
+ background-clip : padding-box;
50
+ border: 1px solid #aaaaaa;
51
+ -webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
52
+ -moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
53
+ box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
54
+ display: block;
55
+ overflow: hidden;
56
+ white-space: nowrap;
57
+ position: relative;
58
+ height: 23px;
59
+ line-height: 24px;
60
+ padding: 0 0 0 8px;
61
+ color: #444444;
62
+ text-decoration: none;
63
+ }
64
+ .chzn-container-single .chzn-default {
65
+ color: #999;
66
+ }
67
+ .chzn-container-single .chzn-single span {
68
+ margin-right: 26px;
69
+ display: block;
70
+ overflow: hidden;
71
+ white-space: nowrap;
72
+ -o-text-overflow: ellipsis;
73
+ -ms-text-overflow: ellipsis;
74
+ text-overflow: ellipsis;
75
+ }
76
+ .chzn-container-single .chzn-single abbr {
77
+ display: block;
78
+ position: absolute;
79
+ right: 26px;
80
+ top: 6px;
81
+ width: 12px;
82
+ height: 12px;
83
+ font-size: 1px;
84
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
85
+ }
86
+ .chzn-container-single .chzn-single abbr:hover {
87
+ background-position: -42px -10px;
88
+ }
89
+ .chzn-container-single.chzn-disabled .chzn-single abbr:hover {
90
+ background-position: -42px -10px;
91
+ }
92
+ .chzn-container-single .chzn-single div {
93
+ position: absolute;
94
+ right: 0;
95
+ top: 0;
96
+ display: block;
97
+ height: 100%;
98
+ width: 18px;
99
+ }
100
+ .chzn-container-single .chzn-single div b {
101
+ background: url('chosen-sprite.png') no-repeat 0px 2px;
102
+ display: block;
103
+ width: 100%;
104
+ height: 100%;
105
+ }
106
+ .chzn-container-single .chzn-search {
107
+ padding: 3px 4px;
108
+ position: relative;
109
+ margin: 0;
110
+ white-space: nowrap;
111
+ z-index: 1010;
112
+ }
113
+ .chzn-container-single .chzn-search input {
114
+ background: #fff url('chosen-sprite.png') no-repeat 100% -20px;
115
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
116
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
117
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
118
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
119
+ background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
120
+ margin: 1px 0;
121
+ padding: 4px 20px 4px 5px;
122
+ outline: 0;
123
+ border: 1px solid #aaa;
124
+ font-family: sans-serif;
125
+ font-size: 1em;
126
+ width: 100%;
127
+ -moz-box-sizing : border-box;
128
+ -ms-box-sizing : border-box;
129
+ -webkit-box-sizing: border-box;
130
+ -khtml-box-sizing : border-box;
131
+ box-sizing : border-box;
132
+ }
133
+ .chzn-container-single .chzn-drop {
134
+ margin-top: -1px;
135
+ -webkit-border-radius: 0 0 4px 4px;
136
+ -moz-border-radius : 0 0 4px 4px;
137
+ border-radius : 0 0 4px 4px;
138
+ -moz-background-clip : padding;
139
+ -webkit-background-clip: padding-box;
140
+ background-clip : padding-box;
141
+ }
142
+ .chzn-container-single-nosearch .chzn-search {
143
+ position: absolute;
144
+ left: -9999px;
145
+ }
146
+ /* @end */
147
+
148
+ /* @group Multi Chosen */
149
+ .chzn-container-multi .chzn-choices {
150
+ background-color: #fff;
151
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
152
+ background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
153
+ background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
154
+ background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
155
+ background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
156
+ border: 1px solid #aaa;
157
+ margin: 0;
158
+ padding: 0;
159
+ cursor: text;
160
+ overflow: hidden;
161
+ height: auto !important;
162
+ height: 1%;
163
+ position: relative;
164
+ width: 100%;
165
+ -moz-box-sizing : border-box;
166
+ -ms-box-sizing : border-box;
167
+ -webkit-box-sizing: border-box;
168
+ -khtml-box-sizing : border-box;
169
+ box-sizing : border-box;
170
+ }
171
+ .chzn-container-multi .chzn-choices li {
172
+ float: left;
173
+ list-style: none;
174
+ }
175
+ .chzn-container-multi .chzn-choices .search-field {
176
+ white-space: nowrap;
177
+ margin: 0;
178
+ padding: 0;
179
+ }
180
+ .chzn-container-multi .chzn-choices .search-field input {
181
+ color: #666;
182
+ background: transparent !important;
183
+ border: 0 !important;
184
+ font-family: sans-serif;
185
+ font-size: 100%;
186
+ height: 15px;
187
+ padding: 5px;
188
+ margin: 1px 0;
189
+ outline: 0;
190
+ -webkit-box-shadow: none;
191
+ -moz-box-shadow : none;
192
+ box-shadow : none;
193
+ }
194
+ .chzn-container-multi .chzn-choices .search-field .default {
195
+ color: #999;
196
+ }
197
+ .chzn-container-multi .chzn-choices .search-choice {
198
+ -webkit-border-radius: 3px;
199
+ -moz-border-radius : 3px;
200
+ border-radius : 3px;
201
+ -moz-background-clip : padding;
202
+ -webkit-background-clip: padding-box;
203
+ background-clip : padding-box;
204
+ background-color: #e4e4e4;
205
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
206
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
207
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
208
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
209
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
210
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
211
+ -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
212
+ -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
213
+ box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
214
+ color: #333;
215
+ border: 1px solid #aaaaaa;
216
+ line-height: 13px;
217
+ padding: 3px 20px 3px 5px;
218
+ margin: 3px 0 3px 5px;
219
+ position: relative;
220
+ cursor: default;
221
+ }
222
+ .chzn-container-multi .chzn-choices .search-choice.search-choice-disabled {
223
+ background-color: #e4e4e4;
224
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
225
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
226
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
227
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
228
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
229
+ background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
230
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
231
+ color: #666;
232
+ border: 1px solid #cccccc;
233
+ padding-right: 5px;
234
+ }
235
+ .chzn-container-multi .chzn-choices .search-choice-focus {
236
+ background: #d4d4d4;
237
+ }
238
+ .chzn-container-multi .chzn-choices .search-choice .search-choice-close {
239
+ display: block;
240
+ position: absolute;
241
+ right: 3px;
242
+ top: 4px;
243
+ width: 12px;
244
+ height: 12px;
245
+ font-size: 1px;
246
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
247
+ }
248
+ .chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
249
+ background-position: -42px -10px;
250
+ }
251
+ .chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
252
+ background-position: -42px -10px;
253
+ }
254
+ /* @end */
255
+
256
+ /* @group Results */
257
+ .chzn-container .chzn-results {
258
+ margin: 0 4px 4px 0;
259
+ max-height: 240px;
260
+ padding: 0 0 0 4px;
261
+ position: relative;
262
+ overflow-x: hidden;
263
+ overflow-y: auto;
264
+ -webkit-overflow-scrolling: touch;
265
+ }
266
+ .chzn-container-multi .chzn-results {
267
+ margin: 0;
268
+ padding: 0;
269
+ }
270
+ .chzn-container .chzn-results li {
271
+ display: none;
272
+ line-height: 15px;
273
+ padding: 5px 6px;
274
+ margin: 0;
275
+ list-style: none;
276
+ }
277
+ .chzn-container .chzn-results .active-result {
278
+ cursor: pointer;
279
+ display: list-item;
280
+ }
281
+ .chzn-container .chzn-results .highlighted {
282
+ background-color: #3875d7;
283
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
284
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
285
+ background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
286
+ background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
287
+ background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
288
+ background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
289
+ color: #fff;
290
+ }
291
+ .chzn-container .chzn-results li em {
292
+ background: #feffde;
293
+ font-style: normal;
294
+ }
295
+ .chzn-container .chzn-results .highlighted em {
296
+ background: transparent;
297
+ }
298
+ .chzn-container .chzn-results .no-results {
299
+ background: #f4f4f4;
300
+ display: list-item;
301
+ }
302
+ .chzn-container .chzn-results .group-result {
303
+ cursor: default;
304
+ color: #999;
305
+ font-weight: bold;
306
+ }
307
+ .chzn-container .chzn-results .group-option {
308
+ padding-left: 15px;
309
+ }
310
+ .chzn-container-multi .chzn-drop .result-selected {
311
+ display: none;
312
+ }
313
+ .chzn-container .chzn-results-scroll {
314
+ background: white;
315
+ margin: 0 4px;
316
+ position: absolute;
317
+ text-align: center;
318
+ width: 321px; /* This should by dynamic with js */
319
+ z-index: 1;
320
+ }
321
+ .chzn-container .chzn-results-scroll span {
322
+ display: inline-block;
323
+ height: 17px;
324
+ text-indent: -5000px;
325
+ width: 9px;
326
+ }
327
+ .chzn-container .chzn-results-scroll-down {
328
+ bottom: 0;
329
+ }
330
+ .chzn-container .chzn-results-scroll-down span {
331
+ background: url('chosen-sprite.png') no-repeat -4px -3px;
332
+ }
333
+ .chzn-container .chzn-results-scroll-up span {
334
+ background: url('chosen-sprite.png') no-repeat -22px -3px;
335
+ }
336
+ /* @end */
337
+
338
+ /* @group Active */
339
+ .chzn-container-active .chzn-single {
340
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
341
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
342
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
343
+ border: 1px solid #5897fb;
344
+ }
345
+ .chzn-container-active.chzn-with-drop .chzn-single {
346
+ border: 1px solid #aaa;
347
+ -webkit-box-shadow: 0 1px 0 #fff inset;
348
+ -moz-box-shadow : 0 1px 0 #fff inset;
349
+ box-shadow : 0 1px 0 #fff inset;
350
+ background-color: #eee;
351
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
352
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
353
+ background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
354
+ background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
355
+ background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
356
+ background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
357
+ -webkit-border-bottom-left-radius : 0;
358
+ -webkit-border-bottom-right-radius: 0;
359
+ -moz-border-radius-bottomleft : 0;
360
+ -moz-border-radius-bottomright: 0;
361
+ border-bottom-left-radius : 0;
362
+ border-bottom-right-radius: 0;
363
+ }
364
+ .chzn-container-active.chzn-with-drop .chzn-single div {
365
+ background: transparent;
366
+ border-left: none;
367
+ }
368
+ .chzn-container-active.chzn-with-drop .chzn-single div b {
369
+ background-position: -18px 2px;
370
+ }
371
+ .chzn-container-active .chzn-choices {
372
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
373
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
374
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
375
+ border: 1px solid #5897fb;
376
+ }
377
+ .chzn-container-active .chzn-choices .search-field input {
378
+ color: #111 !important;
379
+ }
380
+ /* @end */
381
+
382
+ /* @group Disabled Support */
383
+ .chzn-disabled {
384
+ cursor: default;
385
+ opacity:0.5 !important;
386
+ }
387
+ .chzn-disabled .chzn-single {
388
+ cursor: default;
389
+ }
390
+ .chzn-disabled .chzn-choices .search-choice .search-choice-close {
391
+ cursor: default;
392
+ }
393
+
394
+ /* @group Right to Left */
395
+ .chzn-rtl { text-align: right; }
396
+ .chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
397
+ .chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
398
+
399
+ .chzn-rtl .chzn-single div { left: 3px; right: auto; }
400
+ .chzn-rtl .chzn-single abbr {
401
+ left: 26px;
402
+ right: auto;
403
+ }
404
+ .chzn-rtl .chzn-choices .search-field input { direction: rtl; }
405
+ .chzn-rtl .chzn-choices li { float: right; }
406
+ .chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
407
+ .chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; }
408
+ .chzn-rtl .chzn-search { left: 9999px; }
409
+ .chzn-rtl.chzn-with-drop .chzn-search { left: 0px; }
410
+ .chzn-rtl .chzn-drop { left: 9999px; }
411
+ .chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
412
+ .chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
413
+ .chzn-rtl.chzn-container-active.chzn-with-drop .chzn-single div { border-right: none; }
414
+ .chzn-rtl .chzn-search input {
415
+ background: #fff url('chosen-sprite.png') no-repeat -30px -20px;
416
+ background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
417
+ background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
418
+ background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
419
+ background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
420
+ background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
421
+ padding: 4px 5px 4px 20px;
422
+ direction: rtl;
423
+ }
424
+ .chzn-container-single.chzn-rtl .chzn-single div b {
425
+ background-position: 6px 2px;
426
+ }
427
+ .chzn-container-single.chzn-rtl.chzn-with-drop .chzn-single div b {
428
+ background-position: -12px 2px;
429
+ }
430
+ /* @end */
431
+
432
+ /* @group Retina compatibility */
433
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
434
+ .chzn-rtl .chzn-search input, .chzn-container-single .chzn-single abbr, .chzn-container-single .chzn-single div b, .chzn-container-single .chzn-search input, .chzn-container-multi .chzn-choices .search-choice .search-choice-close, .chzn-container .chzn-results-scroll-down span, .chzn-container .chzn-results-scroll-up span {
435
+ background-image: url('chosen-sprite@2x.png') !important;
436
+ background-repeat: no-repeat !important;
437
+ background-size: 52px 37px !important;
438
+ }
439
+ }