lolita 3.4.3 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +37 -36
  3. data/Gemfile +31 -29
  4. data/README.md +147 -147
  5. data/Rakefile +17 -7
  6. data/app/assets/javascripts/lolita/application.js +5 -6
  7. data/app/assets/javascripts/lolita/tab.js +98 -100
  8. data/app/assets/stylesheets/lolita/PIE-custom.htc +87 -87
  9. data/app/assets/stylesheets/lolita/PIE.htc +81 -81
  10. data/app/assets/stylesheets/lolita/application.css +7 -6
  11. data/app/assets/stylesheets/lolita/default.css.erb +169 -169
  12. data/app/assets/stylesheets/lolita/jquery-ui-1.8.16.lolita.css.erb +567 -567
  13. data/app/assets/stylesheets/lolita/style.css.erb +554 -553
  14. data/app/assets/stylesheets/tinymce/skins/lolita/content.inline.min.css +1 -0
  15. data/app/assets/stylesheets/tinymce/skins/lolita/content.min.css +1 -0
  16. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/readme.md +1 -0
  17. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/tinymce-small.eot +0 -0
  18. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/tinymce-small.svg +175 -0
  19. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/tinymce-small.ttf +0 -0
  20. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/tinymce-small.woff +0 -0
  21. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/tinymce.eot +0 -0
  22. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/tinymce.svg +153 -0
  23. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/tinymce.ttf +0 -0
  24. data/app/assets/stylesheets/tinymce/skins/lolita/fonts/tinymce.woff +0 -0
  25. data/app/assets/stylesheets/tinymce/skins/lolita/img/anchor.gif +0 -0
  26. data/app/assets/stylesheets/tinymce/skins/lolita/img/loader.gif +0 -0
  27. data/app/assets/stylesheets/tinymce/skins/lolita/img/object.gif +0 -0
  28. data/app/assets/stylesheets/tinymce/skins/lolita/img/trans.gif +0 -0
  29. data/app/assets/stylesheets/tinymce/skins/lolita/img/wline.gif +0 -0
  30. data/app/assets/stylesheets/tinymce/skins/lolita/skin.ie7.min.css +1 -0
  31. data/app/assets/stylesheets/tinymce/skins/lolita/skin.min.css +2 -0
  32. data/app/helpers/components/lolita/configuration/list_component.rb +10 -10
  33. data/app/helpers/components/lolita/configuration_component.rb +21 -21
  34. data/app/views/components/lolita/configuration/column/_first.html.haml +1 -1
  35. data/app/views/components/lolita/configuration/column/header/_first.html.haml +1 -1
  36. data/app/views/components/lolita/configuration/column/header/_sort.html.haml +6 -6
  37. data/app/views/components/lolita/configuration/columns/body/_display.html.haml +1 -1
  38. data/app/views/components/lolita/configuration/columns/header/_display.html.haml +5 -5
  39. data/app/views/components/lolita/configuration/field/array/checkbox/_display.html.haml +7 -7
  40. data/app/views/components/lolita/configuration/field/string/text/_display.html.haml +4 -7
  41. data/app/views/components/lolita/configuration/search/_display.html.haml +2 -2
  42. data/app/views/components/lolita/configuration/tab/_display.html.haml +4 -4
  43. data/app/views/components/lolita/configuration/tabs/_form.html.haml +7 -6
  44. data/app/views/components/lolita/configuration/tabs/yo.html +1 -0
  45. data/app/views/kaminari/lolita/_first_page.html.erb +11 -11
  46. data/app/views/kaminari/lolita/_gap.html.erb +8 -8
  47. data/app/views/kaminari/lolita/_last_page.html.erb +11 -11
  48. data/app/views/kaminari/lolita/_next_page.html.erb +11 -11
  49. data/app/views/kaminari/lolita/_page.html.erb +12 -12
  50. data/app/views/kaminari/lolita/_paginator.html.erb +23 -23
  51. data/app/views/kaminari/lolita/_prev_page.html.erb +11 -11
  52. data/app/views/lolita/info/index.html.erb +232 -232
  53. data/author +1 -1
  54. data/config/locales/sv_SE.yml +37 -0
  55. data/config/routes.rb +6 -6
  56. data/lib/generators/lolita/install_generator.rb +22 -19
  57. data/lib/generators/lolita/uninstall_generator.rb +76 -71
  58. data/lib/generators/templates/lolita.rb +17 -14
  59. data/lib/generators/templates/tinymce.yml +22 -0
  60. data/lib/lolita.rb +142 -141
  61. data/lib/lolita/adapter/abstract_adapter.rb +17 -16
  62. data/lib/lolita/adapter/active_record.rb +229 -227
  63. data/lib/lolita/adapter/common_helper.rb +220 -221
  64. data/lib/lolita/adapter/field_helper.rb +18 -18
  65. data/lib/lolita/adapter/mongoid.rb +244 -241
  66. data/lib/lolita/components/base.rb +10 -12
  67. data/lib/lolita/configuration.rb +61 -61
  68. data/lib/lolita/configuration/column.rb +170 -181
  69. data/lib/lolita/configuration/field/big_decimal.rb +12 -12
  70. data/lib/lolita/configuration/field/boolean.rb +12 -12
  71. data/lib/lolita/configuration/field/date.rb +12 -12
  72. data/lib/lolita/configuration/field/hidden.rb +12 -12
  73. data/lib/lolita/configuration/field/integer.rb +11 -11
  74. data/lib/lolita/configuration/field/string.rb +16 -16
  75. data/lib/lolita/configuration/field/time.rb +13 -13
  76. data/lib/lolita/configuration/field_set.rb +25 -25
  77. data/lib/lolita/configuration/filter.rb +130 -116
  78. data/lib/lolita/configuration/list.rb +201 -201
  79. data/lib/lolita/configuration/search.rb +105 -105
  80. data/lib/lolita/controllers/component_helpers.rb +156 -156
  81. data/lib/lolita/controllers/internal_helpers.rb +74 -71
  82. data/lib/lolita/dbi/base.rb +56 -56
  83. data/lib/lolita/hooks/named_hook.rb +125 -125
  84. data/lib/lolita/lazy_loader.rb +54 -54
  85. data/lib/lolita/navigation/tree.rb +132 -132
  86. data/lib/lolita/rails/engine.rb +29 -24
  87. data/lib/lolita/rails/routes.rb +133 -129
  88. data/lib/lolita/ruby_ext/accessors.rb +26 -26
  89. data/lib/lolita/search/simple.rb +75 -75
  90. data/lib/lolita/support/formatter.rb +62 -62
  91. data/lib/lolita/support/formatter/rails.rb +56 -56
  92. data/lib/lolita/system_configuration/base.rb +182 -178
  93. data/lib/lolita/test/matchers.rb +77 -77
  94. data/lib/lolita/version.rb +30 -30
  95. data/lolita.gemspec +35 -34
  96. data/spec/adapter/common_helper_spec.rb +96 -96
  97. data/spec/builder_spec.rb +120 -120
  98. data/spec/configuration/base_spec.rb +23 -23
  99. data/spec/configuration/field_spec.rb +117 -118
  100. data/spec/configuration/filter_spec.rb +145 -131
  101. data/spec/configuration/tab_spec.rb +184 -187
  102. data/spec/configuration/tabs_spec.rb +116 -120
  103. data/spec/generators/lolita/install_generator_spec.rb +70 -55
  104. data/spec/generators/lolita/uninstall_generator_spec.rb +65 -49
  105. data/spec/helpers/url_for_spec.rb +8 -0
  106. data/spec/orm/active_record.rb +53 -0
  107. data/spec/orm/mongoid.rb +2 -13
  108. data/spec/orm/mongoid.yml +6 -0
  109. data/spec/rails_app/app/controllers/application_controller.rb +3 -3
  110. data/spec/rails_app/app/helpers/application_helper.rb +3 -3
  111. data/spec/rails_app/app/orm/active_record/address.rb +3 -0
  112. data/spec/rails_app/app/orm/active_record/category.rb +16 -0
  113. data/spec/rails_app/app/orm/active_record/comment.rb +4 -0
  114. data/spec/rails_app/app/orm/active_record/post.rb +24 -0
  115. data/spec/rails_app/app/orm/active_record/preference.rb +4 -0
  116. data/spec/rails_app/app/orm/active_record/profile.rb +9 -0
  117. data/spec/rails_app/app/orm/active_record/tag.rb +2 -0
  118. data/spec/rails_app/app/{mongoid → orm/mongoid}/address.rb +7 -7
  119. data/spec/rails_app/app/{mongoid → orm/mongoid}/category.rb +18 -19
  120. data/spec/rails_app/app/{mongoid → orm/mongoid}/comment.rb +5 -5
  121. data/spec/rails_app/app/{mongoid → orm/mongoid}/post.rb +30 -30
  122. data/spec/rails_app/app/{mongoid → orm/mongoid}/preference.rb +5 -5
  123. data/spec/rails_app/app/{mongoid → orm/mongoid}/profile.rb +13 -14
  124. data/spec/rails_app/app/{mongoid → orm/mongoid}/tag.rb +3 -3
  125. data/spec/rails_app/app/views/components/lolita/configuration/list/_body_cell.html.erb +1 -1
  126. data/spec/rails_app/config/application.rb +34 -33
  127. data/spec/rails_app/config/boot.rb +7 -8
  128. data/spec/rails_app/config/environment.rb +5 -5
  129. data/spec/rails_app/config/environments/development.rb +22 -23
  130. data/spec/rails_app/config/environments/production.rb +37 -37
  131. data/spec/rails_app/config/environments/test.rb +36 -37
  132. data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -7
  133. data/spec/rails_app/config/initializers/inflections.rb +2 -2
  134. data/spec/rails_app/config/initializers/secret_token.rb +1 -1
  135. data/spec/rails_app/config/routes.rb +4 -3
  136. data/spec/rails_app/lib/lolita/configuration/field/my_custom_collection.rb +13 -13
  137. data/spec/rails_app/public/javascripts/jquery-1.5.1.min.js +15 -15
  138. data/spec/rails_app/public/javascripts/lolita/main.js +6 -6
  139. data/spec/rails_app/public/javascripts/modernizr-1.7.min.js +1 -1
  140. data/spec/rails_app/public/javascripts/rails.js +137 -137
  141. data/spec/rails_app/public/javascripts/tinymce/langs/en.js +221 -221
  142. data/spec/rails_app/public/javascripts/tinymce/license.txt +504 -504
  143. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/about.htm +52 -52
  144. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/anchor.htm +26 -26
  145. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/charmap.htm +51 -51
  146. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/color_picker.htm +74 -74
  147. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/editor_template_src.js +1328 -1328
  148. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/image.htm +80 -80
  149. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/about.js +73 -73
  150. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/anchor.js +42 -42
  151. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/charmap.js +354 -354
  152. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/color_picker.js +329 -329
  153. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/image.js +247 -247
  154. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/link.js +153 -153
  155. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/source_editor.js +56 -56
  156. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/langs/en.js +68 -68
  157. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +53 -53
  158. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/link.htm +57 -57
  159. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -47
  160. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/content.css +66 -66
  161. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/dialog.css +117 -117
  162. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/ui.css +988 -988
  163. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/source_editor.htm +25 -25
  164. data/spec/rails_app/public/javascripts/tinymce/tiny_mce_popup.js +4 -4
  165. data/spec/rails_app/public/stylesheets/lolita/default.css +169 -169
  166. data/spec/rails_app/public/stylesheets/lolita/style.css +214 -214
  167. data/spec/spec_helper.rb +44 -51
  168. data/spec/support/cleaner.rb +12 -0
  169. data/vendor/assets/javascripts/application_vendor_lolita.js +5 -4
  170. data/vendor/assets/javascripts/jquery-numeric.js +279 -279
  171. data/vendor/assets/javascripts/modernizr_1_7_min.js +1 -1
  172. data/vendor/assets/stylesheets/jquery-ui-1.8.16.custom.css +567 -567
  173. metadata +105 -72
  174. data/lib/tasks/tinymce-assets.rake +0 -7
  175. data/spec/adapter_helper.rb +0 -43
  176. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/content.css +0 -66
  177. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/dialog.css +0 -117
  178. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/butt2.png +0 -0
  179. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/button-bg.png +0 -0
  180. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/buttons.png +0 -0
  181. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/down_arrow.gif +0 -0
  182. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/fade-butt.png +0 -0
  183. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/icons.png +0 -0
  184. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/items.gif +0 -0
  185. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/menu-arrow.png +0 -0
  186. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/menu-check.png +0 -0
  187. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/progress.gif +0 -0
  188. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/tabs.gif +0 -0
  189. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/img/toolbarbg.png +0 -0
  190. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/ui.css +0 -988
@@ -1,6 +1,6 @@
1
- - sort_mapping = {"desc" => '⇓', "asc" => '⇑'}
2
- - new_params = params.reject{|k,v| ["controller","action"].include?(k.to_s)}
3
- - direction_indicator = raw(sort_mapping[column.current_sort_state(new_params)[1]])
4
- - new_params[:s] = column.sort_params(new_params)
5
-
6
- = link_to raw("#{column.title.to_s.capitalize} #{direction_indicator}"), lolita_resources_path(new_params)
1
+ - sort_mapping = {"desc" => '⇓', "asc" => '⇑'}
2
+ - new_params = params.reject{|k,v| ["controller","action"].include?(k.to_s)}
3
+ - direction_indicator = raw(sort_mapping[column.current_sort_state(new_params)[1]])
4
+ - new_params[:s] = column.sort_params(new_params)
5
+
6
+ = link_to raw("#{column.title.to_s.capitalize} #{direction_indicator}"), lolita_resources_path(new_params)
@@ -1,3 +1,3 @@
1
1
  %tbody
2
2
  - page.each_with_index do |record,index|
3
- = render_component *columns.build("body/row", :record => record, :index => index, :list => list)
3
+ = render_component *columns.build("body/row", :record => record, :index => index, :list => list)
@@ -1,5 +1,5 @@
1
- %thead
2
- %tr
3
- - columns.each do |column|
4
- = render_component *column.build("header")
5
- = render_component "lolita/configuration/column/header", :last
1
+ %thead
2
+ %tr
3
+ - columns.each do |column|
4
+ = render_component *column.build("header")
5
+ = render_component "lolita/configuration/column/header", :last
@@ -1,8 +1,8 @@
1
- - ids_method = field.name.to_s.match(/_ids$/) ? field.name : "#{field.name.to_s.singularize}_ids"
2
- = hidden_field_tag "#{resource_name}[#{ids_method}][]",""
3
- - field.view_values(self).each do |value|
4
- - editors = resource.send(:"#{ids_method}")
5
- .habtm-container
6
- = label_tag "#{resource_name}_#{field.name}_#{value.last}",value.first, :class => "habtm-label"
7
- = check_box_tag "#{resource_name}[#{ids_method}][]", value.last, resource.send("#{ids_method}").include?(value.last), :id => "#{resource_name}_#{field.name}_#{value.last}", :class => "habtm-checkbox"
1
+ - ids_method = field.name.to_s.match(/_ids$/) ? field.name : "#{field.name.to_s.singularize}_ids"
2
+ = hidden_field_tag "#{resource_name}[#{ids_method}][]",""
3
+ - field.view_values(self).each do |value|
4
+ - editors = resource.send(:"#{ids_method}")
5
+ .habtm-container
6
+ = label_tag "#{resource_name}_#{field.name}_#{value.last}",value.first, :class => "habtm-label"
7
+ = check_box_tag "#{resource_name}[#{ids_method}][]", value.last, resource.send("#{ids_method}").include?(value.last), :id => "#{resource_name}_#{field.name}_#{value.last}", :class => "habtm-checkbox"
8
8
  .clear
@@ -1,7 +1,4 @@
1
- = current_form.text_area field.name, :rows=>(field.rows || 20), :"data-simple"=>field.simple
2
- - if @textarea_component_include_tinymce_once.nil?
3
- :javascript
4
- $(function(){
5
- TinyMCEConfigManager.get().load();
6
- })
7
- - @textarea_component_include_tinymce_once = "done"
1
+ = current_form.text_area field.name, :rows=>(field.rows || 20), :"data-simple"=>field.simple
2
+ - if @textarea_component_include_tinymce_once.nil?
3
+ = tinymce Lolita.tinymce_configuration_set, selector: "textarea[data-simple!=true]", language: I18n.locale
4
+ - @textarea_component_include_tinymce_once = "done"
@@ -1,2 +1,2 @@
1
- = form_tag lolita_resources_path(), :method => :get, :class => "search" do
2
- %input{:type => "text", :name => "q", :value => params[:q], :placeholder => t("lolita.search")}
1
+ = form_tag lolita_resources_path(), :method => :get, :class => "search" do
2
+ %input{:type => "text", :name => "q", :value => params[:q], :placeholder => t("lolita.search")}
@@ -1,4 +1,4 @@
1
- %div{:class => "tab #{active && "active"}", :id => "tab_#{tab.__id__}"}
2
- = render_component "lolita/configuration/tab", :error_msg, :tab => tab
3
- = render_component *tab.build
4
- = #render_component "lolita/configuration/tab", :form, :tab => tab
1
+ %div{:class => "tab #{active && "active"}", :id => "tab_#{tab.__id__}"}
2
+ = render_component "lolita/configuration/tab", :error_msg, :tab => tab
3
+ = render_component *tab.build
4
+ //= render_component "lolita/configuration/tab", :form, :tab => tab
@@ -1,7 +1,8 @@
1
- = form_for resource, :url => resource.new_record? ? lolita_resources_path : lolita_resource_path(:id=>resource.id), :method => resource.new_record? ? :post : :put, :html => {:multipart => true, :class => "associated"} do |form|
2
- - self.current_form = form
3
- - tabs.associated.each_with_index do |tab,index|
4
- = render_component :"lolita/configuration/tab", :display, :tab => tab, :active => index == 0
5
- - self.current_form = nil
6
- - tabs.dissociated.each_with_index do |tab,index|
1
+ = form_for resource, :url => resource.new_record? ? lolita_resources_path : lolita_resource_path(:id=>resource.id), :method => resource.new_record? ? :post : :put, :html => {:multipart => true, :class => "associated"} do |form|
2
+ - self.current_form = form
3
+ - tabs.associated.each_with_index do |tab,index|
4
+ = render_component :"lolita/configuration/tab", :display, :tab => tab, :active => index == 0
5
+ - self.current_form = nil
6
+ - tabs.dissociated.each_with_index do |tab,index|
7
+ /= binding.pry
7
8
  = render_component :"lolita/configuration/tab", :display, :tab => tab, :active => false
@@ -0,0 +1 @@
1
+ <form accept-charset=\"UTF-8\" action=\"/lolita/producers\" class=\"associated\" enctype=\"multipart/form-data\" id=\"new_producer\" method=\"post\"><div style=\"margin:0;padding:0;display:inline\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" /><input name=\"authenticity_token\" type=\"hidden\" value=\"yxDB5wlw91LhUwhCikk4FLziDowlVoiXCHLxFAaQRT8=\" /></div> <div class='tab active' id='tab_70311164860540'>\n <ul class='tab-language-switch' id='tab_70311164860540_language_switch'>\n <li class='active' data-locale='en' data-tab='tab_70311164860540'>En</li>\n <li class='' data-locale='sv' data-tab='tab_70311164860540'>Sv</li>\n </ul>\n <div class='clear'></div>\n <div class='tab-content'>\n <div class='active language-wrap' id='en_for_tab_70311164860540'>\n <div class='field_string' id='field_70311164856180'>\n <label for=\"producer_name\" id=\"field_70311164856180_label\">Name</label>\n <div class='field-value' id='field_70311164856180_value'><input class=\"string\" id=\"producer_name\" name=\"producer[name]\" type=\"text\" /></div>\n </div>\n <div class='field_string' id='field_70311164854820'>\n <label for=\"producer_description\" id=\"field_70311164854820_label\">Description</label>\n <div class='field-value' id='field_70311164854820_value'><textarea data-simple=\"true\" id=\"producer_description\" name=\"producer[description]\" rows=\"20\">&#x000A;</textarea></div>\n </div>\n <div class='field_string' id='field_70311164877500'>\n <label for=\"producer_full_description\" id=\"field_70311164877500_label\">Full description</label>\n <div class='field-value' id='field_70311164877500_value'><textarea data-simple=\"true\" id=\"producer_full_description\" name=\"producer[full_description]\" rows=\"20\">&#x000A;</textarea></div>\n </div>\n <div class='field_string' id='field_70311164875720'>\n <label for=\"producer_website_url\" id=\"field_70311164875720_label\">Website url</label>\n <div class='field-value' id='field_70311164875720_value'><input class=\"string\" id=\"producer_website_url\" name=\"producer[website_url]\" type=\"text\" /></div>\n </div>\n <div class='field_file' id='field_70311147558540'>\n <label for=\"producer_logo\" id=\"field_70311147558540_label\">Logo</label>\n <div class='field-value' id='field_70311147558540_value'>\n \n <span class=\"actions\"><input id=\"producer_logo\" name=\"producer[logo]\" type=\"file\" />\n <input id=\"producer_logo_cache\" name=\"producer[logo_cache]\" type=\"hidden\" />\n </span>\n <div class=\"clear\" />\n </div>\n </div>\n <div class='field_string' id='field_70311187900940'>\n <div class='field-value' id='field_70311187900940_value'><input class=\"string\" id=\"producer_original_locale\" name=\"producer[original_locale]\" type=\"hidden\" value=\"en\" /></div>\n </div>\n </div>\n <div class='nested_form normal' id='nested_form_70311115184120'>\n <div class='nested-form-fields-container'>\n <div class='language-wrap' id='sv_for_tab_70311164860540'>\n <div class=''>\n <div class='field_string' id='field_70311164854820'>\n <label for=\"producer_translations_attributes_0_description\" id=\"field_70311164854820_label\">Description</label>\n <div class='field-value' id='field_70311164854820_value'><textarea data-simple=\"true\" id=\"producer_translations_attributes_0_description\" name=\"producer[translations_attributes][0][description]\" rows=\"20\">&#x000A;</textarea></div>\n </div>\n <div class='field_string' id='field_70311164877500'>\n <label for=\"producer_translations_attributes_0_full_description\" id=\"field_70311164877500_label\">Full description</label>\n <div class='field-value' id='field_70311164877500_value'><textarea data-simple=\"true\" id=\"producer_translations_attributes_0_full_description\" name=\"producer[translations_attributes][0][full_description]\" rows=\"20\">&#x000A;</textarea></div>\n </div>\n <div class='field_string' id='field_70311115251100'>\n <div class='field-value' id='field_70311115251100_value'><input class=\"string\" id=\"producer_translations_attributes_0_locale\" name=\"producer[translations_attributes][0][locale]\" type=\"hidden\" value=\"sv\" /></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n \n </div>\n</form>\n<div class='tab false' id='tab_70311164906800'>\n \n <form accept-charset=\"UTF-8\" action=\"/lolita/producers/files/create\" class=\"lolita-file-upload-form\" id=\"files_form\" method=\"post\"><div style=\"margin:0;padding:0;display:inline\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" /><input name=\"authenticity_token\" type=\"hidden\" value=\"yxDB5wlw91LhUwhCikk4FLziDowlVoiXCHLxFAaQRT8=\" /></div>\n <div id=\"file_upload_container_files\">\n Your browser don't have HTML5 or Flash support.\n </div>\n <div class=\"filelist\">\n <div id=\"file_list_for_files\" class=\"filelist-container\">\n </div>\n \n </div>\n <script type=\"text/javascript\"> \n $(function(){ \n $(\"#file_upload_container_files\").plupload({\n // General settings\n runtimes : 'html5,flash',\n url : '/lolita/producers/files/create',\n max_file_size : '100mb',\n unique_names : true,\n rename: true,\n multipart: true,\n multipart_params: { \n \"authenticity_token\" : 'yxDB5wlw91LhUwhCikk4FLziDowlVoiXCHLxFAaQRT8=',\n \"upload[fileable_type]\": \"Producer\",\n \"upload[fileable_id]\": \"0\"\n },\n headers:{\n \"X-CSRF-Token\": $(\"meta[name='csrf-token']\").attr(\"content\")\n },\n \n // Flash settings\n flash_swf_url : \"/assets/lolita/file-upload/plupload.flash.swf\",\n init:{\n FileUploaded:function(uploader, file, info){\n $(\"#file_list_for_files\").append(info.response)\n \n var ids=\"producer[file_ids][]\"\n \n var existing_ids=[]\n $(\"input.files-ids\").each(function(){\n existing_ids.push($(this).val())\n })\n \n var new_ids=[]\n $(\"#file_list_for_files .file-item[data-files-id]\").each(function(){\n if($.inArray($(this).attr(\"data-files-id\"),existing_ids)<0){\n new_ids.push($(this).attr(\"data-files-id\"))\n }\n })\n for(var i in new_ids){\n $(\".tabs form:first\").append('<input type=\"hidden\" class=\"files-ids\" name=\"'+ids+'\" value=\"'+new_ids[i]+'\" />')\n }\n \n } \n },\n \n });\n \n \t$(\"#tab_70311164906800\").bind(\"tab.toggle\", function(){\n \t\tvar uploader = $(\"#file_upload_container_files\").plupload('getUploader');\n \t\tuploader.refresh();\t\t\n \t})\n \n }); \n </script> \n \n </form>\n \n</div>
@@ -1,11 +1,11 @@
1
- <%# Link to the "First" page
2
- - available local variables
3
- url: url to the first page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="first">
10
- <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
11
- </span>
1
+ <%# Link to the "First" page
2
+ - available local variables
3
+ url: url to the first page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="first">
10
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
11
+ </span>
@@ -1,8 +1,8 @@
1
- <%# Non-link tag that stands for skipped pages...
2
- - available local variables
3
- current_page: a page object for the currently displayed page
4
- num_pages: total number of pages
5
- per_page: number of items to fetch per page
6
- remote: data-remote
7
- -%>
8
- <span class="page gap"><%= raw(t 'views.pagination.truncate') %></span>
1
+ <%# Non-link tag that stands for skipped pages...
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ -%>
8
+ <span class="page gap"><%= raw(t 'views.pagination.truncate') %></span>
@@ -1,11 +1,11 @@
1
- <%# Link to the "Last" page
2
- - available local variables
3
- url: url to the last page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="last">
10
- <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
11
- </span>
1
+ <%# Link to the "Last" page
2
+ - available local variables
3
+ url: url to the last page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="last">
10
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
11
+ </span>
@@ -1,11 +1,11 @@
1
- <%# Link to the "Next" page
2
- - available local variables
3
- url: url to the next page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="next">
10
- <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
11
- </span>
1
+ <%# Link to the "Next" page
2
+ - available local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="next">
10
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
11
+ </span>
@@ -1,12 +1,12 @@
1
- <%# Link showing page number
2
- - available local variables
3
- page: a page object for "this" page
4
- url: url to this page
5
- current_page: a page object for the currently displayed page
6
- num_pages: total number of pages
7
- per_page: number of items to fetch per page
8
- remote: data-remote
9
- -%>
10
- <span class="page<%= ' current' if page.current? %>">
11
- <%= link_to_unless page.current?, page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
12
- </span>
1
+ <%# Link showing page number
2
+ - available local variables
3
+ page: a page object for "this" page
4
+ url: url to this page
5
+ current_page: a page object for the currently displayed page
6
+ num_pages: total number of pages
7
+ per_page: number of items to fetch per page
8
+ remote: data-remote
9
+ -%>
10
+ <span class="page<%= ' current' if page.current? %>">
11
+ <%= link_to_unless page.current?, page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
12
+ </span>
@@ -1,23 +1,23 @@
1
- <%# The container tag
2
- - available local variables
3
- current_page: a page object for the currently displayed page
4
- num_pages: total number of pages
5
- per_page: number of items to fetch per page
6
- remote: data-remote
7
- paginator: the paginator that renders the pagination tags inside
8
- -%>
9
- <%= paginator.render do -%>
10
- <nav class="pagination">
11
- <%= first_page_tag unless current_page.first? %>
12
- <%= prev_page_tag unless current_page.first? %>
13
- <% each_page do |page| -%>
14
- <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
15
- <%= page_tag page %>
16
- <% elsif !page.was_truncated? -%>
17
- <%= gap_tag %>
18
- <% end -%>
19
- <% end -%>
20
- <%= next_page_tag unless current_page.last? %>
21
- <%= last_page_tag unless current_page.last? %>
22
- </nav>
23
- <% end -%>
1
+ <%# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ paginator: the paginator that renders the pagination tags inside
8
+ -%>
9
+ <%= paginator.render do -%>
10
+ <nav class="pagination">
11
+ <%= first_page_tag unless current_page.first? %>
12
+ <%= prev_page_tag unless current_page.first? %>
13
+ <% each_page do |page| -%>
14
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
15
+ <%= page_tag page %>
16
+ <% elsif !page.was_truncated? -%>
17
+ <%= gap_tag %>
18
+ <% end -%>
19
+ <% end -%>
20
+ <%= next_page_tag unless current_page.last? %>
21
+ <%= last_page_tag unless current_page.last? %>
22
+ </nav>
23
+ <% end -%>
@@ -1,11 +1,11 @@
1
- <%# Link to the "Previous" page
2
- - available local variables
3
- url: url to the previous page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="prev">
10
- <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
11
- </span>
1
+ <%# Link to the "Previous" page
2
+ - available local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="prev">
10
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
11
+ </span>
@@ -1,232 +1,232 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Lolita: Welcome aboard</title>
5
- <style type="text/css" media="screen">
6
- body {
7
- margin: 0;
8
- margin-bottom: 25px;
9
- padding: 0;
10
- background-color: #f0f0f0;
11
- font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
12
- font-size: 13px;
13
- color: #333;
14
- }
15
-
16
- h1 {
17
- font-size: 28px;
18
- color: #000;
19
- }
20
-
21
- a {color: #03c}
22
- a:hover {
23
- background-color: #03c;
24
- color: white;
25
- text-decoration: none;
26
- }
27
-
28
-
29
- #page {
30
- background-color: #f0f0f0;
31
- width: 750px;
32
- margin: 0;
33
- margin-left: auto;
34
- margin-right: auto;
35
- }
36
-
37
- #content {
38
- float: left;
39
- background-color: white;
40
- border: 3px solid #aaa;
41
- border-top: none;
42
- padding: 25px;
43
- width: 500px;
44
- }
45
-
46
- #sidebar {
47
- float: right;
48
- width: 175px;
49
- }
50
-
51
- #footer {
52
- clear: both;
53
- }
54
-
55
-
56
- #header, #about, #getting-started {
57
- padding-left: 75px;
58
- padding-right: 30px;
59
- }
60
-
61
-
62
- #header {
63
- background-image: url("images/lolita/plus.png");
64
- background-repeat: no-repeat;
65
- background-position: top left;
66
- height: 64px;
67
- }
68
- #header h1, #header h2 {margin: 0}
69
- #header h2 {
70
- color: #888;
71
- font-weight: normal;
72
- font-size: 16px;
73
- }
74
-
75
-
76
- #about h3 {
77
- margin: 0;
78
- margin-bottom: 10px;
79
- font-size: 14px;
80
- }
81
-
82
- #about-content {
83
- background-color: #ffd;
84
- border: 1px solid #fc0;
85
- margin-left: -55px;
86
- margin-right: -10px;
87
- }
88
- #about-content table {
89
- margin-top: 10px;
90
- margin-bottom: 10px;
91
- font-size: 11px;
92
- border-collapse: collapse;
93
- }
94
- #about-content td {
95
- padding: 10px;
96
- padding-top: 3px;
97
- padding-bottom: 3px;
98
- }
99
- #about-content td.name {color: #555}
100
- #about-content td.value {color: #000}
101
-
102
- #about-content ul {
103
- padding: 0;
104
- list-style-type: none;
105
- }
106
-
107
- #about-content.failure {
108
- background-color: #fcc;
109
- border: 1px solid #f00;
110
- }
111
- #about-content.failure p {
112
- margin: 0;
113
- padding: 10px;
114
- }
115
-
116
-
117
- #getting-started {
118
- border-top: 1px solid #ccc;
119
- margin-top: 25px;
120
- padding-top: 15px;
121
- }
122
- #getting-started h1 {
123
- margin: 0;
124
- font-size: 20px;
125
- }
126
- #getting-started h2 {
127
- margin: 0;
128
- font-size: 14px;
129
- font-weight: normal;
130
- color: #333;
131
- margin-bottom: 25px;
132
- }
133
- #getting-started ol {
134
- margin-left: 0;
135
- padding-left: 0;
136
- }
137
- #getting-started li {
138
- font-size: 18px;
139
- color: #888;
140
- margin-bottom: 25px;
141
- }
142
- #getting-started li h2 {
143
- margin: 0;
144
- font-weight: normal;
145
- font-size: 18px;
146
- color: #333;
147
- }
148
- #getting-started li p {
149
- color: #555;
150
- font-size: 13px;
151
- }
152
-
153
-
154
- #sidebar ul {
155
- margin-left: 0;
156
- padding-left: 0;
157
- }
158
- #sidebar ul h3 {
159
- margin-top: 25px;
160
- font-size: 16px;
161
- padding-bottom: 10px;
162
- border-bottom: 1px solid #ccc;
163
- }
164
- #sidebar li {
165
- list-style-type: none;
166
- }
167
- #sidebar ul.links li {
168
- margin-bottom: 5px;
169
- }
170
-
171
- </style>
172
- <script type="text/javascript">
173
- function about() {
174
- info = document.getElementById('about-content');
175
- if (window.XMLHttpRequest)
176
- { xhr = new XMLHttpRequest(); }
177
- else
178
- { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
179
- xhr.open("GET","lolita/info/properties",false);
180
- xhr.send("");
181
- info.innerHTML = xhr.responseText;
182
- info.style.display = 'block'
183
- }
184
- </script>
185
- </head>
186
- <body>
187
- <div id="page">
188
- <div id="sidebar">
189
- <ul id="sidebar-items">
190
- <li>
191
- <h3>Browse the documentation</h3>
192
- <ul class="links">
193
- <li><a href="http://rdoc.info/github/ithouse/lolita/master/frames">Lolita API</a></li>
194
- </ul>
195
- </li>
196
- </ul>
197
- </div>
198
-
199
- <div id="content">
200
- <div id="header">
201
- <h1>Welcome aboard</h1>
202
- <h2>You&rsquo;re riding Lolita!</h2>
203
- </div>
204
-
205
- <div id="about">
206
- <h3><a href="lolita/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
207
- <div id="about-content" style="display: none"></div>
208
- </div>
209
-
210
- <div id="getting-started">
211
- <h1>Getting started</h1>
212
- <h2>Here&rsquo;s how to get rolling:</h2>
213
-
214
- <ol>
215
- <li>
216
- <h2>Use <code>lolita_for</code> in config/routes.rb</h2>
217
- <p>run it.</p>
218
- </li>
219
-
220
- <li>
221
- <h2>Use <code>lolita</code> in your models</h2>
222
- <p></p>
223
- </li>
224
-
225
- </ol>
226
- </div>
227
- </div>
228
-
229
- <div id="footer">&nbsp;</div>
230
- </div>
231
- </body>
232
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Lolita: Welcome aboard</title>
5
+ <style type="text/css" media="screen">
6
+ body {
7
+ margin: 0;
8
+ margin-bottom: 25px;
9
+ padding: 0;
10
+ background-color: #f0f0f0;
11
+ font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
12
+ font-size: 13px;
13
+ color: #333;
14
+ }
15
+
16
+ h1 {
17
+ font-size: 28px;
18
+ color: #000;
19
+ }
20
+
21
+ a {color: #03c}
22
+ a:hover {
23
+ background-color: #03c;
24
+ color: white;
25
+ text-decoration: none;
26
+ }
27
+
28
+
29
+ #page {
30
+ background-color: #f0f0f0;
31
+ width: 750px;
32
+ margin: 0;
33
+ margin-left: auto;
34
+ margin-right: auto;
35
+ }
36
+
37
+ #content {
38
+ float: left;
39
+ background-color: white;
40
+ border: 3px solid #aaa;
41
+ border-top: none;
42
+ padding: 25px;
43
+ width: 500px;
44
+ }
45
+
46
+ #sidebar {
47
+ float: right;
48
+ width: 175px;
49
+ }
50
+
51
+ #footer {
52
+ clear: both;
53
+ }
54
+
55
+
56
+ #header, #about, #getting-started {
57
+ padding-left: 75px;
58
+ padding-right: 30px;
59
+ }
60
+
61
+
62
+ #header {
63
+ background-image: url("images/lolita/plus.png");
64
+ background-repeat: no-repeat;
65
+ background-position: top left;
66
+ height: 64px;
67
+ }
68
+ #header h1, #header h2 {margin: 0}
69
+ #header h2 {
70
+ color: #888;
71
+ font-weight: normal;
72
+ font-size: 16px;
73
+ }
74
+
75
+
76
+ #about h3 {
77
+ margin: 0;
78
+ margin-bottom: 10px;
79
+ font-size: 14px;
80
+ }
81
+
82
+ #about-content {
83
+ background-color: #ffd;
84
+ border: 1px solid #fc0;
85
+ margin-left: -55px;
86
+ margin-right: -10px;
87
+ }
88
+ #about-content table {
89
+ margin-top: 10px;
90
+ margin-bottom: 10px;
91
+ font-size: 11px;
92
+ border-collapse: collapse;
93
+ }
94
+ #about-content td {
95
+ padding: 10px;
96
+ padding-top: 3px;
97
+ padding-bottom: 3px;
98
+ }
99
+ #about-content td.name {color: #555}
100
+ #about-content td.value {color: #000}
101
+
102
+ #about-content ul {
103
+ padding: 0;
104
+ list-style-type: none;
105
+ }
106
+
107
+ #about-content.failure {
108
+ background-color: #fcc;
109
+ border: 1px solid #f00;
110
+ }
111
+ #about-content.failure p {
112
+ margin: 0;
113
+ padding: 10px;
114
+ }
115
+
116
+
117
+ #getting-started {
118
+ border-top: 1px solid #ccc;
119
+ margin-top: 25px;
120
+ padding-top: 15px;
121
+ }
122
+ #getting-started h1 {
123
+ margin: 0;
124
+ font-size: 20px;
125
+ }
126
+ #getting-started h2 {
127
+ margin: 0;
128
+ font-size: 14px;
129
+ font-weight: normal;
130
+ color: #333;
131
+ margin-bottom: 25px;
132
+ }
133
+ #getting-started ol {
134
+ margin-left: 0;
135
+ padding-left: 0;
136
+ }
137
+ #getting-started li {
138
+ font-size: 18px;
139
+ color: #888;
140
+ margin-bottom: 25px;
141
+ }
142
+ #getting-started li h2 {
143
+ margin: 0;
144
+ font-weight: normal;
145
+ font-size: 18px;
146
+ color: #333;
147
+ }
148
+ #getting-started li p {
149
+ color: #555;
150
+ font-size: 13px;
151
+ }
152
+
153
+
154
+ #sidebar ul {
155
+ margin-left: 0;
156
+ padding-left: 0;
157
+ }
158
+ #sidebar ul h3 {
159
+ margin-top: 25px;
160
+ font-size: 16px;
161
+ padding-bottom: 10px;
162
+ border-bottom: 1px solid #ccc;
163
+ }
164
+ #sidebar li {
165
+ list-style-type: none;
166
+ }
167
+ #sidebar ul.links li {
168
+ margin-bottom: 5px;
169
+ }
170
+
171
+ </style>
172
+ <script type="text/javascript">
173
+ function about() {
174
+ info = document.getElementById('about-content');
175
+ if (window.XMLHttpRequest)
176
+ { xhr = new XMLHttpRequest(); }
177
+ else
178
+ { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
179
+ xhr.open("GET","lolita/info/properties",false);
180
+ xhr.send("");
181
+ info.innerHTML = xhr.responseText;
182
+ info.style.display = 'block'
183
+ }
184
+ </script>
185
+ </head>
186
+ <body>
187
+ <div id="page">
188
+ <div id="sidebar">
189
+ <ul id="sidebar-items">
190
+ <li>
191
+ <h3>Browse the documentation</h3>
192
+ <ul class="links">
193
+ <li><a href="http://rdoc.info/github/ithouse/lolita/master/frames">Lolita API</a></li>
194
+ </ul>
195
+ </li>
196
+ </ul>
197
+ </div>
198
+
199
+ <div id="content">
200
+ <div id="header">
201
+ <h1>Welcome aboard</h1>
202
+ <h2>You&rsquo;re riding Lolita!</h2>
203
+ </div>
204
+
205
+ <div id="about">
206
+ <h3><a href="lolita/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
207
+ <div id="about-content" style="display: none"></div>
208
+ </div>
209
+
210
+ <div id="getting-started">
211
+ <h1>Getting started</h1>
212
+ <h2>Here&rsquo;s how to get rolling:</h2>
213
+
214
+ <ol>
215
+ <li>
216
+ <h2>Use <code>lolita_for</code> in config/routes.rb</h2>
217
+ <p>run it.</p>
218
+ </li>
219
+
220
+ <li>
221
+ <h2>Use <code>lolita</code> in your models</h2>
222
+ <p></p>
223
+ </li>
224
+
225
+ </ol>
226
+ </div>
227
+ </div>
228
+
229
+ <div id="footer">&nbsp;</div>
230
+ </div>
231
+ </body>
232
+ </html>