Hide radio buttons in share modal when no contacts
This commit is contained in:
parent
f1d1690cf8
commit
bdd338902b
@ -1322,7 +1322,13 @@ define([
|
|||||||
|
|
||||||
var contactButtons = friendsObject.buttons;
|
var contactButtons = friendsObject.buttons;
|
||||||
contactButtons.unshift(makeCancelButton());
|
contactButtons.unshift(makeCancelButton());
|
||||||
|
|
||||||
|
var onShowContacts = function () {
|
||||||
|
if (!hasFriends) {
|
||||||
|
$rights.hide();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var frameContacts = UI.dialog.customModal(contactsContent, {
|
var frameContacts = UI.dialog.customModal(contactsContent, {
|
||||||
buttons: contactButtons,
|
buttons: contactButtons,
|
||||||
onClose: config.onClose,
|
onClose: config.onClose,
|
||||||
@ -1405,13 +1411,16 @@ define([
|
|||||||
|
|
||||||
// Create modal
|
// Create modal
|
||||||
var resetTab = function () {
|
var resetTab = function () {
|
||||||
|
$rights.show();
|
||||||
$rights.find('label.cp-radio').show();
|
$rights.find('label.cp-radio').show();
|
||||||
};
|
};
|
||||||
var tabs = [{
|
var tabs = [{
|
||||||
title: Messages.share_contactCategory,
|
title: Messages.share_contactCategory,
|
||||||
icon: "fa fa-address-book",
|
icon: "fa fa-address-book",
|
||||||
content: frameContacts,
|
content: frameContacts,
|
||||||
active: hasFriends
|
active: hasFriends,
|
||||||
|
onShow: onShowContacts,
|
||||||
|
onHide: resetTab
|
||||||
}, {
|
}, {
|
||||||
title: Messages.share_linkCategory,
|
title: Messages.share_linkCategory,
|
||||||
icon: "fa fa-link",
|
icon: "fa fa-link",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user