adva 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/adva.gemspec +3 -0
  3. data/app/assets/config/manifest.js +6 -0
  4. data/app/assets/javascripts/adva_cms/ckeditor.js.erb +12 -0
  5. data/app/assets/javascripts/adva_cms/concat_main_menus.js +13 -0
  6. data/app/assets/javascripts/adva_cms/jquery.table_tree.js +704 -0
  7. data/app/assets/javascripts/adva_cms.js +7 -0
  8. data/app/assets/javascripts/ckeditor/config.js.erb +94 -0
  9. data/app/assets/stylesheets/adva_cms/admin/common.scss +15 -1
  10. data/app/assets/stylesheets/adva_cms/admin/projection.scss +2 -5
  11. data/app/assets/stylesheets/adva_cms/admin/sidebar.scss +30 -9
  12. data/app/assets/stylesheets/adva_cms/admin.scss +1 -1
  13. data/app/controllers/admin/base_controller.rb +10 -24
  14. data/app/controllers/admin/page/articles_controller.rb +8 -27
  15. data/app/controllers/admin/page/categories_controller.rb +6 -9
  16. data/app/controllers/admin/page/links_controller.rb +6 -9
  17. data/app/controllers/admin/sections_controller.rb +7 -9
  18. data/app/controllers/admin/sites_controller.rb +9 -12
  19. data/app/controllers/admin/users_controller.rb +6 -9
  20. data/app/controllers/articles_controller.rb +30 -52
  21. data/app/controllers/base_controller.rb +8 -8
  22. data/app/controllers/password_controller.rb +3 -5
  23. data/app/controllers/session_controller.rb +3 -5
  24. data/app/helpers/activities_helper.rb +9 -20
  25. data/app/helpers/admin/base_helper.rb +4 -22
  26. data/app/helpers/base_helper.rb +1 -1
  27. data/app/helpers/content_helper.rb +7 -5
  28. data/app/helpers/resource_helper.rb +4 -5
  29. data/app/helpers/users_helper.rb +1 -1
  30. data/app/models/activity.rb +3 -0
  31. data/app/models/article.rb +0 -11
  32. data/app/models/category.rb +3 -3
  33. data/app/models/content.rb +10 -39
  34. data/app/models/link.rb +0 -1
  35. data/app/models/password_mailer.rb +6 -9
  36. data/app/models/section.rb +6 -7
  37. data/app/models/site.rb +0 -2
  38. data/app/models/user.rb +1 -2
  39. data/app/views/activity_notifier/new_content_notification.html.erb +5 -5
  40. data/app/views/admin/activities/_activities.html.erb +4 -4
  41. data/app/views/admin/activities/_comment.html.erb +21 -21
  42. data/app/views/admin/activities/_content.html.erb +4 -3
  43. data/app/views/admin/activities/_topic.html.erb +5 -5
  44. data/app/views/admin/install/confirmation.html.erb +3 -3
  45. data/app/views/admin/install/index.html.erb +14 -14
  46. data/app/views/admin/page/articles/_form.html.erb +28 -25
  47. data/app/views/admin/page/articles/_options.html.erb +3 -4
  48. data/app/views/admin/page/articles/edit.html.erb +3 -3
  49. data/app/views/admin/page/articles/new.html.erb +4 -4
  50. data/app/views/admin/page/categories/edit.html.erb +9 -9
  51. data/app/views/admin/page/categories/index.html.erb +16 -16
  52. data/app/views/admin/page/categories/new.html.erb +5 -3
  53. data/app/views/admin/page/contents/index.html.erb +3 -18
  54. data/app/views/admin/page/links/_form.html.erb +17 -17
  55. data/app/views/admin/page/links/_options.html.erb +16 -19
  56. data/app/views/admin/page/links/edit.html.erb +3 -3
  57. data/app/views/admin/page/links/new.html.erb +3 -3
  58. data/app/views/admin/sections/_form.html.haml +5 -5
  59. data/app/views/admin/sections/edit.html.haml +2 -2
  60. data/app/views/admin/sections/index.html.erb +18 -18
  61. data/app/views/admin/sections/new.html.erb +15 -13
  62. data/app/views/admin/sections/settings/_page.html.haml +4 -6
  63. data/app/views/admin/shared/_header.html.erb +5 -4
  64. data/app/views/admin/shared/_section_tree.html.erb +2 -2
  65. data/app/views/admin/sites/_email_notifications.html.erb +6 -7
  66. data/app/views/admin/sites/_form.html.erb +7 -7
  67. data/app/views/admin/sites/_recent_users.html.erb +4 -2
  68. data/app/views/admin/sites/_unapproved_comments.html.erb +1 -1
  69. data/app/views/admin/sites/index.html.erb +1 -1
  70. data/app/views/admin/sites/new.html.erb +2 -2
  71. data/app/views/admin/sites/show.html.erb +7 -8
  72. data/app/views/admin/users/edit.html.erb +1 -1
  73. data/app/views/admin/users/index.html.erb +10 -10
  74. data/app/views/admin/users/new.html.erb +1 -1
  75. data/app/views/admin/users/show.html.erb +7 -7
  76. data/app/views/layouts/admin.html.haml +3 -5
  77. data/app/views/layouts/login.html.erb +1 -1
  78. data/app/views/password/edit.html.erb +12 -5
  79. data/app/views/password/new.html.erb +7 -7
  80. data/app/views/password_mailer/reset_password_email.html.erb +21 -1
  81. data/app/views/password_mailer/updated_password_email.html.erb +3 -1
  82. data/app/views/session/new.html.erb +9 -9
  83. data/app/views/shared/_flash.html.erb +2 -2
  84. data/app/views/shared/_sidebar.html.erb +2 -2
  85. data/config/initializers/ckeditor.rb +61 -0
  86. data/config/initializers/menus.rb +1 -1
  87. data/config/initializers/time_format.rb +2 -0
  88. data/lib/adva/authenticate_user.rb +193 -0
  89. data/lib/{active_record → adva}/belongs_to_author.rb +4 -4
  90. data/lib/adva/event.rb +34 -0
  91. data/lib/adva/extensible_forms.rb +285 -0
  92. data/lib/{has_options.rb → adva/has_options.rb} +5 -7
  93. data/lib/adva/has_permalink.rb +36 -0
  94. data/lib/adva/version.rb +1 -1
  95. data/lib/adva.rb +10 -36
  96. data/lib/rails_ext/action_controller/event_helper.rb +1 -1
  97. data/lib/rails_ext.rb +0 -9
  98. data/vendor/gems/cacheable_flash/.gitignore +8 -0
  99. data/vendor/gems/cacheable_flash/Gemfile +8 -0
  100. data/vendor/gems/cacheable_flash/README.md +35 -0
  101. data/vendor/gems/cacheable_flash/Rakefile +4 -0
  102. data/vendor/gems/cacheable_flash/bin/console +15 -0
  103. data/vendor/gems/cacheable_flash/bin/setup +8 -0
  104. data/vendor/gems/cacheable_flash/cacheable_flash.gemspec +38 -0
  105. data/vendor/gems/cacheable_flash/lib/cacheable_flash/controller.rb +29 -0
  106. data/vendor/gems/cacheable_flash/lib/cacheable_flash/javascript.js +19 -0
  107. data/vendor/gems/cacheable_flash/lib/cacheable_flash/middleware.rb +30 -0
  108. data/vendor/gems/cacheable_flash/lib/cacheable_flash/version.rb +5 -0
  109. data/vendor/gems/cacheable_flash/lib/cacheable_flash.rb +12 -0
  110. data/vendor/gems/simple_taggable/lib/tag_list.rb +1 -1
  111. data/vendor/gems/tags/lib/menu.rb +1 -1
  112. data/vendor/gems/tags/lib/tags/tag.rb +1 -1
  113. metadata +72 -145
  114. data/app/assets/javascripts/adva_cms/admin/jquery.admin.js +0 -23
  115. data/app/assets/javascripts/adva_cms/admin/jquery.article.js +0 -22
  116. data/app/assets/javascripts/adva_cms/admin/jquery.cached_pages.js +0 -14
  117. data/app/assets/javascripts/adva_cms/admin/jquery.table_tree.js +0 -7
  118. data/app/assets/javascripts/adva_cms/application.js +0 -13
  119. data/app/assets/javascripts/adva_cms/base.js +0 -4
  120. data/app/assets/javascripts/adva_cms/cookie.js +0 -49
  121. data/app/assets/javascripts/adva_cms/jquery/jquery-lowpro.js +0 -224
  122. data/app/assets/javascripts/adva_cms/jquery/jquery.qtip.js +0 -2085
  123. data/app/assets/javascripts/adva_cms/jquery/jquery.table_tree.js +0 -307
  124. data/app/assets/javascripts/adva_cms/jquery/jquery.tablednd_0_5.js +0 -386
  125. data/app/assets/javascripts/adva_cms/jquery.common.js +0 -41
  126. data/app/assets/javascripts/adva_cms/jquery.dates.js +0 -51
  127. data/app/assets/javascripts/adva_cms/jquery.flash.js +0 -59
  128. data/app/assets/javascripts/adva_cms/jquery.roles.js +0 -25
  129. data/app/assets/javascripts/adva_cms/json.js +0 -139
  130. data/app/controllers/admin/base_account_controller.rb +0 -13
  131. data/app/controllers/admin/install_controller.rb +0 -61
  132. data/app/controllers/admin/plugins_controller.rb +0 -38
  133. data/app/helpers/meta_tags_helper.rb +0 -30
  134. data/app/models/account.rb +0 -7
  135. data/app/models/event.rb +0 -34
  136. data/app/views/admin/articles/_meta_tags.html.erb +0 -7
  137. data/app/views/admin/cached_pages/_filter.html.erb +0 -8
  138. data/app/views/admin/cached_pages/destroy.js.erb +0 -18
  139. data/app/views/admin/cached_pages/index.html.erb +0 -26
  140. data/app/views/admin/plugins/_form.html.erb +0 -11
  141. data/app/views/admin/plugins/index.html.erb +0 -16
  142. data/app/views/admin/plugins/show.html.erb +0 -43
  143. data/app/views/admin/shared/_language_select.html.erb +0 -6
  144. data/app/views/admin/shared/_section_summary.html.erb +0 -23
  145. data/app/views/admin/sites/_meta_tags.html.erb +0 -15
  146. data/app/views/layouts/default.html.erb +0 -38
  147. data/app/views/layouts/simple.html.erb +0 -22
  148. data/app/views/shared/_footer.html.erb +0 -4
  149. data/app/views/shared/messages/insufficient_permissions.html.erb +0 -4
  150. data/config/initializers/article.rb +0 -8
  151. data/config/initializers/has_options.rb +0 -2
  152. data/config/initializers/has_permalink.rb +0 -2
  153. data/config/initializers/site.rb +0 -8
  154. data/config/locales/en.yml +0 -1319
  155. data/lib/action_controller/authenticate_anonymous.rb +0 -69
  156. data/lib/action_controller/authenticate_user.rb +0 -203
  157. data/lib/core_ext.rb +0 -7
  158. data/lib/extensible_forms.rb +0 -284
  159. data/lib/has_permalink.rb +0 -33
  160. data/lib/login/helper_integration.rb +0 -11
  161. data/lib/login/mail_config.rb +0 -39
  162. data/lib/rails_ext/action_controller/cacheable_flash.rb +0 -30
  163. data/lib/rails_ext/action_controller/content_for_assignments.rb +0 -106
  164. data/lib/rails_ext/action_controller/page_caching.rb +0 -23
  165. data/lib/rails_ext/action_controller/responds_to_parent.rb +0 -46
  166. data/lib/rails_ext/active_record/exists.rb +0 -5
  167. data/lib/rails_ext/active_record/sti_instantiation.rb +0 -35
  168. data/lib/rails_ext/active_record/sticky_changes.rb +0 -30
  169. data/lib/rails_ext/railties/plugin.rb +0 -58
  170. data/lib/rails_ext/railties/plugin_configuration.rb +0 -72
  171. data/lib/registry.rb +0 -49
  172. data/lib/tasks/translation.rake +0 -69
  173. data/lib/time_hacks.rb +0 -57
  174. data/lib/webrat_patch.rb +0 -11
  175. data/test/meta_tags_test.rb +0 -42
  176. data/vendor/gems/has_counter/.gitignore +0 -17
  177. data/vendor/gems/has_counter/Gemfile +0 -4
  178. data/vendor/gems/has_counter/LICENSE +0 -22
  179. data/vendor/gems/has_counter/MIT-LICENSE +0 -20
  180. data/vendor/gems/has_counter/README.markdown +0 -64
  181. data/vendor/gems/has_counter/README.md +0 -29
  182. data/vendor/gems/has_counter/Rakefile +0 -2
  183. data/vendor/gems/has_counter/db/migrate/20080601194338_create_counters_table.rb.rb +0 -13
  184. data/vendor/gems/has_counter/has_counter.gemspec +0 -17
  185. data/vendor/gems/has_counter/lib/active_record/has_counter.rb +0 -67
  186. data/vendor/gems/has_counter/lib/counter.rb +0 -23
  187. data/vendor/gems/has_counter/lib/has_counter/version.rb +0 -3
  188. data/vendor/gems/has_counter/lib/has_counter.rb +0 -4
  189. data/vendor/gems/has_counter/spec/has_counter.sqlite3.db +0 -0
  190. data/vendor/gems/has_counter/spec/has_counter_spec.rb +0 -55
  191. data/vendor/gems/has_counter/spec/spec_helper.rb +0 -117
  192. data/vendor/gems/has_filter/.gitignore +0 -17
  193. data/vendor/gems/has_filter/Gemfile +0 -4
  194. data/vendor/gems/has_filter/LICENSE +0 -22
  195. data/vendor/gems/has_filter/README.md +0 -29
  196. data/vendor/gems/has_filter/Rakefile +0 -2
  197. data/vendor/gems/has_filter/app/assets/images/has_filter/filter_add.png +0 -0
  198. data/vendor/gems/has_filter/app/assets/images/has_filter/filter_button_left.png +0 -0
  199. data/vendor/gems/has_filter/app/assets/images/has_filter/filter_button_right.png +0 -0
  200. data/vendor/gems/has_filter/app/assets/images/has_filter/filter_remove.png +0 -0
  201. data/vendor/gems/has_filter/app/assets/javascripts/has_filter/filter.js +0 -35
  202. data/vendor/gems/has_filter/app/assets/javascripts/has_filter/jquery.filter.js +0 -23
  203. data/vendor/gems/has_filter/app/assets/stylesheets/has_filter/alternate/filter.scss +0 -102
  204. data/vendor/gems/has_filter/app/assets/stylesheets/has_filter/filter.scss +0 -100
  205. data/vendor/gems/has_filter/app/helpers/filter_helper.rb +0 -3
  206. data/vendor/gems/has_filter/has_filter.gemspec +0 -17
  207. data/vendor/gems/has_filter/init.rb +0 -3
  208. data/vendor/gems/has_filter/lib/has_filter/active_record/act_macro.rb +0 -102
  209. data/vendor/gems/has_filter/lib/has_filter/filter/base.rb +0 -67
  210. data/vendor/gems/has_filter/lib/has_filter/filter/categorized.rb +0 -24
  211. data/vendor/gems/has_filter/lib/has_filter/filter/chain.rb +0 -45
  212. data/vendor/gems/has_filter/lib/has_filter/filter/set.rb +0 -80
  213. data/vendor/gems/has_filter/lib/has_filter/filter/state.rb +0 -25
  214. data/vendor/gems/has_filter/lib/has_filter/filter/tagged.rb +0 -22
  215. data/vendor/gems/has_filter/lib/has_filter/filter/text.rb +0 -55
  216. data/vendor/gems/has_filter/lib/has_filter/filter.rb +0 -17
  217. data/vendor/gems/has_filter/lib/has_filter/version.rb +0 -3
  218. data/vendor/gems/has_filter/lib/has_filter.rb +0 -22
  219. data/vendor/gems/has_filter/test/db/setup.rb +0 -45
  220. data/vendor/gems/has_filter/test/db/test.sqlite3.db +0 -0
  221. data/vendor/gems/has_filter/test/fixtures.rb +0 -15
  222. data/vendor/gems/has_filter/test/has_filter/filter_chain_test.rb +0 -41
  223. data/vendor/gems/has_filter/test/has_filter/filter_scopes_test.rb +0 -102
  224. data/vendor/gems/has_filter/test/has_filter/filter_tags_test.rb +0 -113
  225. data/vendor/gems/has_filter/test/has_filter/integration.rb +0 -15
  226. data/vendor/gems/has_filter/test/has_filter/scopes_test.rb +0 -48
  227. data/vendor/gems/has_filter/test/log/test.log +0 -34346
  228. data/vendor/gems/has_filter/test/models.rb +0 -23
  229. data/vendor/gems/has_filter/test/templates/has_filter/test/index.html.erb +0 -5
  230. data/vendor/gems/has_filter/test/test_helper.rb +0 -66
  231. data/vendor/gems/xss_terminate/.gitignore +0 -17
  232. data/vendor/gems/xss_terminate/Gemfile +0 -4
  233. data/vendor/gems/xss_terminate/LICENSE +0 -22
  234. data/vendor/gems/xss_terminate/MIT-LICENSE +0 -20
  235. data/vendor/gems/xss_terminate/README +0 -94
  236. data/vendor/gems/xss_terminate/README.md +0 -29
  237. data/vendor/gems/xss_terminate/Rakefile +0 -23
  238. data/vendor/gems/xss_terminate/lib/html5lib_sanitize.rb +0 -2453
  239. data/vendor/gems/xss_terminate/lib/rails_sanitize.rb +0 -8
  240. data/vendor/gems/xss_terminate/lib/xss_terminate/version.rb +0 -3
  241. data/vendor/gems/xss_terminate/lib/xss_terminate.rb +0 -141
  242. data/vendor/gems/xss_terminate/tasks/xss_terminate_tasks.rake +0 -7
  243. data/vendor/gems/xss_terminate/test/models/comment.rb +0 -5
  244. data/vendor/gems/xss_terminate/test/models/entry.rb +0 -7
  245. data/vendor/gems/xss_terminate/test/models/message.rb +0 -3
  246. data/vendor/gems/xss_terminate/test/models/person.rb +0 -5
  247. data/vendor/gems/xss_terminate/test/models/review.rb +0 -5
  248. data/vendor/gems/xss_terminate/test/schema.rb +0 -34
  249. data/vendor/gems/xss_terminate/test/setup_test.rb +0 -16
  250. data/vendor/gems/xss_terminate/test/xss_terminate_test.rb +0 -50
  251. data/vendor/gems/xss_terminate/xss_terminate.gemspec +0 -17
  252. /data/lib/tasks/{adva_cms.rake → adva.rake} +0 -0
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in cacheable_flash.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
@@ -0,0 +1,35 @@
1
+ # CacheableFlash
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cacheable_flash`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'cacheable_flash'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install cacheable_flash
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cacheable_flash.
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "cacheable_flash"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/cacheable_flash/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "cacheable_flash"
7
+ spec.version = CacheableFlash::VERSION
8
+ spec.authors = ["Micah Geisel"]
9
+ spec.email = ["micah@botandrose.com"]
10
+
11
+ spec.summary = "TODO: Write a short summary, because RubyGems requires one."
12
+ spec.description = "TODO: Write a longer description or delete this line."
13
+ spec.homepage = "TODO: Put your gem's website or public repo URL here."
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+
16
+ spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
17
+
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
20
+ spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
+ `git ls-files -z`.split("\x0").reject do |f|
26
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
27
+ end
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ # Uncomment to register a new dependency of your gem
34
+ # spec.add_dependency "example-gem", "~> 1.0"
35
+
36
+ # For more information and examples about making a new gem, checkout our
37
+ # guide at: https://bundler.io/guides/creating_gem.html
38
+ end
@@ -0,0 +1,29 @@
1
+ module CacheableFlash
2
+ module Controller
3
+ def self.included(base)
4
+ base.prepend_around_action :write_flash_to_cookie
5
+ end
6
+
7
+ def write_flash_to_cookie
8
+ yield self
9
+
10
+ cookie_flash = begin
11
+ JSON.parse(cookies["flash"] || "{}")
12
+ rescue JSON::ParserError
13
+ {}
14
+ end
15
+
16
+ flash.each do |key, value|
17
+ if cookie_flash[key.to_s].blank?
18
+ cookie_flash[key.to_s] = value
19
+ else
20
+ cookie_flash[key.to_s] << "<br/>#{value}" # TODO should be an array
21
+ end
22
+ end
23
+
24
+ cookies['flash'] = cookie_flash.to_json
25
+ flash.clear
26
+ end
27
+ end
28
+ end
29
+
@@ -0,0 +1,19 @@
1
+ document.addEventListener("DOMContentLoaded", () => {
2
+ const cookie = document.cookie.match(/(^|;)\\s*flash=([^;\\s]+)/)
3
+ if(!cookie) return
4
+ const data = JSON.parse(unescape(cookie[2]).replaceAll("+"," "))
5
+ document.cookie = 'flash=; path=/; expires=Sat, 01 Jan 2000 00:00:00 GMT;'
6
+
7
+ function show(type) {
8
+ const flash = document.querySelector('#flash_' + type)
9
+ const message = data[type]
10
+ if(flash && message) {
11
+ flash.innerHTML = message
12
+ flash.hidden = false
13
+ }
14
+ }
15
+
16
+ show('error')
17
+ show('alert')
18
+ show('notice')
19
+ })
@@ -0,0 +1,30 @@
1
+ module CacheableFlash
2
+ class Middleware
3
+ def initialize app
4
+ @app = app
5
+ end
6
+
7
+ def call env
8
+ status, headers, body = @app.call env
9
+ return [status, headers, body] unless headers["Content-Type"].try(:include?, "text/html")
10
+
11
+ new_body = ""
12
+ body.each { |part| new_body << part }
13
+ process! new_body
14
+ headers.delete("Content-Length")
15
+
16
+ [status, headers, [new_body]]
17
+ end
18
+
19
+ private
20
+
21
+ def process! body
22
+ body.gsub!("</head>", "<script>#{javascript}</script></head>")
23
+ end
24
+
25
+ def javascript
26
+ File.read(__dir__ + "/javascript.js")
27
+ end
28
+ end
29
+ end
30
+
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CacheableFlash
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "cacheable_flash/version"
4
+ require_relative "cacheable_flash/middleware"
5
+ require_relative "cacheable_flash/controller"
6
+
7
+ module CacheableFlash
8
+ class Engine < ::Rails::Engine
9
+ config.app_middleware.use Middleware
10
+ ActionController::Base.include(Controller)
11
+ end
12
+ end
@@ -60,7 +60,7 @@ class TagList < Array
60
60
 
61
61
  map do |name|
62
62
  name.include?(delimiter) ? "\"#{name}\"" : name
63
- end.join(delimiter.ends_with?(" ") ? delimiter : "#{delimiter} ")
63
+ end.join(delimiter.end_with?(" ") ? delimiter : "#{delimiter} ")
64
64
  end
65
65
 
66
66
  private
@@ -108,7 +108,7 @@ module Menu
108
108
  end
109
109
 
110
110
  def text
111
- @text ||= key.is_a?(Symbol) ? I18n.t(key, :scope => :'adva.titles') : key
111
+ @text ||= key.is_a?(Symbol) ? key.to_s.titleize : key
112
112
  end
113
113
 
114
114
  def content
@@ -85,7 +85,7 @@ module Tags
85
85
  end
86
86
 
87
87
  def content=(content)
88
- @content = content.is_a?(Symbol) ? I18n.t(content) : content
88
+ @content = content.is_a?(Symbol) ? content.to_s.titleize : content
89
89
  end
90
90
 
91
91
  def tag_name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adva
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-06 00:00:00.000000000 Z
11
+ date: 2024-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: ckeditor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: nacelle
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: friendly_id
43
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +108,20 @@ dependencies:
80
108
  - - ">="
81
109
  - !ruby/object:Gem::Version
82
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: jquery-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
83
125
  description: Adva CMS
84
126
  email:
85
127
  - micah@botandrose.com
@@ -94,6 +136,7 @@ files:
94
136
  - README
95
137
  - Rakefile
96
138
  - adva.gemspec
139
+ - app/assets/config/manifest.js
97
140
  - app/assets/images/adva_cms/admin/header_bg.png
98
141
  - app/assets/images/adva_cms/admin/section_menu_bg.png
99
142
  - app/assets/images/adva_cms/admin/tab_action_active.png
@@ -195,22 +238,11 @@ files:
195
238
  - app/assets/images/adva_cms/sortable_tree/drag.png
196
239
  - app/assets/images/adva_cms/theme_selected.png
197
240
  - app/assets/javascripts/admin.js
198
- - app/assets/javascripts/adva_cms/admin/jquery.admin.js
199
- - app/assets/javascripts/adva_cms/admin/jquery.article.js
200
- - app/assets/javascripts/adva_cms/admin/jquery.cached_pages.js
201
- - app/assets/javascripts/adva_cms/admin/jquery.table_tree.js
202
- - app/assets/javascripts/adva_cms/application.js
203
- - app/assets/javascripts/adva_cms/base.js
204
- - app/assets/javascripts/adva_cms/cookie.js
205
- - app/assets/javascripts/adva_cms/jquery.common.js
206
- - app/assets/javascripts/adva_cms/jquery.dates.js
207
- - app/assets/javascripts/adva_cms/jquery.flash.js
208
- - app/assets/javascripts/adva_cms/jquery.roles.js
209
- - app/assets/javascripts/adva_cms/jquery/jquery-lowpro.js
210
- - app/assets/javascripts/adva_cms/jquery/jquery.qtip.js
211
- - app/assets/javascripts/adva_cms/jquery/jquery.table_tree.js
212
- - app/assets/javascripts/adva_cms/jquery/jquery.tablednd_0_5.js
213
- - app/assets/javascripts/adva_cms/json.js
241
+ - app/assets/javascripts/adva_cms.js
242
+ - app/assets/javascripts/adva_cms/ckeditor.js.erb
243
+ - app/assets/javascripts/adva_cms/concat_main_menus.js
244
+ - app/assets/javascripts/adva_cms/jquery.table_tree.js
245
+ - app/assets/javascripts/ckeditor/config.js.erb
214
246
  - app/assets/stylesheets/admin.scss
215
247
  - app/assets/stylesheets/adva_cms/admin.scss
216
248
  - app/assets/stylesheets/adva_cms/admin/activities.scss
@@ -257,16 +289,13 @@ files:
257
289
  - app/assets/stylesheets/adva_cms/layout/simple.scss
258
290
  - app/assets/stylesheets/adva_cms/menu.scss
259
291
  - app/assets/stylesheets/adva_cms/reset.scss
260
- - app/controllers/admin/base_account_controller.rb
261
292
  - app/controllers/admin/base_controller.rb
262
293
  - app/controllers/admin/categories_controller.rb
263
- - app/controllers/admin/install_controller.rb
264
294
  - app/controllers/admin/page/articles_controller.rb
265
295
  - app/controllers/admin/page/categories_controller.rb
266
296
  - app/controllers/admin/page/contents_controller.rb
267
297
  - app/controllers/admin/page/links_controller.rb
268
298
  - app/controllers/admin/pages_controller.rb
269
- - app/controllers/admin/plugins_controller.rb
270
299
  - app/controllers/admin/sections_controller.rb
271
300
  - app/controllers/admin/sites_controller.rb
272
301
  - app/controllers/admin/users_controller.rb
@@ -278,17 +307,14 @@ files:
278
307
  - app/helpers/admin/base_helper.rb
279
308
  - app/helpers/base_helper.rb
280
309
  - app/helpers/content_helper.rb
281
- - app/helpers/meta_tags_helper.rb
282
310
  - app/helpers/resource_helper.rb
283
311
  - app/helpers/users_helper.rb
284
- - app/models/account.rb
285
312
  - app/models/activity.rb
286
313
  - app/models/activity_notifier.rb
287
314
  - app/models/article.rb
288
315
  - app/models/categorization.rb
289
316
  - app/models/category.rb
290
317
  - app/models/content.rb
291
- - app/models/event.rb
292
318
  - app/models/link.rb
293
319
  - app/models/membership.rb
294
320
  - app/models/page.rb
@@ -306,10 +332,6 @@ files:
306
332
  - app/views/admin/activities/_comment.html.erb
307
333
  - app/views/admin/activities/_content.html.erb
308
334
  - app/views/admin/activities/_topic.html.erb
309
- - app/views/admin/articles/_meta_tags.html.erb
310
- - app/views/admin/cached_pages/_filter.html.erb
311
- - app/views/admin/cached_pages/destroy.js.erb
312
- - app/views/admin/cached_pages/index.html.erb
313
335
  - app/views/admin/install/confirmation.html.erb
314
336
  - app/views/admin/install/index.html.erb
315
337
  - app/views/admin/page/articles/_form.html.erb
@@ -324,22 +346,16 @@ files:
324
346
  - app/views/admin/page/links/_options.html.erb
325
347
  - app/views/admin/page/links/edit.html.erb
326
348
  - app/views/admin/page/links/new.html.erb
327
- - app/views/admin/plugins/_form.html.erb
328
- - app/views/admin/plugins/index.html.erb
329
- - app/views/admin/plugins/show.html.erb
330
349
  - app/views/admin/sections/_form.html.haml
331
350
  - app/views/admin/sections/edit.html.haml
332
351
  - app/views/admin/sections/index.html.erb
333
352
  - app/views/admin/sections/new.html.erb
334
353
  - app/views/admin/sections/settings/_page.html.haml
335
354
  - app/views/admin/shared/_header.html.erb
336
- - app/views/admin/shared/_language_select.html.erb
337
355
  - app/views/admin/shared/_section.html.erb
338
- - app/views/admin/shared/_section_summary.html.erb
339
356
  - app/views/admin/shared/_section_tree.html.erb
340
357
  - app/views/admin/sites/_email_notifications.html.erb
341
358
  - app/views/admin/sites/_form.html.erb
342
- - app/views/admin/sites/_meta_tags.html.erb
343
359
  - app/views/admin/sites/_recent_users.html.erb
344
360
  - app/views/admin/sites/_sections.html.erb
345
361
  - app/views/admin/sites/_unapproved_comments.html.erb
@@ -356,9 +372,7 @@ files:
356
372
  - app/views/admin/users/show.html.erb
357
373
  - app/views/categories/_checkboxes.html.erb
358
374
  - app/views/layouts/admin.html.haml
359
- - app/views/layouts/default.html.erb
360
375
  - app/views/layouts/login.html.erb
361
- - app/views/layouts/simple.html.erb
362
376
  - app/views/pages/articles/index.html.erb
363
377
  - app/views/pages/articles/show.html.erb
364
378
  - app/views/password/edit.html.erb
@@ -367,20 +381,15 @@ files:
367
381
  - app/views/password_mailer/updated_password_email.html.erb
368
382
  - app/views/session/new.html.erb
369
383
  - app/views/shared/_flash.html.erb
370
- - app/views/shared/_footer.html.erb
371
384
  - app/views/shared/_menu.html.erb
372
385
  - app/views/shared/_sidebar.html.erb
373
- - app/views/shared/messages/insufficient_permissions.html.erb
374
386
  - config/environment.rb
375
- - config/initializers/article.rb
376
- - config/initializers/has_options.rb
377
- - config/initializers/has_permalink.rb
387
+ - config/initializers/ckeditor.rb
378
388
  - config/initializers/mailer.rb
379
389
  - config/initializers/menus.rb
380
390
  - config/initializers/settings.rb
381
- - config/initializers/site.rb
391
+ - config/initializers/time_format.rb
382
392
  - config/initializers/translations_are_a_pain.rb
383
- - config/locales/en.yml
384
393
  - config/routes.rb
385
394
  - db/migrate/20080401000000_create_activities_table.rb
386
395
  - db/migrate/20080401000001_create_sites_table.rb
@@ -414,36 +423,20 @@ files:
414
423
  - doc/git_tips.txt
415
424
  - doc/notes.txt
416
425
  - doc/testing.txt
417
- - lib/action_controller/authenticate_anonymous.rb
418
- - lib/action_controller/authenticate_user.rb
419
- - lib/active_record/belongs_to_author.rb
420
426
  - lib/adva.rb
427
+ - lib/adva/authenticate_user.rb
428
+ - lib/adva/belongs_to_author.rb
429
+ - lib/adva/event.rb
430
+ - lib/adva/extensible_forms.rb
431
+ - lib/adva/has_options.rb
432
+ - lib/adva/has_permalink.rb
421
433
  - lib/adva/version.rb
422
- - lib/core_ext.rb
423
- - lib/extensible_forms.rb
424
- - lib/has_options.rb
425
- - lib/has_permalink.rb
426
- - lib/login/helper_integration.rb
427
- - lib/login/mail_config.rb
428
434
  - lib/rails_ext.rb
429
- - lib/rails_ext/action_controller/cacheable_flash.rb
430
- - lib/rails_ext/action_controller/content_for_assignments.rb
431
435
  - lib/rails_ext/action_controller/default_params.rb
432
436
  - lib/rails_ext/action_controller/event_helper.rb
433
- - lib/rails_ext/action_controller/page_caching.rb
434
437
  - lib/rails_ext/action_controller/render_with_error_proc.rb
435
- - lib/rails_ext/action_controller/responds_to_parent.rb
436
438
  - lib/rails_ext/action_controller/url_for_returning.rb
437
- - lib/rails_ext/active_record/exists.rb
438
- - lib/rails_ext/active_record/sti_instantiation.rb
439
- - lib/rails_ext/active_record/sticky_changes.rb
440
- - lib/rails_ext/railties/plugin.rb
441
- - lib/rails_ext/railties/plugin_configuration.rb
442
- - lib/registry.rb
443
- - lib/tasks/adva_cms.rake
444
- - lib/tasks/translation.rake
445
- - lib/time_hacks.rb
446
- - lib/webrat_patch.rb
439
+ - lib/tasks/adva.rake
447
440
  - locale/rails/fr.yml
448
441
  - test/NOTES
449
442
  - test/adva_user_contexts.rb
@@ -526,7 +519,6 @@ files:
526
519
  - test/matchy/test/test_modals.rb
527
520
  - test/matchy/test/test_operator_expectations.rb
528
521
  - test/matchy/test/test_truth_expectations.rb
529
- - test/meta_tags_test.rb
530
522
  - test/no_peeping_toms/README
531
523
  - test/no_peeping_toms/init.rb
532
524
  - test/no_peeping_toms/install.rb
@@ -989,6 +981,18 @@ files:
989
981
  - vendor/gems/belongs_to_cacheable/lib/belongs_to_cacheable/version.rb
990
982
  - vendor/gems/belongs_to_cacheable/spec/belongs_to_cacheable_spec.rb
991
983
  - vendor/gems/belongs_to_cacheable/spec/spec_helper.rb
984
+ - vendor/gems/cacheable_flash/.gitignore
985
+ - vendor/gems/cacheable_flash/Gemfile
986
+ - vendor/gems/cacheable_flash/README.md
987
+ - vendor/gems/cacheable_flash/Rakefile
988
+ - vendor/gems/cacheable_flash/bin/console
989
+ - vendor/gems/cacheable_flash/bin/setup
990
+ - vendor/gems/cacheable_flash/cacheable_flash.gemspec
991
+ - vendor/gems/cacheable_flash/lib/cacheable_flash.rb
992
+ - vendor/gems/cacheable_flash/lib/cacheable_flash/controller.rb
993
+ - vendor/gems/cacheable_flash/lib/cacheable_flash/javascript.js
994
+ - vendor/gems/cacheable_flash/lib/cacheable_flash/middleware.rb
995
+ - vendor/gems/cacheable_flash/lib/cacheable_flash/version.rb
992
996
  - vendor/gems/filtered_column/.gitignore
993
997
  - vendor/gems/filtered_column/Gemfile
994
998
  - vendor/gems/filtered_column/LICENSE
@@ -1008,61 +1012,6 @@ files:
1008
1012
  - vendor/gems/filtered_column/test/abstract_unit.rb
1009
1013
  - vendor/gems/filtered_column/test/filtered_column_test.rb
1010
1014
  - vendor/gems/filtered_column/test/macro_filter_test.rb
1011
- - vendor/gems/has_counter/.gitignore
1012
- - vendor/gems/has_counter/Gemfile
1013
- - vendor/gems/has_counter/LICENSE
1014
- - vendor/gems/has_counter/MIT-LICENSE
1015
- - vendor/gems/has_counter/README.markdown
1016
- - vendor/gems/has_counter/README.md
1017
- - vendor/gems/has_counter/Rakefile
1018
- - vendor/gems/has_counter/db/migrate/20080601194338_create_counters_table.rb.rb
1019
- - vendor/gems/has_counter/has_counter.gemspec
1020
- - vendor/gems/has_counter/lib/active_record/has_counter.rb
1021
- - vendor/gems/has_counter/lib/counter.rb
1022
- - vendor/gems/has_counter/lib/has_counter.rb
1023
- - vendor/gems/has_counter/lib/has_counter/version.rb
1024
- - vendor/gems/has_counter/spec/has_counter.sqlite3.db
1025
- - vendor/gems/has_counter/spec/has_counter_spec.rb
1026
- - vendor/gems/has_counter/spec/spec_helper.rb
1027
- - vendor/gems/has_filter/.gitignore
1028
- - vendor/gems/has_filter/Gemfile
1029
- - vendor/gems/has_filter/LICENSE
1030
- - vendor/gems/has_filter/README.md
1031
- - vendor/gems/has_filter/Rakefile
1032
- - vendor/gems/has_filter/app/assets/images/has_filter/filter_add.png
1033
- - vendor/gems/has_filter/app/assets/images/has_filter/filter_button_left.png
1034
- - vendor/gems/has_filter/app/assets/images/has_filter/filter_button_right.png
1035
- - vendor/gems/has_filter/app/assets/images/has_filter/filter_remove.png
1036
- - vendor/gems/has_filter/app/assets/javascripts/has_filter/filter.js
1037
- - vendor/gems/has_filter/app/assets/javascripts/has_filter/jquery.filter.js
1038
- - vendor/gems/has_filter/app/assets/stylesheets/has_filter/alternate/filter.scss
1039
- - vendor/gems/has_filter/app/assets/stylesheets/has_filter/filter.scss
1040
- - vendor/gems/has_filter/app/helpers/filter_helper.rb
1041
- - vendor/gems/has_filter/has_filter.gemspec
1042
- - vendor/gems/has_filter/init.rb
1043
- - vendor/gems/has_filter/lib/has_filter.rb
1044
- - vendor/gems/has_filter/lib/has_filter/active_record/act_macro.rb
1045
- - vendor/gems/has_filter/lib/has_filter/filter.rb
1046
- - vendor/gems/has_filter/lib/has_filter/filter/base.rb
1047
- - vendor/gems/has_filter/lib/has_filter/filter/categorized.rb
1048
- - vendor/gems/has_filter/lib/has_filter/filter/chain.rb
1049
- - vendor/gems/has_filter/lib/has_filter/filter/set.rb
1050
- - vendor/gems/has_filter/lib/has_filter/filter/state.rb
1051
- - vendor/gems/has_filter/lib/has_filter/filter/tagged.rb
1052
- - vendor/gems/has_filter/lib/has_filter/filter/text.rb
1053
- - vendor/gems/has_filter/lib/has_filter/version.rb
1054
- - vendor/gems/has_filter/test/db/setup.rb
1055
- - vendor/gems/has_filter/test/db/test.sqlite3.db
1056
- - vendor/gems/has_filter/test/fixtures.rb
1057
- - vendor/gems/has_filter/test/has_filter/filter_chain_test.rb
1058
- - vendor/gems/has_filter/test/has_filter/filter_scopes_test.rb
1059
- - vendor/gems/has_filter/test/has_filter/filter_tags_test.rb
1060
- - vendor/gems/has_filter/test/has_filter/integration.rb
1061
- - vendor/gems/has_filter/test/has_filter/scopes_test.rb
1062
- - vendor/gems/has_filter/test/log/test.log
1063
- - vendor/gems/has_filter/test/models.rb
1064
- - vendor/gems/has_filter/test/templates/has_filter/test/index.html.erb
1065
- - vendor/gems/has_filter/test/test_helper.rb
1066
1015
  - vendor/gems/simple_taggable/.gitignore
1067
1016
  - vendor/gems/simple_taggable/Gemfile
1068
1017
  - vendor/gems/simple_taggable/LICENSE
@@ -1131,27 +1080,6 @@ files:
1131
1080
  - vendor/gems/tags/test/tags/menu_test.rb
1132
1081
  - vendor/gems/tags/test/tags/tag_test.rb
1133
1082
  - vendor/gems/tags/test/test_helper.rb
1134
- - vendor/gems/xss_terminate/.gitignore
1135
- - vendor/gems/xss_terminate/Gemfile
1136
- - vendor/gems/xss_terminate/LICENSE
1137
- - vendor/gems/xss_terminate/MIT-LICENSE
1138
- - vendor/gems/xss_terminate/README
1139
- - vendor/gems/xss_terminate/README.md
1140
- - vendor/gems/xss_terminate/Rakefile
1141
- - vendor/gems/xss_terminate/lib/html5lib_sanitize.rb
1142
- - vendor/gems/xss_terminate/lib/rails_sanitize.rb
1143
- - vendor/gems/xss_terminate/lib/xss_terminate.rb
1144
- - vendor/gems/xss_terminate/lib/xss_terminate/version.rb
1145
- - vendor/gems/xss_terminate/tasks/xss_terminate_tasks.rake
1146
- - vendor/gems/xss_terminate/test/models/comment.rb
1147
- - vendor/gems/xss_terminate/test/models/entry.rb
1148
- - vendor/gems/xss_terminate/test/models/message.rb
1149
- - vendor/gems/xss_terminate/test/models/person.rb
1150
- - vendor/gems/xss_terminate/test/models/review.rb
1151
- - vendor/gems/xss_terminate/test/schema.rb
1152
- - vendor/gems/xss_terminate/test/setup_test.rb
1153
- - vendor/gems/xss_terminate/test/xss_terminate_test.rb
1154
- - vendor/gems/xss_terminate/xss_terminate.gemspec
1155
1083
  homepage: ''
1156
1084
  licenses: []
1157
1085
  metadata: {}
@@ -1170,7 +1098,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1170
1098
  - !ruby/object:Gem::Version
1171
1099
  version: '0'
1172
1100
  requirements: []
1173
- rubygems_version: 3.1.6
1101
+ rubygems_version: 3.2.32
1174
1102
  signing_key:
1175
1103
  specification_version: 4
1176
1104
  summary: cutting edge cms, blog, wiki, forum
@@ -1256,7 +1184,6 @@ test_files:
1256
1184
  - test/matchy/test/test_modals.rb
1257
1185
  - test/matchy/test/test_operator_expectations.rb
1258
1186
  - test/matchy/test/test_truth_expectations.rb
1259
- - test/meta_tags_test.rb
1260
1187
  - test/no_peeping_toms/README
1261
1188
  - test/no_peeping_toms/init.rb
1262
1189
  - test/no_peeping_toms/install.rb
@@ -1,23 +0,0 @@
1
- $(document).ready(function() {
2
- $('div.tabs li a').click(function() {
3
- div = $(this).closest('div');
4
- $('div.active, li.active', div).removeClass('active')
5
- // activate selected tab and tab content
6
- $(this).closest('li').addClass('active');
7
- selected = '#tab_' + $(this).attr('href').replace('#', '');
8
- $(selected).addClass('active');
9
- });
10
- });
11
-
12
- // concatenate successive sites main menus together. this allows for extension in other engines. pretty lame.
13
- $(function() {
14
- var first = null;
15
- $("#top > .main").each(function(index) {
16
- if(index == 0) {
17
- first = this;
18
- } else {
19
- $(first).append(this.innerHTML);
20
- $(this).remove();
21
- }
22
- });
23
- });