hobo_clean 2.0.0.pre1 → 2.0.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/hobo_clean.gemspec +1 -0
- data/lib/hobo_clean.rb +4 -0
- data/taglibs/hobo_clean.dryml +41 -9
- metadata +20 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0.
|
1
|
+
2.0.0.pre2
|
data/hobo_clean.gemspec
CHANGED
@@ -12,6 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = File.read(File.expand_path('../README', __FILE__))
|
13
13
|
|
14
14
|
s.add_runtime_dependency('hobo', ["= #{version}"])
|
15
|
+
s.add_runtime_dependency('hobo_jquery_ui', ["= #{version}"])
|
15
16
|
|
16
17
|
s.files = `git ls-files -x #{name}/* -z`.split("\0")
|
17
18
|
|
data/lib/hobo_clean.rb
CHANGED
data/taglibs/hobo_clean.dryml
CHANGED
@@ -9,24 +9,25 @@
|
|
9
9
|
|
10
10
|
<!-- Renders `<div id="ajax-progress"><div><span id="ajax-progress-text"></span></div></div>`. -->
|
11
11
|
<def tag="ajax-progress">
|
12
|
-
<div id="ajax-progress
|
13
|
-
<div>
|
14
|
-
<
|
12
|
+
<div id="ajax-progress-wrapper">
|
13
|
+
<div id="ajax-progress" class="ajax-progress" merge-attrs>
|
14
|
+
<div>
|
15
|
+
<span id="ajax-progress-text"></span>
|
16
|
+
</div>
|
15
17
|
</div>
|
16
18
|
</div>
|
17
19
|
</def>
|
18
20
|
|
19
|
-
<!-- The basic page structure for all the pages in a Hobo Rapid application.
|
20
|
-
|
21
|
-
The easiest way to see what this tag does is to look at the source.
|
21
|
+
<!-- The basic page structure for all the pages in a Hobo Rapid application that uses the hobo_clean theme, or a variation on it. Provides the doctype, page title, standard stylesheet javascript includes, the ajax progress spinner, default header with app-name, account navigation, main navigation, and live search, empty section for the page content, flash message (if any) and an empty page footer.
|
22
22
|
|
23
23
|
### Attributes
|
24
24
|
|
25
25
|
- `title` - the page title, will have ": `[app-name]`" appended
|
26
26
|
- `full-title` - the full page title. Set this if you do not want the app name suffix.
|
27
|
+
- `bottom-load-javascript` - if set, will load Javascript at the bottom of the page rather than in head
|
27
28
|
|
28
29
|
-->
|
29
|
-
<def tag="page" attrs="title, full-title">
|
30
|
+
<def tag="page" attrs="title, full-title, bottom-load-javascript">
|
30
31
|
<% full_title ||= "#{title} : #{app_name}" %>
|
31
32
|
<html merge-attrs>
|
32
33
|
<head param>
|
@@ -35,9 +36,13 @@ The easiest way to see what this tag does is to look at the source.
|
|
35
36
|
<stylesheet name="#{subsite || 'front'}" param="app-stylesheet"/>
|
36
37
|
</do>
|
37
38
|
|
38
|
-
<do param="scripts"><%# in Hobo <= 1.3, we had other javascripts here. Now the asset pipeline is preferred. %>
|
39
|
+
<do param="scripts" if="&!bottom_load_javascript"><%# in Hobo <= 1.3, we had other javascripts here. Now the asset pipeline is preferred. %>
|
39
40
|
<javascript param="application-javascript" name="#{subsite || 'front'}"/>
|
40
|
-
<do param="custom-scripts"
|
41
|
+
<do param="custom-scripts">
|
42
|
+
<script type="text/javascript">
|
43
|
+
<do param="custom-javascript"/>
|
44
|
+
</script>
|
45
|
+
</do>
|
41
46
|
</do>
|
42
47
|
<%= csrf_meta_tag %>
|
43
48
|
</head>
|
@@ -54,6 +59,33 @@ The easiest way to see what this tag does is to look at the source.
|
|
54
59
|
<section with-flash-messages param="content"/>
|
55
60
|
<footer class="page-footer" param/>
|
56
61
|
<page-scripts param/>
|
62
|
+
|
63
|
+
<if test="&bottom_load_javascript">
|
64
|
+
<script defer type="text/javascript">
|
65
|
+
(function() {
|
66
|
+
function getScript(url,success){
|
67
|
+
var script=document.createElement('script');
|
68
|
+
script.src=url;
|
69
|
+
var head=document.getElementsByTagName('head')[0],
|
70
|
+
done=false;
|
71
|
+
script.onload=script.onreadystatechange = function(){
|
72
|
+
if (!done){
|
73
|
+
if (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete'){
|
74
|
+
done=true;
|
75
|
+
success();
|
76
|
+
script.onload = script.onreadystatechange = null;
|
77
|
+
head.removeChild(script);
|
78
|
+
}}
|
79
|
+
};
|
80
|
+
head.appendChild(script);
|
81
|
+
}
|
82
|
+
|
83
|
+
getScript('<%= asset_path((subsite || 'front')+'.js')%>',function(){
|
84
|
+
<do param="custom-javascript"/>
|
85
|
+
});
|
86
|
+
})();
|
87
|
+
</script>
|
88
|
+
</if>
|
57
89
|
</set-scoped>
|
58
90
|
</body>
|
59
91
|
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hobo_clean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.pre2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hobo
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.0.0.
|
21
|
+
version: 2.0.0.pre2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,23 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 2.0.0.
|
29
|
+
version: 2.0.0.pre2
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: hobo_jquery_ui
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - '='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.0.0.pre2
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - '='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.0.0.pre2
|
30
46
|
description: ! 'This gem is a Hobo plugin that implements the default Hobo theme.
|
31
47
|
|
32
48
|
'
|