CSS refactorings and pad-is-not-pinned work

This commit is contained in:
Caleb James DeLisle
2017-12-07 19:00:13 +01:00
parent 67f8031beb
commit 617c4b6044
20 changed files with 210 additions and 230 deletions

View File

@@ -729,11 +729,20 @@ define([
Common.sendAnonRpcMsg('IS_CHANNEL_PINNED', cid, function (x) {
if (x.error || !Array.isArray(x.response)) { return void console.log(x); }
if (x.response[0] === true) { return; }
var pnpTitle = Messages._getKey('padNotPinned', ['','','','']);
var pnpMsg = Messages._getKey('padNotPinned', [
'<a href="' + o + '/login" target="blank" title>',
'</a>',
'<a href="' + o + '/register" target="blank" title>',
'</a>'
]);
var msg = $('<span>', {
'class': 'cp-pad-not-pinned',
}).append(
Messages._getKey('padNotPinned', [o + '/login', o + '/register'])
);
'title': pnpTitle
}).append([
$('<span>', {'class': 'fa fa-exclamation-triangle'}),
$('<span>', {'class': 'cp-pnp-msg'}).append(pnpMsg)
]);
$('.cp-toolbar-title').append(msg);
console.log("This pad is not pinned");
});