batman-rails 0.15.3 → 0.15.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12985b6c9b29ad1faf9fb4b619939512fe321ae9
4
- data.tar.gz: 95fbbd780c076eab54aab23f4e18bb6fb9a8f5e6
3
+ metadata.gz: 827c6fe292b697c321c92b6ee0f3034720f0081c
4
+ data.tar.gz: ca9f83be4e3331e7b3dab5eb4cdc80ee0296ff7d
5
5
  SHA512:
6
- metadata.gz: 0de16672c2d22c2c234e88b134879e7bb9f18eb4154e05798a95bb69ccc4cba741305eece3fcfb9df249d4440696675a3f4fc4d91cb8a6a482ecf5346f713b20
7
- data.tar.gz: 75cf1615857550dc70d2a3aca74554fdd0acd4efa99fabeff6da218bc03ea04487253f7bf18dfd7326a2c8431bed6c5ff035ce7326a2611a52f4feee30bfc1a1
6
+ metadata.gz: a00bce8ce04bcdbac33a8ff75f6b32159613a1840555f4430341733c0933d32aed1789c26d9df0871a91e1979b37d0af5776b9f559e5a91b5cb2d2582e797956
7
+ data.tar.gz: 92998e811e228de5b19e0731b77c47b36af61328156109f8f4ce28aa137c81b6d45f423803932c637ebc92f4ea3ee7dfc6ec0caf21919f643f6b8cd605facb3a
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.description = %q{Quickly get started with batman.js in a Rails app. Provides generators to get started and bundles in the latest version of batman.js.}
12
12
  gem.summary = %q{Use batman.js with Rails}
13
13
  gem.homepage = "https://github.com/Shopify/batman-rails"
14
- gem.date = "2013-08-30"
14
+ gem.date = File.mtime('lib/batman-rails/version.rb')
15
15
 
16
16
  gem.add_dependency "railties", [">= 3.2"]
17
17
 
@@ -1,6 +1,6 @@
1
1
  module Batman
2
2
  module Rails
3
- VERSION = "0.15.3"
4
- BATMAN_VERSION = "0.15.0-rc2"
3
+ VERSION = "0.15.4"
4
+ BATMAN_VERSION = "0.15.0"
5
5
  end
6
6
  end
@@ -51,6 +51,7 @@ module Batman
51
51
  template "batman/application_controller.coffee", "#{app_path}/controllers/application_controller.js.coffee"
52
52
  template "batman/main_controller.coffee", "#{app_path}/controllers/main_controller.js.coffee"
53
53
  template "batman/html/main_index.html", "#{app_path}/html/main/index.html"
54
+ template "batman/main_index_view.coffee", "#{app_path}/views/main/main_index_view.js.coffee"
54
55
  end
55
56
  end
56
57
 
@@ -1,54 +1,109 @@
1
- <div id="sub">
2
- <div id="header-wrapper">
3
- <div id="header">
4
- <!-- Begin logo -->
5
- <h1 id="logo">
6
- <a href="/">batman.js</a>
7
- </h1>
8
- <!-- End logo -->
9
- </div>
1
+ <div class="intro">
2
+ <div class="wrapper">
3
+ <div class="row clearfix">
4
+ <div class="span24 intro-message">
5
+ <h2>You're set up with batman-rails!</h2>
6
+ <h3>This page aims to be a collection of everything that batman.js is capable of. Over time it will grow to include more comprehensive examples, in addition to live applications using batman.js. But most of that isn't done yet. Hooray!</h3>
7
+ </div>
8
+ </div>
10
9
  </div>
11
- <div id="content-wrapper">
12
- <div id="content">
13
- <!-- Begin left-sidebar -->
14
- <div id="left-sidebar">
15
- <ul class="subnav">
16
- <li><a href="http://batmanjs.org/examples.html" target="_blank">Batman Examples</a></li>
17
- <li><a href="http://batmanjs.org/docs/batman.html" target="_blank">Batman Documentation</a></li>
18
- <li><a href="http://coffeescript.org/" target="_blank">CoffeeScript Documentation</a></li>
19
- </ul>
10
+ </div>
11
+
12
+ <div class="header">
13
+ <div class="wrapper clearfix">
14
+ <h1 class="header-site-title"><a href="/">
15
+ <div class="logo"></div>batman.js
16
+ </a></h1>
17
+
18
+ <div class="header-nav clearfix">
19
+ <nav class="nav-top">
20
+ <ul class="nav-primary">
21
+ <li class="active"><a href="/">Overview</a></li>
22
+ <li><a href="http://batmanjs.org/examples.html" target="_blank">Examples</a></li>
23
+ <li><a href="http://batmanjs.org/docs/index.html" target="_blank">Documentation</a></li>
24
+ </ul>
25
+ </nav>
26
+ </div>
27
+ </div><!-- /.header -->
28
+ </div>
29
+
30
+ <!-- Begin content-wrapper -->
31
+ <div id="content-wrapper">
32
+ <div id="content">
33
+
34
+ <div class="alt-row">
35
+ <div class="wrapper clearfix">
36
+ <div class="row clearfix ppt">
37
+
38
+ <div class="span14">
39
+ <h4>Generate your resources</h4>
40
+ <p>Everything in batman.js has a proper place, driven by batman.js's conventions. By default with batman-rails, your app lives in app/assets/batman. A great way to get started is using the automatic generators to add some of your resources.</p><br />
41
+ <p>More info on <a href="http://batmanjs.org/docs/structure.html" target="_blank">directory structure</a></p>
42
+ </div>
43
+
44
+ <div class="span10">
45
+ <div class="box featured">
46
+ <code>
47
+ rails generate batman:scaffold Post<br />
48
+ rails generate batman:model Product<br />
49
+ rails generate batman:view player<br />
50
+ </code>
51
+ </div>
52
+ </div>
53
+
20
54
  </div>
21
- <!-- End left-sidebar -->
22
- <!-- Begin content-column-wrapper -->
23
- <div id="content-column-wrapper">
24
- <h2>Batman.js</h2>
25
- <h3>A client-side framework for Rails developers</h3>
26
- <p>This page aims to be a collection of everything that batman.js is capable of. Over time it will grow to include more comprehensive examples, in addition to live applications using batman.js.</p>
27
-
28
- <h4>Generate your resources</h4>
29
- <p>Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam quis risus eget urna mollis ornare vel eu leo. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
30
-
31
- <div class="highlight">
32
- rails generate batman:app<br />
33
- rails generate batman:scaffold Post title:string content:string<br />
55
+ </div>
56
+ </div>
57
+
58
+ <div class="plain-row">
59
+ <div class="wrapper clearfix">
60
+ <div class="row clearfix ppb">
61
+ <div class="span14">
62
+ <h4>Add your bindings</h4>
63
+ <p>batman.js has a powerful system to automatically bind your HTML to data in your app and models. You can use data-* attributes to tell a node what type of stuff it cares about. Here's some simple examples.</p><br />
64
+ <p>More info on <a href="http://batmanjs.org/docs/bindings.html" target="_blank">data bindings</a></p>
65
+ </div>
66
+
67
+ <div class="span10">
68
+ <div class="box featured">
69
+ <div><label>First Name:</label><input type="text" data-bind="firstName"></div>
70
+ <div><label>Last Name:</label><input type="text" data-bind="lastName"></div>
71
+ <div data-showif="hasName">Hello, my name is <span data-bind="fullName"></span></div>
72
+ <div><button data-event-click="resetName">Reset name</button></div>
73
+ </div>
34
74
  </div>
35
75
 
36
- <h4>Create your bindings</h4>
37
- <p>Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam quis risus eget urna mollis ornare vel eu leo. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+ <div class="alt-row">
81
+ <div class="wrapper clearfix">
82
+ <div class="row clearfix ppb">
83
+ <div class="span14">
84
+ <h4>Connect to Rails</h4>
85
+ <p>batman-rails includes a StorageAdapter class that makes communicating with your Rails API extremely easy. First set the storageKey to tell it which API endpoint to use, then specify that the model should persist with the RailsStorage storage adapter.</p><br />
86
+ <p>More info on <a href="http://batmanjs.org/docs/models.html" target="_blank">models</a></p>
87
+ </div>
38
88
 
39
- <div style="padding: 10px">
40
- <span>First Name:</span><input type="text" data-bind="firstName"><br />
41
- <span>Last Name:</span><input type="text" data-bind="lastName"><br />
42
- <span>Hello, my name is <span data-bind="fullName"></span></span><br />
89
+ <div class="span10">
90
+ <div class="box featured">
91
+ <pre><code>class MyApp.Product extends Batman.Model
92
+ @storageKey: 'products'
93
+ @persist Batman.RailsStorage</code></pre>
94
+ </div>
43
95
  </div>
44
96
 
45
- <h4>Connect to Rails</h4>
46
- <p>Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam quis risus eget urna mollis ornare vel eu leo. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
47
97
  </div>
48
- <!-- End content-column-wrapper -->
49
- </div>
98
+ </div>
99
+ </div>
100
+
50
101
  </div>
51
102
  </div>
103
+ <!-- End content-wrapper -->
104
+
105
+
106
+
52
107
  <style type="text/css" media="screen">
53
108
  /* ============= */
54
109
  /* = CSS Reset = */
@@ -79,181 +134,314 @@
79
134
  blockquote:before, blockquote:after, q:before, q:after { content: ""; }
80
135
  blockquote, q { quotes: "" ""; }
81
136
 
82
- /* ================= */
83
- /* = Global Styles = */
84
- /* ================= */
85
-
86
- * { margin:0; padding:0; }
87
- img { border:0px; }
88
- html, body { height: 100%; }
89
- body { background: url(/assets/batman/content-bg.png); font-family: "ff-meta-web-pro-1","ff-meta-web-pro-2", sans-serif; font-size:13px; font-style: normal; font-weight: 400; color:#222; }
90
- body p { color: #222; line-height: 20px; margin-bottom: 20px; }
91
-
92
- h1, h2, h3, h4, h5, h6 { font-family: "ff-meta-web-pro-1","ff-meta-web-pro-2", sans-serif; font-size:13px; font-style: normal; font-weight: 700; }
93
- h2 { font-size: 30px; color: #373862; margin-bottom: 15px; }
94
- #home h3 { font-size: 22px; color: #373862; margin-bottom: 30px; }
95
- h3 { font-size: 22px; color: #373862; margin-bottom: 20px; }
96
- h4 { font-size: 16px; color: #373862; line-height: 22px; margin-bottom: 15px; }
97
- h5 { font-size: 14px; color: #000; line-height: 20px; margin-bottom: 15px; }
98
-
99
- .clearfix:after { content:"."; display:block; height:0; clear:both; visibility:hidden; }
100
- .clear { clear:both }
101
- .float-right { float:right }
102
-
103
- /* ========= */
104
- /* = Links = */
105
- /* ========= */
106
-
107
- a:link { color: #373862; text-decoration: none; }
108
- a:hover { color: #47497c; text-decoration: none; }
109
- a:focus { color: #47497c; text-decoration: none; }
110
- a:visited { color: #47497c; text-decoration: none; }
111
-
112
- #intro-statement a:link { color: #fdf9cc; }
113
- #intro-statement a:hover { color: #fffdec; }
114
- #intro-statement a:focus { color: #fffdec; }
115
- #intro-statement a:visited { color: #fffdec; }
116
-
117
- #download-box a.release-links { text-decoration: underline; }
118
- #download-box a.release-links:link { color: #fdf9cc; }
119
- #download-box a.release-links:hover { color: #fffdec; }
120
- #download-box a.release-links:focus { color: #fffdec; }
121
- #download-box a.release-links:visited { color: #fffdec; }
122
-
123
- #footer-content a:link { color: #8688a0; }
124
- #footer-content a:hover { color: #9c9ebb; }
125
- #footer-content a:focus { color: #9c9ebb; }
126
- #footer-content a:visited { color: #9c9ebb; }
127
-
128
- /* ================= */
129
- /* = Global Layout = */
130
- /* ================= */
131
-
132
- #logo { float: left; margin-left: -30px; }
133
- #logo a { display: block; background: url(/assets/batman/logo.png) top left no-repeat; width: 276px; height: 65px; text-indent: -999px; }
134
-
135
- #content-wrapper { min-height: 100%; padding-bottom: 32px; background: url(/assets/batman/content-bg-fade.png) top left repeat-x; }
136
- #content { overflow:auto; margin: 0 auto; padding: 45px 32px 190px 32px; width: 932px; }
137
- #right-sidebar { float: left; width: 267px; padding-left: 32px; border-left: 1px dashed #c6c7da; }
138
- #left-sidebar { float: left; width: 267px; padding-right: 32px; }
139
-
140
- ul.blog-list { margin-bottom: 32px; font-size: 13px; }
141
- ul.blog-list li.blog-post-date { font-size: 13px; font-weight: bold; font-style: italic; margin-bottom: 12px; color: #000; }
142
- ul.blog-list a.read-more { font-weight: bold; }
143
-
144
- a.icon-rss { float: left; display: block; width: 16px; height: 20px; overflow: hidden; text-indent: -999px; margin-right: 14px; background: url(/assets/batman/icon-rss.png) 0 4px no-repeat; }
145
- a.icon-twitter { float: left; display: block; width: 26px; height: 20px; overflow: hidden; text-indent: -999px; margin-right: 10px; background: url(/assets/batman/icon-twitter.png) 0 2px no-repeat; }
146
-
147
- #footer-wrapper { position: relative; margin-top: -190px; /* negative value of footer height */ height: 190px; clear:both; background: #181818; }
148
- #footer-content { width: 932px; margin: 0 auto; padding-top: 64px; color: #6c6d80; }
149
- #footer-content ul li { line-height: 26px; }
150
- #footer-content ul li a.inline-link { margin-left: 15px; }
151
- #footer-content a.shopify-logo { float: right; }
152
-
153
- /*Opera Fix*/
154
- body:before { content:""; height:100%; float:left; width:0; margin-top:-32767px;/ }
155
-
156
- #sub #header-wrapper { width: 100%; height: 155px; background: #1d1d2b url(/assets/batman/header-wrapper-bg.jpg) top center no-repeat; }
157
- #sub #header-wrapper #header { margin: 0 auto; width: 932px; padding: 36px 32px 42px 32px; }
158
-
159
- /* ============== */
160
- /* = Navigation = */
161
- /* ============== */
162
-
163
- #navigation { float: right; }
164
- #navigation ul { margin-top: 32px; color: #b3b3c3; font-size: 15px; text-shadow:1px 1px rgba(0,0,0,0.9)}
165
- #navigation ul li { float: left; margin-right: 42px;}
166
- #navigation ul li:last-child { float: left; margin-right: 0;}
167
- #navigation ul li a { color: #b3b3c3; text-decoration: none; }
168
- #navigation ul li a:hover { color: #fff; }
169
- #navigation ul li.active a { color: #fff; background: #181826; padding: 6px 14px; cursor: default; border-bottom: 1px solid #333340; -moz-border-radius: 5px; border-radius: 5px; }
170
-
171
- /* ======== */
172
- /* = Home = */
173
- /* ======== */
174
-
175
- #home #header-wrapper { width: 100%; height: 470px; background: #1d1d2b url(/assets/batman/header-wrapper-bg.jpg) top center no-repeat; }
176
- #home #header-wrapper #header { margin: 0 auto; width: 932px; padding: 36px 32px 42px 32px; }
177
- #home #intro-statement { float: left; width: 600px; padding-top: 78px; margin-right: 32px; }
178
- #home #intro-statement h2 { color: #b3b3c3; font-size: 30px; font-style: normal; font-weight: 400; margin-bottom: 26px; }
179
- #home #intro-statement p { color: #b3b3c3; font-size: 18px; line-height: 28px; margin-bottom: 26px; }
180
- #home #download-box { float: left; margin-top: 40px; width: 236px; min-height: 280px; padding: 32px; background: #181826 url(/assets/batman/download-box-top.png) center 1px no-repeat; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
181
- #home #download-box a.btn-download { display: block; text-indent: -999px; overflow: hidden; width: 235px; height: 50px; margin-bottom: 20px; cursor: pointer; background: url(/assets/batman/btn-download-batman.png) top left no-repeat; }
182
- #home #download-box a.btn-download:hover { background-position: 0 -50px; }
183
- #home #download-box p { font-size: 14px; line-height: 20px; margin-bottom: 18px; color: #fff; }
184
- #home #download-box .title { color: #b3b3c3; }
185
-
186
- #home #content-column-wrapper { float: left; width: 600px; padding-right: 32px; }
187
- #home #content-column-1 { float: left; width: 268px; margin-right: 32px; }
188
- #home #content-column-2 { float: left; width: 268px; margin-left: 32px; }
189
-
190
- #home ul.feature-box { margin-bottom: 32px; }
191
- #home ul.feature-box li.feature-image { margin-bottom: 20px; }
192
- #home ul.feature-box li.feature-description { margin-bottom: 20px; }
193
-
194
- input[type="text"].email-signup { font-size: 13px; text-align: left; width: 222px; padding: 4px; margin-top: 10px; margin-bottom: 10px; }
195
- input[type="submit"].email-submit { font-size: 32px; margin-left: 15px; padding: 4px; }
196
-
197
- /* ============ */
198
- /* = Subpages = */
199
- /* ============ */
200
-
201
- #sub #content-column-wrapper-full { float: left; width: 100%; }
202
- #sub #content-column-wrapper { float: left; width: 600px; padding-left: 32px; border-left: 1px dashed #d0d0d0; }
203
- #sub #content-column-1 { float: left; width: 268px; margin-right: 32px; }
204
- #sub #content-column-2 { float: left; width: 268px; margin-left: 32px; }
205
-
206
- #sub ul.feature-box { margin-bottom: 32px; }
207
- #sub ul.feature-box li.feature-image { margin-bottom: 20px; }
208
- #sub ul.feature-box li.feature-description { margin-bottom: 20px; }
209
-
210
- ul.subnav { margin-bottom: 32px; font-size: 14px; line-height: 20px; }
211
- ul.subnav li { color: #8f90ac; padding-bottom: 15px; margin-top: 15px; border-bottom: 1px dashed #d0d0d0; }
212
- ul.subnav li:first-child { margin-top: 0; }
213
- ul.subnav li.active { font-weight: bold; color: #373862; }
214
- ul.subnav a { color: #8f90ac; display: block; }
215
- ul.subnav a:hover { color: #6d6e93; }
216
-
217
- #sub #download-box { float: right; margin: 0 0 32px 32px; width: 236px; padding: 32px 32px 10px 32px; background: #303153 url(/assets/batman/download-box-top.png) center 1px no-repeat; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
218
- #sub #download-box a.btn-download { display: block; text-indent: -999px; overflow: hidden; width: 235px; height: 50px; margin-bottom: 20px; cursor: pointer; background: url(/assets/batman/btn-download-batman.png) top left no-repeat; }
219
- #sub #download-box a.btn-download:hover { background-position: 0 -50px; }
220
- #sub #download-box p { font-size: 14px; line-height: 20px; margin-bottom: 18px; color: #fff; }
221
- #sub #download-box .title { color: #b3b3c3; }
222
-
223
- ul.content { margin-bottom: 20px; }
224
- ul.content li { background: url(/assets/batman/bullet.png) 0 8px no-repeat; margin-bottom: 10px; padding-left: 20px; line-height: 20px; }
225
-
226
- ol.content { margin-bottom: 20px; list-style: decimal; padding-left: 20px; }
227
- ol.content li { margin-bottom: 10px; line-height: 20px; }
228
-
229
- .callout-box { padding: 20px; border: 1px dashed #d0d0d0; background: #eeeef7; }
230
-
231
- /* =========== */
232
- /* = Twitter = */
233
- /* =========== */
234
-
235
- .tweet, .query { font-size: 13px; }
236
- .tweet .tweet_list, .query .tweet_list { list-style-type: none; margin: 0; padding: 0; overflow-y: hidden; }
237
- .tweet .tweet_list .awesome, .tweet .tweet_list .epic, .query .tweet_list .awesome, .query .tweet_list .epic { text-transform: uppercase; }
238
- .tweet .tweet_list li:first-child { margin-top: 0; }
239
- .tweet .tweet_list li, .query .tweet_list li { line-height: 20px; padding-bottom: 15px; margin-top: 15px; border-bottom: 1px dashed #d0d0d0; }
240
- .tweet .tweet_list li:last-child, .query .tweet_list li:last-child { border-bottom: none; }
241
- .tweet .tweet_list li a, .query .tweet_list li a { text-decoration: none; }
242
- .tweet .tweet_list .tweet_avatar, .query .tweet_list .tweet_avatar { padding: 0 15px 30px 0; margin-top: 7px; float: left; }
243
- .tweet .tweet_list .tweet_avatar img, .query .tweet_list .tweet_avatar img { vertical-align: middle; }
244
- .tweet .tweet_list .tweet_time a { font-size: 13px; font-style: italic; }
245
- .tweet .tweet_list .tweet_text { margin-bottom: 20px; }
246
- .tweet .tweet_list .tweet_text a { text-decoration: none; }
247
- a.tweet_user { margin-bottom: 5px; font-size: 13px; font-style: italic; }
248
-
249
- .listy ul { list-style: url(/assets/batman/bullet.png) inside; margin-bottom: 20px; }
250
-
251
-
252
- /* ======== */
253
- /* = Code = */
254
- /* ======== */
255
-
256
-
257
- div.highlight { background:#FFFFFF; border:1px solid #E0E0E0; font-family:"Courier New",Courier,monospace; overflow: hidden; padding: 7px; margin-bottom: 20px; }
137
+ /* generic / layout */
138
+ body {
139
+ font-family: Avenir, sans-serif;
140
+ line-height: 1.3;
141
+ padding-top: 64px;
142
+ background: #171722;
143
+ color: #a2a1ba;
144
+ }
145
+ p + p { margin: 0 0 .45em 0;}
146
+ h1 { color: magenta; }
147
+
148
+ h2, h3, h4, h5 { font-family: Avenir, sans-serif; }
149
+ h2 {
150
+ font-size: 170%;
151
+ margin-bottom: .5em;
152
+ margin-top: 1.3em;
153
+ padding-bottom: 8px;
154
+ border-bottom: 1px solid #E4E8F5;
155
+ }
156
+ h3 { font-size: 150%; margin-bottom: .5em; line-height: 1.3em; }
157
+ h4 { font-size: 130%; margin-bottom: .5em; }
158
+ h5 { font-size: 115%; margin-bottom: .5em; }
159
+ a { color: #a2a2ba; }
160
+ a:hover { color: #fff; }
161
+ ol { list-style-type: decimal; padding-left: 20px; }
162
+ code {
163
+ font-family: Monaco, Consolas, "Lucida Console", monospace;
164
+ color: #333;
165
+ padding: 0 3px;
166
+ background: #fff;
167
+ font-size: 85%;
168
+ }
169
+ .code-highlight {
170
+ background: #fff8d4;
171
+ font-size: 90%
172
+ }
173
+
174
+ /* layout */
175
+ .row {
176
+ margin-left: -20px;
177
+ }
178
+ div[class*="span"] {
179
+ padding-left: 20px;
180
+ float:left;
181
+ -webkit-box-sizing: border-box;
182
+ -moz-box-sizing: border-box;
183
+ box-sizing: border-box;
184
+ }
185
+ .span1 { width:4.1666667%; }
186
+ .span2 { width:8.3333333%; }
187
+ .span3 { width:12.5%; }
188
+ .span4 { width:16.6666667%; }
189
+ .span5 { width:20%; }
190
+ .span6 { width:25%; }
191
+ .span7 { width:29.1666667%; }
192
+ .span8 { width:33.3333333%; }
193
+ .span9 { width:37.5%; }
194
+ .span10 { width:41.6666667%; }
195
+ .span11 { width:45%; }
196
+ .span12 { width:50%; }
197
+ .span13 { width:54.1666667%; }
198
+ .span14 { width:58.3333333%; }
199
+ .span15 { width:62.5%; }
200
+ .span16 { width:66.6666667%; }
201
+ .span17 { width:70.8333333%; }
202
+ .span18 { width:75%; }
203
+ .span19 { width:79.1666667%; }
204
+ .span20 { width:83.3333333%; }
205
+ .span21 { width:87.5%; }
206
+ .span22 { width:91.6666667%; }
207
+ .span23 { width:95.8333333%; }
208
+ .span24 { width:100%; float:none; }
209
+
210
+ .wrapper {
211
+ width: 980px;
212
+ margin: 0 auto;
213
+ }
214
+
215
+ .flex .wrapper {
216
+ width: 100%;
217
+ max-width: 1340px;
218
+ min-width: 800px;
219
+ }
220
+
221
+ .alt-row { background: #EAEBFA; }
222
+ .plain-row { background: #fff;}
223
+
224
+ .alt-row, .plain-row { color: #171722; }
225
+
226
+ .alt-row a, .plain-row a { color: #323264; }
227
+ .alt-row a:hover, .plain-row a:hover { color: #3f3f9e;}
228
+
229
+ /* helpers */
230
+ .clearfix:before,.clearfix:after{content:"\0020";display:block;height:0;visibility:hidden}.clearfix:after{clear:both}.clearfix{zoom:1}
231
+
232
+ .p { padding: 10px; }
233
+ .pp { padding: 20px; }
234
+ .ppt { padding-top: 20px; }
235
+ .ppr { padding-right: 20px; }
236
+ .ppl { padding-left: 20px; }
237
+ .ppb { padding-bottom: 20px; }
238
+ .p-none { padding: 0; }
239
+
240
+ .sb{ margin-bottom: 10px; }
241
+ .ssb{ margin-bottom: 20px; }
242
+ .ssl{ margin-left: 20px; }
243
+ .s-none { margin: 0; }
244
+
245
+ .fl { float: left; }
246
+ .fr { float: right; }
247
+
248
+ .tc { text-align: center }
249
+ .tl { text-align: left }
250
+ .tr { text-align: right }
251
+
252
+ .divider-top { border-top: solid 1px #e8e8fc; margin-top: 15px; padding-top: 15px; }
253
+ .divider { border-bottom: solid 1px #e8e8fc; margin-bottom: 15px; padding-bottom: 15px; }
254
+
255
+ .small { font-size: 13px; }
256
+
257
+ /* buttons */
258
+ .btn {
259
+ padding: 6px 8px 4px 10px;
260
+ background: #a2a1ba;
261
+ text-decoration: none;
262
+ color: #fff !important;
263
+ border-radius: 4px;
264
+ -webkit-transition: all 0.1s ease;
265
+ -moz-transition: all 0.1s ease;
266
+ -ms-transition: all 0.1s ease;
267
+ -o-transition: all 0.1s ease;
268
+ transition: all 0.1s ease;
269
+ text-transform: uppercase;
270
+ font-size: 14px;
271
+ line-height: 18px;
272
+ }
273
+ .btn:hover { background: #ffe43f; color: #1f1f27 !important; }
274
+ .btn:active { background: #ffe43f; }
275
+
276
+ /* boxes */
277
+ .box {
278
+ background: #f9f9f9;
279
+ padding: 20px;
280
+ line-height: 1.5em;
281
+ }
282
+ .box.featured {
283
+ font-size: 1.1em;
284
+ }
285
+ .box p { color: #5c5c6e; }
286
+ .box a { text-decoration: none; }
287
+ .box-connected{
288
+ border-top: solid 1px #e6e6e6;
289
+ padding: 10px;
290
+ background: #efefef;
291
+ }
292
+ .box-highlight{
293
+ background: #f3f3fc;
294
+ }
295
+ .box-highlight .divider { border-color: #e8e7ec; }
296
+ .box-highlight .divider-top { border-color: #e8e7ec; }
297
+ .box-highlight .callout {
298
+ background: #e8e7f1;
299
+ padding: 10px;
300
+ float: right;
301
+ width: 28%;
302
+ font-size: 13px;
303
+ }
304
+ .box-highlight-connected{
305
+ border-top: solid 1px #e0deeb;
306
+ padding: 20px;
307
+ background: #e8e7f4;
308
+ font-size: 14px;
309
+ }
310
+ .box-highlight-connected a { text-decoration: none }
311
+ .box-highlight-connected a:hover{ text-decoration: underline }
312
+ .box.mh {
313
+ min-height: 12.5em;
314
+ }
315
+
316
+ td + td > p, th + th {
317
+ padding-left: 20px;
318
+ }
319
+
320
+ /* lists */
321
+ .bat-list{
322
+ font-size: 14px;
323
+ color: #a2a1ba;
324
+ margin-left: 18px;
325
+ margin-top: 1em;
326
+ }
327
+ .bat-list li{
328
+ list-style-type: square;
329
+ margin-bottom: .45em;
330
+ }
331
+
332
+ /* header */
333
+ .header{
334
+ position: fixed; top: 0; left: 0;
335
+ width: 100%;
336
+ height: 64px;
337
+ background: #1f1f27;
338
+ box-shadow: 0 5px 10px rgba(0,0,0,.05);
339
+ z-index: 2;
340
+ }
341
+ .header a{ color: #a2a2ba;
342
+ -webkit-transition: all 0.15s ease;
343
+ -moz-transition: all 0.15s ease;
344
+ -ms-transition: all 0.15s ease;
345
+ -o-transition: all 0.15s ease;
346
+ transition: all 0.15s ease;
347
+ }
348
+ .header a:hover { color: #fff; }
349
+
350
+ .header-site-title {
351
+ float: left;
352
+ font-weight: 600;
353
+ text-transform: uppercase;
354
+ font-size: 24px;
355
+ padding-left: 20px;
356
+ }
357
+ .header-site-title a{
358
+ color: #fff;
359
+ text-decoration: none;
360
+ line-height: 66px;
361
+ }
362
+ .header .logo {
363
+ display: inline-block;
364
+ width: 50px;
365
+ height: 40px;
366
+ margin: 9px 10px -9px 0;
367
+ }
368
+
369
+
370
+ /* header > nav */
371
+ .header-nav { float: right; padding-right: 20px; }
372
+ .nav-primary a {
373
+ display: block;
374
+ height: 64px;
375
+ line-height: 67px;
376
+ -webkit-box-sizing: border-box;
377
+ -moz-box-sizing: border-box;
378
+ box-sizing: border-box;
379
+ text-align: center;
380
+ padding: 0 20px;
381
+ text-transform: uppercase;
382
+ font-size: 14px;
383
+ text-decoration: none;
384
+ }
385
+
386
+ .nav-top-highlight a { color: #1f1f27; line-height: 34px; background: #ffe43f; height: 32px; margin: 16px 0 0 20px; border-radius: 4px; }
387
+ .nav-primary li { float: left; }
388
+ .nav-primary a:hover, .nav-primary li.active{
389
+ background: #2a2a32;
390
+ color: #fff;
391
+ }
392
+
393
+ .box li a {
394
+ text-decoration: none;
395
+ line-height: 1.6em;
396
+ }
397
+
398
+ .current:before {
399
+ content: "▶";
400
+ margin-left: -42px;
401
+ font-size: 16px;
402
+ padding-right: 23px;
403
+ color: #f3f4fb;
404
+ text-shadow: 1px 2px 1px rgb(231, 226, 255);
405
+ }
406
+
407
+ .intro {
408
+ background: #111119 0 100% repeat-x;
409
+ color: #a2a1ba;
410
+ height: 382px;
411
+ overflow: hidden;
412
+ -moz-transition: height 0.4s cubic-bezier(0.860, 0.000, 0.070, 1.000);
413
+ -webkit-transition: height 0.4s cubic-bezier(0.860, 0.000, 0.070, 1.000);
414
+ }
415
+
416
+ .intro h2 { font-size: 36px; color: #fff; line-height: 1.2em; text-align: center; }
417
+ .intro h3 { font-size: 18px; line-height: 1.3em; text-align: center; }
418
+
419
+ .intro-message {
420
+ margin-top: 80px;
421
+ margin-bottom: 40px;
422
+ }
423
+
424
+ .alt-row .row,
425
+ .plain-row .row {
426
+ padding: 60px 0;
427
+ }
428
+
429
+ /* content-wrapper */
430
+ .content-wrapper ul {
431
+ list-style: disc;
432
+ padding: 15px;
433
+ }
434
+ .content-wrapper p {
435
+ margin-bottom: 15px;
436
+ }
437
+
438
+ @media all and (min-width: 1340px) {
439
+ .api-docs.box {
440
+ padding-left: 20px;
441
+ }
442
+ .header-nav, .header-site-title {
443
+ padding: 0;
444
+ }
445
+ }
258
446
 
259
447
  </style>
@@ -2,7 +2,8 @@ class <%= js_application_name %>.MainController extends <%= js_application_name
2
2
  routingKey: 'main'
3
3
 
4
4
  index: (params) ->
5
- @set 'firstName', 'James'
6
- @set 'lastName', 'Bond'
5
+ @set 'firstName', 'Bruce'
6
+ @set 'lastName', 'Wayne'
7
7
 
8
- @accessor 'fullName', -> "#{@get('firstName')} #{@get('lastName')}"
8
+ @accessor 'fullName', ->
9
+ "#{@get('firstName')} #{@get('lastName')}"
@@ -0,0 +1,7 @@
1
+ class <%= js_application_name %>.MainIndexView extends Batman.View
2
+ resetName: ->
3
+ @controller.set('firstName', '')
4
+ @controller.set('lastName', '')
5
+
6
+ @accessor 'hasName', ->
7
+ @controller.get('fullName').length > 1
@@ -11715,7 +11715,8 @@
11715
11715
  });
11716
11716
 
11717
11717
  RouteBinding.prototype.bind = function() {
11718
- if (this.node.nodeName.toUpperCase() === 'A') {
11718
+ var _ref1;
11719
+ if ((_ref1 = this.node.nodeName) === 'a' || _ref1 === 'A') {
11719
11720
  this.onAnchorTag = true;
11720
11721
  }
11721
11722
  RouteBinding.__super__.bind.apply(this, arguments);
@@ -12766,6 +12767,7 @@
12766
12767
  this.handleArrayChanged(items);
12767
12768
  }
12768
12769
  } else {
12770
+ this.unbindCollection();
12769
12771
  this.collection = [];
12770
12772
  this.handleArrayChanged([]);
12771
12773
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: batman-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.3
4
+ version: 0.15.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Small
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-08-30 00:00:00.000000000 Z
14
+ date: 2013-09-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -115,6 +115,7 @@ files:
115
115
  - lib/templates/batman/html/new.html
116
116
  - lib/templates/batman/html/show.html
117
117
  - lib/templates/batman/main_controller.coffee
118
+ - lib/templates/batman/main_index_view.coffee
118
119
  - lib/templates/batman/model.coffee
119
120
  - lib/templates/batman/view.coffee
120
121
  - lib/templates/rails/controller.rb