public
Description: The web app builder for Rails
Homepage: http://hobocentral.net
Clone URL: git://github.com/tablatom/hobo.git
Contributions to the 'Make Hobo Validate' initiative
jgarlick (author)
Fri Jun 27 05:52:26 -0700 2008
commit  f62e7cd14d1fa662119fde006fe9fd0b008d8a60
tree    62d8a4ea3c3c3d5870b5585bcaab5d7173d51e93
parent  4b7d05235358bc05b2e02cc09479a3581976c5ed
...
681
682
683
684
 
685
686
687
...
681
682
683
 
684
685
686
687
0
@@ -681,7 +681,7 @@ module Hobo::Dryml
0
       part_name = el.attributes['part']
0
       if part_name
0
         part_id = part_name && "<%= #{attribute_to_ruby(el.attributes['id'] || part_name)} %>"
0
- "<span class='part-wrapper' id='#{part_id}'>" + part_element(el, call) + "</span>"
0
+ "<div class='part-wrapper' id='#{part_id}'>" + part_element(el, call) + "</div>"
0
       else
0
         call
0
       end
...
440
441
442
443
 
444
445
446
...
440
441
442
 
443
444
445
446
0
@@ -440,7 +440,7 @@ module Hobo::Dryml
0
 
0
     def part_contexts_javascripts
0
       storage = part_contexts_storage
0
- storage.blank? ? "" : "<script>\n#{storage}</script>\n"
0
+ storage.blank? ? "" : "<script type=\"text/javascript\">\n#{storage}</script>\n"
0
     end
0
 
0
 
...
235
236
237
238
 
239
240
241
...
282
283
284
285
 
286
287
288
...
413
414
415
 
416
417
 
418
419
420
...
235
236
237
 
238
239
240
241
...
282
283
284
 
285
286
287
288
...
413
414
415
416
417
418
419
420
421
422
0
@@ -235,7 +235,7 @@
0
           
0
           if view_tag == "view" # i.e. it didn't find a type specific tag
0
             if this.respond_to?(:to_html)
0
- this.to_html
0
+ this.to_html(scope.xmldoctype)
0
             else
0
               this.to_s
0
             end
0
@@ -282,7 +282,7 @@
0
 
0
 <def tag="view" for="Numeric" attrs="format"><%= format ? format % this : this.to_s %></def>
0
 
0
-<def tag="view" for="string"><%= this.try.to_html || h(this).gsub("\n", "<br/>") %></def>
0
+<def tag="view" for="string"><%= this.try.to_html(scope.xmldoctype) || h(this).gsub("\n", "<br#{scope.xmldoctype ? ' /' : ''}>") %></def>
0
 
0
 <def tag="view" for="boolean"><%= this ? 'Yes' : 'No' %></def>
0
 
0
@@ -413,8 +413,10 @@ in the future - use at your own risk. -->
0
 <def tag="filter-menu" attrs="param-name, options, no-filter">
0
   <% no_filter ||= "All" %>
0
   <form action="&request.request_uri" method="get" class="filter-menu">
0
+ <div>
0
     <hidden-form-field name="filter-parameter" value="&param_name"/>
0
     <select-menu name="&param_name" options="&options" selected="&params[param_name.gsub('-', '_')]" first-option="&no_filter" merge-params/>
0
+ </div>
0
   </form>
0
 </def>
0
 
...
72
73
74
 
 
75
76
77
 
78
79
80
...
72
73
74
75
76
77
 
 
78
79
80
81
0
@@ -72,9 +72,10 @@
0
                   view_name.sub(Hobo::Dryml::EMPTY_PAGE, params[:action])
0
                 end
0
     page_path_hidden = hidden_field_tag("page_path", page_path) unless method == "get"
0
+
0
+ hiddens_div = element(:div, {:class => "hidden-fields"}, [http_method_hidden, page_path_hidden, auth_token, hiddens].join)
0
      
0
- body = [http_method_hidden, page_path_hidden, auth_token, hiddens, body].join
0
-
0
+ body = [hiddens_div, body].join
0
     
0
     if action.nil? # don't add automatic css classes if the action was specified
0
       if web_method
...
12
13
14
15
 
16
17
18
...
12
13
14
 
15
16
17
18
0
@@ -12,7 +12,7 @@ module HoboFields
0
       self =~ /^\s*([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\s*$/i
0
     end
0
 
0
- def to_html
0
+ def to_html(xmldoctype = true)
0
       self
0
     end
0
 
...
2
3
4
5
 
6
7
8
...
2
3
4
 
5
6
7
8
0
@@ -2,7 +2,7 @@ module HoboFields
0
 
0
   class HtmlString < HoboFields::Text
0
 
0
- def to_html
0
+ def to_html(xmldoctype = true)
0
       self
0
     end
0
 
...
4
5
6
7
 
8
9
10
...
4
5
6
 
7
8
9
10
0
@@ -4,7 +4,7 @@ module HoboFields
0
 
0
     HoboFields.register_type(:markdown, self)
0
 
0
- def to_html
0
+ def to_html(xmldoctype = true)
0
       blank? ? "" : BlueCloth.new(self).to_html
0
     end
0
 
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@ module HoboFields
0
 
0
     HoboFields.register_type(:password, self)
0
 
0
- def to_html
0
+ def to_html(xmldoctype = true)
0
       "[password hidden]"
0
     end
0
 
...
6
7
8
9
10
 
 
11
12
13
...
6
7
8
 
 
9
10
11
12
13
0
@@ -6,8 +6,8 @@ module HoboFields
0
 
0
     COLUMN_TYPE = :text
0
 
0
- def to_html
0
- gsub(/[&"><]/) { |special| HTML_ESCAPE[special] }.gsub("\n", "<br />\n")
0
+ def to_html(xmldoctype = true)
0
+ gsub(/[&"><]/) { |special| HTML_ESCAPE[special] }.gsub("\n", "<br#{xmldoctype ? ' /' : ''}>\n")
0
     end
0
 
0
     HoboFields.register_type(:text, self)
...
4
5
6
7
 
8
9
10
...
4
5
6
 
7
8
9
10
0
@@ -4,7 +4,7 @@ module HoboFields
0
 
0
   class TextileString < HoboFields::Text
0
 
0
- def to_html
0
+ def to_html(xmldoctype = true)
0
       if blank?
0
         ""
0
       else
...
37
38
39
40
 
41
42
43
...
37
38
39
 
40
41
42
43
0
@@ -37,7 +37,7 @@ This class defines the methods `to_html` to customize the way the type is render
0
    "is too long (you shouldn't shout that much)" if length > 100
0
    end
0
 
0
- def to_html
0
+ def to_html(xmldoctype = true)
0
    upcase
0
    end
0
 

Comments

    No one has commented yet.