jschat 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jschat/http/jschat.rb +7 -1
- data/lib/jschat/http/public/javascripts/app/controllers/chat_controller.js +6 -0
- data/lib/jschat/http/public/javascripts/app/helpers/page_helper.js +2 -0
- data/lib/jschat/http/public/stylesheets/ipad.css +2 -0
- data/lib/jschat/http/views/ipad.erb +1 -0
- metadata +3 -2
data/lib/jschat/http/jschat.rb
CHANGED
@@ -192,7 +192,13 @@ helpers do
|
|
192
192
|
end
|
193
193
|
|
194
194
|
def detected_message_form
|
195
|
-
iphone_user_agent?
|
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' });
|
@@ -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
|
-
-
|
9
|
-
version: 0.3.
|
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
|