hobo_rapid 1.4.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. data/README.markdown +5 -0
  2. data/VERSION +1 -0
  3. data/app/controllers/dev_controller.rb +25 -0
  4. data/app/helpers/hobo_rapid_helper.rb +197 -0
  5. data/hobo_rapid.gemspec +26 -0
  6. data/lib/hobo_rapid/railtie.rb +6 -0
  7. data/lib/hobo_rapid.rb +13 -0
  8. data/taglibs/buttons/buttons.dryml +1 -0
  9. data/taglibs/buttons/create_button.dryml +40 -0
  10. data/taglibs/buttons/delete-button.dryml +75 -0
  11. data/taglibs/buttons/remote_method_button.dryml +34 -0
  12. data/taglibs/buttons/transition_button.dryml +71 -0
  13. data/taglibs/buttons/transition_link.dryml +22 -0
  14. data/taglibs/buttons/update_button.dryml +29 -0
  15. data/taglibs/cache/cache.dryml +1 -0
  16. data/taglibs/cache/nested_cache.dryml +332 -0
  17. data/taglibs/cards/card.dryml +7 -0
  18. data/taglibs/cards/cards.dryml +1 -0
  19. data/taglibs/cards/search_card.dryml +4 -0
  20. data/taglibs/editors/click_editor.dryml +60 -0
  21. data/taglibs/editors/editors.dryml +27 -0
  22. data/taglibs/editors/live_editor.dryml +37 -0
  23. data/taglibs/forms/error_messages.dryml +21 -0
  24. data/taglibs/forms/form.dryml +101 -0
  25. data/taglibs/forms/formlet.dryml +48 -0
  26. data/taglibs/forms/forms.dryml +5 -0
  27. data/taglibs/forms/submit.dryml +14 -0
  28. data/taglibs/hobo_rapid.dryml +14 -0
  29. data/taglibs/html/a.dryml +156 -0
  30. data/taglibs/html/aside.dryml +5 -0
  31. data/taglibs/html/doctype.dryml +39 -0
  32. data/taglibs/html/empty_tag.dryml +23 -0
  33. data/taglibs/html/footer.dryml +5 -0
  34. data/taglibs/html/header.dryml +5 -0
  35. data/taglibs/html/html.dryml +18 -0
  36. data/taglibs/html/if_ie.dryml +11 -0
  37. data/taglibs/html/image.dryml +11 -0
  38. data/taglibs/html/javascript.dryml +12 -0
  39. data/taglibs/html/section.dryml +12 -0
  40. data/taglibs/html/section_group.dryml +11 -0
  41. data/taglibs/html/stylesheet.dryml +5 -0
  42. data/taglibs/html/table.dryml +174 -0
  43. data/taglibs/i18n/ht.dryml +48 -0
  44. data/taglibs/i18n/human_attribute_name +18 -0
  45. data/taglibs/i18n/human_collection_name.dryml +69 -0
  46. data/taglibs/i18n/i18n.dryml +1 -0
  47. data/taglibs/i18n/model_name_human.dryml +16 -0
  48. data/taglibs/i18n/t.dryml +12 -0
  49. data/taglibs/inputs/after_submit.dryml +32 -0
  50. data/taglibs/inputs/check_many.dryml +25 -0
  51. data/taglibs/inputs/collection_input.dryml +10 -0
  52. data/taglibs/inputs/hidden_field.dryml +48 -0
  53. data/taglibs/inputs/hot_input.dryml +50 -0
  54. data/taglibs/inputs/input.dryml +76 -0
  55. data/taglibs/inputs/input_all.dryml +14 -0
  56. data/taglibs/inputs/input_for.dryml +38 -0
  57. data/taglibs/inputs/input_for_date.dryml +86 -0
  58. data/taglibs/inputs/input_for_enum_string.dryml +26 -0
  59. data/taglibs/inputs/input_many.dryml +131 -0
  60. data/taglibs/inputs/inputs.dryml +1 -0
  61. data/taglibs/inputs/name_one.dryml +74 -0
  62. data/taglibs/inputs/or_cancel.dryml +8 -0
  63. data/taglibs/inputs/select_input.dryml +13 -0
  64. data/taglibs/inputs/select_many.dryml +58 -0
  65. data/taglibs/inputs/select_menu.dryml +23 -0
  66. data/taglibs/inputs/select_one.dryml +46 -0
  67. data/taglibs/inputs/sortable_input_many.dryml +31 -0
  68. data/taglibs/inputs/sti_type_input.dryml +6 -0
  69. data/taglibs/lists/collection.dryml +26 -0
  70. data/taglibs/lists/empty_collection_message.dryml +13 -0
  71. data/taglibs/lists/feckless_fieldset.dryml +94 -0
  72. data/taglibs/lists/field_list.dryml +21 -0
  73. data/taglibs/lists/field_list_v1.dryml +64 -0
  74. data/taglibs/lists/labelled_item_list.dryml +11 -0
  75. data/taglibs/lists/lists.dryml +2 -0
  76. data/taglibs/lists/with_fields.dryml +98 -0
  77. data/taglibs/pages/account.dryml +30 -0
  78. data/taglibs/pages/account_disabled.dryml +19 -0
  79. data/taglibs/pages/flash_message.dryml +23 -0
  80. data/taglibs/pages/forgot_password.dryml +62 -0
  81. data/taglibs/pages/login.dryml +57 -0
  82. data/taglibs/pages/not_found_page.dryml +18 -0
  83. data/taglibs/pages/page_nav.dryml +17 -0
  84. data/taglibs/pages/pages.dryml +12 -0
  85. data/taglibs/pages/permission_denied_page.dryml +24 -0
  86. data/taglibs/plus/collection_preview.dryml +23 -0
  87. data/taglibs/plus/filter_menu.dryml +103 -0
  88. data/taglibs/plus/gravatar.dryml +12 -0
  89. data/taglibs/plus/live_search.dryml +40 -0
  90. data/taglibs/plus/plus.dryml +1 -0
  91. data/taglibs/plus/sortable_collection.dryml +36 -0
  92. data/taglibs/plus/table_plus.dryml +63 -0
  93. data/taglibs/views/a_or_an.dryml +10 -0
  94. data/taglibs/views/collection_name.dryml +28 -0
  95. data/taglibs/views/comma_list.dryml +2 -0
  96. data/taglibs/views/count.dryml +99 -0
  97. data/taglibs/views/links_for_collection.dryml +2 -0
  98. data/taglibs/views/name.dryml +30 -0
  99. data/taglibs/views/nil_view.dryml +10 -0
  100. data/taglibs/views/record_flags.dryml +5 -0
  101. data/taglibs/views/type_name.dryml +24 -0
  102. data/taglibs/views/view.dryml +79 -0
  103. data/taglibs/views/view_for.dryml +42 -0
  104. data/taglibs/views/views.dryml +1 -0
  105. data/taglibs/views/you.dryml +150 -0
  106. data/vendor/assets/javascripts/hobo_rapid.js +1 -0
  107. data/vendor/assets/stylesheets/feckless-fieldset.css +40 -0
  108. data/vendor/assets/stylesheets/hobo-rapid.css +94 -0
  109. data/vendor/assets/stylesheets/hobo_rapid.css +1 -0
  110. metadata +174 -0
@@ -0,0 +1,30 @@
1
+ <!-- Renders the name of the current context using a variety of methods.
2
+
3
+ ### Details
4
+
5
+ - Equivalent to `<nil-view>` if `this` is nil
6
+ - Equivalent to `<count>` if `this` is an Array
7
+ - Equivalent to `<type-name>` if `this` is a class
8
+ - If the context has a `name_attribute` defined, equivalent to `<view:abc/>` (where `abc` is the name attribute)
9
+ - Finally falls back to `this.to_s` (html escaped), but only if the user has view permission for `this`
10
+
11
+ ### Attributes
12
+
13
+ - if-present: if given, nothing at all will be rendered for nil values (as opposed to rendering `<nil-view>`)
14
+
15
+ -->
16
+ <def tag="name" attrs="if-present"><%=
17
+ if this.nil?
18
+ nil_view unless if_present
19
+ else
20
+ if this.is_a?(Array)
21
+ count
22
+ elsif this.is_a?(Class)
23
+ type_name(attributes)
24
+ elsif (name_attr = this.class.try.name_attribute) && can_view?(this, name_attr)
25
+ view(merge_attrs(attributes, {:field => name_attr}))
26
+ elsif can_view?(this)
27
+ h this.to_s
28
+ end
29
+ end
30
+ %></def>
@@ -0,0 +1,10 @@
1
+ <!-- Used to render nil values. By default renders "(Not Available)"
2
+
3
+ ### Usage
4
+
5
+ Redefine in your app to have nil values displayed differently, e.g.:
6
+
7
+ <def tag="nil-view">-</def>
8
+
9
+ -->
10
+ <def tag="nil-view"><%= scope.nil_view || "(Not Available)" %></def>
@@ -0,0 +1,5 @@
1
+ <!-- Renders a `separator` separated list of any fields passed in the `fields` attribute that are true (in the Ruby sense). For example, if a forum post had a boolean field `sticky`, this tag can be used to automatically label sticky posts "Sticky". Similarly, you could automatically add an "Administrator" label to the user's home page (this is seen in the default Hobo app). -->
2
+ <def tag="record-flags" attrs="fields, separator"><%=
3
+ separator ||= ', '
4
+ comma_split(fields).select { |f| this.send(f) }.map { |f| this.class.human_attribute_name(f) }.join(separator)
5
+ %></def>
@@ -0,0 +1,24 @@
1
+ <!-- Renders a human readable version of the type of the context
2
+
3
+ ### Details
4
+
5
+ - If `this` is already a class, the name of that class is used
6
+ - Otherwise, first `this.member_class` (for collections), then `this.class` are tried
7
+ - By default the name is titleised and singular.
8
+
9
+ ### Attributes
10
+
11
+ - plural: pluralise the name
12
+ - lowercase: render the name in all lower case
13
+ - dasherize: render the name in lower case with dashes instead of spaces.
14
+
15
+ -->
16
+ <def tag="type-name" attrs="plural, lowercase, dasherize"><%=
17
+ type ||= (this if this.is_a?(Class)) || this.try.member_class || this.class
18
+
19
+ name = type.respond_to?(:model_name) ? type.model_name.human : type.name
20
+ name = dasherize ? name.underscore.dasherize : name.titleize
21
+ name = name.pluralize if plural
22
+ name = name.downcase if lowercase
23
+ name
24
+ %></def>
@@ -0,0 +1,79 @@
1
+ <!--
2
+ Provides a read-only view tailored to the type of the object being viewed. `<view>` is a _polymorphic_ tag which means that there are a variety of definitions, each one written for a particular type. For example there are views for `Date`, `Time`, `Numeric`, `String` and `Boolean`. The type specific view is enclosed in a wrapper tag (typically a `<span>` or `<div>`) with some useful classes automatically added.
3
+
4
+ ### Usage
5
+
6
+ Assuming the context is a blog post...
7
+
8
+ * Viewing a DateTime field:
9
+
10
+ <view:created_at/> -> <span class="view blog-post-created-at">June 09, 2008 15:36</span>
11
+ * Viewing a String field:
12
+
13
+ <view:title/> -> <span class="view blog-post-title">My First Blog Post</span>
14
+ * Viewing an Integer field:
15
+
16
+ <view:comment_count/> -> <span class="view blog-post-comment-count">4</span>
17
+ * Viewing the blog post itself results in a link to the blog post (using Rapid's `<a>` tag):
18
+
19
+ <view/> -> <span class="view model:blog-post-1"><a href="/blog_posts/1">My First Blog Post</a></span>
20
+
21
+ ### Additional Notes
22
+
23
+ * The wrapper tag is `<span>` unless the field type is `Text` (different to `String`) where it is `<div>`. Use the `inline` or `block` attributes to force a `<span>` or a `<div>`, e.g.
24
+
25
+ <view:body/> -> <div class="view blog-post-body">This is my blog post body</div>
26
+
27
+ <view:body inline/> -> <span class="view blog-post-body">This is my blog post body</span>
28
+
29
+ <view:created_at block/> -> <div class="view blog-post-created-at">June 09, 2008 15:36</div>
30
+ * Use the `no-wrapper` attribute to remove the wrapper tag completely. e.g.
31
+
32
+ <view:created_at no-wrapper/> -> June 09, 2008 15:36
33
+ -->
34
+ <def tag="view" attrs="inline, block, if-blank, no-wrapper, truncate"><%=
35
+ raise Hobo::PermissionDeniedError, "view of non-viewable field '#{this_field}' of #{this_parent.typed_id rescue this_parent}" unless
36
+ can_view?
37
+
38
+ res = if this.nil? && if_blank.nil?
39
+ this_type.is_a?(Class) && this_type <= String ? "" : nil_view
40
+ elsif (refl = this_field_reflection) && refl.macro == :has_many
41
+ collection_view(attributes)
42
+ else
43
+ view_tag = find_polymorphic_tag("view")
44
+
45
+ if view_tag == "view" # i.e. it didn't find a type specific tag
46
+ if this.respond_to?(:to_html)
47
+ this.to_html(scope.xmldoctype)
48
+ else
49
+ this.to_s
50
+ end
51
+ else
52
+ attrs = add_classes(attributes, "view", type_and_field._?.dasherize, model_id_class)
53
+
54
+ view_attrs = attrs_for(view_tag)
55
+ the_view = send(view_tag, attrs & view_attrs)
56
+
57
+ the_view = if_blank if if_blank && the_view.blank?
58
+
59
+ truncate = 30 if truncate == true
60
+ the_view = self.truncate(the_view, :length => truncate.to_i) if truncate
61
+ the_view = the_view.html_safe? ? the_view.strip.html_safe : the_view.strip
62
+
63
+ if no_wrapper
64
+ the_view
65
+ else
66
+ wrapper = if inline
67
+ :span
68
+ elsif block || this_type <= HoboFields::Types::Text
69
+ :div
70
+ else
71
+ :span
72
+ end
73
+ element(wrapper, attrs - view_attrs, the_view)
74
+ end
75
+ end
76
+ end
77
+ Dryml.last_if = !res.blank?
78
+ res
79
+ %></def>
@@ -0,0 +1,42 @@
1
+
2
+ <!-- `<view>` calls this tag when called for a `has_many` collection. By default calls `<links-for-collection/>` -->
3
+ <def tag="collection-view" polymorphic><links-for-collection merge-attrs/></def>
4
+
5
+ <!-- Renders `this` in localized :default format. `format` can be a symbol representing a locale key or a standard format string (see strftime) -->
6
+ <def tag="view" for="date" attrs="format"><%= this && (format||= :default) && I18n.backend.localize(I18n.locale, this, format) %></def>
7
+
8
+ <!-- Renders `this` in localized :default format. `format` can be a symbol representing a Time::DATE_FORMATS or a standard format string (see strftime) -->
9
+ <def tag="view" for="time" attrs="format"><%= this && (format||= :time) && (format.is_a?(Symbol) ? this.to_s(format) : this.strftime(format) ) %></def>
10
+
11
+ <!-- Renders `this` in localized :default format. `format` can be a symbol representing a locale key or a standard format string (see strftime) -->
12
+ <def tag="view" for="datetime" attrs="format"><%= this && (format||= :default) && I18n.backend.localize(I18n.locale, this, format) %></def>
13
+
14
+ <!-- Renders localized `number_with_delimiter this`, or `format % this` if the `format` attribute is given -->
15
+ <def tag="view" for="Numeric" attrs="format"><%= format ? format % this : number_with_delimiter(this) %></def>
16
+
17
+ <!-- If `this.html_safe?`, returns this unchanged. Otherwise renders `this` with HTML escaping and newlines replaced with `<br>` tags -->
18
+ <def tag="view" for="string"><%=
19
+ if this.html_safe?
20
+ this
21
+ elsif !(this.class == String) && this.respond_to?(:to_html) # workaround for Maruku which adds String#to_html : (
22
+ this.to_html(scope.xmldoctype)
23
+ else
24
+ h(this).gsub("\n", "<br#{scope.xmldoctype ? ' /' : ''}>").html_safe
25
+ end
26
+ %></def>
27
+
28
+ <!-- This tag add internationalization support to EnumString fields -->
29
+ <def tag="view" for="HoboFields::Types::EnumString">
30
+ <%=
31
+ model = this_parent.class
32
+ I18n.t(
33
+ "activerecord.attributes.#{model.to_s.downcase}/#{this_field}s.#{this}",
34
+ :default => this.titleize)
35
+ %>
36
+ </def>
37
+
38
+ <!-- Renders 'Yes' for true and 'No' for false -->
39
+ <def tag="view" for="boolean"><%= this ? t('hobo.boolean_yes', :default => 'Yes') : t('hobo.boolean_no', :default => 'No') %></def>
40
+
41
+ <!-- Renders a link (`<a>`) to `this` -->
42
+ <def tag="view" for="ActiveRecord::Base"><a merge-attrs/></def>
@@ -0,0 +1 @@
1
+ <%# Tags that display a basic representation of an object. %>
@@ -0,0 +1,150 @@
1
+ # -*- coding: utf-8 -*-
2
+ <!-- Equivalent to `<you capitalize/>`-->
3
+ <def tag="You"><you merge capitalize/></def>
4
+
5
+ <!-- Convenience tag to help with the common situation where you need to address the current user as "you", and refer to other users by name
6
+
7
+ ### Usage
8
+
9
+ The context should be a user object. If `this == current_user` the "you" form is rendered, otherwise the form with the user's name:
10
+
11
+ - `<you have/> new mail` -> "you have new mail" or "Jim has new mail"
12
+ - `<you are/> now an admin` -> "you are now an admin" or "Jim is now an admin"
13
+ - `<you do/>n't want to go there` -> "you don't want to go there" or "Jim doesn't want to go there"
14
+
15
+ The tag is also localized in the namespaces "tags.you.current_user" and "tags.you.other_user".
16
+ Each namespace can contain the legacy keys "have", "are", "do" used for the respective attributes,
17
+ and "nothing" used when no attribute is passed. But you can also use your own keys, providing
18
+ that you add the keys in the correct namespaces.
19
+
20
+ ### Examples
21
+
22
+ it:
23
+ tags:
24
+ you:
25
+ current_user:
26
+ nothing: "Tu"
27
+ have: "Hai"
28
+ are: "sei"
29
+ can: "Puoi"
30
+ other_user:
31
+ nothing: "{{name}}"
32
+ have: "{{name}} ha"
33
+ are: "{{name}} è"
34
+ can: "{{name}} può"
35
+
36
+ - `<you have/> un nuovo messaggio.` -> "Hai un nuovo messaggio." or "Jim ha un nuovo messaggio."
37
+ - `Adesso <you are/> amministratore.` -> "Adesso sei amministratore." or "Adesso Jim è amministratore."
38
+ - `<you can/> scrivere.` -> "Puoi scrivere." or "Jim può scrivere."
39
+
40
+ (note: :name is added by default as an interpolable variable)
41
+
42
+ ### Attributes
43
+
44
+ - capitalize: the first letter of the resulting sentence will be capitalized
45
+
46
+
47
+ ### Additional Notes
48
+
49
+ The "titleize" attribute is deprecated: use "capitalize" instead.
50
+
51
+ -->
52
+ <def tag="you" attrs="titleize, capitalize">
53
+ <% Rails.logger.warn "'titleize' is a deprecated attribute of the 'you' tag. Please, use 'capitalize' instead." -%>
54
+ <% raise ArgumentError, "You can add only one attribute-key to the 'you' tag." if attributes.size > 1 -%>
55
+ <% k = case
56
+ when attributes[:have] then 'have'
57
+ when attributes[:are] then 'are'
58
+ when attributes[:do] then 'do'
59
+ end -%>
60
+ <if test="&this == current_user">
61
+ <%= s = t("tags.you.current_user.#{k || attributes.keys.first || 'default'}",:default=>"you #{k}")
62
+ (titleize||capitalize) ? s.sub(/^./){|c| c.upcase} : s %>
63
+ </if>
64
+ <else>
65
+ <do param="default">
66
+ <%= s = t("tags.you.other_user.#{k || attributes.keys.first || 'default'}", :name=>name(:no_wrapper => true),
67
+ :default=>"#{name(:no_wrapper => true)} #{'has' if attributes[:have]}#{'is' if attributes[:are]}#{'does' if attributes[:do]}")
68
+ (titleize||capitalize) ? s.sub(/^./){|c| c.upcase} : s %>
69
+ </do>
70
+ </else>
71
+ </def>
72
+
73
+ <!-- Equivalent to `<your ... capitalize/>`-->
74
+ <def tag="Your"><your merge capitalize/></def>
75
+
76
+ <!-- Similar to `<you>`, but renders "Your" or "Fred's" or equivalent localized strings
77
+
78
+ ### Attributes
79
+
80
+ - capitalize: the first letter of the resulting sentence will be capitalized
81
+ - count: used in pluralization. If omitted it will be set to 1.
82
+ - key: used to lookup the translation in the locale file. It allows 3 different options:
83
+ - single key like 'message': simple translation in 'tags.your.message.current_user'
84
+ or 'tags.your.message.other_user'
85
+ - composite key like 'any.namespace.message': translation as for the previous case, but it will
86
+ translate also the 'any.namespace.message' and will interpolate the variable `key` (in this case :message)
87
+ in the translation
88
+ - when key is omitted it will be set to "default" and will do the translation with that key.
89
+ Pass other meaningful attributes to achieve a dynamic usage
90
+ - any other attribute passed to the tag will be used as a variable for interpolation
91
+
92
+ Notes
93
+
94
+ - The :name variable is added by default as an interpolable variable
95
+ - If no translation is found an automatic (only english) default is generated:
96
+ the Your/Jim's string, joined to the tag content.
97
+ If you pass an explicit 'default' attribute you will override the automatic default.
98
+
99
+
100
+ ### Examples
101
+
102
+ it:
103
+ tags:
104
+ your:
105
+ message:
106
+ current_user:
107
+ one: "Tuo Messaggio"
108
+ other: "Tuoi Messaggi"
109
+ other_user:
110
+ one: "Messaggio di {{name}}"
111
+ other: "Messaggi di {{name}
112
+ entry:
113
+ current_user:
114
+ one: "Tua {{entry}}"
115
+ other: "Tue {{entry}}"
116
+ other_user: "{{entry}} di {{name}}"
117
+
118
+ - `<your key="message" count=>"&messages.count"/>`:
119
+
120
+ - count => 1: "Tuo Messaggio" or "Messaggio di Jim"
121
+ - count => 5: "Tuoi Messaggi" or "Messaggi di Jim"
122
+
123
+ - `<your key="activerecord.models.entry" count=>"&this.entries.count"/>`:
124
+
125
+ - count => 1: "Tua Entrata" or "Entrata di Jim"
126
+ - count => 5: "Tue Entrate" or "Entrate di Jim"
127
+
128
+ - `<your>Posts</your>`: "your Posts" or "Jim's Posts"
129
+ -->
130
+ <def tag="your" attrs="key, capitalize, name"><%=
131
+ key ||= 'default'
132
+ name ||= name(:no_wrapper => true)
133
+ # prepare symbolized attributes for merging
134
+ attrs = {}
135
+ attributes.each_pair{|k,v| attrs[k.to_sym] = v}
136
+ d = "#{name}'#{'s' unless name.ends_with?('s')} #{all_parameters.default}"
137
+ options = {:default=>[d], :count=>(attrs[:count]||1), :name=>name}
138
+ your_key = key.split('.').last
139
+ unless key.eql?(your_key) || attrs.has_key?(your_key.to_sym)
140
+ options[your_key.to_sym] = t(key, :count=>options[:count], :default=>your_key.titleize)
141
+ end
142
+ s = if this == current_user
143
+ options[:default].unshift :"tags.your.default.current_user"
144
+ t("tags.your.#{your_key}.current_user", options.merge(attrs))
145
+ else
146
+ options[:default].unshift :"tags.your.default.other_user"
147
+ t("tags.your.#{your_key}.other_user", options.merge(attrs))
148
+ end
149
+ capitalize ? s.sub(/^./){|c| c.upcase} : s
150
+ %></def>
@@ -0,0 +1 @@
1
+ //= require_tree .
@@ -0,0 +1,40 @@
1
+ /* see: http://fecklessmind.com/2009/01/23/how-to-reliable-css-forms/ */
2
+
3
+ /* put a class of 'vertical', 'horizontal' or 'inline-vertical' on
4
+ your fieldset to choose your layout. */
5
+
6
+ /* fieldset {clear: both;} */
7
+ fieldset.feckless-fields legend {padding: 0 0 1.286em; font-size: 1.167em; font-weight: 700;}
8
+ fieldset.feckless-fields fieldset legend {padding: 0 0 1.5em; font-size: 1em;}
9
+ * html fieldset.feckless-fields legend {margin-left: -7px;} /* ie6 */
10
+ *+html fieldset.feckless-fields legend {margin-left: -7px;} /* ie7 */
11
+
12
+ fieldset.feckless-fields .field, fieldset.feckless-fields .buttons {/* clear: both; */ margin: 0 0 1.0em;}
13
+ fieldset.feckless-fields .field label, fieldset.feckless-fields .field .input-help {display: block;}
14
+ fieldset.feckless-fields ul.fields {margin: 0 0 1.0em; padding: 0;}
15
+ fieldset.feckless-fields ul.fields li {list-style-type: none; margin: 0;}
16
+ fieldset.feckless-fields ul.inline li, fieldset.feckless-fields ul.inline label {display: inline;}
17
+ fieldset.feckless-fields ul.inline li {padding: 0 .75em 0 0;}
18
+
19
+ fieldset.feckless-fields input.radio, fieldset.feckless-fields input.checkbox {vertical-align: top;}
20
+ fieldset.feckless-fields label, fieldset.feckless-fields button, fieldset.feckless-fields input.submit, fieldset.feckless-fields input.image {cursor: pointer;}
21
+ * html fieldset.feckless-fields input.radio, * html fieldset.feckless-fields input.checkbox {vertical-align: middle;} /* ie6 */
22
+ *+html fieldset.feckless-fields input.radio, *+html fieldset.feckless-fields input.checkbox {vertical-align: middle;} /* ie7 */
23
+
24
+
25
+ fieldset.feckless-fields textarea {overflow: auto;}
26
+ fieldset.feckless-fields input.text, fieldset.feckless-fields input.string, fieldset.feckless-fields input.email-address, fieldset.feckless-fields input.password, fieldset.feckless-fields textarea, fieldset.feckless-fields select {margin: 0; font: 1em/1.3 Helvetica, Arial, "Liberation Sans", "Bitstream Vera Sans", sans-serif; vertical-align: baseline;}
27
+ fieldset.feckless-fields input.text, fieldset.feckless-fields input.string, fieldset.feckless-fields input.email-address, fieldset.feckless-fields input.password, fieldset.feckless-fields textarea {border: 1px solid #444; padding: 2px;}
28
+
29
+ /* horizontal layout */
30
+ fieldset.feckless-fields.horizontal .field {padding-left: 150px; }
31
+ fieldset.feckless-fields.horizontal .field label {display: inline; float: left; width: 140px; margin-left: -150px; clear:none;}
32
+ fieldset.feckless-fields.horizontal .input-help { display: inline; margin-left: 0.5em; }
33
+
34
+ /* inline vertical layout. We make sure to undue all the fieldset.horizontal styles so that this can be nested inside a fieldset.horizontal */
35
+ fieldset.feckless-fields.inline-vertical .field {padding-left: 0; display: inline-block; float: none; margin-left: 0; clear: none; height:1%; *display:inline;}
36
+ fieldset.feckless-fields.inline-vertical .field label {display: block; float: none; width: 100%; margin-left: 0;}
37
+ fieldset.feckless-fields.inline-vertical .input-help { display: block; margin-left: 0; }
38
+
39
+ fieldset.feckless-fields .field.required label:before {content:"*"; color: red;}
40
+ fieldset.feckless-fields .field.required label {color: red;}
@@ -0,0 +1,94 @@
1
+ /**** Default styling for Rapid ****/
2
+
3
+ #ajax_progress {
4
+ color: gray;
5
+ float: right;
6
+ margin: 20px;
7
+ position: fixed;
8
+ background: white;
9
+ font-family: tahoma, sans-serif;
10
+ display: none;
11
+ z-index: 10;
12
+ }
13
+
14
+ #ajax_progress div {
15
+ margin: 10px;
16
+ padding: 3px;
17
+ /* padding-top: -15px;*/
18
+ }
19
+
20
+ #ajax_progress img {
21
+ padding-left: 6px;
22
+ vertical-align: middle;
23
+ }
24
+
25
+
26
+ /* Scriptaculous Autocompleter ---*/
27
+
28
+ div.completions_popup {
29
+ position:absolute;
30
+ width:250px;
31
+ background-color:white;
32
+ border:1px solid #888;
33
+ margin:0px;
34
+ padding:0px;
35
+ z-index:100;
36
+ }
37
+ div.completions_popup ul {
38
+ list-style-type:none;
39
+ margin:0px;
40
+ padding:0px;
41
+ }
42
+ div.completions_popup ul li.selected { background-color: #ffb;}
43
+ div.completions_popup ul li {
44
+ list-style-type:none;
45
+ display:block;
46
+ margin:0;
47
+ padding:2px;
48
+ cursor:pointer;
49
+ }
50
+
51
+
52
+ .field_list { width:95%; }
53
+ .field_list td { padding: 5px; vertical-align: middle; }
54
+ .field_list td.field_label {
55
+ text-align: left; width: 1px; white-space: nowrap; vertical-align: top;
56
+ padding-top: 10px; padding-bottom: 10px;
57
+ }
58
+ .field_list input[type=text] { width: 100%; }
59
+ .field_list input, .field_list textarea { margin: -2px 0 0 0; }
60
+ .field_list textarea { width: 100%; margin: 0; }
61
+ /*
62
+ td span.in_place_textfield_bhv, td span.in_place_textarea_bhv, td span.in_place_html_textarea_bhv {
63
+ display: block; border: 1px solid #ddd;
64
+ padding: 4px; background: #fafafa;
65
+ }
66
+ */
67
+ table.login-table, table.login-table td {border: none;}
68
+ .login_table td.field_label { vertical-align: middle; }
69
+ /*table.login-table input {font-size: 16px; color: black;}*/
70
+
71
+ input[type=text].wide { width: 100%; }
72
+ textarea { height: 200px; }
73
+ textarea.wide { width: 100%; }
74
+ textarea.tall { height: 350px; }
75
+
76
+ .field_list input.percentage {width: 25px; display: inline; margin-right: 5px; padding: 1px 3px;}
77
+
78
+ /* rails error message */
79
+ .error_messages {
80
+ font-family: "Lucida Grande", arial, sans-serif;
81
+ background: #9d0018;
82
+ border: 1px solid #7a0013;
83
+ padding: 20px;
84
+ color: white;
85
+ margin-bottom: 20px;
86
+ }
87
+ .error_messages h2 {
88
+ text-transform: none;
89
+ letter-spacing: normal;
90
+ color: white;
91
+ }
92
+ .error_messages li {
93
+ margin-left: 20px;
94
+ }
@@ -0,0 +1 @@
1
+ //= require_tree .
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hobo_rapid
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: 6
5
+ version: 1.4.0.pre2
6
+ platform: ruby
7
+ authors:
8
+ - Tom Locke, Bryan Larsen
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2012-03-28 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hobo
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - "="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.4.0.pre2
24
+ type: :runtime
25
+ version_requirements: *id001
26
+ description: The RAPID tag library for Hobo
27
+ email: tom@tomlocke.com
28
+ executables: []
29
+
30
+ extensions: []
31
+
32
+ extra_rdoc_files: []
33
+
34
+ files:
35
+ - README.markdown
36
+ - VERSION
37
+ - app/controllers/dev_controller.rb
38
+ - app/helpers/hobo_rapid_helper.rb
39
+ - hobo_rapid.gemspec
40
+ - lib/hobo_rapid.rb
41
+ - lib/hobo_rapid/railtie.rb
42
+ - taglibs/buttons/buttons.dryml
43
+ - taglibs/buttons/create_button.dryml
44
+ - taglibs/buttons/delete-button.dryml
45
+ - taglibs/buttons/remote_method_button.dryml
46
+ - taglibs/buttons/transition_button.dryml
47
+ - taglibs/buttons/transition_link.dryml
48
+ - taglibs/buttons/update_button.dryml
49
+ - taglibs/cache/cache.dryml
50
+ - taglibs/cache/nested_cache.dryml
51
+ - taglibs/cards/card.dryml
52
+ - taglibs/cards/cards.dryml
53
+ - taglibs/cards/search_card.dryml
54
+ - taglibs/editors/click_editor.dryml
55
+ - taglibs/editors/editors.dryml
56
+ - taglibs/editors/live_editor.dryml
57
+ - taglibs/forms/error_messages.dryml
58
+ - taglibs/forms/form.dryml
59
+ - taglibs/forms/formlet.dryml
60
+ - taglibs/forms/forms.dryml
61
+ - taglibs/forms/submit.dryml
62
+ - taglibs/hobo_rapid.dryml
63
+ - taglibs/html/a.dryml
64
+ - taglibs/html/aside.dryml
65
+ - taglibs/html/doctype.dryml
66
+ - taglibs/html/empty_tag.dryml
67
+ - taglibs/html/footer.dryml
68
+ - taglibs/html/header.dryml
69
+ - taglibs/html/html.dryml
70
+ - taglibs/html/if_ie.dryml
71
+ - taglibs/html/image.dryml
72
+ - taglibs/html/javascript.dryml
73
+ - taglibs/html/section.dryml
74
+ - taglibs/html/section_group.dryml
75
+ - taglibs/html/stylesheet.dryml
76
+ - taglibs/html/table.dryml
77
+ - taglibs/i18n/ht.dryml
78
+ - taglibs/i18n/human_attribute_name
79
+ - taglibs/i18n/human_collection_name.dryml
80
+ - taglibs/i18n/i18n.dryml
81
+ - taglibs/i18n/model_name_human.dryml
82
+ - taglibs/i18n/t.dryml
83
+ - taglibs/inputs/after_submit.dryml
84
+ - taglibs/inputs/check_many.dryml
85
+ - taglibs/inputs/collection_input.dryml
86
+ - taglibs/inputs/hidden_field.dryml
87
+ - taglibs/inputs/hot_input.dryml
88
+ - taglibs/inputs/input.dryml
89
+ - taglibs/inputs/input_all.dryml
90
+ - taglibs/inputs/input_for.dryml
91
+ - taglibs/inputs/input_for_date.dryml
92
+ - taglibs/inputs/input_for_enum_string.dryml
93
+ - taglibs/inputs/input_many.dryml
94
+ - taglibs/inputs/inputs.dryml
95
+ - taglibs/inputs/name_one.dryml
96
+ - taglibs/inputs/or_cancel.dryml
97
+ - taglibs/inputs/select_input.dryml
98
+ - taglibs/inputs/select_many.dryml
99
+ - taglibs/inputs/select_menu.dryml
100
+ - taglibs/inputs/select_one.dryml
101
+ - taglibs/inputs/sortable_input_many.dryml
102
+ - taglibs/inputs/sti_type_input.dryml
103
+ - taglibs/lists/collection.dryml
104
+ - taglibs/lists/empty_collection_message.dryml
105
+ - taglibs/lists/feckless_fieldset.dryml
106
+ - taglibs/lists/field_list.dryml
107
+ - taglibs/lists/field_list_v1.dryml
108
+ - taglibs/lists/labelled_item_list.dryml
109
+ - taglibs/lists/lists.dryml
110
+ - taglibs/lists/with_fields.dryml
111
+ - taglibs/pages/account.dryml
112
+ - taglibs/pages/account_disabled.dryml
113
+ - taglibs/pages/flash_message.dryml
114
+ - taglibs/pages/forgot_password.dryml
115
+ - taglibs/pages/login.dryml
116
+ - taglibs/pages/not_found_page.dryml
117
+ - taglibs/pages/page_nav.dryml
118
+ - taglibs/pages/pages.dryml
119
+ - taglibs/pages/permission_denied_page.dryml
120
+ - taglibs/plus/collection_preview.dryml
121
+ - taglibs/plus/filter_menu.dryml
122
+ - taglibs/plus/gravatar.dryml
123
+ - taglibs/plus/live_search.dryml
124
+ - taglibs/plus/plus.dryml
125
+ - taglibs/plus/sortable_collection.dryml
126
+ - taglibs/plus/table_plus.dryml
127
+ - taglibs/views/a_or_an.dryml
128
+ - taglibs/views/collection_name.dryml
129
+ - taglibs/views/comma_list.dryml
130
+ - taglibs/views/count.dryml
131
+ - taglibs/views/links_for_collection.dryml
132
+ - taglibs/views/name.dryml
133
+ - taglibs/views/nil_view.dryml
134
+ - taglibs/views/record_flags.dryml
135
+ - taglibs/views/type_name.dryml
136
+ - taglibs/views/view.dryml
137
+ - taglibs/views/view_for.dryml
138
+ - taglibs/views/views.dryml
139
+ - taglibs/views/you.dryml
140
+ - vendor/assets/javascripts/hobo_rapid.js
141
+ - vendor/assets/stylesheets/feckless-fieldset.css
142
+ - vendor/assets/stylesheets/hobo-rapid.css
143
+ - vendor/assets/stylesheets/hobo_rapid.css
144
+ homepage: http://hobocentral.net
145
+ licenses: []
146
+
147
+ post_install_message:
148
+ rdoc_options:
149
+ - --charset=UTF-8
150
+ require_paths:
151
+ - lib
152
+ - vendor
153
+ required_ruby_version: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: "0"
159
+ required_rubygems_version: !ruby/object:Gem::Requirement
160
+ none: false
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: 1.3.6
165
+ requirements: []
166
+
167
+ rubyforge_project: hobo
168
+ rubygems_version: 1.8.17
169
+ signing_key:
170
+ specification_version: 3
171
+ summary: The RAPID tag library for Hobo
172
+ test_files: []
173
+
174
+ has_rdoc: