Fix initial text not removed in /contacts
This commit is contained in:
@@ -89,7 +89,7 @@ define([
|
|||||||
});
|
});
|
||||||
$remove.click(function (e) {
|
$remove.click(function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
common.confirm(common.Messages.getKey('contacts_confirmRemove', [
|
common.confirm(common.Messages._getKey('contacts_confirmRemove', [
|
||||||
common.fixHTML(data.displayName)
|
common.fixHTML(data.displayName)
|
||||||
]), function (yes) {
|
]), function (yes) {
|
||||||
if (!yes) { return; }
|
if (!yes) { return; }
|
||||||
@@ -364,6 +364,7 @@ define([
|
|||||||
};
|
};
|
||||||
// Display a new channel
|
// Display a new channel
|
||||||
var display = function (curvePublic) {
|
var display = function (curvePublic) {
|
||||||
|
$msgContainer.find('.info').hide();
|
||||||
var isNew = false;
|
var isNew = false;
|
||||||
var $chat = $msgContainer.find('.chat').filter(function (idx, el) {
|
var $chat = $msgContainer.find('.chat').filter(function (idx, el) {
|
||||||
return $(el).data('key') === curvePublic;
|
return $(el).data('key') === curvePublic;
|
||||||
@@ -421,7 +422,12 @@ define([
|
|||||||
var $friend = $listContainer.find('.friend').filter(function (idx, el) {
|
var $friend = $listContainer.find('.friend').filter(function (idx, el) {
|
||||||
return $(el).data('key') === curvePublic;
|
return $(el).data('key') === curvePublic;
|
||||||
});
|
});
|
||||||
|
var $chat = $msgContainer.find('.chat').filter(function (idx, el) {
|
||||||
|
return $(el).data('key') === curvePublic;
|
||||||
|
});
|
||||||
$friend.remove();
|
$friend.remove();
|
||||||
|
$chat.remove();
|
||||||
|
$msgContainer.find('.info').show();
|
||||||
};
|
};
|
||||||
var updateUI = function (curvePublic, types) {
|
var updateUI = function (curvePublic, types) {
|
||||||
var data = getFriend(common, curvePublic);
|
var data = getFriend(common, curvePublic);
|
||||||
|
|||||||
@@ -49,11 +49,12 @@ define([
|
|||||||
|
|
||||||
Cryptpad.initMessaging(Cryptpad, $list, $messages);
|
Cryptpad.initMessaging(Cryptpad, $list, $messages);
|
||||||
|
|
||||||
var $title = $('<h2>').text(Messages.contacts_info1).appendTo($messages);
|
var $infoBlock = $('<div>', {'class': 'info'}).appendTo($messages);
|
||||||
var $ul = $('<ul>').appendTo($messages);
|
$('<h2>').text(Messages.contacts_info1).appendTo($infoBlock);
|
||||||
|
var $ul = $('<ul>').appendTo($infoBlock);
|
||||||
$('<li>').text(Messages.contacts_info2).appendTo($ul);
|
$('<li>').text(Messages.contacts_info2).appendTo($ul);
|
||||||
$('<li>').text(Messages.contacts_info3).appendTo($ul);
|
$('<li>').text(Messages.contacts_info3).appendTo($ul);
|
||||||
$('<li>').text(Messages.contacts_info4).appendTo($ul);
|
//$('<li>').text(Messages.contacts_info4).appendTo($ul);
|
||||||
|
|
||||||
Cryptpad.removeLoadingScreen();
|
Cryptpad.removeLoadingScreen();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ body {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: lighten(@bg-color, 20%);
|
background-color: lighten(@bg-color, 20%);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
.info {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
background-color: lighten(@bg-color, 15%);
|
background-color: lighten(@bg-color, 15%);
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user