From 7c33dbd479df8b95c0ec05dcacad0666d9550194 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Dec 2008 08:13:09 +0100 Subject: translations support for mobile version --- mobile/login_form.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- mobile/mobile.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ mobile/tt-rss.php | 2 ++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 mobile/mobile.js (limited to 'mobile') diff --git a/mobile/login_form.php b/mobile/login_form.php index 567d1aa97..dd5b4acdc 100644 --- a/mobile/login_form.php +++ b/mobile/login_form.php @@ -3,14 +3,50 @@ Tiny Tiny RSS : Login + + + + + +
Tiny Tiny RSS
-
+ @@ -23,8 +59,16 @@ + + + + - +
diff --git a/mobile/mobile.js b/mobile/mobile.js new file mode 100644 index 000000000..64d581410 --- /dev/null +++ b/mobile/mobile.js @@ -0,0 +1,48 @@ +function debug(msg) { + // no-op +} + +function setCookie(name, value, lifetime, path, domain, secure) { + + var d = false; + + if (lifetime) { + d = new Date(); + d.setTime(d.getTime() + (lifetime * 1000)); + } + + debug("setCookie: " + name + " => " + value + ": " + d); + + int_setCookie(name, value, d, path, domain, secure); + +} + +function int_setCookie(name, value, expires, path, domain, secure) { + document.cookie= name + "=" + escape(value) + + ((expires) ? "; expires=" + expires.toGMTString() : "") + + ((path) ? "; path=" + path : "") + + ((domain) ? "; domain=" + domain : "") + + ((secure) ? "; secure" : ""); +} + +function exception_error(location, e, silent) { + var msg; + + if (e.fileName) { + var base_fname = e.fileName.substring(e.fileName.lastIndexOf("/") + 1); + + msg = "Exception: " + e.name + ", " + e.message + + "\nFunction: " + location + "()" + + "\nLocation: " + base_fname + ":" + e.lineNumber; + + } else if (e.description) { + msg = "Exception: " + e.description + "\nFunction: " + location + "()"; + } else { + msg = "Exception: " + e + "\nFunction: " + location + "()"; + } + + if (!silent) { + alert(msg); + } +} + diff --git a/mobile/tt-rss.php b/mobile/tt-rss.php index a23bc8b6a..9521e66dc 100644 --- a/mobile/tt-rss.php +++ b/mobile/tt-rss.php @@ -1,6 +1,8 @@