mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
chat: Rename hide
method to reduce
It doesn't hide: If sticky, it unsticks. Otherwise, it minimizes.
This commit is contained in:
parent
f7d7d89874
commit
b830ed9744
2 changed files with 4 additions and 4 deletions
|
@ -79,7 +79,7 @@ exports.chat = (() => {
|
||||||
.toggleClass('chatAndUsers popup-show stickyUsers', userAndChat);
|
.toggleClass('chatAndUsers popup-show stickyUsers', userAndChat);
|
||||||
$('#chatbox').toggleClass('chatAndUsersChat', userAndChat);
|
$('#chatbox').toggleClass('chatAndUsersChat', userAndChat);
|
||||||
},
|
},
|
||||||
hide() {
|
reduce() {
|
||||||
// decide on hide logic based on chat window being maximized or not
|
// decide on hide logic based on chat window being maximized or not
|
||||||
if ($('#options-stickychat').prop('checked')) {
|
if ($('#options-stickychat').prop('checked')) {
|
||||||
this.stickToScreen();
|
this.stickToScreen();
|
||||||
|
@ -221,7 +221,7 @@ exports.chat = (() => {
|
||||||
$('#options-stickychat').on('click', () => this.stickToScreen());
|
$('#options-stickychat').on('click', () => this.stickToScreen());
|
||||||
$('#options-chatandusers').on('click', () => this.chatAndUsers());
|
$('#options-chatandusers').on('click', () => this.chatAndUsers());
|
||||||
$('#chaticon').on('click', () => { this.show(); return false; });
|
$('#chaticon').on('click', () => { this.show(); return false; });
|
||||||
$('#titlecross').on('click', () => { this.hide(); return false; });
|
$('#titlecross').on('click', () => { this.reduce(); return false; });
|
||||||
$('#titlesticky').on('click', () => { this.stickToScreen(true); return false; });
|
$('#titlesticky').on('click', () => { this.stickToScreen(true); return false; });
|
||||||
$('#chatinput').on('keydown', (evt) => {
|
$('#chatinput').on('keydown', (evt) => {
|
||||||
// If the event is Alt C or Escape & we're already in the chat menu
|
// If the event is Alt C or Escape & we're already in the chat menu
|
||||||
|
|
|
@ -76,7 +76,7 @@ const getParameters = [
|
||||||
callback: (val) => {
|
callback: (val) => {
|
||||||
if (val === 'false') {
|
if (val === 'false') {
|
||||||
settings.hideChat = true;
|
settings.hideChat = true;
|
||||||
chat.hide();
|
chat.reduce();
|
||||||
$('#chaticon').hide();
|
$('#chaticon').hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -480,7 +480,7 @@ const pad = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.clientVars.readonly) {
|
if (window.clientVars.readonly) {
|
||||||
chat.hide();
|
chat.reduce();
|
||||||
$('#myusernameedit').attr('disabled', true);
|
$('#myusernameedit').attr('disabled', true);
|
||||||
$('#chatinput').attr('disabled', true);
|
$('#chatinput').attr('disabled', true);
|
||||||
$('#chaticon').hide();
|
$('#chaticon').hide();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue