typus 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/.gitignore +15 -0
- data/Gemfile +9 -5
- data/Rakefile +34 -21
- data/app/controllers/admin/base_controller.rb +0 -4
- data/app/controllers/admin/resources_controller.rb +77 -213
- data/app/controllers/admin/session_controller.rb +1 -1
- data/app/helpers/admin/base_helper.rb +4 -4
- data/app/helpers/admin/dashboard_helper.rb +1 -3
- data/app/helpers/admin/display_helper.rb +49 -0
- data/app/helpers/admin/file_preview_helper.rb +10 -12
- data/app/helpers/admin/filters_helper.rb +1 -1
- data/app/helpers/admin/form_helper.rb +2 -13
- data/app/helpers/admin/list_helper.rb +14 -3
- data/app/helpers/admin/relationships_helper.rb +79 -62
- data/app/helpers/admin/resources_helper.rb +17 -16
- data/app/helpers/admin/search_helper.rb +1 -1
- data/app/helpers/admin/sidebar_helper.rb +1 -2
- data/app/helpers/admin/table_helper.rb +9 -4
- data/app/views/admin/helpers/_file_preview.html.erb +1 -1
- data/app/views/admin/helpers/base/_apps.html.erb +23 -0
- data/app/views/admin/helpers/{_flash_message.html.erb → base/_flash_message.html.erb} +0 -0
- data/app/views/admin/helpers/{_header.html.erb → base/_header.html.erb} +0 -0
- data/app/views/admin/helpers/{_login_info.html.erb → base/_login_info.html.erb} +0 -0
- data/app/views/admin/helpers/resources/_display_link_to_previous.html.erb +1 -1
- data/app/views/admin/resources/show.html.erb +4 -27
- data/app/views/admin/templates/_belongs_to_with_autocomplete.html.erb +11 -0
- data/app/views/admin/templates/_has_n.html.erb +1 -1
- data/app/views/admin/templates/_has_one.html.erb +3 -3
- data/app/views/admin/templates/_relate_form.html.erb +1 -1
- data/app/views/admin/templates/_relate_form_with_autocomplete.html.erb +24 -0
- data/app/views/layouts/admin/base.html.erb +15 -9
- data/app/views/layouts/admin/headless.html.erb +44 -0
- data/app/views/layouts/admin/session.html.erb +3 -2
- data/doc/hudson_setup.md +19 -0
- data/lib/generators/typus/assets_generator.rb +0 -4
- data/lib/generators/typus/config_generator.rb +107 -0
- data/lib/generators/typus/controller_generator.rb +0 -4
- data/lib/generators/typus/initializers_generator.rb +22 -0
- data/lib/generators/typus/migration_generator.rb +0 -4
- data/lib/generators/typus/typus_generator.rb +8 -101
- data/lib/generators/typus/views_generator.rb +0 -4
- data/lib/support/active_record.rb +8 -2
- data/lib/support/fake_user.rb +2 -0
- data/lib/support/hash.rb +1 -1
- data/lib/support/string.rb +3 -3
- data/lib/tasks/typus.rake +1 -1
- data/lib/typus.rb +15 -6
- data/lib/typus/controller/actions.rb +69 -0
- data/lib/typus/controller/associations.rb +82 -0
- data/lib/typus/controller/autocomplete.rb +16 -0
- data/lib/typus/controller/filters.rb +24 -0
- data/lib/typus/controller/format.rb +70 -0
- data/lib/typus/orm/active_record.rb +9 -240
- data/lib/typus/orm/active_record/class_methods.rb +227 -0
- data/lib/typus/orm/active_record/instance_methods.rb +13 -0
- data/lib/typus/orm/active_record/search.rb +17 -5
- data/lib/typus/orm/active_record/user.rb +157 -0
- data/lib/typus/regex.rb +11 -0
- data/lib/typus/version.rb +1 -1
- data/test/app/controllers/admin/account_controller_test.rb +104 -0
- data/test/app/controllers/admin/assets_controller_test.rb +153 -0
- data/test/app/controllers/admin/base_controller_test.rb +41 -0
- data/test/app/controllers/admin/birds_controller_test.rb +42 -0
- data/test/app/controllers/admin/cases_controller_test.rb +21 -0
- data/test/app/controllers/admin/categories_controller_test.rb +141 -0
- data/test/app/controllers/admin/comments_controller_test.rb +79 -0
- data/test/app/controllers/admin/dashboard_controller_test.rb +162 -0
- data/test/app/controllers/admin/image_holders_controller_test.rb +75 -0
- data/test/app/controllers/admin/invoices_controller_test.rb +78 -0
- data/test/app/controllers/admin/orders_controller_test.rb +18 -0
- data/test/app/controllers/admin/pages_controller_test.rb +37 -0
- data/test/app/controllers/admin/posts_controller_test.rb +745 -0
- data/test/app/controllers/admin/projects_controller_test.rb +52 -0
- data/test/app/controllers/admin/session_controller_test.rb +92 -0
- data/test/app/controllers/admin/status_controller_test.rb +54 -0
- data/test/app/controllers/admin/typus_users_controller_test.rb +160 -0
- data/test/app/controllers/admin/users_controller_test.rb +106 -0
- data/test/app/helpers/admin/base_helper_test.rb +83 -0
- data/test/app/helpers/admin/dashboard_helper_test.rb +32 -0
- data/test/app/helpers/admin/file_preview_helper_test.rb +82 -0
- data/test/app/helpers/admin/filters_helper_test.rb +161 -0
- data/test/app/helpers/admin/form_helper_test.rb +126 -0
- data/test/app/helpers/admin/list_helper_test.rb +59 -0
- data/test/app/helpers/admin/relationships_helper_test.rb +19 -0
- data/test/app/helpers/admin/resources_helper_test.rb +46 -0
- data/test/app/helpers/admin/search_helper_test.rb +60 -0
- data/test/app/helpers/admin/sidebar_helper_test.rb +34 -0
- data/test/app/helpers/admin/table_helper_test.rb +215 -0
- data/test/app/mailers/admin/mailer_test.rb +32 -0
- data/test/app/models/typus_user_roles_test.rb +124 -0
- data/test/app/models/typus_user_test.rb +194 -0
- data/test/config/routes_test.rb +29 -0
- data/test/factories.rb +111 -0
- data/test/fixtures/config/broken/application.yml +68 -0
- data/test/fixtures/config/broken/application_roles.yml +20 -0
- data/test/fixtures/config/broken/empty.yml +0 -0
- data/test/fixtures/config/broken/empty_roles.yml +0 -0
- data/test/fixtures/config/broken/undefined.yml +3 -0
- data/test/fixtures/config/broken/undefined_roles.yml +6 -0
- data/test/fixtures/config/default/typus.yml +13 -0
- data/test/fixtures/config/default/typus_roles.yml +2 -0
- data/test/fixtures/config/empty/empty_01.yml +0 -0
- data/test/fixtures/config/empty/empty_01_roles.yml +0 -0
- data/test/fixtures/config/empty/empty_02.yml +0 -0
- data/test/fixtures/config/empty/empty_02_roles.yml +0 -0
- data/test/fixtures/config/locales/es.yml +10 -0
- data/test/fixtures/config/namespaced/application.yml +5 -0
- data/test/fixtures/config/namespaced/application_roles.yml +2 -0
- data/test/fixtures/config/ordered/001_roles.yml +2 -0
- data/test/fixtures/config/ordered/002_roles.yml +2 -0
- data/test/fixtures/config/unordered/app_one_roles.yml +2 -0
- data/test/fixtures/config/unordered/app_two_roles.yml +2 -0
- data/test/fixtures/rails_app/.gitignore +4 -0
- data/test/fixtures/rails_app/Capfile +6 -0
- data/test/fixtures/rails_app/README +256 -0
- data/test/fixtures/rails_app/Rakefile +7 -0
- data/test/fixtures/rails_app/app/controllers/admin/animals_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/articles_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/assets_controller.rb +51 -0
- data/test/fixtures/rails_app/app/controllers/admin/birds_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/cases_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/categories_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/comments_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/dogs_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/entries_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/image_holders_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/invoices_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/orders_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/pages_controller.rb +7 -0
- data/test/fixtures/rails_app/app/controllers/admin/posts_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/project_collaborators_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/projects_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/status_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/typus_users_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/users_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/views_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/admin/watch_dog_controller.rb +2 -0
- data/test/fixtures/rails_app/app/controllers/application_controller.rb +3 -0
- data/test/fixtures/rails_app/app/helpers/application_helper.rb +2 -0
- data/test/fixtures/rails_app/app/helpers/form_helper.rb +3 -0
- data/test/fixtures/rails_app/app/models/animal.rb +21 -0
- data/test/fixtures/rails_app/app/models/article.rb +10 -0
- data/test/fixtures/rails_app/app/models/asset.rb +39 -0
- data/test/fixtures/rails_app/app/models/bird.rb +2 -0
- data/test/fixtures/rails_app/app/models/case.rb +2 -0
- data/test/fixtures/rails_app/app/models/category.rb +31 -0
- data/test/fixtures/rails_app/app/models/comment.rb +17 -0
- data/test/fixtures/rails_app/app/models/delayed/task.rb +5 -0
- data/test/fixtures/rails_app/app/models/dog.rb +2 -0
- data/test/fixtures/rails_app/app/models/entry.rb +23 -0
- data/test/fixtures/rails_app/app/models/image_holder.rb +21 -0
- data/test/fixtures/rails_app/app/models/invoice.rb +10 -0
- data/test/fixtures/rails_app/app/models/order.rb +9 -0
- data/test/fixtures/rails_app/app/models/page.rb +24 -0
- data/test/fixtures/rails_app/app/models/post.rb +32 -0
- data/test/fixtures/rails_app/app/models/project.rb +17 -0
- data/test/fixtures/rails_app/app/models/project_collaborator.rb +16 -0
- data/test/fixtures/rails_app/app/models/typus_user.rb +22 -0
- data/test/fixtures/rails_app/app/models/user.rb +10 -0
- data/test/fixtures/rails_app/app/models/view.rb +17 -0
- data/test/fixtures/rails_app/app/views/admin/assets/_index.html.erb +3 -0
- data/test/fixtures/rails_app/app/views/admin/cases/_index.html.erb +3 -0
- data/test/fixtures/rails_app/app/views/admin/categories/_index.html.erb +3 -0
- data/test/fixtures/rails_app/app/views/admin/dashboard/_sidebar.html.erb +11 -0
- data/test/fixtures/rails_app/app/views/admin/entries/_index.html.erb +3 -0
- data/test/fixtures/rails_app/app/views/admin/pages/_index.html.erb +3 -0
- data/test/fixtures/rails_app/app/views/admin/posts/_edit.html.erb +1 -0
- data/test/fixtures/rails_app/app/views/admin/posts/_index.html.erb +5 -0
- data/test/fixtures/rails_app/app/views/admin/posts/_new.html.erb +1 -0
- data/test/fixtures/rails_app/app/views/admin/posts/_show.html.erb +1 -0
- data/test/fixtures/rails_app/app/views/admin/resources/_sidebar.html.erb +1 -0
- data/test/fixtures/rails_app/app/views/admin/status/index.html.erb +9 -0
- data/test/fixtures/rails_app/app/views/admin/templates/_datepicker.html.erb +1 -0
- data/test/fixtures/rails_app/app/views/admin/watch_dog/index.html.erb +9 -0
- data/test/fixtures/rails_app/app/views/layouts/admin/headless.html.erb +38 -0
- data/test/fixtures/rails_app/config.ru +4 -0
- data/test/fixtures/rails_app/config/application.rb +44 -0
- data/test/fixtures/rails_app/config/boot.rb +13 -0
- data/test/fixtures/rails_app/config/database.yml +34 -0
- data/test/fixtures/rails_app/config/deploy.rb +32 -0
- data/test/fixtures/rails_app/config/environment.rb +5 -0
- data/test/fixtures/rails_app/config/environments/development.rb +32 -0
- data/test/fixtures/rails_app/config/environments/production.rb +54 -0
- data/test/fixtures/rails_app/config/environments/test.rb +40 -0
- data/test/fixtures/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/fixtures/rails_app/config/initializers/dragonfly.rb +1 -0
- data/test/fixtures/rails_app/config/initializers/inflections.rb +12 -0
- data/test/fixtures/rails_app/config/initializers/mime_types.rb +5 -0
- data/test/fixtures/rails_app/config/initializers/secret_token.rb +7 -0
- data/test/fixtures/rails_app/config/initializers/session_store.rb +8 -0
- data/test/fixtures/rails_app/config/initializers/typus.rb +5 -0
- data/test/fixtures/rails_app/config/initializers/typus_resources.rb +27 -0
- data/test/fixtures/rails_app/config/locales/en.yml +5 -0
- data/test/fixtures/rails_app/config/routes.rb +61 -0
- data/test/fixtures/rails_app/config/typus/README +68 -0
- data/test/fixtures/rails_app/config/typus/crud_basic.yml +10 -0
- data/test/fixtures/rails_app/config/typus/crud_basic_roles.yml +2 -0
- data/test/fixtures/rails_app/config/typus/crud_extended.yml +64 -0
- data/test/fixtures/rails_app/config/typus/crud_extended_roles.yml +18 -0
- data/test/fixtures/rails_app/config/typus/has_many.yml +0 -0
- data/test/fixtures/rails_app/config/typus/has_many_roles.yml +0 -0
- data/test/fixtures/rails_app/config/typus/has_many_through.yml +23 -0
- data/test/fixtures/rails_app/config/typus/has_many_through_roles.yml +4 -0
- data/test/fixtures/rails_app/config/typus/has_one.yml +12 -0
- data/test/fixtures/rails_app/config/typus/has_one_roles.yml +3 -0
- data/test/fixtures/rails_app/config/typus/polymorphic.yml +17 -0
- data/test/fixtures/rails_app/config/typus/polymorphic_roles.yml +5 -0
- data/test/fixtures/rails_app/config/typus/resource_roles.yml +7 -0
- data/test/fixtures/rails_app/config/typus/sti.yml +5 -0
- data/test/fixtures/rails_app/config/typus/sti_roles.yml +2 -0
- data/test/fixtures/rails_app/config/typus/typus.yml +13 -0
- data/test/fixtures/rails_app/config/typus/typus_roles.yml +2 -0
- data/test/fixtures/rails_app/config/typus/unknown.yml +3 -0
- data/test/fixtures/rails_app/config/typus/unknown_roles.yml +5 -0
- data/test/fixtures/rails_app/db/.gitkeep +0 -0
- data/test/fixtures/rails_app/db/schema.rb +174 -0
- data/test/fixtures/rails_app/db/seeds.rb +54 -0
- data/test/fixtures/rails_app/db/seeds/assets/000.jpg +0 -0
- data/test/fixtures/rails_app/db/seeds/assets/001.jpg +0 -0
- data/test/fixtures/rails_app/db/seeds/assets/002.jpg +0 -0
- data/test/fixtures/rails_app/db/seeds/assets/003.jpg +0 -0
- data/test/fixtures/rails_app/db/seeds/assets/004.jpg +0 -0
- data/test/fixtures/rails_app/public/404.html +26 -0
- data/test/fixtures/rails_app/public/422.html +26 -0
- data/test/fixtures/rails_app/public/500.html +26 -0
- data/test/fixtures/rails_app/public/favicon.ico +0 -0
- data/test/fixtures/rails_app/public/images/rails.png +0 -0
- data/test/fixtures/rails_app/public/javascripts/application.js +2 -0
- data/test/fixtures/rails_app/public/javascripts/controls.js +965 -0
- data/test/fixtures/rails_app/public/javascripts/dragdrop.js +974 -0
- data/test/fixtures/rails_app/public/javascripts/effects.js +1123 -0
- data/test/fixtures/rails_app/public/javascripts/prototype.js +6001 -0
- data/test/fixtures/rails_app/public/javascripts/rails.js +175 -0
- data/test/fixtures/rails_app/public/robots.txt +5 -0
- data/test/fixtures/rails_app/public/stylesheets/.gitkeep +0 -0
- data/test/fixtures/rails_app/script/rails +6 -0
- data/test/lib/support/active_record_test.rb +150 -0
- data/test/lib/support/fake_user_test.rb +59 -0
- data/test/lib/support/hash_test.rb +29 -0
- data/test/lib/support/object_test.rb +17 -0
- data/test/lib/support/string_test.rb +116 -0
- data/test/lib/typus/configuration_test.rb +46 -0
- data/test/lib/typus/controller/actions_test.rb +141 -0
- data/test/lib/typus/controller/associations_test.rb +7 -0
- data/test/lib/typus/controller/autocomplete_test.rb +7 -0
- data/test/lib/typus/controller/filters_test.rb +73 -0
- data/test/lib/typus/controller/format_test.rb +7 -0
- data/test/lib/typus/i18n_test.rb +9 -0
- data/test/lib/typus/orm/active_record/class_methods_test.rb +378 -0
- data/test/lib/typus/orm/active_record/search_test.rb +330 -0
- data/test/lib/typus/regex_test.rb +53 -0
- data/test/lib/typus/resources_test.rb +41 -0
- data/test/lib/typus_test.rb +141 -0
- data/test/test_helper.rb +15 -0
- data/typus.gemspec +25 -0
- metadata +586 -64
- data/Gemfile.lock +0 -149
- data/app/views/admin/helpers/_apps.html.erb +0 -9
- data/lib/generators/templates/public/admin/javascripts/application.js +0 -2
- data/lib/generators/templates/public/admin/javascripts/jquery-1.4.4.min.js +0 -167
- data/lib/generators/templates/public/admin/javascripts/jquery.application.js +0 -16
- data/lib/generators/templates/public/admin/javascripts/jquery.rails.js +0 -160
- data/lib/generators/templates/public/admin/javascripts/jquery.searchField.js +0 -91
- data/lib/generators/templates/public/admin/stylesheets/application.css +0 -11
- data/lib/generators/templates/public/admin/stylesheets/screen.css +0 -367
- data/lib/generators/templates/public/admin/vendor/fancybox/blank.gif +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_close.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_loading.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_nav_left.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_nav_right.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_shadow_e.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_shadow_n.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_shadow_ne.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_shadow_nw.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_shadow_s.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_shadow_se.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_shadow_sw.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_shadow_w.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_title_left.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_title_main.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_title_over.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancy_title_right.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancybox-x.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancybox-y.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/fancybox.png +0 -0
- data/lib/generators/templates/public/admin/vendor/fancybox/jquery.easing-1.3.pack.js +0 -72
- data/lib/generators/templates/public/admin/vendor/fancybox/jquery.fancybox-1.3.4.css +0 -359
- data/lib/generators/templates/public/admin/vendor/fancybox/jquery.fancybox-1.3.4.js +0 -1156
- data/lib/generators/templates/public/admin/vendor/fancybox/jquery.fancybox-1.3.4.pack.js +0 -46
- data/lib/generators/templates/public/admin/vendor/fancybox/jquery.mousewheel-3.0.4.pack.js +0 -14
- data/lib/typus/actions.rb +0 -41
- data/lib/typus/filters.rb +0 -12
- data/lib/typus/format.rb +0 -70
- data/lib/typus/user.rb +0 -157
@@ -1,91 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* searchField - jQuery plugin to display and remove
|
3
|
-
* a default value in a searchvalue on blur/focus
|
4
|
-
*
|
5
|
-
* Copyright (c) 2008 J�örn Zaefferer
|
6
|
-
*
|
7
|
-
* $Id$
|
8
|
-
*
|
9
|
-
* Dual licensed under the MIT and GPL licenses:
|
10
|
-
* http://www.opensource.org/licenses/mit-license.php
|
11
|
-
* http://www.gnu.org/licenses/gpl.html
|
12
|
-
*
|
13
|
-
*/
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Clear the help text in a search field (either in the value or title attribute)
|
17
|
-
* when focused, and restore it on blur if nothing was entered. If the value is
|
18
|
-
* blank but there is a title attribute, the title will be moved to the initial value.
|
19
|
-
*
|
20
|
-
* @example $('#quicksearch').searchField();
|
21
|
-
* @before <input id="quicksearch" title="Enter search here" name="quicksearch" />
|
22
|
-
* @result <input id="quicksearch" value="Enter search here" name="quicksearch" />
|
23
|
-
*
|
24
|
-
* @name searchField
|
25
|
-
* @type jQuery
|
26
|
-
* @cat Plugins/SearchField
|
27
|
-
*/
|
28
|
-
jQuery.fn.searchField = function(mark){
|
29
|
-
return this.each(function() {
|
30
|
-
var mark = mark || this.title;
|
31
|
-
|
32
|
-
if (!mark)
|
33
|
-
return;
|
34
|
-
|
35
|
-
var target = this;
|
36
|
-
var original = $(this);
|
37
|
-
if (this.type == "password") {
|
38
|
-
target = $("<input />")
|
39
|
-
.insertBefore(this)
|
40
|
-
.css("display", $(this).css("display"))
|
41
|
-
.attr("size", this.size)
|
42
|
-
.attr("title", this.title)
|
43
|
-
.attr("class", this.className)
|
44
|
-
.addClass("watermark")[0];
|
45
|
-
if (!this.value) {
|
46
|
-
$(this).hide();
|
47
|
-
} else {
|
48
|
-
$(target).hide();
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
if(!target.value || mark == this.value) {
|
53
|
-
$(target).addClass("watermark");
|
54
|
-
}
|
55
|
-
|
56
|
-
// setup initial value
|
57
|
-
if (!this.value || target != this) {
|
58
|
-
target.value = mark;
|
59
|
-
}
|
60
|
-
|
61
|
-
$(target).focus(function() {
|
62
|
-
if (target != original[0]) {
|
63
|
-
$(this).hide();
|
64
|
-
original.show().focus();
|
65
|
-
} else if (this.value == mark) {
|
66
|
-
this.value = '';
|
67
|
-
$(this).removeClass("watermark");
|
68
|
-
}
|
69
|
-
});
|
70
|
-
$(this).blur(function() {
|
71
|
-
if (!this.value.length) {
|
72
|
-
if (target != original[0]) {
|
73
|
-
$(target).show();
|
74
|
-
original.hide();
|
75
|
-
} else {
|
76
|
-
this.value = mark;
|
77
|
-
$(this).addClass("watermark")
|
78
|
-
}
|
79
|
-
}
|
80
|
-
});
|
81
|
-
|
82
|
-
// make sure that when the form is submitted, the watermark is
|
83
|
-
// replaced with the empty string, which is usually the expected behavior.
|
84
|
-
$(this).parents("form:first").submit(function(){
|
85
|
-
if ($(target).hasClass("watermark")) {
|
86
|
-
$(target).attr("value", "");
|
87
|
-
$(target).removeClass("watermark");
|
88
|
-
}
|
89
|
-
});
|
90
|
-
});
|
91
|
-
};
|
@@ -1,367 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2010, Francesc Esplugas Marti
|
3
|
-
Code licensed under the MIT License
|
4
|
-
Updated: 20100618
|
5
|
-
|
6
|
-
Reset
|
7
|
-
Global Styles – (body, paragraphs, lists, etc)
|
8
|
-
Header
|
9
|
-
Page Structure
|
10
|
-
Headings
|
11
|
-
Text Styles
|
12
|
-
Navigation
|
13
|
-
Forms
|
14
|
-
Comments
|
15
|
-
Extras
|
16
|
-
|
17
|
-
*/
|
18
|
-
|
19
|
-
/* @group Reset (960.gs) */
|
20
|
-
|
21
|
-
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
|
22
|
-
|
23
|
-
/* @end */
|
24
|
-
|
25
|
-
/* @group Defaults */
|
26
|
-
|
27
|
-
html, body {}
|
28
|
-
|
29
|
-
body {
|
30
|
-
font-family: "Lucida Grande", Sans-serif;
|
31
|
-
font-size: 75%;
|
32
|
-
height: 100%;
|
33
|
-
}
|
34
|
-
|
35
|
-
label { display: block; font-weight: bold; margin: 0 0 5px 0; }
|
36
|
-
strong { font-weight: bold; }
|
37
|
-
em { font-style: italic; }
|
38
|
-
|
39
|
-
dl { margin: 14px 0 20px 0; }
|
40
|
-
dt { font-weight: bold; }
|
41
|
-
dd { font-size: 18px; margin: 0.25em 0 1em 0; }
|
42
|
-
dd p { color: #000; }
|
43
|
-
|
44
|
-
p { color: #777; line-height: 1.25em; margin: 1em 0; }
|
45
|
-
|
46
|
-
h1 { font-size: 2em; font-weight: normal; }
|
47
|
-
h2 { font-weight: bold; }
|
48
|
-
h3 { font-size: 1.25em; font-weight: bold; margin: 1em 0; }
|
49
|
-
|
50
|
-
li { color: #777; }
|
51
|
-
|
52
|
-
/* @end */
|
53
|
-
|
54
|
-
/* @group Links */
|
55
|
-
|
56
|
-
a,
|
57
|
-
a:visited,
|
58
|
-
a:link { color: #000; font-weight: normal; }
|
59
|
-
a:hover { color: #333; text-decoration: underline!important; }
|
60
|
-
|
61
|
-
/* @end */
|
62
|
-
|
63
|
-
/* @group Header */
|
64
|
-
|
65
|
-
#header_wrapper { background: #4A525A; }
|
66
|
-
|
67
|
-
#header_wrapper #header { color: #FFF; padding: 1.25em 2em 0.25em 2em; }
|
68
|
-
#header_wrapper #header h1 a { color: #FFF; text-decoration: none; }
|
69
|
-
#header_wrapper #header h1 a:hover { text-decoration: underline; }
|
70
|
-
|
71
|
-
#header_wrapper #links { color: #FFF; padding: 1.25em 2em; }
|
72
|
-
#header_wrapper #links ul li { display: inline; padding-left: 0.5em; color: #FFF; }
|
73
|
-
#header_wrapper #links a { color: #FFF; }
|
74
|
-
|
75
|
-
#header_wrapper #links .left { float: left; }
|
76
|
-
#header_wrapper #links .left ul { display: block; }
|
77
|
-
#header_wrapper #links .left ul li { display: inline; padding: 0 0.5em 0 0; }
|
78
|
-
#header_wrapper #links .left ul li a {
|
79
|
-
-webkit-border-radius: 5px;
|
80
|
-
background: #242527;
|
81
|
-
padding: 3px 5px;
|
82
|
-
text-decoration: none;
|
83
|
-
}
|
84
|
-
|
85
|
-
#header_wrapper #links .left ul li a.active,
|
86
|
-
#header_wrapper #links .left ul li a:hover { background: #FFF; color: #000; }
|
87
|
-
|
88
|
-
#header_wrapper #links .right { float: right; }
|
89
|
-
|
90
|
-
/* @end */
|
91
|
-
|
92
|
-
/* @group Wrapper */
|
93
|
-
|
94
|
-
#wrapper { min-height: 100%; position: relative; }
|
95
|
-
|
96
|
-
/* @end */
|
97
|
-
|
98
|
-
/* @group Content Wrapper */
|
99
|
-
|
100
|
-
#content_wrapper { margin: 0em 0 2em 0; padding: 2em; }
|
101
|
-
|
102
|
-
/* @end */
|
103
|
-
|
104
|
-
/* @group Content */
|
105
|
-
|
106
|
-
#content { margin: 0 0 0 20em; }
|
107
|
-
#content.headless { margin: 1em; }
|
108
|
-
|
109
|
-
#content h2 { font-size: 1.5em; margin: 0.5em 0; }
|
110
|
-
#content h2 small { font-size: 0.75em; }
|
111
|
-
#content h2 small a { color: #666; }
|
112
|
-
|
113
|
-
#content ol { margin: 1em 2em; }
|
114
|
-
#content ul { margin: 0 1.5em; }
|
115
|
-
#content li { list-style: square; line-height: 20px; }
|
116
|
-
|
117
|
-
#content pre {
|
118
|
-
background: #000;
|
119
|
-
color: #FFF;
|
120
|
-
font-size: 1.5em;
|
121
|
-
margin: 1em 0;
|
122
|
-
overflow: auto;
|
123
|
-
padding: 1em;
|
124
|
-
}
|
125
|
-
|
126
|
-
#content blockquote {
|
127
|
-
-moz-border-radius: 3px;
|
128
|
-
-webkit-border-radius: 3px;
|
129
|
-
font-size: 1.25em;
|
130
|
-
font-family: georgia;
|
131
|
-
line-height: 1.5em;
|
132
|
-
margin: 1em 0;
|
133
|
-
padding: 0 1em;
|
134
|
-
border: 1px solid #AAA;
|
135
|
-
}
|
136
|
-
|
137
|
-
/* @end */
|
138
|
-
|
139
|
-
/* @group Sidebar */
|
140
|
-
|
141
|
-
#sidebar { float: left; margin: -1em 2em 0 0; width: 18em; }
|
142
|
-
|
143
|
-
#sidebar h2 { font-size: 1.5em; margin: 1.1em 0 0 0; }
|
144
|
-
|
145
|
-
#sidebar h3 {
|
146
|
-
-moz-border-radius: 0.5em;
|
147
|
-
-webkit-border-radius: 0.5em;
|
148
|
-
background: #242527;
|
149
|
-
color: #FFF;
|
150
|
-
padding: 0.5em;
|
151
|
-
}
|
152
|
-
|
153
|
-
#sidebar h3 a { color: #FFF; }
|
154
|
-
#sidebar ul { font-weight: bold; }
|
155
|
-
#sidebar ul li { padding: 0.25em 1em; }
|
156
|
-
|
157
|
-
#sidebar a { text-decoration: none; }
|
158
|
-
#sidebar li a:hover { text-decoration: underline; }
|
159
|
-
|
160
|
-
/* @end */
|
161
|
-
|
162
|
-
/* @group Footer */
|
163
|
-
|
164
|
-
#footer_wrapper { display: none; }
|
165
|
-
|
166
|
-
/* @end */
|
167
|
-
|
168
|
-
/* @group Fieldsets */
|
169
|
-
|
170
|
-
fieldset { margin: 0; padding: 0; }
|
171
|
-
fieldset ol { margin: 0!important; }
|
172
|
-
fieldset ol li { list-style: none!important; margin: 1em 0!important; }
|
173
|
-
fieldset small { font-size: 0.9em; font-weight: normal; margin: 0 0 0 0.25em; }
|
174
|
-
fieldset small a { text-decoration: none; }
|
175
|
-
|
176
|
-
fieldset.inputs { }
|
177
|
-
|
178
|
-
fieldset.inputs input[type='text'],
|
179
|
-
fieldset.inputs input[type='password'] {
|
180
|
-
font-size: 20px;
|
181
|
-
padding: 5px;
|
182
|
-
width: 685px;
|
183
|
-
}
|
184
|
-
|
185
|
-
fieldset.inputs input[type='text']:focus,
|
186
|
-
fieldset.inputs input[type='password']:focus {
|
187
|
-
background: #FFFCE1;
|
188
|
-
}
|
189
|
-
|
190
|
-
fieldset.inputs textarea {
|
191
|
-
font-size: 1.2em;
|
192
|
-
padding: 3px;
|
193
|
-
width: 691px;
|
194
|
-
}
|
195
|
-
|
196
|
-
fieldset.inputs select { border: 1px solid #999; font-size: 1.20em; }
|
197
|
-
|
198
|
-
fieldset.inputs textarea:focus { background: #FFFCE1; }
|
199
|
-
fieldset.inputs label.inline_label { display: inline; }
|
200
|
-
|
201
|
-
fieldset.buttons { }
|
202
|
-
|
203
|
-
/* @end */
|
204
|
-
|
205
|
-
/* @group Content Tables */
|
206
|
-
|
207
|
-
#content table { margin-bottom: 2em!important; width: 100%; text-align: left; }
|
208
|
-
#content table a { text-decoration: none; }
|
209
|
-
#content table th { background: #242527; color: #FFF; padding: 6px; }
|
210
|
-
#content table th a { color: #FFF!important; text-decoration: none; }
|
211
|
-
#content table th a:hover { text-decoration: underline; }
|
212
|
-
#content table td.right { text-align: right; }
|
213
|
-
#content table tr.even { background: #FFF!important; }
|
214
|
-
#content table tr.even:hover,
|
215
|
-
#content table tr.odd:hover { background: #E4E4E4!important; }
|
216
|
-
#content table tr.odd { background: #F3F3F3; }
|
217
|
-
#content table td { border: none; padding: 5px; vertical-align: top; }
|
218
|
-
|
219
|
-
/* @end */
|
220
|
-
|
221
|
-
/* @group Login Page Dialog */
|
222
|
-
|
223
|
-
#account { background: #F3F3F3; }
|
224
|
-
|
225
|
-
#account #wrapper { margin: 10em auto; width: 40em; }
|
226
|
-
|
227
|
-
#account #box {
|
228
|
-
-moz-border-radius: 3px;
|
229
|
-
-webkit-border-radius: 3px;
|
230
|
-
background: #FFF;
|
231
|
-
border: 0.1em solid #D3D3D3;
|
232
|
-
padding: 1em 2em;
|
233
|
-
margin: 0 0 1em 0;
|
234
|
-
}
|
235
|
-
|
236
|
-
#account #box h1 { margin: 0.5em 0; }
|
237
|
-
#account #box ul { margin: 1.5em 0 0.5em 0; }
|
238
|
-
#account #box li { margin: 1em 0; }
|
239
|
-
|
240
|
-
#account #box input.text { font-size: 2em; padding: 0.25em; width: 17.25em; }
|
241
|
-
#account #box input.button { margin: 0.5em 1em 0 0; }
|
242
|
-
|
243
|
-
#account #footer { font-size: 0.9em; line-height: 1.8em; text-align: center; }
|
244
|
-
#account #footer a { font-weight: bold; }
|
245
|
-
|
246
|
-
/* @end */
|
247
|
-
|
248
|
-
/* @group Pagination */
|
249
|
-
|
250
|
-
.pagination {
|
251
|
-
border-top: 1px solid #D3D3D3;
|
252
|
-
margin: 1.5em auto;
|
253
|
-
padding: 1em 0;
|
254
|
-
text-align: center;
|
255
|
-
}
|
256
|
-
|
257
|
-
.pagination em { font-style: normal!important; }
|
258
|
-
.pagination em,
|
259
|
-
.pagination a { padding: 3px 5px; text-decoration: none; }
|
260
|
-
.pagination a:hover,
|
261
|
-
.pagination em { background: #000; color: #FFF; }
|
262
|
-
|
263
|
-
.pagination span.disabled { color: #D3D3D3; margin: 2px; padding: 2px 3px; }
|
264
|
-
|
265
|
-
.pagination .previous_page { float: left; }
|
266
|
-
.pagination .next_page { float: right; }
|
267
|
-
|
268
|
-
/* @end */
|
269
|
-
|
270
|
-
/* @group Rails errors and flashes */
|
271
|
-
|
272
|
-
#errorExplanation,
|
273
|
-
.alert,
|
274
|
-
.notice {
|
275
|
-
padding: 0.8em;
|
276
|
-
margin: 1em 0;
|
277
|
-
border: 1px solid #ddd;
|
278
|
-
-moz-border-radius: 8px;
|
279
|
-
-webkit-border-radius: 8px;
|
280
|
-
line-height: 1.5em;
|
281
|
-
}
|
282
|
-
|
283
|
-
#errorExplanation p,
|
284
|
-
#errorExplanation li,
|
285
|
-
#errorExplanation h3 {
|
286
|
-
color: #D12F19;
|
287
|
-
}
|
288
|
-
|
289
|
-
#errorExplanation h3 { margin: 5px 0 0 0; }
|
290
|
-
|
291
|
-
#errorExplanation ul { margin: 10px 0 0 20px!important; }
|
292
|
-
|
293
|
-
#errorExplanation,
|
294
|
-
.alert { background: #FBE3E4; border-color: #FBC2C4; color: #D12F19; }
|
295
|
-
.alert a { color: #D12F19; text-decoration: underline; }
|
296
|
-
|
297
|
-
.notice { background: #FFF6BF; border-color: #FFD324; color: #817134; }
|
298
|
-
.notice a { color: #817134; text-decoration: underline; }
|
299
|
-
|
300
|
-
.fieldWithErrors label { color: #CD0A0A;}
|
301
|
-
.fieldWithErrors input { background: #FEF8F6; }
|
302
|
-
|
303
|
-
#errorExplanation ul { margin: 1em 1.5em; }
|
304
|
-
#errorExplanation ul li { list-style: square!important; margin: 0!important; }
|
305
|
-
|
306
|
-
/* @end */
|
307
|
-
|
308
|
-
/* Boxes */
|
309
|
-
|
310
|
-
.box {
|
311
|
-
-moz-border-radius: 3px;
|
312
|
-
-webkit-border-radius: 3px;
|
313
|
-
background: #FFF;
|
314
|
-
border: 1px solid #AAA;
|
315
|
-
margin: 1em 0;
|
316
|
-
padding: 0.5em 1em ;
|
317
|
-
}
|
318
|
-
|
319
|
-
.box h3 { margin: 0.5em 0!important; }
|
320
|
-
|
321
|
-
/* @group Hacks */
|
322
|
-
|
323
|
-
.clear { clear: both; }
|
324
|
-
.box_relationships { margin-top: 2.5em; }
|
325
|
-
|
326
|
-
/* @end */
|
327
|
-
|
328
|
-
/* @group Filters */
|
329
|
-
|
330
|
-
#content .filters {
|
331
|
-
border-top: 1px solid #D3D3D3;
|
332
|
-
border-bottom: 1px solid #D3D3D3;
|
333
|
-
height: 2em;
|
334
|
-
margin: 0 0 1em 0;
|
335
|
-
padding: 1em 0;
|
336
|
-
}
|
337
|
-
|
338
|
-
#content .filters ul { margin: 0; }
|
339
|
-
#content .filters ul li { float: left; list-style: none; margin: 0 1em 0 0; }
|
340
|
-
|
341
|
-
/* @end */
|
342
|
-
|
343
|
-
/* @group Search */
|
344
|
-
|
345
|
-
#search { float: right; }
|
346
|
-
#search input { font-size: 1em; padding: 3px; }
|
347
|
-
|
348
|
-
/* @end */
|
349
|
-
|
350
|
-
/* @group Misc */
|
351
|
-
|
352
|
-
ul.predefined_filters {
|
353
|
-
margin: 1em 0 0.5em 0!important;
|
354
|
-
}
|
355
|
-
|
356
|
-
ul.predefined_filters li {
|
357
|
-
display: inline;
|
358
|
-
margin: 0 0.5em 0 0;
|
359
|
-
}
|
360
|
-
|
361
|
-
.actions {
|
362
|
-
font-size: 0.9em;
|
363
|
-
margin: 0.5em 0;
|
364
|
-
height: 1em;
|
365
|
-
}
|
366
|
-
|
367
|
-
/* @end */
|