hobo_bootstrap 2.0.0.pre1 → 2.0.0.pre3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.pre1
1
+ 2.0.0.pre3
@@ -11,7 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.summary = 'A bootstrap based theme for Hobo'
12
12
  s.description = 'A bootstrap based theme for Hobo'
13
13
 
14
- s.add_runtime_dependency('hobo', ["~> #{version}"])
14
+ s.add_runtime_dependency('hobo', "~> 2.0.0.pre1")
15
+ s.add_runtime_dependency('hobo_jquery_ui', ["= #{version}"])
15
16
  s.add_runtime_dependency "compass_twitter_bootstrap", "~> 2.0.3"
16
17
  s.add_runtime_dependency "compass-rails", "~> 1.0.3"
17
18
  s.add_runtime_dependency "will_paginate-bootstrap", "~> 0.2.1"
@@ -4,6 +4,9 @@
4
4
  require 'compass_twitter_bootstrap'
5
5
  require 'compass-rails'
6
6
  require 'will_paginate-bootstrap'
7
+ require 'hobo_rapid'
8
+ require 'hobo_jquery'
9
+ require 'hobo_jquery_ui'
7
10
 
8
11
  module HoboBootstrap
9
12
 
@@ -3,7 +3,7 @@
3
3
  <a with="&this_parent" action="edit">
4
4
  <i class="icon icon-edit"></i>
5
5
  </a>
6
- <%= link_to '<i class=\'icon-trash\'></i>'.html_safe, this_parent, :confirm => t('hobo.messages.confirm', :default=>'Are you sure?'), method: :delete %>
6
+ <%= link_to '<i class=\'icon-trash\'></i>'.html_safe, this_parent, :'data-confirm' => t('hobo.messages.confirm', :default=>'Are you sure?'), method: :delete %>
7
7
  </def>
8
8
 
9
9
  <extend tag="index-page">
@@ -100,11 +100,11 @@ When not logged in, renders:
100
100
  This is a simple tag - just look at the source if you need to know more detail.
101
101
 
102
102
  -->
103
- <def tag="account-nav">
103
+ <def tag="account-nav" attrs="include-search">
104
104
  <div class="nav-collapse collapse">
105
105
  <do with="&current_user">
106
106
  <ul class="navigation account-nav nav pull-right" param>
107
-
107
+ <li if="&include_search" param="search"><live-search param if="&defined_route? :site_search"/></li>
108
108
  <li if="&Rails.env.development?" param="dev-user-changer"><dev-user-changer/></li>
109
109
  <if test="&logged_in?">
110
110
  <li class='nav-item' param="logged-in-as"><a to="&current_user"><t key="hobo.actions.logged_in_as" name="&name">Logged in as <name/></t></a></li>
@@ -13,8 +13,10 @@
13
13
 
14
14
  Attributes:
15
15
 
16
+ - `bottom-load-javascript` - if set, will load Javascript at the bottom of the page rather than in head
16
17
  - nav-location: `top`, `sub`. Where do you want your main-nav located. `top` merges it into the top bar, `sub` gives it its own bar. `top` is the default option.
17
18
 
19
+
18
20
  Make your choice global with:
19
21
 
20
22
  <extend tag="page">
@@ -22,7 +24,7 @@ Make your choice global with:
22
24
  </extend>
23
25
 
24
26
  -->
25
- <def tag="page" attrs="title, full-title, nav-location">
27
+ <def tag="page" attrs="title, full-title, nav-location, bottom-load-javascript">
26
28
  <% full_title ||= "#{title} : #{app_name}" %>
27
29
  <html lang="en" merge-attrs>
28
30
  <head param>
@@ -31,9 +33,13 @@ Make your choice global with:
31
33
  <stylesheet name="#{subsite || 'front'}" param="app-stylesheet"/>
32
34
  </do>
33
35
 
34
- <do param="scripts"><%# in Hobo <= 1.3, we had other javascripts here. Now the asset pipeline is preferred. %>
36
+ <do param="scripts" if="&!bottom_load_javascript"><%# in Hobo <= 1.3, we had other javascripts here. Now the asset pipeline is preferred. %>
35
37
  <javascript param="application-javascript" name="#{subsite || 'front'}"/>
36
- <do param="custom-scripts"/>
38
+ <do param="custom-scripts">
39
+ <script type="text/javascript">
40
+ <do param="custom-javascript"/>
41
+ </script>
42
+ </do>
37
43
  </do>
38
44
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
39
45
  <%= csrf_meta_tag %>
@@ -42,8 +48,8 @@ Make your choice global with:
42
48
  <body param>
43
49
  <set-scoped flash-rendered="&false">
44
50
  <ajax-progress param/>
45
- <div class="navbar">
46
- <div class="navbar-inner">
51
+ <div class="navbar" param="navbar">
52
+ <div class="navbar-inner" param="navbar-innner">
47
53
  <header class="container" param>
48
54
  <button data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar" type="button">
49
55
  <span class="icon-bar"></span>
@@ -53,8 +59,8 @@ Make your choice global with:
53
59
  <h1 param="app-name">
54
60
  <a class="brand" href="#{base_url}/"><app-name/></a>
55
61
  </h1>
56
- <main-nav class="nav" current="&title" include-search param if="&nav_location.blank? || nav_location=='top'" />
57
- <account-nav if="&login_url(Hobo::Model::UserBase.default_user_model)" param/>
62
+ <main-nav class="nav" current="&title" param if="&nav_location.blank? || nav_location=='top'" />
63
+ <account-nav if="&login_url(Hobo::Model::UserBase.default_user_model)" include-search="&nav_location.blank? || nav_location=='top'" param/>
58
64
  </header>
59
65
  </div>
60
66
  </div>
@@ -66,12 +72,12 @@ Make your choice global with:
66
72
  <% attributes[:content_size] = "12" unless attributes[:content_size]
67
73
  aside_span = "span" + (12 - attributes[:content_size].to_i).to_s
68
74
  %>
69
- <div class="container bootstrap-content">
70
- <div class="row">
71
- <div class="span#{attributes[:content_size]}">
75
+ <div class="container bootstrap-content" param="container">
76
+ <div class="row" param="main-row">
77
+ <div class="span#{attributes[:content_size]}" param="main-column">
72
78
  <section with-flash-messages param="content"/>
73
79
  </div>
74
- <div class="#{aside_span}" if="&attributes[:content_size].to_i < 12">
80
+ <div class="#{aside_span}" if="&attributes[:content_size].to_i < 12" param="aside-column">
75
81
  <div class="well">
76
82
  <section param="aside"/>
77
83
  </div>
@@ -81,6 +87,32 @@ Make your choice global with:
81
87
 
82
88
  <footer class="page-footer" param/>
83
89
  <page-scripts param/>
90
+ <if test="&bottom_load_javascript">
91
+ <script defer type="text/javascript">
92
+ (function() {
93
+ function getScript(url,success){
94
+ var script=document.createElement('script');
95
+ script.src=url;
96
+ var head=document.getElementsByTagName('head')[0],
97
+ done=false;
98
+ script.onload=script.onreadystatechange = function(){
99
+ if (!done){
100
+ if (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete'){
101
+ done=true;
102
+ success();
103
+ script.onload = script.onreadystatechange = null;
104
+ head.removeChild(script);
105
+ }}
106
+ };
107
+ head.appendChild(script);
108
+ }
109
+
110
+ getScript('<%= asset_path((subsite || 'front')+'.js')%>',function(){
111
+ <do param="custom-javascript"/>
112
+ });
113
+ })();
114
+ </script>
115
+ </if>
84
116
  </set-scoped>
85
117
  </body>
86
118
  </html>
@@ -54,6 +54,7 @@ div.hidden-fields {
54
54
  padding: 0 20px 10px;
55
55
  background: url(ajax-loader.gif) no-repeat 0px 1px;
56
56
  display: none;
57
+ z-index: 1000;
57
58
  }
58
59
 
59
60
  /* wrap with a position:absolute so the relatively positioned stuff inside doesn't leave a blank space */
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobo_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre1
4
+ version: 2.0.0.pre3
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-15 00:00:00.000000000 Z
12
+ date: 2012-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hobo
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 2.0.0.pre1
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.pre3
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.pre3
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: compass_twitter_bootstrap
32
48
  requirement: !ruby/object:Gem::Requirement