jschat 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -192,7 +192,13 @@ helpers do
192
192
  end
193
193
 
194
194
  def detected_message_form
195
- iphone_user_agent? ? :iphone_message_form : :message_form
195
+ if iphone_user_agent?
196
+ :iphone_message_form
197
+ elsif ipad_user_agent?
198
+ :iphone_message_form
199
+ else
200
+ :message_form
201
+ end
196
202
  end
197
203
 
198
204
  def iphone_user_agent?
@@ -86,6 +86,12 @@ JsChat.ChatController = Class.create({
86
86
  var messageInset = PageHelper.isDevice('iphone') ? 390 : 290,
87
87
  heightInset = PageHelper.isDevice('iphone') ? 200 : 100,
88
88
  windowSize = document.viewport.getDimensions();
89
+
90
+ if (PageHelper.isDevice('ipad')) {
91
+ messageInset = 330;
92
+ heightInset = 130;
93
+ }
94
+
89
95
  $('messages').setStyle({ width: windowSize.width - 220 + 'px' });
90
96
  $('messages').setStyle({ height: windowSize.height - heightInset + 'px' });
91
97
  $('message').setStyle({ width: windowSize.width - messageInset + 'px' });
@@ -31,6 +31,8 @@ var PageHelper = {
31
31
  device: function() {
32
32
  if ($$('body.iphone').length > 0) {
33
33
  return 'iphone';
34
+ } else if ($$('body.ipad').length > 0) {
35
+ return 'ipad';
34
36
  }
35
37
  },
36
38
 
@@ -0,0 +1,2 @@
1
+ body { font-size: 120% }
2
+ #message, #send_button { font-size: 130% }
@@ -9,6 +9,7 @@
9
9
  <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js" type="text/javascript"></script>
10
10
  <script src="/javascripts/all.js?<%= Time.now.to_i %>" type="text/javascript"></script>
11
11
  <link href="/stylesheets/screen.css?<%= Time.now.to_i %>" media="screen" rel="stylesheet" type="text/css" />
12
+ <link href="/stylesheets/ipad.css?<%= Time.now.to_i %>" media="screen" rel="stylesheet" type="text/css" />
12
13
  </head>
13
14
  <body class="ipad">
14
15
  <div id="loading" style="display: none">Loading...</div>
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 5
9
- version: 0.3.5
8
+ - 6
9
+ version: 0.3.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alex R. Young
@@ -177,6 +177,7 @@ files:
177
177
  - lib/jschat/http/public/javascripts/app/ui/commands.js
178
178
  - lib/jschat/http/public/javascripts/app/ui/tab_completion.js
179
179
  - lib/jschat/http/public/javascripts/init.js
180
+ - lib/jschat/http/public/stylesheets/ipad.css
180
181
  - lib/jschat/http/public/stylesheets/iphone.css
181
182
  - lib/jschat/http/public/stylesheets/screen.css
182
183
  - lib/jschat/http/script/sprockets.rb