mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
Stream Name to Content Editable.
This changes the stream name component to be content editable.
This commit is contained in:
committed by
Brock Whittaker
parent
eaeb0e32a7
commit
14b471a29f
@@ -423,9 +423,8 @@ $(function () {
|
||||
|
||||
(function () {
|
||||
var map = {
|
||||
".stream-description-editable": function (e) {
|
||||
subs.change_stream_description(e);
|
||||
},
|
||||
".stream-description-editable": subs.change_stream_description,
|
||||
".stream-name-editable": subs.change_stream_name
|
||||
};
|
||||
|
||||
$(document).on("keydown", ".editable-section", function (e) {
|
||||
@@ -461,9 +460,13 @@ $(function () {
|
||||
edit_area.text(edit_area.attr("data-prev-text"));
|
||||
$(this).html("");
|
||||
} else {
|
||||
$(edit_area).attr("data-prev-text", edit_area.text().trim());
|
||||
$("[data-finish-editing='" + selector + "']").show();
|
||||
edit_area.attr("contenteditable", true).focus().select();
|
||||
|
||||
edit_area.attr("data-prev-text", edit_area.text().trim())
|
||||
.attr("contenteditable", true);
|
||||
|
||||
place_caret_at_end(edit_area[0]);
|
||||
|
||||
$(this).html("×");
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user