diff --git a/WebKit/scripts/controller/Mentions.js b/WebKit/scripts/controller/Mentions.js index 0cf8314..326cadf 100644 --- a/WebKit/scripts/controller/Mentions.js +++ b/WebKit/scripts/controller/Mentions.js @@ -89,18 +89,16 @@ function(HostApp, Timeline, URI, Paths, Core) { var url = URI(Paths.mkApiRootPath("/profile/" + encodeURIComponent("https://tent.io/types/info/cursor/v0.1.0"))); var body = { - "https://tent.io/types/info/cursor/v0.1.0": { - "mentions": { - "https://tent.io/types/post/status/v0.1.0": { - "post_id": status.id, - "post_entity": status.entity - } + "mentions": { + "https://tent.io/types/post/status/v0.1.0": { + "post": status.id, + "entity": status.entity } } } var callback = function(resp) { - //debug(resp) + } Paths.getURL(url.toString(), "PUT", callback, JSON.stringify(body)); @@ -124,16 +122,16 @@ function(HostApp, Timeline, URI, Paths, Core) { try { // don't crash when there is no cursor yet var body = JSON.parse(resp.responseText); - var cursor = body["https://tent.io/types/info/cursor/v0.1.0"]["mentions"]["https://tent.io/types/post/status/v0.1.0"]; - url.addSearch("since_id", cursor.post_id); - url.addSearch("since_id_entity", cursor.post_entity); + var cursor = body["mentions"]["https://tent.io/types/post/status/v0.1.0"]; + url.addSearch("since_id", cursor["post"]); + url.addSearch("since_id_entity", cursor["entity"]); } catch(e) { } var callback = function(resp) { this.unread_mentions = parseInt(resp.responseText, 10); HostApp.unreadMentions(this.unread_mentions); } - + Paths.getURL(url.toString(), "GET", callback); // FIXME: error callback }); } diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js index 5237f3c..3904231 100644 --- a/WebKit/scripts/helper/Core.js +++ b/WebKit/scripts/helper/Core.js @@ -340,8 +340,10 @@ function(jQuery, Paths, URI, HostApp, Cache) { $(template.ago).single_double_click(function () { HostApp.showConversation(status.id, status.entity); + return false; }, function () { HostApp.showConversationViewForPostIdandEntity(status.id, status.entity); + return false; }); // {"type":"Point","coordinates":[57.10803113,12.25854746]} diff --git a/WebKit/scripts/lib/SingleDoubleClick.js b/WebKit/scripts/lib/SingleDoubleClick.js index 4577ddb..70c248f 100644 --- a/WebKit/scripts/lib/SingleDoubleClick.js +++ b/WebKit/scripts/lib/SingleDoubleClick.js @@ -23,6 +23,7 @@ jQuery.fn.single_double_click = function(single_click_callback, double_click_cal clicks = 0; }, timeout || 300); } + return false; // added by jeena so it doesn't follow links }); }); }