typus 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +23 -0
- data/Gemfile +5 -5
- data/README.md +8 -8
- data/app/assets/javascripts/typus/application.js +1 -1
- data/app/assets/javascripts/typus/jquery.application.js +25 -28
- data/app/controllers/admin/resources_controller.rb +1 -1
- data/app/helpers/admin/resources/data_types/belongs_to_helper.rb +3 -1
- data/app/helpers/admin/resources/data_types/dragonfly_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/has_and_belongs_to_many_helper.rb +3 -3
- data/app/helpers/admin/resources/data_types/has_many_helper.rb +2 -2
- data/app/helpers/admin/resources/data_types/has_one_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/paperclip_helper.rb +2 -2
- data/app/helpers/admin/resources/form_helper.rb +1 -1
- data/app/helpers/admin/resources/table_helper.rb +2 -2
- data/app/views/admin/dashboard/styles.html.erb +94 -90
- data/app/views/admin/dashboard/widgets/_applications.html.erb +1 -1
- data/app/views/admin/dashboard/widgets/_models.html.erb +1 -1
- data/app/views/admin/dashboard/widgets/_models_extended.html.erb +1 -1
- data/app/views/admin/resources/_form.html.erb +1 -1
- data/app/views/admin/resources/edit.html.erb +7 -5
- data/app/views/admin/templates/_belongs_to.html.erb +8 -2
- data/app/views/admin/templates/_date.html.erb +0 -5
- data/app/views/admin/templates/_datetime.html.erb +0 -5
- data/app/views/admin/templates/_has_and_belongs_to_many.html.erb +14 -12
- data/app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb +1 -1
- data/config/routes.rb +2 -2
- data/lib/generators/typus/config_generator.rb +14 -9
- data/lib/support/string.rb +1 -1
- data/lib/typus.rb +3 -2
- data/lib/typus/configuration.rb +3 -3
- data/lib/typus/controller/autocomplete.rb +13 -0
- data/lib/typus/controller/format.rb +1 -1
- data/lib/typus/controller/headless.rb +3 -1
- data/lib/typus/i18n.rb +3 -4
- data/lib/typus/orm/active_record/class_methods.rb +4 -4
- data/lib/typus/orm/base.rb +2 -2
- data/lib/typus/resources.rb +1 -1
- data/lib/typus/version.rb +1 -1
- data/typus.gemspec +3 -2
- data/vendor/assets/chosen/LICENSE.md +24 -0
- data/vendor/assets/chosen/chosen.css +58 -24
- data/vendor/assets/chosen/chosen.jquery.js +888 -0
- data/vendor/assets/chosen/typus/chosen-sprite.png +0 -0
- metadata +27 -14
- data/vendor/assets/chosen/chosen-sprite.png +0 -0
- data/vendor/assets/chosen/chosen.jquery.min.js +0 -10
@@ -33,7 +33,7 @@
|
|
33
33
|
</tr>
|
34
34
|
</thead>
|
35
35
|
|
36
|
-
<% admin_user.application(app).map
|
36
|
+
<% admin_user.application(app).map(&:constantize).each do |klass| %>
|
37
37
|
<% if klass.typus_options_for(:hide_from_dashboard) == false %>
|
38
38
|
<tr class="<%= cycle("even", "odd") %>">
|
39
39
|
<td>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
</tr>
|
12
12
|
</thead>
|
13
13
|
|
14
|
-
<% admin_user.models.map
|
14
|
+
<% admin_user.models.map(&:constantize).each do |klass| %>
|
15
15
|
<tr class="<%= cycle("even", "odd") %>">
|
16
16
|
<td><%= link_to klass.model_name.human.pluralize, :controller => "/admin/#{klass.to_resource}" %></td>
|
17
17
|
<td width="80px" align="right">
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</tr>
|
13
13
|
</thead>
|
14
14
|
|
15
|
-
<% admin_user.models.map
|
15
|
+
<% admin_user.models.map(&:constantize).each do |klass| %>
|
16
16
|
<tr class="<%= cycle("even", "odd") %>">
|
17
17
|
<td><%= link_to klass.model_name.human.pluralize, :controller => "/admin/#{klass.to_resource}" %></td>
|
18
18
|
<td width="30px" align="right"><%= klass.count %></td>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<% build_save_options.each do |key, value, special| %>
|
16
16
|
<%
|
17
17
|
message = Typus::I18n.t(value)
|
18
|
-
options = { :name => key, :onclick => "setConfirmUnload(false);", :disable_with => message }
|
18
|
+
options = { :name => key, :onclick => "Typus.setConfirmUnload(false);", :disable_with => message }
|
19
19
|
%>
|
20
20
|
<li><%= submit_tag message, options %></li>
|
21
21
|
<% end %>
|
@@ -9,15 +9,17 @@
|
|
9
9
|
<small><%= list_actions %></small>
|
10
10
|
</h2>
|
11
11
|
|
12
|
-
<% if headless_mode? && params[:action] == 'edit' %>
|
12
|
+
<% if headless_mode? && params[:action] == 'edit' && flash.keys.include?(:notice) && !params[:_input] %>
|
13
13
|
<script type="text/javascript">
|
14
14
|
$(document).ready(function () {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
<% if params[:attribute] %>
|
16
|
+
var option = new Option("<%= @item.to_label %>", "<%= @item.id %>", true, true);
|
17
|
+
parent.$("#<%= params[:attribute] %>").append(option);
|
18
|
+
parent.$(".chzn-select-<%= params[:attribute] %>").trigger("liszt:updated");
|
19
|
+
<% else %>
|
19
20
|
parent.Typus.parent_location_reload = true;
|
20
21
|
<% end %>
|
22
|
+
parent.$.fancybox.close();
|
21
23
|
});
|
22
24
|
</script>
|
23
25
|
<% end %>
|
@@ -1,8 +1,14 @@
|
|
1
|
-
|
1
|
+
<% chosen_class = "chzn-select-#{attribute_id}" %>
|
2
|
+
|
3
|
+
<li id="<%= attribute_id %>_li">
|
2
4
|
<%= form.label attribute, label_text %>
|
3
5
|
<% if values.any? %>
|
4
|
-
<%= form.select related_fk, values, options, html_options.merge(:class =>
|
6
|
+
<%= form.select related_fk, values, options, html_options.merge(:class => chosen_class, :style => "width: 350px;") %>
|
5
7
|
<% else %>
|
6
8
|
<%= Typus::I18n.t("No %{resources} found.", :resources => related.model_name.human.downcase.pluralize) %>
|
7
9
|
<% end %>
|
8
10
|
</li>
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
$(document).ready(function () { $(".<%= chosen_class %>").chosen(); });
|
14
|
+
</script>
|
@@ -1,15 +1,17 @@
|
|
1
|
+
<% chosen_class = "chzn-select-#{attribute_id}" %>
|
2
|
+
|
1
3
|
<li id="<%= attribute_id %>_field">
|
2
4
|
<%= form.label attribute, label_text %>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
"data-placeholder" => Typus::I18n.t("Select Some Options")) %>
|
12
|
-
<% else %>
|
13
|
-
<%= Typus::I18n.t("No %{resources} found.", :resources => related_klass.model_name.human.downcase.pluralize) %>
|
14
|
-
<% end %>
|
5
|
+
<%= hidden_field_tag related_ids %>
|
6
|
+
<%= select_tag related_ids,
|
7
|
+
options_from_collection_for_select(values.all, "id", "to_label", related_items.map(&:id)),
|
8
|
+
html_options.merge(:multiple => true,
|
9
|
+
:id => attribute_id,
|
10
|
+
:class => chosen_class,
|
11
|
+
:style => "width: 550px;",
|
12
|
+
"data-placeholder" => Typus::I18n.t("Select Some Options")) %>
|
15
13
|
</li>
|
14
|
+
|
15
|
+
<script type="text/javascript">
|
16
|
+
$(document).ready(function () { $(".<%= chosen_class %>").chosen(); });
|
17
|
+
</script>
|
data/config/routes.rb
CHANGED
@@ -21,11 +21,11 @@ Rails.application.routes.draw do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
Typus.models.map
|
24
|
+
Typus.models.map(&:to_resource).each do |resource|
|
25
25
|
match "#{resource}(/:action(/:id))(.:format)", :controller => resource
|
26
26
|
end
|
27
27
|
|
28
|
-
Typus.resources.map
|
28
|
+
Typus.resources.map(&:underscore).each do |resource|
|
29
29
|
match "#{resource}(/:action(/:id))(.:format)", :controller => resource
|
30
30
|
end
|
31
31
|
end
|
@@ -26,32 +26,37 @@ Description:
|
|
26
26
|
@configuration
|
27
27
|
end
|
28
28
|
|
29
|
+
def fields_for(model, *defaults)
|
30
|
+
rejections = %w( ^id$ _type$ type created_at created_on updated_at updated_on deleted_at ).join("|")
|
31
|
+
fields = model.table_exists? ? model.columns.map(&:name) : defaults
|
32
|
+
fields.reject { |f| f.match(rejections) }.join(", ")
|
33
|
+
end
|
34
|
+
|
29
35
|
def generate_yaml
|
30
36
|
Typus.reload!
|
31
37
|
|
32
38
|
configuration = {}
|
33
|
-
models = Typus.application_models.reject { |m| Typus.models.include?(m) }.map
|
39
|
+
models = Typus.application_models.reject { |m| Typus.models.include?(m) }.map(&:constantize)
|
34
40
|
|
35
41
|
models.each do |model|
|
36
|
-
|
42
|
+
key = model.name.underscore
|
43
|
+
|
44
|
+
configuration[key] = {}
|
37
45
|
|
38
46
|
relationships = [ :has_many, :has_one ].map do |relationship|
|
39
47
|
model.reflect_on_all_associations(relationship).map { |i| i.name.to_s }
|
40
48
|
end.flatten.join(", ")
|
41
49
|
|
42
|
-
|
43
|
-
fields = model.columns.map(&:name).reject { |f| f.match(rejections) }.join(", ")
|
44
|
-
|
45
|
-
configuration[model.table_name][:base] = <<-RAW
|
50
|
+
configuration[key][:base] = <<-RAW
|
46
51
|
#{model}:
|
47
52
|
fields:
|
48
|
-
default: #{
|
49
|
-
form: #{
|
53
|
+
default: #{fields_for(model, 'to_label')}
|
54
|
+
form: #{fields_for(model)}
|
50
55
|
relationships: #{relationships}
|
51
56
|
application: Application
|
52
57
|
RAW
|
53
58
|
|
54
|
-
configuration[
|
59
|
+
configuration[key][:roles] = "#{model}: create, read, update, delete"
|
55
60
|
end
|
56
61
|
|
57
62
|
configuration
|
data/lib/support/string.rb
CHANGED
data/lib/typus.rb
CHANGED
@@ -23,6 +23,7 @@ module Typus
|
|
23
23
|
autoload :Actions, "typus/controller/actions"
|
24
24
|
autoload :ActsAsList, "typus/controller/acts_as_list"
|
25
25
|
autoload :Ancestry, "typus/controller/ancestry"
|
26
|
+
autoload :Autocomplete, "typus/controller/autocomplete"
|
26
27
|
autoload :Bulk, "typus/controller/bulk"
|
27
28
|
autoload :FeaturedImage, "typus/controller/featured_image"
|
28
29
|
autoload :Filters, "typus/controller/filters"
|
@@ -158,7 +159,7 @@ module Typus
|
|
158
159
|
hash[settings.first] = settings.size > 1 ? settings.last : 1000
|
159
160
|
end
|
160
161
|
|
161
|
-
hash.sort { |a1, a2| a1[1].to_i <=> a2[1].to_i }.map
|
162
|
+
hash.sort { |a1, a2| a1[1].to_i <=> a2[1].to_i }.map(&:first)
|
162
163
|
end
|
163
164
|
|
164
165
|
# Lists modules of an application.
|
@@ -175,7 +176,7 @@ module Typus
|
|
175
176
|
|
176
177
|
# Lists models from the configuration file.
|
177
178
|
def models
|
178
|
-
Typus::Configuration.config.map
|
179
|
+
Typus::Configuration.config.map(&:first).sort
|
179
180
|
end
|
180
181
|
|
181
182
|
# Lists resources, which are tableless models. This is done by looking at
|
data/lib/typus/configuration.rb
CHANGED
@@ -19,19 +19,19 @@ module Typus
|
|
19
19
|
|
20
20
|
# Read roles from files <tt>config/typus/*_roles.yml</tt>.
|
21
21
|
def self.roles!
|
22
|
-
@@roles = {}
|
22
|
+
@@roles = Hash.new({})
|
23
23
|
|
24
24
|
Typus.role_configuration_files.each do |file|
|
25
25
|
if data = YAML::load(ERB.new(File.read(file)).result)
|
26
26
|
data.compact.each do |key, value|
|
27
|
-
@@roles[key]
|
27
|
+
@@roles[key] = @@roles[key].merge(value)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
33
|
mattr_accessor :roles
|
34
|
-
@@roles = {}
|
34
|
+
@@roles = Hash.new({})
|
35
35
|
|
36
36
|
end
|
37
37
|
end
|
@@ -60,7 +60,7 @@ module Typus
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def export(format)
|
63
|
-
fields = @resource.typus_fields_for(format).map
|
63
|
+
fields = @resource.typus_fields_for(format).map(&:first)
|
64
64
|
methods = fields - @resource.column_names
|
65
65
|
except = @resource.column_names - fields
|
66
66
|
|
@@ -15,7 +15,9 @@ module Typus
|
|
15
15
|
private :set_resources_action_for_headless_on_index
|
16
16
|
|
17
17
|
def set_resources_action_for_headless
|
18
|
-
|
18
|
+
if params[:_input]
|
19
|
+
add_resources_action("All Entries", {:action => 'index', :id => nil})
|
20
|
+
end
|
19
21
|
end
|
20
22
|
private :set_resources_action_for_headless
|
21
23
|
|
data/lib/typus/i18n.rb
CHANGED
@@ -18,10 +18,9 @@ module Typus
|
|
18
18
|
#
|
19
19
|
# Typus::I18n.t("Hello %{world}!", :world => @world)
|
20
20
|
#
|
21
|
-
def t(
|
22
|
-
options
|
23
|
-
options
|
24
|
-
::I18n.t(msg, options)
|
21
|
+
def t(key, options = {})
|
22
|
+
options[:default] ||= key
|
23
|
+
::I18n.t(key, options)
|
25
24
|
end
|
26
25
|
|
27
26
|
def default_locale
|
@@ -44,7 +44,7 @@ module Typus
|
|
44
44
|
|
45
45
|
fields ||= data['default'] || typus_default_fields_for(filter)
|
46
46
|
fields = fields.extract_settings if fields.is_a?(String)
|
47
|
-
fields.map
|
47
|
+
fields.map(&:to_sym)
|
48
48
|
end
|
49
49
|
|
50
50
|
def typus_default_fields_for(filter)
|
@@ -52,7 +52,7 @@ module Typus
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def virtual_fields
|
55
|
-
instance_methods.map
|
55
|
+
instance_methods.map(&:to_s) - model_fields.keys.map(&:to_s)
|
56
56
|
end
|
57
57
|
|
58
58
|
def virtual_attribute?(field)
|
@@ -60,7 +60,7 @@ module Typus
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def dragonfly_attribute?(field)
|
63
|
-
if respond_to?(:dragonfly_attachment_classes) && dragonfly_attachment_classes.map
|
63
|
+
if respond_to?(:dragonfly_attachment_classes) && dragonfly_attachment_classes.map(&:attribute).include?(field)
|
64
64
|
:dragonfly
|
65
65
|
end
|
66
66
|
end
|
@@ -98,7 +98,7 @@ module Typus
|
|
98
98
|
|
99
99
|
def get_typus_filters
|
100
100
|
data = read_model_config['filters'] || ""
|
101
|
-
data.extract_settings.map
|
101
|
+
data.extract_settings.map(&:to_sym)
|
102
102
|
end
|
103
103
|
|
104
104
|
end
|
data/lib/typus/orm/base.rb
CHANGED
@@ -52,7 +52,7 @@ module Typus
|
|
52
52
|
|
53
53
|
def typus_field_options_for(filter)
|
54
54
|
options = read_model_config['fields']['options']
|
55
|
-
options && options[filter.to_s] ? options[filter.to_s].extract_settings.map
|
55
|
+
options && options[filter.to_s] ? options[filter.to_s].extract_settings.map(&:to_sym) : []
|
56
56
|
end
|
57
57
|
|
58
58
|
#--
|
@@ -145,7 +145,7 @@ module Typus
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def typus_user_id?
|
148
|
-
columns.map
|
148
|
+
columns.map(&:name).include?(Typus.user_foreign_key)
|
149
149
|
end
|
150
150
|
|
151
151
|
def read_model_config
|
data/lib/typus/resources.rb
CHANGED
data/lib/typus/version.rb
CHANGED
data/typus.gemspec
CHANGED
@@ -15,8 +15,8 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.version = Typus::VERSION
|
16
16
|
s.platform = Gem::Platform::RUBY
|
17
17
|
s.authors = ["Francesc Esplugas"]
|
18
|
-
s.email = ["
|
19
|
-
s.homepage = "http://
|
18
|
+
s.email = ["support@typuscmf.com"]
|
19
|
+
s.homepage = "http://www.typuscmf.com/"
|
20
20
|
s.summary = "Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator)"
|
21
21
|
s.description = "Ruby on Rails Admin Panel (Engine) to allow trusted users edit structured content."
|
22
22
|
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.test_files = []
|
27
27
|
s.require_paths = ["lib"]
|
28
28
|
|
29
|
+
s.add_dependency "bcrypt-ruby", "~> 3.0.0"
|
29
30
|
s.add_dependency "jquery-rails"
|
30
31
|
s.add_dependency "kaminari"
|
31
32
|
s.add_dependency "rails", "~> 3.1.0"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Chosen, a Select Box Enhancer for jQuery and Protoype
|
2
|
+
## by Patrick Filler for [Harvest](http://getharvest.com)
|
3
|
+
|
4
|
+
Available for use under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
|
5
|
+
|
6
|
+
Copyright (c) 2011 by Harvest
|
7
|
+
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
10
|
+
in the Software without restriction, including without limitation the rights
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
13
|
+
furnished to do so, subject to the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
16
|
+
all copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
+
THE SOFTWARE.
|
@@ -57,6 +57,19 @@
|
|
57
57
|
-ms-text-overflow: ellipsis;
|
58
58
|
text-overflow: ellipsis;
|
59
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: url(chosen-sprite.png) right top no-repeat;
|
69
|
+
}
|
70
|
+
.chzn-container-single .chzn-single abbr:hover {
|
71
|
+
background-position: right -11px;
|
72
|
+
}
|
60
73
|
.chzn-container-single .chzn-single div {
|
61
74
|
-webkit-border-radius: 0 4px 4px 0;
|
62
75
|
-moz-border-radius : 0 4px 4px 0;
|
@@ -81,25 +94,26 @@
|
|
81
94
|
width: 18px;
|
82
95
|
}
|
83
96
|
.chzn-container-single .chzn-single div b {
|
84
|
-
background: url('
|
97
|
+
background: url('chosen-sprite.png') no-repeat 0 1px;
|
85
98
|
display: block;
|
86
99
|
width: 100%;
|
87
100
|
height: 100%;
|
88
101
|
}
|
89
102
|
.chzn-container-single .chzn-search {
|
90
103
|
padding: 3px 4px;
|
104
|
+
position: relative;
|
91
105
|
margin: 0;
|
92
106
|
white-space: nowrap;
|
93
107
|
}
|
94
108
|
.chzn-container-single .chzn-search input {
|
95
|
-
background: #fff url('
|
96
|
-
background: url('
|
97
|
-
background: url('
|
98
|
-
background: url('
|
99
|
-
background: url('
|
100
|
-
background: url('
|
101
|
-
background: url('
|
102
|
-
background: url('
|
109
|
+
background: #fff url('chosen-sprite.png') no-repeat 100% -22px;
|
110
|
+
background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
111
|
+
background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
112
|
+
background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
113
|
+
background: url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
114
|
+
background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
115
|
+
background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
116
|
+
background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
103
117
|
margin: 1px 0;
|
104
118
|
padding: 4px 20px 4px 5px;
|
105
119
|
outline: 0;
|
@@ -117,6 +131,11 @@
|
|
117
131
|
}
|
118
132
|
/* @end */
|
119
133
|
|
134
|
+
.chzn-container-single-nosearch .chzn-search input {
|
135
|
+
position: absolute;
|
136
|
+
left: -9000px;
|
137
|
+
}
|
138
|
+
|
120
139
|
/* @group Multi Chosen */
|
121
140
|
.chzn-container-multi .chzn-choices {
|
122
141
|
background-color: #fff;
|
@@ -191,18 +210,18 @@
|
|
191
210
|
.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
|
192
211
|
display: block;
|
193
212
|
position: absolute;
|
194
|
-
right:
|
195
|
-
top:
|
196
|
-
width:
|
197
|
-
height:
|
213
|
+
right: 3px;
|
214
|
+
top: 4px;
|
215
|
+
width: 12px;
|
216
|
+
height: 13px;
|
198
217
|
font-size: 1px;
|
199
|
-
background: url(
|
218
|
+
background: url(chosen-sprite.png) right top no-repeat;
|
200
219
|
}
|
201
220
|
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
|
202
|
-
background-position: right -
|
221
|
+
background-position: right -11px;
|
203
222
|
}
|
204
223
|
.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
|
205
|
-
background-position: right -
|
224
|
+
background-position: right -11px;
|
206
225
|
}
|
207
226
|
/* @end */
|
208
227
|
|
@@ -220,6 +239,7 @@
|
|
220
239
|
padding: 0;
|
221
240
|
}
|
222
241
|
.chzn-container .chzn-results li {
|
242
|
+
display: none;
|
223
243
|
line-height: 80%;
|
224
244
|
padding: 7px 7px 8px;
|
225
245
|
margin: 0;
|
@@ -227,6 +247,7 @@
|
|
227
247
|
}
|
228
248
|
.chzn-container .chzn-results .active-result {
|
229
249
|
cursor: pointer;
|
250
|
+
display: list-item;
|
230
251
|
}
|
231
252
|
.chzn-container .chzn-results .highlighted {
|
232
253
|
background: #3875d7;
|
@@ -241,6 +262,7 @@
|
|
241
262
|
}
|
242
263
|
.chzn-container .chzn-results .no-results {
|
243
264
|
background: #f4f4f4;
|
265
|
+
display: list-item;
|
244
266
|
}
|
245
267
|
.chzn-container .chzn-results .group-result {
|
246
268
|
cursor: default;
|
@@ -303,6 +325,18 @@
|
|
303
325
|
}
|
304
326
|
/* @end */
|
305
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
|
+
|
306
340
|
/* @group Right to Left */
|
307
341
|
.chzn-rtl { direction:rtl;text-align: right; }
|
308
342
|
.chzn-rtl .chzn-single { padding-left: 0; padding-right: 8px; }
|
@@ -321,14 +355,14 @@
|
|
321
355
|
.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 20px; }
|
322
356
|
.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
|
323
357
|
.chzn-rtl .chzn-search input {
|
324
|
-
background: url('
|
325
|
-
background: url('
|
326
|
-
background: url('
|
327
|
-
background: url('
|
328
|
-
background: url('
|
329
|
-
background: url('
|
330
|
-
background: url('
|
331
|
-
background: url('
|
358
|
+
background: url('chosen-sprite.png') no-repeat -38px -22px, #ffffff;
|
359
|
+
background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
360
|
+
background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
361
|
+
background: url('chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
362
|
+
background: url('chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
363
|
+
background: url('chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
364
|
+
background: url('chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
365
|
+
background: url('chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
332
366
|
padding: 4px 5px 4px 20px;
|
333
367
|
}
|
334
368
|
/* @end */
|