From 9ad3aa0e4b85c09cac40c32754675025b8fa7ee2 Mon Sep 17 00:00:00 2001 From: 0ip Date: Tue, 6 Dec 2011 18:43:30 +0100 Subject: [PATCH 1/5] Updated chat for mobile devices --- static/js/chat.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/static/js/chat.js b/static/js/chat.js index 0dd2b3c1..bda5786d 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -16,6 +16,10 @@ var chat = (function() { + var ua = navigator.userAgent.toLowerCase(); + var isAndroid = ua.indexOf("android") > -1; + var isMobileSafari = ua.indexOf("mobile") > -1; + var bottomMargin = "0px"; var chatMentions = 0; var title = document.title; var self = { @@ -41,7 +45,10 @@ var chat = (function() { $("#focusprotector").hide(); - $("#chatbox").css({right: "20px", bottom: "0px", left: "", top: ""}); + if(isAndroid || isMobileSafari) + bottommargin = "32px"; + + $("#chatbox").css({right: "20px", bottom: bottomMargin, left: "", top: ""}); self.scrollDown(); } @@ -53,10 +60,14 @@ var chat = (function() hide: function () { $("#chatcounter").text("0"); - $("#chatbox").hide("slide", { direction: "down" }, 750, function() + if(isAndroid || isMobileSafari) { + $("#chatbox").toggle(); + } + else { - $("#chaticon").show("slide", { direction: "down" }, 500); - }); + $("#chatbox").toggle("slide", { direction: "down" }, 625); + } + }, scrollDown: function() { @@ -155,4 +166,4 @@ var chat = (function() } return self; -}()); +}()); \ No newline at end of file From b615da194f2297a64416b6c9757263b752644c2a Mon Sep 17 00:00:00 2001 From: 0ip Date: Tue, 6 Dec 2011 18:45:16 +0100 Subject: [PATCH 2/5] Optimized index page for mobile devices --- static/pad.html | 477 +++++++++++++++--------------------------------- 1 file changed, 146 insertions(+), 331 deletions(-) diff --git a/static/pad.html b/static/pad.html index 3b766ae7..bc51f556 100644 --- a/static/pad.html +++ b/static/pad.html @@ -1,333 +1,148 @@ + - - - - - Etherpad Lite - - - - - - - - - - - - - -
- - - - - -
- -
-
- -
- -
- -
-
- - - Save - - - Cancel - - -
- -
-
-
-
- -
-
- - - - - -
-
- -
-
-
- -
- -
- -
- - - - - -
- -
- -
-
- Loading... -
- -
- - -
- -
- Import from text file, HTML, PDF, Word, ODT or RTF:

-
-
- -
-
-
Successful!
-
- - - - - - -
-
-
- -
- -
- Export current pad as: -
HTML
-
Plain text
-
Microsoft Word
-
PDF
-
OpenDocument
-
Wordle
-
-
-
-
-
- - -
-
- -
- Share: -
-
- -

-
- -

-
-
-
-
-
- -
- -
- - - -
-
Chat
-
-
-
- -
-
-
- -
 
- - -
-
- - -
-
-
-
-
-
- Connecting... -
-
- Reestablishing connection... -
-
-

Disconnected.

-

Opened in another window.

-

No Authorization.

-
-

- We're having trouble talking to the EtherPad lite synchronization server. - You may be connecting through an incompatible firewall or proxy server. -

-
-
-

- We were unable to connect to the EtherPad lite synchronization server. - This may be due to an incompatibility with your web browser or internet connection. -

-
-
-

- You seem to have opened this pad in another browser window. - If you'd like to use this window instead, you can reconnect. -

-
-
-

- Lost connection with the EtherPad lite synchronization server. This may be due to a loss of network connectivity. -

-
-
-

- Server not responding. This may be due to network connectivity issues or high load on the server. -

-
-
-

- Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting. -

-
-
-

- This pad was deleted. -

-
-
-

- If this continues to happen, please let us know -

-
-
- -
-
-
- - - - + + Etherpad Lite + + + + +
+
New Pad

or create/open a Pad with the name
+
+ + +
+
+ From a4dad594d3a2d4d510a3a7c2b046e6d894bf5fed Mon Sep 17 00:00:00 2001 From: 0ip Date: Tue, 6 Dec 2011 18:46:40 +0100 Subject: [PATCH 3/5] Optimized css for mobile devices --- static/css/pad.css | 101 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 92 insertions(+), 9 deletions(-) diff --git a/static/css/pad.css b/static/css/pad.css index 33fc49a9..0c1e4bc1 100644 --- a/static/css/pad.css +++ b/static/css/pad.css @@ -472,12 +472,10 @@ table#otheruserstable { display: none; } background: url(../../static/img/connectingbar.gif) no-repeat center 60px; height: 100px; } -.modaldialog.cboxreconnecting { - background: #fed; -} +.modaldialog.cboxreconnecting, .modaldialog.cboxconnecting, .modaldialog.cboxdisconnected { - background: #fdd; + background: #8FCDE0; } .cboxdisconnected #connectionboxinner div { display: none; } .cboxdisconnected_userdup #connectionboxinner #disconnected_userdup { display: block; } @@ -1150,11 +1148,6 @@ label[for=readonlyinput] { margin: 0 10px 0 2px; } -@media screen and (max-width: 600px) { - #editbar ul li { - padding: 4px 1px; - } -} #qr_center { margin: 10px 10px auto 0; @@ -1164,3 +1157,93 @@ label[for=readonlyinput] { #qrcode{ margin-left:10px; } + + +@media screen and (max-width: 960px) { + .modaldialog { + position: relative; + margin: 0 auto; + width: 80%; + top: 40px; + left: 0; + } +} + +@media screen and (max-width: 600px) { + #editbar ul li { + padding: 4px 1px; + } +} + +@media only screen and (min-device-width: 320px) and (max-device-width: 600px) { + #editbar ul li { + padding: 4px 3px; + } + #editbar ul#menu_right > li { + padding: 4px 8px; + margin-top: 2px; + } + #chaticon { + opacity: .8; + } + #users { + right: none; + left: 30px; + } + #mycolorpicker { + right: 0; + left: 0 !important; + } + #editorcontainer { + margin-bottom: 33px; + } + #editbar ul#menu_right { + background: #f7f7f7; + background: -moz-linear-gradient(#f7f7f7, #f1f1f1 80%); + background: -ms-linear-gradient(#f7f7f7, #f1f1f1 80%); + background: -o-linear-gradient(#f7f7f7, #f1f1f1 80%); + background: -webkit-linear-gradient(#f7f7f7, #f1f1f1 80%); + width: 100%; + overflow: hidden; + height: 32px; + position: fixed; + bottom: 0; + border-top: 1px solid #ccc; + } + #editbar ul#menu_right li:not(:last-child) { + display: none; + } + #editbar ul#menu_right li:last-child { + height: 24px; + border-radius: 0; + margin-top: 0; + border: 0; + float: right; + } + #chaticon { + bottom: 0; + right: 55px; + border-right: none; + border-radius: 0; + background: #f7f7f7; + background: -moz-linear-gradient(#f7f7f7, #f1f1f1 80%); + background: -ms-linear-gradient(#f7f7f7, #f1f1f1 80%); + background: -o-linear-gradient(#f7f7f7, #f1f1f1 80%); + background: -webkit-linear-gradient(#f7f7f7, #f1f1f1 80%); + border: 0; + } + #chatbox { + bottom: 32px; + right: 0; + border-top-right-radius: 0; + } + #editbar ul li a span { + top: -3px; + } + #usericonback { + margin-top: 4px; + } + #sidediv { + display:none; + } +} \ No newline at end of file From 95fe749791c03fcc90d8ab725a23c5fc96780bb6 Mon Sep 17 00:00:00 2001 From: 0ip Date: Tue, 6 Dec 2011 18:48:28 +0100 Subject: [PATCH 4/5] Optimized index page for mobile devices --- static/index.html | 52 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/static/index.html b/static/index.html index 2bed58f9..eb41e8af 100644 --- a/static/index.html +++ b/static/index.html @@ -1,6 +1,8 @@ + Etherpad Lite + -
-
New Pad

or create/open a Pad with the name
-
- +
New Pad

or create/open a Pad with the name
+ +
@@ -124,5 +145,4 @@ //start the costum js if(typeof costumStart == "function") costumStart(); - \ No newline at end of file From 89aac09c91b8a4476bfdc9ad3ec410674ad14c09 Mon Sep 17 00:00:00 2001 From: 0ip Date: Tue, 6 Dec 2011 18:54:57 +0100 Subject: [PATCH 5/5] sorry for that, correct pad.html --- static/pad.html | 480 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 333 insertions(+), 147 deletions(-) diff --git a/static/pad.html b/static/pad.html index bc51f556..35ec559b 100644 --- a/static/pad.html +++ b/static/pad.html @@ -1,148 +1,334 @@ - - - Etherpad Lite - - - - -
-
New Pad

or create/open a Pad with the name
-
- - -
-
- - + + + + + Etherpad Lite + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +
+ +
+ +
+
+ + + Save + + + Cancel + + +
+ +
+
+
+
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+ +
+ +
+ + + + + +
+ +
+ +
+
+ Loading... +
+ +
+ + +
+ +
+ Import from text file, HTML, PDF, Word, ODT or RTF:

+
+
+ +
+
+
Successful!
+
+ + + + + + +
+
+
+ +
+ +
+ Export current pad as: +
HTML
+
Plain text
+
Microsoft Word
+
PDF
+
OpenDocument
+
Wordle
+
+
+
+
+
+ + +
+
+ +
+ Share: +
+
+ +

+
+ +

+
+
+
+
+
+ +
+ +
+ + + +
+
Chat
+
+
+
+ +
+
+
+ +
 
+ + +
+
+ + +
+
+
+
+
+
+ Connecting... +
+
+ Reestablishing connection... +
+
+

Disconnected.

+

Opened in another window.

+

No Authorization.

+
+

+ We're having trouble talking to the EtherPad lite synchronization server. + You may be connecting through an incompatible firewall or proxy server. +

+
+
+

+ We were unable to connect to the EtherPad lite synchronization server. + This may be due to an incompatibility with your web browser or internet connection. +

+
+
+

+ You seem to have opened this pad in another browser window. + If you'd like to use this window instead, you can reconnect. +

+
+
+

+ Lost connection with the EtherPad lite synchronization server. This may be due to a loss of network connectivity. +

+
+
+

+ Server not responding. This may be due to network connectivity issues or high load on the server. +

+
+
+

+ Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting. +

+
+
+

+ This pad was deleted. +

+
+
+

+ If this continues to happen, please let us know +

+
+
+ +
+
+
+ + + + + \ No newline at end of file