Skip to content

Commit 6c8ac2f

Browse files
committed
Add edit menu item for owned posts
1 parent fd5b6ec commit 6c8ac2f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

js/Post.coffee

+2
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ class Post extends Class
140140
@menu.items.push ["Follow in newsfeed", ( => if followed then @unfollow() else @follow() ), followed]
141141
@menu.items.push ["Mute user", @user.handleMuteClick]
142142
@menu.items.push ["Permalink", @getLink()]
143+
if @owned
144+
@menu.items.push ["Edit", ( (e) => @editable_body.handleEditClick(e) )]
143145
@menu.toggle()
144146
return false
145147

js/all.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -4644,6 +4644,13 @@ function clone(obj) {
46444644
]);
46454645
_this.menu.items.push(["Mute user", _this.user.handleMuteClick]);
46464646
_this.menu.items.push(["Permalink", _this.getLink()]);
4647+
if (_this.owned) {
4648+
_this.menu.items.push([
4649+
"Edit", (function(e) {
4650+
return _this.editable_body.handleEditClick(e);
4651+
})
4652+
]);
4653+
}
46474654
return _this.menu.toggle();
46484655
};
46494656
})(this));
@@ -4818,6 +4825,7 @@ function clone(obj) {
48184825

48194826
}).call(this);
48204827

4828+
48214829
/* ---- PostCreate.coffee ---- */
48224830

48234831

@@ -6107,7 +6115,6 @@ function clone(obj) {
61076115

61086116
}).call(this);
61096117

6110-
61116118
/* ---- ZeroMe.coffee ---- */
61126119

61136120

0 commit comments

Comments
 (0)