diff --git a/mobile/backend.php b/mobile/backend.php
new file mode 100644
index 00000000..c6b75c51
--- /dev/null
+++ b/mobile/backend.php
@@ -0,0 +1,43 @@
+
+
diff --git a/mobile/functions.php b/mobile/functions.php
index a773eb94..5f6256dc 100644
--- a/mobile/functions.php
+++ b/mobile/functions.php
@@ -303,17 +303,6 @@
$is_starred = (sql_bool_to_bool($line["marked"])) ? "true" : "false";
$is_published = (sql_bool_to_bool($line["published"])) ? "true" : "false";
- print "
";
-
- print "";
-
-
print "";
print "
";
print "
";
@@ -324,7 +313,21 @@
print "
";
print $line["content"];
print "
";
+
+ print "
";
+
print "
";
}
diff --git a/mobile/index.php b/mobile/index.php
index 4d5cf1e9..5a2ed97e 100644
--- a/mobile/index.php
+++ b/mobile/index.php
@@ -32,7 +32,8 @@
-
+
+
-
-
diff --git a/mobile/mobile.js b/mobile/mobile.js
new file mode 100644
index 00000000..655987ce
--- /dev/null
+++ b/mobile/mobile.js
@@ -0,0 +1,41 @@
+var backend = "backend.php";
+
+function toggleMarked(id, elem) {
+
+ var toggled = false;
+
+ if (elem.getAttribute("toggled") == "true") {
+ toggled = 1;
+ } else {
+ toggled = 0;
+ }
+
+ var query = "?op=toggleMarked&id=" + id + "&mark=" + toggled;
+
+ new Ajax.Request(backend, {
+ parameters: query,
+ onComplete: function (transport) {
+ //
+ } });
+}
+
+function togglePublished(id, elem) {
+
+ var toggled = false;
+
+ if (elem.getAttribute("toggled") == "true") {
+ toggled = 1;
+ } else {
+ toggled = 0;
+ }
+
+ var query = "?op=togglePublished&id=" + id + "&mark=" + toggled;
+
+ new Ajax.Request(backend, {
+ parameters: query,
+ onComplete: function (transport) {
+ //
+ } });
+
+}
+