diff --git a/Mac/Tentia.xcodeproj/project.pbxproj b/Mac/Tentia.xcodeproj/project.pbxproj index 9aba9db..7263da3 100644 --- a/Mac/Tentia.xcodeproj/project.pbxproj +++ b/Mac/Tentia.xcodeproj/project.pbxproj @@ -11,7 +11,6 @@ 1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */; }; 1F122D49118E1DE100E83B77 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1F122D48118E1DE100E83B77 /* Icon.icns */; }; 1F132C791666CD9700E4E661 /* TB_SendTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F132C781666CD9700E4E661 /* TB_SendTemplate.png */; }; - 1F132C7B1666CF6E00E4E661 /* send2.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F132C7A1666CF6E00E4E661 /* send2.png */; }; 1F1990C6117BCA960049BEA7 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F1990C5117BCA960049BEA7 /* ApplicationServices.framework */; }; 1F1C80F916482A250010B409 /* WebKit in Resources */ = {isa = PBXBuildFile; fileRef = 1F1C80F816482A250010B409 /* WebKit */; }; 1F2D79BD165E8C6B000E8428 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F2D79BC165E8C6B000E8428 /* CoreLocation.framework */; }; @@ -62,7 +61,6 @@ 1DDD582B0DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; 1F122D48118E1DE100E83B77 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; 1F132C781666CD9700E4E661 /* TB_SendTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TB_SendTemplate.png; sourceTree = ""; }; - 1F132C7A1666CF6E00E4E661 /* send2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = send2.png; sourceTree = ""; }; 1F1990C5117BCA960049BEA7 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; }; 1F1C80F816482A250010B409 /* WebKit */ = {isa = PBXFileReference; lastKnownFileType = folder; name = WebKit; path = ../WebKit; sourceTree = ""; }; 1F2D79BC165E8C6B000E8428 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = /System/Library/Frameworks/CoreLocation.framework; sourceTree = ""; }; @@ -205,7 +203,6 @@ children = ( 1F1C80F816482A250010B409 /* WebKit */, 1F122D48118E1DE100E83B77 /* Icon.icns */, - 1F132C7A1666CF6E00E4E661 /* send2.png */, 1F3F129D164F202000C7C983 /* dsa_pub.pem */, 1F132C781666CD9700E4E661 /* TB_SendTemplate.png */, 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */, @@ -281,7 +278,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1F132C7B1666CF6E00E4E661 /* send2.png in Resources */, 1F3F129E164F202000C7C983 /* dsa_pub.pem in Resources */, 1FDEF726164F094600F927F3 /* Growl Registration Ticket.growlRegDict in Resources */, 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */, diff --git a/WebKit/css/default.css b/WebKit/css/default.css index ed2262a..b58ec46 100644 --- a/WebKit/css/default.css +++ b/WebKit/css/default.css @@ -257,6 +257,7 @@ header.profile button { border: 0; border-radius: 3px; font-weight: bold; + clear: right; } header.profile button.following { diff --git a/WebKit/scripts/controller/Mentions.js b/WebKit/scripts/controller/Mentions.js index dbb65f0..af09832 100644 --- a/WebKit/scripts/controller/Mentions.js +++ b/WebKit/scripts/controller/Mentions.js @@ -15,6 +15,7 @@ function(HostApp, Timeline) { this.action = "mentions"; this.body.className = this.action; + } Mentions.prototype = Object.create(Timeline.prototype); @@ -61,6 +62,7 @@ function(HostApp, Timeline) { } } + return Mentions; }); \ No newline at end of file diff --git a/WebKit/scripts/controller/Oauth.js b/WebKit/scripts/controller/Oauth.js index e74797e..581a4ba 100644 --- a/WebKit/scripts/controller/Oauth.js +++ b/WebKit/scripts/controller/Oauth.js @@ -155,6 +155,7 @@ function(HostApp, Paths, Hmac) { Oauth.prototype.logout = function() { return false; } + return Oauth; diff --git a/WebKit/scripts/controller/Profile.js b/WebKit/scripts/controller/Profile.js index 070f6d7..120c3d1 100644 --- a/WebKit/scripts/controller/Profile.js +++ b/WebKit/scripts/controller/Profile.js @@ -23,8 +23,8 @@ function(HostApp, Core, Paths, URI) { this.clear(); this.entity = entity; - this.profile_template.entity.innerHTML = entity; - this.profile_template.entity.href = entity; + this.profile_template.entity.innerHTML = this.entity; + this.profile_template.entity.href = this.entity; this.setFollowingButton(!!this.followings.followings[this.entity]); @@ -51,7 +51,8 @@ function(HostApp, Core, Paths, URI) { location: document.createElement("td"), gender: document.createElement("td"), url: document.createElement("a"), - following_button: document.createElement("button") + following_button: document.createElement("button"), + mention_button: document.createElement("button") }; header.appendChild(this.profile_template.avatar); @@ -63,8 +64,18 @@ function(HostApp, Core, Paths, URI) { this.profile_template.following_button.onclick = function(e) { _this.toggleFollow() } - div.appendChild(this.profile_template.following_button); + + this.profile_template.mention_button.onclick = function() { + var e = _this.entity; + if (e.startsWith("https://")) { + e = e.substr(8, e.length); + } + HostApp.openNewMessageWidow(null, null, "^" + e + " "); + } + div.appendChild(this.profile_template.mention_button); + this.profile_template.mention_button.innerHTML = "Mention"; + div.appendChild(this.profile_template.name); var p = document.createElement("p"); @@ -302,7 +313,7 @@ function(HostApp, Core, Paths, URI) { Profile.prototype.toggleFollow = function() { var _this = this; - var callback = function() { _this.followings.getAllFollowings() }; + var callback = function(resp) { _this.followings.getAllFollowings(); debug(resp.responseText) }; if (this.followings.followings[this.entity]) { diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js index d4b43ad..00e9ddf 100644 --- a/WebKit/scripts/helper/Core.js +++ b/WebKit/scripts/helper/Core.js @@ -398,6 +398,7 @@ function(jQuery, Paths, URI, HostApp, Followings) { } var mentions = this.parseMentions(content, in_reply_to_status_id, in_reply_to_entity); + if (mentions.length > 0) { data["mentions"] = mentions; } @@ -569,7 +570,7 @@ function(jQuery, Paths, URI, HostApp, Followings) { node.innerHTML = new_text; $(node).find("a.name").click(function(e) { - HostApp.showProfileForEntity(e.target.href); + HostApp.showProfileForEntity(e.target.title); return false; }); } @@ -600,7 +601,7 @@ function(jQuery, Paths, URI, HostApp, Followings) { var mentions = []; - if (post_id && entity) { + if (post_id && entity && post_id != "(null)" && entity != "(null)") { mentions.push({ post: post_id, entity: entity diff --git a/WebKit/scripts/helper/Followings.js b/WebKit/scripts/helper/Followings.js index 0979020..b446f28 100644 --- a/WebKit/scripts/helper/Followings.js +++ b/WebKit/scripts/helper/Followings.js @@ -33,8 +33,6 @@ function(Paths, URI) { _this.before_id = following.id; _this.followings[following.entity] = following; } - - _this.getAllFollowings(); } var url = URI(Paths.mkApiRootPath("/followings"));