hobo 0.5.3 → 0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/hobo +18 -4
- data/hobo_files/plugin/CHANGES.txt +511 -0
- data/hobo_files/plugin/README +8 -3
- data/hobo_files/plugin/Rakefile +81 -0
- data/hobo_files/plugin/generators/hobo/hobo_generator.rb +4 -4
- data/hobo_files/plugin/generators/hobo/templates/guest.rb +1 -1
- data/hobo_files/plugin/generators/hobo_front_controller/hobo_front_controller_generator.rb +1 -1
- data/hobo_files/plugin/generators/hobo_front_controller/templates/index.dryml +16 -22
- data/hobo_files/plugin/generators/hobo_front_controller/templates/login.dryml +4 -6
- data/hobo_files/plugin/generators/hobo_front_controller/templates/search.dryml +6 -5
- data/hobo_files/plugin/generators/hobo_front_controller/templates/signup.dryml +4 -6
- data/hobo_files/plugin/generators/hobo_migration/hobo_migration_generator.rb +237 -0
- data/hobo_files/plugin/generators/hobo_migration/templates/migration.rb +9 -0
- data/hobo_files/plugin/generators/hobo_model/USAGE +2 -3
- data/hobo_files/plugin/generators/hobo_model/hobo_model_generator.rb +1 -14
- data/hobo_files/plugin/generators/hobo_model/templates/fixtures.yml +1 -6
- data/hobo_files/plugin/generators/hobo_model/templates/model.rb +10 -4
- data/hobo_files/plugin/generators/hobo_rapid/hobo_rapid_generator.rb +7 -6
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_base.css +68 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_rapid.css +93 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_rapid.js +11 -6
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/plus.png +0 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/stylesheets/application.css +24 -14
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/views/application.dryml +28 -44
- data/hobo_files/plugin/generators/hobo_user_model/USAGE +2 -12
- data/hobo_files/plugin/generators/hobo_user_model/hobo_user_model_generator.rb +1 -14
- data/hobo_files/plugin/generators/hobo_user_model/templates/fixtures.yml +0 -6
- data/hobo_files/plugin/generators/hobo_user_model/templates/model.rb +8 -1
- data/hobo_files/plugin/init.rb +6 -2
- data/hobo_files/plugin/lib/active_record/has_many_association.rb +23 -12
- data/hobo_files/plugin/lib/extensions.rb +134 -40
- data/hobo_files/plugin/lib/extensions/test_case.rb +0 -1
- data/hobo_files/plugin/lib/hobo.rb +77 -46
- data/hobo_files/plugin/lib/hobo/authenticated_user.rb +24 -2
- data/hobo_files/plugin/lib/hobo/authentication_support.rb +2 -1
- data/hobo_files/plugin/lib/hobo/controller.rb +35 -12
- data/hobo_files/plugin/lib/hobo/define_tags.rb +4 -4
- data/hobo_files/plugin/lib/hobo/dryml.rb +33 -51
- data/hobo_files/plugin/lib/hobo/dryml/dryml_builder.rb +47 -34
- data/hobo_files/plugin/lib/hobo/dryml/scoped_variables.rb +37 -0
- data/hobo_files/plugin/lib/hobo/dryml/taglib.rb +27 -5
- data/hobo_files/plugin/lib/hobo/dryml/template.rb +545 -302
- data/hobo_files/plugin/lib/hobo/dryml/template_environment.rb +305 -135
- data/hobo_files/plugin/lib/hobo/email_address.rb +5 -0
- data/hobo_files/plugin/lib/hobo/field_spec.rb +66 -0
- data/hobo_files/plugin/lib/hobo/hobo_helper.rb +325 -0
- data/hobo_files/plugin/lib/hobo/html_string.rb +2 -0
- data/hobo_files/plugin/lib/hobo/lazy_hash.rb +13 -1
- data/hobo_files/plugin/lib/hobo/markdown_string.rb +3 -1
- data/hobo_files/plugin/lib/hobo/model.rb +185 -66
- data/hobo_files/plugin/lib/hobo/model_controller.rb +56 -49
- data/hobo_files/plugin/lib/hobo/password_string.rb +2 -0
- data/hobo_files/plugin/lib/hobo/plugins.rb +75 -0
- data/hobo_files/plugin/lib/hobo/rapid_helper.rb +98 -0
- data/hobo_files/plugin/lib/hobo/static_tags +0 -3
- data/hobo_files/plugin/lib/hobo/textile_string.rb +11 -1
- data/hobo_files/plugin/lib/hobo/undefined.rb +1 -1
- data/hobo_files/plugin/lib/rexml.rb +166 -75
- data/hobo_files/plugin/spec/fixtures/users.yml +9 -0
- data/hobo_files/plugin/spec/spec.opts +6 -0
- data/hobo_files/plugin/spec/spec_helper.rb +28 -0
- data/hobo_files/plugin/spec/unit/hobo/dryml/template_spec.rb +650 -0
- data/hobo_files/plugin/tags/core.dryml +58 -4
- data/hobo_files/plugin/tags/rapid.dryml +289 -135
- data/hobo_files/plugin/tags/rapid_document_tags.dryml +49 -0
- data/hobo_files/plugin/tags/rapid_editing.dryml +92 -69
- data/hobo_files/plugin/tags/rapid_forms.dryml +242 -0
- data/hobo_files/plugin/tags/rapid_navigation.dryml +65 -65
- data/hobo_files/plugin/tags/rapid_pages.dryml +197 -124
- data/hobo_files/plugin/tags/rapid_support.dryml +23 -0
- metadata +29 -22
- data/hobo_files/plugin/generators/hobo_model/templates/migration.rb +0 -13
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/default_mapping.rb +0 -11
- data/hobo_files/plugin/generators/hobo_user_model/templates/migration.rb +0 -15
- data/hobo_files/plugin/lib/hobo/HtmlString +0 -3
- data/hobo_files/plugin/lib/hobo/controller_helpers.rb +0 -135
- data/hobo_files/plugin/lib/hobo/core.rb +0 -475
- data/hobo_files/plugin/lib/hobo/rapid.rb +0 -447
- data/hobo_files/plugin/test/hobo_dryml_template_test.rb +0 -7
- data/hobo_files/plugin/test/hobo_test.rb +0 -7
|
@@ -9,8 +9,8 @@ Description:
|
|
|
9
9
|
You don't have to think up all attributes up front, but it's a good idea of adding just the baseline of what's
|
|
10
10
|
needed to start really working with the resource.
|
|
11
11
|
|
|
12
|
-
The generator creates a model class in app/models, a test suite in test/unit
|
|
13
|
-
test/fixtures/singular_name.yml
|
|
12
|
+
The generator creates a model class in app/models, a test suite in test/unit and test fixtures in
|
|
13
|
+
test/fixtures/singular_name.yml.
|
|
14
14
|
|
|
15
15
|
Examples:
|
|
16
16
|
./script/generate model account
|
|
@@ -19,7 +19,6 @@ Examples:
|
|
|
19
19
|
Model: app/models/account.rb
|
|
20
20
|
Test: test/unit/account_test.rb
|
|
21
21
|
Fixtures: test/fixtures/accounts.yml
|
|
22
|
-
Migration: db/migrate/XXX_add_accounts.rb
|
|
23
22
|
|
|
24
23
|
./script/generate model post title:string created_on:date body:text published:boolean
|
|
25
24
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
class HoboModelGenerator < Rails::Generator::NamedBase
|
|
2
|
-
default_options :skip_migration => false
|
|
3
2
|
|
|
4
3
|
def manifest
|
|
5
4
|
record do |m|
|
|
@@ -15,24 +14,12 @@ class HoboModelGenerator < Rails::Generator::NamedBase
|
|
|
15
14
|
m.template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb")
|
|
16
15
|
m.template 'unit_test.rb', File.join('test/unit', class_path, "#{file_name}_test.rb")
|
|
17
16
|
m.template 'fixtures.yml', File.join('test/fixtures', class_path, "#{table_name}.yml")
|
|
18
|
-
|
|
19
|
-
unless options[:skip_migration]
|
|
20
|
-
m.migration_template 'migration.rb', 'db/migrate', :assigns => {
|
|
21
|
-
:migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}"
|
|
22
|
-
}, :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}"
|
|
23
|
-
end
|
|
24
17
|
end
|
|
25
18
|
end
|
|
26
19
|
|
|
27
20
|
protected
|
|
28
21
|
def banner
|
|
29
|
-
"Usage: #{$0}
|
|
22
|
+
"Usage: #{$0} #{spec.name} ModelName [field:type, field:type]"
|
|
30
23
|
end
|
|
31
24
|
|
|
32
|
-
def add_options!(opt)
|
|
33
|
-
opt.separator ''
|
|
34
|
-
opt.separator 'Options:'
|
|
35
|
-
opt.on("--skip-migration",
|
|
36
|
-
"Don't generate a migration file for this model") { |v| options[:skip_migration] = v }
|
|
37
|
-
end
|
|
38
25
|
end
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
|
2
2
|
one:
|
|
3
3
|
id: 1
|
|
4
|
-
|
|
5
|
-
<%= attribute.name %>: <%= attribute.default %>
|
|
6
|
-
<% end -%>
|
|
4
|
+
|
|
7
5
|
two:
|
|
8
6
|
id: 2
|
|
9
|
-
<% for attribute in attributes -%>
|
|
10
|
-
<%= attribute.name %>: <%= attribute.default %>
|
|
11
|
-
<% end -%>
|
|
@@ -2,22 +2,28 @@ class <%= class_name %> < ActiveRecord::Base
|
|
|
2
2
|
|
|
3
3
|
hobo_model
|
|
4
4
|
|
|
5
|
+
fields do
|
|
6
|
+
<% for attribute in attributes -%>
|
|
7
|
+
<%= attribute.name %> :<%= attribute.type %>
|
|
8
|
+
<% end -%>
|
|
9
|
+
end
|
|
10
|
+
|
|
5
11
|
|
|
6
12
|
# --- Hobo Permissions --- #
|
|
7
13
|
|
|
8
|
-
def creatable_by?(
|
|
14
|
+
def creatable_by?(user)
|
|
9
15
|
false
|
|
10
16
|
end
|
|
11
17
|
|
|
12
|
-
def updatable_by?(
|
|
18
|
+
def updatable_by?(user, new)
|
|
13
19
|
false
|
|
14
20
|
end
|
|
15
21
|
|
|
16
|
-
def deletable_by?(
|
|
22
|
+
def deletable_by?(user)
|
|
17
23
|
false
|
|
18
24
|
end
|
|
19
25
|
|
|
20
|
-
def viewable_by?(
|
|
26
|
+
def viewable_by?(user, field)
|
|
21
27
|
true
|
|
22
28
|
end
|
|
23
29
|
|
|
@@ -11,16 +11,17 @@ class HoboRapidGenerator < Hobo::Generator
|
|
|
11
11
|
|
|
12
12
|
record do |m|
|
|
13
13
|
m.file "hobo_rapid.js", "public/javascripts/hobo_rapid.js"
|
|
14
|
-
m.file "
|
|
14
|
+
m.file "hobo_base.css", "public/stylesheets/hobo_base.css"
|
|
15
|
+
m.file "hobo_rapid.css", "public/stylesheets/hobo_rapid.css"
|
|
15
16
|
create_all(m, "themes/default/public", "public/hobothemes/default")
|
|
16
|
-
create_all(m, "themes/default/views", "app/views/
|
|
17
|
+
create_all(m, "themes/default/views", "app/views/taglibs/themes/default")
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
def import_tags
|
|
21
|
-
path = File.join(RAILS_ROOT, "app/views/
|
|
22
|
+
path = File.join(RAILS_ROOT, "app/views/taglibs/application.dryml")
|
|
22
23
|
|
|
23
|
-
tag = "<
|
|
24
|
+
tag = "<include src=\"plugins/hobo/tags/rapid\"/>\n\n<set_theme name=\"default\"/>\n"
|
|
24
25
|
|
|
25
26
|
src = File.read(path)
|
|
26
27
|
return if src.include?(tag)
|
|
@@ -37,14 +38,14 @@ class HoboRapidGenerator < Hobo::Generator
|
|
|
37
38
|
|
|
38
39
|
protected
|
|
39
40
|
def banner
|
|
40
|
-
"Usage: #{$0}
|
|
41
|
+
"Usage: #{$0} #{spec.name} [--import-tags]"
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
def add_options!(opt)
|
|
44
45
|
opt.separator ''
|
|
45
46
|
opt.separator 'Options:'
|
|
46
47
|
opt.on("--import-tags",
|
|
47
|
-
"Modify
|
|
48
|
+
"Modify taglibs/application.dryml to import hobo-rapid and theme tags ") do |v|
|
|
48
49
|
options[:import_tags] = true
|
|
49
50
|
end
|
|
50
51
|
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/******** Reset default browser CSS styles. *********/
|
|
2
|
+
/* Based on Blueprint */
|
|
3
|
+
|
|
4
|
+
html, body, div, span, applet, object, iframe,
|
|
5
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
6
|
+
a, abbr, acronym, address, big, cite, code,
|
|
7
|
+
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
|
8
|
+
small, strike, strong, sub, sup, tt, var,
|
|
9
|
+
dl, dt, dd, ol, ul, li,
|
|
10
|
+
fieldset, form, label, legend,
|
|
11
|
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
border: 0;
|
|
15
|
+
outline: 0;
|
|
16
|
+
font-weight: inherit;
|
|
17
|
+
font-style: inherit;
|
|
18
|
+
font-size: 100%;
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
vertical-align: baseline;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Remember to define focus styles! */
|
|
24
|
+
:focus {
|
|
25
|
+
outline: 0;
|
|
26
|
+
}
|
|
27
|
+
body {
|
|
28
|
+
line-height: 1;
|
|
29
|
+
color: black;
|
|
30
|
+
background: white;
|
|
31
|
+
}
|
|
32
|
+
ol, ul {
|
|
33
|
+
list-style: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Tables still need 'cellspacing="0"' in the markup. */
|
|
37
|
+
table {
|
|
38
|
+
border-collapse: separate;
|
|
39
|
+
border-spacing: 0;
|
|
40
|
+
}
|
|
41
|
+
caption, th, td {
|
|
42
|
+
text-align: left;
|
|
43
|
+
font-weight: normal;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Remove possible quote marks (") from <q>, <blockquote>. */
|
|
47
|
+
blockquote:before, blockquote:after,
|
|
48
|
+
q:before, q:after {
|
|
49
|
+
content: "";
|
|
50
|
+
}
|
|
51
|
+
blockquote, q {
|
|
52
|
+
quotes: "" "";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
body,ul,ol,dl,h1,h2,h3,h4,h5,h6,td,th,
|
|
56
|
+
caption,pre,p,blockquote,input,textarea {
|
|
57
|
+
font-family: "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
}
|
|
60
|
+
h1,h2,h3,h4,h5,h6 { font-weight: bold; }
|
|
61
|
+
h1 { font-size: 36px;}
|
|
62
|
+
h2 { font-size: 28px;}
|
|
63
|
+
h3 { font-size: 18px;}
|
|
64
|
+
h4 { font-size: 14px;}
|
|
65
|
+
h5 { font-size: 12px;}
|
|
66
|
+
h6 { font-size: 10px;}
|
|
67
|
+
|
|
68
|
+
ul, ol { list-style: none;}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**** Default styling for Rapid ****/
|
|
2
|
+
|
|
3
|
+
#ajax_progress {
|
|
4
|
+
color: grey;
|
|
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
|
+
border: 1px dashed grey;
|
|
16
|
+
margin: 10px;
|
|
17
|
+
padding: 3px;
|
|
18
|
+
/* padding-top: -15px;*/
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#ajax_progress img {
|
|
22
|
+
padding-left: 6px;
|
|
23
|
+
vertical-align: middle;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/* Scriptaculous Autocompleter ---*/
|
|
28
|
+
|
|
29
|
+
div.completions_popup {
|
|
30
|
+
position:absolute;
|
|
31
|
+
width:250px;
|
|
32
|
+
background-color:white;
|
|
33
|
+
border:1px solid #888;
|
|
34
|
+
margin:0px;
|
|
35
|
+
padding:0px;
|
|
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
|
+
|
|
77
|
+
/* rails error message */
|
|
78
|
+
.errorExplanation {
|
|
79
|
+
font-family: "Lucida Grande", arial, sans-serif;
|
|
80
|
+
background: #9d0018;
|
|
81
|
+
border: 1px solid #7a0013;
|
|
82
|
+
padding: 20px;
|
|
83
|
+
color: white;
|
|
84
|
+
margin-bottom: 20px;
|
|
85
|
+
}
|
|
86
|
+
.errorExplanation h2 {
|
|
87
|
+
text-transform: none;
|
|
88
|
+
letter-spacing: normal;
|
|
89
|
+
color: white;
|
|
90
|
+
}
|
|
91
|
+
.errorExplanation li {
|
|
92
|
+
margin-left: 20px;
|
|
93
|
+
}
|
|
@@ -47,6 +47,7 @@ var Hobo = {
|
|
|
47
47
|
var i = 0
|
|
48
48
|
if (updates.length > 0) {
|
|
49
49
|
updates.each(function(dom_id) {
|
|
50
|
+
if (!hoboParts[dom_id]) { throw "Update of dom-id that is not a part: " + dom_id }
|
|
50
51
|
params.push("render["+i+"][part]=" + hoboParts[dom_id][0])
|
|
51
52
|
params.push("render["+i+"][id]=" + dom_id)
|
|
52
53
|
params.push("render["+i+"][object]=" + hoboParts[dom_id][1])
|
|
@@ -71,8 +72,8 @@ var Hobo = {
|
|
|
71
72
|
ajaxRequest: function(url_or_form, message, updates, options) {
|
|
72
73
|
options = Object.merge({ asynchronous:true,
|
|
73
74
|
evalScripts:true,
|
|
74
|
-
resetForm:
|
|
75
|
-
refocusForm:
|
|
75
|
+
resetForm: false,
|
|
76
|
+
refocusForm: false
|
|
76
77
|
}, options)
|
|
77
78
|
if (typeof url_or_form == "string") {
|
|
78
79
|
var url = url_or_form
|
|
@@ -102,7 +103,7 @@ var Hobo = {
|
|
|
102
103
|
|
|
103
104
|
if (options.onComplete)
|
|
104
105
|
options.onComplete.apply(this, arguments)
|
|
105
|
-
if (form && options) Form.focusFirstElement(form)
|
|
106
|
+
if (form && options.refocusForm) Form.focusFirstElement(form)
|
|
106
107
|
}
|
|
107
108
|
if (options.method && options.method.toLowerCase() == "put") {
|
|
108
109
|
delete options.method
|
|
@@ -221,7 +222,9 @@ var Hobo = {
|
|
|
221
222
|
})
|
|
222
223
|
|
|
223
224
|
select(".in_place_html_textarea_bhv").each(function (el) {
|
|
224
|
-
var
|
|
225
|
+
var options = {rows: 2, handleLineBreaks: false}
|
|
226
|
+
if (typeof(tinyMCE) != "undefined") options["submitOnBlur"] = false
|
|
227
|
+
var ipe = Hobo._makeInPlaceEditor(el, options)
|
|
225
228
|
if (typeof(tinyMCE) != "undefined") {
|
|
226
229
|
ipe.afterEnterEditMode = function() {
|
|
227
230
|
var id = this.form.id = Hobo.uid()
|
|
@@ -283,8 +286,10 @@ var Hobo = {
|
|
|
283
286
|
if (spinner) Hobo.hide(spinner)
|
|
284
287
|
if (search_results_panel) {
|
|
285
288
|
Hobo.show(search_results_panel)
|
|
286
|
-
|
|
289
|
+
}
|
|
290
|
+
setTimeout(function() {Hobo.applyEvents(search_results)}, 1)
|
|
287
291
|
},
|
|
292
|
+
method: "get",
|
|
288
293
|
parameters:"query=" + value });
|
|
289
294
|
} else {
|
|
290
295
|
Hobo.updateElement(search_results, '')
|
|
@@ -301,7 +306,7 @@ var Hobo = {
|
|
|
301
306
|
|
|
302
307
|
fieldSetParam: function(el, val) {
|
|
303
308
|
spec = Hobo.parseFieldId(el)
|
|
304
|
-
return spec.name + '[' + spec.field + ']=' +
|
|
309
|
+
return spec.name + '[' + spec.field + ']=' + encodeURIComponent(val)
|
|
305
310
|
},
|
|
306
311
|
|
|
307
312
|
fadeObjectElement: function(el) {
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
form.button-to { margin: 0; padding: 0; }
|
|
2
2
|
|
|
3
|
-
.
|
|
3
|
+
.card { padding: 5px; margin: 5px; border: 1px dashed #ddd; background: #fbfbfb; }
|
|
4
4
|
|
|
5
5
|
/* Todo: Big cleanup of this stylesheet */
|
|
6
6
|
|
|
@@ -37,22 +37,31 @@ a:hover.no_hover { background: transparent; }
|
|
|
37
37
|
|
|
38
38
|
/* Main Page Body Window */
|
|
39
39
|
|
|
40
|
-
#header .logo {
|
|
40
|
+
#header .logo { position: absolute; top: 15px; left: 20px; }
|
|
41
41
|
#header .logo a { background: transparent; }
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
#header {
|
|
44
|
+
position: relative;
|
|
45
|
+
height: 80px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.nav {
|
|
49
|
+
padding: 20px 15px 0 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.nav ul { margin: 0; padding: 0; float: right; }
|
|
53
|
+
ul.account_nav { font-size: 80%; clear:right; }
|
|
46
54
|
|
|
47
|
-
.
|
|
55
|
+
.nav li { list-style: none; margin: 0; padding: 0; float: left; padding: 5px; font-size: 130%; }
|
|
56
|
+
.nav a { text-decoration: none;}
|
|
48
57
|
|
|
49
|
-
.
|
|
58
|
+
.main_nav li { text-transform: uppercase; }
|
|
50
59
|
|
|
51
60
|
.flash { margin: 10px 30px; background: white; border: 2px solid #aaf; padding: 10px; text-align: center; }
|
|
52
61
|
|
|
53
62
|
#page {
|
|
54
63
|
width:800px;
|
|
55
|
-
background-color
|
|
64
|
+
background-color: white;
|
|
56
65
|
margin-left:auto;
|
|
57
66
|
margin-right:auto;
|
|
58
67
|
}
|
|
@@ -157,6 +166,7 @@ img.nav_main.current { border-top: 1px solid grey; border-bottom: 1px solid grey
|
|
|
157
166
|
font-size: 10px;
|
|
158
167
|
text-align:center;
|
|
159
168
|
margin:21px;
|
|
169
|
+
background-color:#D2D2D2;
|
|
160
170
|
}
|
|
161
171
|
|
|
162
172
|
|
|
@@ -209,15 +219,15 @@ div.completions_popup ul li {
|
|
|
209
219
|
|
|
210
220
|
th { text-align: left; padding: 5px; }
|
|
211
221
|
|
|
212
|
-
.
|
|
213
|
-
.
|
|
214
|
-
.
|
|
222
|
+
.field_list { width:95%; }
|
|
223
|
+
.field_list td { padding: 5px; vertical-align: middle; }
|
|
224
|
+
.field_list th {
|
|
215
225
|
text-align: left; width: 1px; white-space: nowrap; vertical-align: top;
|
|
216
226
|
padding-top: 10px; padding-bottom: 10px;
|
|
217
227
|
}
|
|
218
|
-
.
|
|
219
|
-
.
|
|
220
|
-
.
|
|
228
|
+
.field_list input[type=text] { width: 100%; }
|
|
229
|
+
.field_list input, .field_list textarea { margin: -2px 0 0 0; }
|
|
230
|
+
.field_list textarea { width: 100%; margin: 0; }
|
|
221
231
|
|
|
222
232
|
td span.in_place_textfield_bhv, td span.in_place_textarea_bhv, td span.in_place_html_textarea_bhv {
|
|
223
233
|
display: block; border: 1px solid #ddd;
|
data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/views/application.dryml
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
<
|
|
1
|
+
<include src="plugins/hobo/tags/rapid"/>
|
|
2
2
|
|
|
3
|
-
<def tag="
|
|
4
|
-
<% title ||= human_type + ": " +
|
|
5
|
-
|
|
3
|
+
<def tag="Page" attrs="title_prefix, title">
|
|
4
|
+
<% title ||= human_type + ": " + name(:no_wrapper => true) %>
|
|
5
|
+
<doctype version="HTML 4.01 Transitional"/>
|
|
6
6
|
<html>
|
|
7
|
-
<head
|
|
7
|
+
<head param="head">
|
|
8
8
|
<title><%= title_prefix %><%= title %></title>
|
|
9
9
|
<theme_stylesheet/>
|
|
10
10
|
<%= javascript_include_tag :defaults %>
|
|
11
|
-
<hobo_rapid_javascripts
|
|
11
|
+
<hobo_rapid_javascripts param="rapid_javascripts"/>
|
|
12
12
|
</head>
|
|
13
13
|
|
|
14
|
-
<body onload="Hobo.applyEvents()"
|
|
14
|
+
<body onload="Hobo.applyEvents()" param="body">
|
|
15
15
|
|
|
16
|
-
<
|
|
17
|
-
<div>
|
|
18
|
-
<span id="ajax_progress_text"></span><theme_img src="spinner.gif"/>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
16
|
+
<ajax_progress/>
|
|
21
17
|
|
|
22
18
|
<div id="page">
|
|
23
19
|
|
|
@@ -31,26 +27,20 @@
|
|
|
31
27
|
<div id="page_corner01">
|
|
32
28
|
<div id="page_inner_top">
|
|
33
29
|
|
|
34
|
-
<div id='header'
|
|
35
|
-
<div class="logo"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
<div class="account_nav" content_option="account_nav"><application_account_nav/></div>
|
|
41
|
-
</if>
|
|
42
|
-
</div>
|
|
43
|
-
<clearer/>
|
|
30
|
+
<div id='header' param="header">
|
|
31
|
+
<div class="logo" param="logo"><theme_image src="logo.gif"/></div>
|
|
32
|
+
<nav param>
|
|
33
|
+
<magic_nav class="main_nav" param="main_nav"/>
|
|
34
|
+
<if test="&defined_route? :login"><account_nav param/></if>
|
|
35
|
+
</nav>
|
|
44
36
|
</div>
|
|
45
37
|
|
|
46
|
-
<
|
|
47
|
-
<div class="flash"><%= flash[:notice] %></div>
|
|
48
|
-
</if>
|
|
38
|
+
<flash_message/>
|
|
49
39
|
|
|
50
|
-
<div
|
|
51
|
-
<div
|
|
52
|
-
<div class="maincol"
|
|
53
|
-
<div class="sidecol"
|
|
40
|
+
<div param="intro"></div>
|
|
41
|
+
<div param="main">
|
|
42
|
+
<div class="maincol" param="maincol"/>
|
|
43
|
+
<div class="sidecol" param="sidecol"/>
|
|
54
44
|
</div>
|
|
55
45
|
|
|
56
46
|
<clearer/>
|
|
@@ -58,14 +48,13 @@
|
|
|
58
48
|
</div></div></div></div></div></div></div></div></div>
|
|
59
49
|
</div>
|
|
60
50
|
|
|
61
|
-
<div id="footer" content_option="footer"/>
|
|
62
51
|
</body>
|
|
63
52
|
</html>
|
|
64
53
|
</def>
|
|
65
54
|
|
|
66
55
|
|
|
67
56
|
<def tag="panel">
|
|
68
|
-
<div class="panel"
|
|
57
|
+
<div class="panel" merge_attrs="&true">
|
|
69
58
|
<div class="panel_top"><div class="panel_right">
|
|
70
59
|
<div class="panel_bottom"><div class="panel_left">
|
|
71
60
|
<div class="panel_corner02"><div class="panel_corner04">
|
|
@@ -76,29 +65,24 @@
|
|
|
76
65
|
</div></div></div></div></div></div></div></div>
|
|
77
66
|
</div>
|
|
78
67
|
</def>
|
|
79
|
-
|
|
68
|
+
<!-->
|
|
80
69
|
<def tag="section">
|
|
81
|
-
<div class="section"
|
|
70
|
+
<div class="section" merge_attrs="&true"><tagbody/></div>
|
|
82
71
|
</def>
|
|
83
|
-
|
|
72
|
+
-->
|
|
84
73
|
|
|
85
74
|
<def tag="navbar" attrs="items,current">
|
|
86
|
-
<repeat
|
|
75
|
+
<repeat with="&items">
|
|
87
76
|
<div class='nav_item <%= "current" if current == this[0] %>'><%= link_to this[0].upcase, this[1] %></div>
|
|
88
77
|
</repeat>
|
|
89
78
|
<clearer/>
|
|
90
79
|
</def>
|
|
91
80
|
|
|
92
|
-
|
|
81
|
+
<!--
|
|
93
82
|
<def tag="application_nav">
|
|
94
|
-
<% items = [['Home',
|
|
83
|
+
<% items = [['Home', base_url + '/']] +
|
|
95
84
|
Hobo.models[0..2].map{|m| [m.name.pluralize.titlecase, object_url(m)]} +
|
|
96
85
|
[['Search', (search_url rescue "")]] %>
|
|
97
|
-
<navbar items="
|
|
86
|
+
<navbar items="&items"/>
|
|
98
87
|
</def>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<def tag="application_logo">
|
|
102
|
-
<theme_img src="logo.gif"/>
|
|
103
|
-
</def>
|
|
104
|
-
|
|
88
|
+
-->
|