Pad Not Pinned: Better CSS, moved element outside of the title element, added it in poll, better colors, tippy, and login/register in same window
This commit is contained in:
@@ -731,20 +731,31 @@ define([
|
||||
if (x.response[0] === true) { return; }
|
||||
var pnpTitle = Messages._getKey('padNotPinned', ['','','','']);
|
||||
var pnpMsg = Messages._getKey('padNotPinned', [
|
||||
'<a href="' + o + '/login" target="blank" title>',
|
||||
'<a href="' + o + '/login" class="cp-pnp-login" target="blank" title>',
|
||||
'</a>',
|
||||
'<a href="' + o + '/register" target="blank" title>',
|
||||
'<a href="' + o + '/register" class="cp-pnp-register" target="blank" title>',
|
||||
'</a>'
|
||||
]);
|
||||
var msg = $('<span>', {
|
||||
'class': 'cp-pad-not-pinned',
|
||||
'title': pnpTitle
|
||||
var $msg = $('<span>', {
|
||||
'class': 'cp-pad-not-pinned'
|
||||
}).append([
|
||||
$('<span>', {'class': 'fa fa-exclamation-triangle'}),
|
||||
$('<span>', {'class': 'fa fa-exclamation-triangle', 'title': pnpTitle}),
|
||||
$('<span>', {'class': 'cp-pnp-msg'}).append(pnpMsg)
|
||||
]);
|
||||
$('.cp-toolbar-title').append(msg);
|
||||
console.log("This pad is not pinned");
|
||||
$msg.find('a.cp-pnp-login').click(function (ev) {
|
||||
ev.preventDefault();
|
||||
Common.setLoginRedirect(function () {
|
||||
window.parent.location = o + '/login/';
|
||||
});
|
||||
});
|
||||
$msg.find('a.cp-pnp-register').click(function (ev) {
|
||||
ev.preventDefault();
|
||||
Common.setLoginRedirect(function () {
|
||||
window.parent.location = o + '/register/';
|
||||
});
|
||||
});
|
||||
$('.cp-toolbar-top').append($msg);
|
||||
UI.addTooltips();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1079,7 +1079,16 @@ define([
|
||||
Title = common.createTitle(titleCfg);
|
||||
|
||||
var configTb = {
|
||||
displayed: ['title', 'useradmin', 'spinner', 'share', 'userlist', 'newpad', 'limit'],
|
||||
displayed: [
|
||||
'userlist',
|
||||
'title',
|
||||
'useradmin',
|
||||
'spinner',
|
||||
'newpad',
|
||||
'share',
|
||||
'limit',
|
||||
'unpinnedWarning'
|
||||
],
|
||||
title: Title.getTitleConfig(),
|
||||
metadataMgr: metadataMgr,
|
||||
readOnly: APP.readOnly,
|
||||
|
||||
Reference in New Issue
Block a user