зеркало из https://github.com/nextcloud/spreed.git
Fix room renaming event.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
235443d566
Коммит
55b0b86c67
|
@ -174,6 +174,7 @@
|
|||
'click .app-navigation-entry-menu .add-person-button': 'addPerson',
|
||||
'click .app-navigation-entry-menu .rename-room-button': 'showRenameInput',
|
||||
'click .app-navigation-entry-menu .rename-confirm': 'confirmRoomRename',
|
||||
'keyup .rename-input': 'renameKeyUp',
|
||||
'click .app-navigation-entry-menu .share-link-button': 'shareGroup',
|
||||
'click .app-navigation-entry-menu .leave-room-button': 'leaveRoom',
|
||||
'click .app-navigation-entry-menu .delete-room-button': 'deleteRoom',
|
||||
|
@ -251,14 +252,6 @@
|
|||
|
||||
this.$el.find('.rename-input').focus();
|
||||
this.$el.find('.rename-input').select();
|
||||
this.$el.keyup(function(e) {
|
||||
if (e.keyCode === 13) {
|
||||
self.confirmRoomRename();
|
||||
} else if (e.keyCode === 27) {
|
||||
self.$el.find('.rename-element').addClass('hidden-important');
|
||||
self.$el.find('.rename-room-button').removeClass('hidden-important');
|
||||
}
|
||||
});
|
||||
},
|
||||
confirmRoomRename: function() {
|
||||
var currentRoomName = this.model.get('name');
|
||||
|
@ -272,6 +265,14 @@
|
|||
this.renameRoom(newRoomName);
|
||||
}
|
||||
},
|
||||
renameKeyUp: function(e) {
|
||||
if (e.keyCode === 13) {
|
||||
this.confirmRoomRename();
|
||||
} else if (e.keyCode === 27) {
|
||||
this.$el.find('.rename-element').addClass('hidden-important');
|
||||
this.$el.find('.rename-room-button').removeClass('hidden-important');
|
||||
}
|
||||
},
|
||||
renameRoom: function(roomName) {
|
||||
var app = OCA.SpreedMe.app;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче