Fix default category after joining a team
parent
efa56e5fbc
commit
8eed376274
|
@ -1701,7 +1701,7 @@ define([
|
|||
var $nav = $linkContent.closest('.alertify').find('nav');
|
||||
$(linkError).text('').hide();
|
||||
var name = $(linkName).val();
|
||||
var pw = $(linkPassword).val();
|
||||
var pw = $(linkPassword).find('input').val();
|
||||
var msg = $(linkMessage).val();
|
||||
var hash = Hash.createRandomHash('invite', pw);
|
||||
var hashData = Hash.parseTypeHash('invite', hash);
|
||||
|
|
|
@ -184,7 +184,7 @@ define([
|
|||
var $categories = $('<div>', {'class': 'cp-sidebarlayout-categories'})
|
||||
.appendTo(APP.$leftside);
|
||||
|
||||
var hash = common.getMetadataMgr().getPrivateData().teamInviteHash;
|
||||
var hash = common.getMetadataMgr().getPrivateData().teamInviteHash && mainCategories.link;
|
||||
|
||||
var categories = team ? teamCategories : mainCategories;
|
||||
var active = team ? 'drive' : (hash ? 'link' : 'list');
|
||||
|
@ -1051,6 +1051,7 @@ define([
|
|||
};
|
||||
|
||||
refreshLink = function (common, cb) {
|
||||
if (!mainCategories.link) { return; }
|
||||
var privateData = common.getMetadataMgr().getPrivateData();
|
||||
var hash = privateData.teamInviteHash;
|
||||
var hashData = Hash.parseTypeHash('invite', hash);
|
||||
|
@ -1133,6 +1134,7 @@ define([
|
|||
if ($divLink.length) {
|
||||
$divLink.remove();
|
||||
$('div.cp-team-cat-link').remove();
|
||||
delete mainCategories.link;
|
||||
}
|
||||
});
|
||||
var $divCreate = $('div.cp-team-create');
|
||||
|
|
Loading…
Reference in New Issue