Merge branch 'staging' into ro
This commit is contained in:
@@ -58,12 +58,6 @@
|
||||
.cp-leftside-narrow {
|
||||
.cp-avatar {
|
||||
overflow: visible;
|
||||
media-tag {
|
||||
margin-right: 0;
|
||||
}
|
||||
span.cp-sidebarlayout-category-name {
|
||||
margin-left: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cp-team-cat-header {
|
||||
@@ -73,15 +67,20 @@
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
media-tag, .cp-avatar-default {
|
||||
margin-right: 3px;
|
||||
}
|
||||
media-tag {
|
||||
order: -1;
|
||||
margin-right: 3px;
|
||||
}
|
||||
cursor: default !important;
|
||||
font-size: 18px;
|
||||
&:hover {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
span.cp-sidebarlayout-category-name {
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
.cp-team-cat-chat {
|
||||
span.cp-team-chat-notification {
|
||||
@@ -132,6 +131,10 @@
|
||||
}
|
||||
.cp-team-avatar {
|
||||
.avatar_main(300px);
|
||||
.cp-avatar img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
.cp-team-roster {
|
||||
.avatar_main(50px);
|
||||
|
||||
@@ -378,7 +378,7 @@ define([
|
||||
refreshList(common, cb);
|
||||
});
|
||||
|
||||
makeBlock('create', function (common, cb) {
|
||||
var refreshCreate = function (common, cb) {
|
||||
var metadataMgr = common.getMetadataMgr();
|
||||
var privateData = metadataMgr.getPrivateData();
|
||||
var content = [];
|
||||
@@ -406,17 +406,21 @@ define([
|
||||
content.push(h('br'));
|
||||
content.push(h('br'));
|
||||
content.push(button);
|
||||
var $spinner = $('<span>', {'class': 'fa fa-spinner fa-pulse'}).hide();
|
||||
content.push($spinner[0]);
|
||||
var state = false;
|
||||
$(button).click(function () {
|
||||
if (state) { return; }
|
||||
var name = $(input).val();
|
||||
if (!name.trim()) { return; }
|
||||
state = true;
|
||||
$spinner.show();
|
||||
APP.module.execCommand('CREATE_TEAM', {
|
||||
name: name
|
||||
}, function (obj) {
|
||||
if (obj && obj.error) {
|
||||
console.error(obj.error);
|
||||
$spinner.hide();
|
||||
return void UI.warn(Messages.error);
|
||||
}
|
||||
// Redraw the create block
|
||||
@@ -428,15 +432,15 @@ define([
|
||||
refreshList(common, function (content) {
|
||||
state = false;
|
||||
$div.append(content);
|
||||
$spinner.hide();
|
||||
$('div.cp-team-cat-list').click();
|
||||
});
|
||||
});
|
||||
});
|
||||
cb(content);
|
||||
});
|
||||
|
||||
makeBlock('back', function (common, cb) {
|
||||
refreshList(common, cb);
|
||||
};
|
||||
makeBlock('create', function (common, cb) {
|
||||
refreshCreate(common, cb);
|
||||
});
|
||||
|
||||
makeBlock('drive', function (common, cb) {
|
||||
@@ -967,10 +971,17 @@ define([
|
||||
|
||||
metadataMgr.onChange(function () {
|
||||
var $div = $('div.cp-team-list');
|
||||
if (!$div.length) { return; }
|
||||
refreshList(common, function (content) {
|
||||
$div.empty().append(content);
|
||||
});
|
||||
if ($div.length) {
|
||||
refreshList(common, function (content) {
|
||||
$div.empty().append(content);
|
||||
});
|
||||
}
|
||||
var $divCreate = $('div.cp-team-create');
|
||||
if ($divCreate.length) {
|
||||
refreshCreate(common, function (content) {
|
||||
$divCreate.empty().append(content);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var onDisconnect = function (noAlert) {
|
||||
|
||||
Reference in New Issue
Block a user