Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
commit
b4b851959f
|
@ -467,14 +467,6 @@
|
|||
white-space: normal;
|
||||
text-align: left;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users {
|
||||
text-align: baseline;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .yourself,
|
||||
.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .anonymous,
|
||||
.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .viewer {
|
||||
font-style: italic;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content p h2 {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
|
|
|
@ -77,12 +77,6 @@
|
|||
margin: 0;
|
||||
white-space: normal;
|
||||
text-align: left;
|
||||
&.cryptpad-dropdown-users {
|
||||
text-align:baseline;
|
||||
.yourself, .anonymous, .viewer {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
h2 {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
|
|
|
@ -24,6 +24,176 @@
|
|||
.cke_reset_all * {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#cke_1_contents {
|
||||
margin-top: -1px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.userlist-drawer {
|
||||
font: normal normal normal 14px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;
|
||||
width: 175px;
|
||||
display: block;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
h2 {
|
||||
color: inherit;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 5px 0px;
|
||||
margin: 5px 0px;
|
||||
font-size: 16px;
|
||||
white-space: normal;
|
||||
}
|
||||
text-align:baseline;
|
||||
.viewer {
|
||||
font-style: italic;
|
||||
padding: 5px;
|
||||
background: rgba(0,0,0,0.1);
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.userlist-others {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
margin: 10px 0;
|
||||
margin-bottom: 20px;
|
||||
&>span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding: 5px;
|
||||
background: rgba(0,0,0,0.1);
|
||||
margin: 2px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
.addToolbarColors (@color, @bg-color) {
|
||||
.userlist-drawer {
|
||||
background-color: @bgcolor;
|
||||
color: @color;
|
||||
h2 {
|
||||
background-color: darken(@bgcolor, 10%);
|
||||
}
|
||||
}
|
||||
.cryptpad-toolbar {
|
||||
background-color: @bgcolor;
|
||||
color: @color;
|
||||
.userlist-drawer {
|
||||
background-color: @bgcolor;
|
||||
width: 150px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96px;
|
||||
bottom: 0;
|
||||
}
|
||||
.cryptpad-toolbar-leftside, .cryptpad-toolbar-rightside, .drawer-content {
|
||||
background-color: lighten(@bgcolor, 8%);
|
||||
button:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
}
|
||||
.hoverable:hover {
|
||||
.editable {
|
||||
cursor: text;
|
||||
border: 1px solid lighten(@bgcolor, 15%);
|
||||
background: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
}
|
||||
.pencilIcon {
|
||||
border: 1px solid lighten(@bgcolor, 15%);
|
||||
background: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
&:hover {
|
||||
background: darken(@bgcolor, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
.saveIcon {
|
||||
border: 1px solid lighten(@bgcolor, 15%);
|
||||
background: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
&:hover {
|
||||
background: darken(@bgcolor, 5%);
|
||||
}
|
||||
}
|
||||
input {
|
||||
border: 1px solid lighten(@bgcolor, 15%);
|
||||
background: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
}
|
||||
.dropdown-bar-content {
|
||||
background: darken(@bgcolor, 5%);
|
||||
border: 1px solid @color;
|
||||
color: @color;
|
||||
a {
|
||||
color: @color;
|
||||
&.active {
|
||||
background-color: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
}
|
||||
&:hover {
|
||||
background-color: @bgcolor;
|
||||
color: @color;
|
||||
}
|
||||
}
|
||||
hr {
|
||||
background-color: darken(@bgcolor, 15%);
|
||||
}
|
||||
p {
|
||||
h2 {
|
||||
background-color: darken(@bgcolor, 10%);
|
||||
}
|
||||
.accountData {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.app-pad {
|
||||
@bgcolor: @toolbar-pad-bg;
|
||||
@color: @toolbar-pad-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.app-code {
|
||||
@bgcolor: @toolbar-code-bg;
|
||||
@color: @toolbar-code-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.app-slide {
|
||||
@bgcolor: @toolbar-slide-bg;
|
||||
@color: @toolbar-slide-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.app-poll {
|
||||
@bgcolor: @toolbar-poll-bg;
|
||||
@color: @toolbar-poll-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.app-whiteboard {
|
||||
@bgcolor: @toolbar-whiteboard-bg;
|
||||
@color: @toolbar-whiteboard-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.app-drive {
|
||||
@bgcolor: @toolbar-drive-bg;
|
||||
@color: @toolbar-drive-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.app-file {
|
||||
@bgcolor: @toolbar-file-bg;
|
||||
@color: @toolbar-file-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.cryptpad-toolbar {
|
||||
@toolbar-green: #5cb85c;
|
||||
|
||||
|
@ -34,108 +204,7 @@
|
|||
background-color: @toolbar-default-bg;
|
||||
color: @toolbar-default-color;
|
||||
|
||||
.addToolbarColors (@color, @bg-color) {
|
||||
background-color: @bgcolor;
|
||||
color: @color;
|
||||
.cryptpad-toolbar-leftside, .cryptpad-toolbar-rightside, .drawer-content {
|
||||
background-color: lighten(@bgcolor, 8%);
|
||||
button:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
}
|
||||
.hoverable:hover {
|
||||
.editable {
|
||||
cursor: text;
|
||||
border: 1px solid lighten(@bgcolor, 15%);
|
||||
background: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
}
|
||||
.pencilIcon {
|
||||
border: 1px solid lighten(@bgcolor, 15%);
|
||||
background: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
&:hover {
|
||||
background: darken(@bgcolor, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
.saveIcon {
|
||||
border: 1px solid lighten(@bgcolor, 15%);
|
||||
background: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
&:hover {
|
||||
background: darken(@bgcolor, 5%);
|
||||
}
|
||||
}
|
||||
input {
|
||||
border: 1px solid lighten(@bgcolor, 15%);
|
||||
background: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
}
|
||||
.dropdown-bar-content {
|
||||
background: darken(@bgcolor, 5%);
|
||||
border: 1px solid @color;
|
||||
color: @color;
|
||||
a {
|
||||
color: @color;
|
||||
&.active {
|
||||
background-color: darken(@bgcolor, 10%);
|
||||
color: @color;
|
||||
}
|
||||
&:hover {
|
||||
background-color: @bgcolor;
|
||||
color: @color;
|
||||
}
|
||||
}
|
||||
hr {
|
||||
background-color: darken(@bgcolor, 15%);
|
||||
}
|
||||
p {
|
||||
h2 {
|
||||
background-color: darken(@bgcolor, 10%);
|
||||
}
|
||||
.accountData {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.pad {
|
||||
@bgcolor: @toolbar-pad-bg;
|
||||
@color: @toolbar-pad-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.code {
|
||||
@bgcolor: @toolbar-code-bg;
|
||||
@color: @toolbar-code-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.slide {
|
||||
@bgcolor: @toolbar-slide-bg;
|
||||
@color: @toolbar-slide-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.poll {
|
||||
@bgcolor: @toolbar-poll-bg;
|
||||
@color: @toolbar-poll-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.whiteboard {
|
||||
@bgcolor: @toolbar-whiteboard-bg;
|
||||
@color: @toolbar-whiteboard-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.drive {
|
||||
@bgcolor: @toolbar-drive-bg;
|
||||
@color: @toolbar-drive-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
&.file {
|
||||
@bgcolor: @toolbar-file-bg;
|
||||
@color: @toolbar-file-color;
|
||||
.addToolbarColors(@color, @bgcolor);
|
||||
}
|
||||
|
||||
.fa {
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
|
@ -664,7 +733,9 @@
|
|||
}
|
||||
}
|
||||
button {
|
||||
margin: 2px 4px 2px 0px;
|
||||
margin: 0px;
|
||||
border-radius: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.dropdown-bar-content {
|
||||
margin-top: -1px;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -488,7 +488,8 @@ define(function () {
|
|||
|
||||
out.header_france = '<a href="http://www.xwiki.com/fr" target="_blank" rel="noopener noreferrer">Fait avec <img class="bottom-bar-heart" src="/customize/heart.png" alt="amour" /> en <img class="bottom-bar-fr" title="France" alt="France" src="/customize/fr.png" /> par <img src="/customize/logo-xwiki.png" alt="XWiki SAS" class="bottom-bar-xwiki"/></a>';
|
||||
out.header_support = '<a href="http://ng.open-paas.org/" title="OpenPaaS::ng" target="_blank" rel="noopener noreferrer"> <img src="/customize/openpaasng.png" alt="OpenPaaS-ng" class="bottom-bar-openpaas" /></a>';
|
||||
out.header_logoTitle = "Aller vers la page d'accueil";
|
||||
out.updated_0_header_logoTitle = 'Retourner vers votre CryptDrive';
|
||||
out.header_logoTitle = out.updated_0_header_logoTitle;
|
||||
|
||||
// Initial states
|
||||
|
||||
|
|
|
@ -498,7 +498,8 @@ define(function () {
|
|||
out.header_france = '<a href="http://www.xwiki.com/" target="_blank" rel="noopener noreferrer">With <img class="bottom-bar-heart" src="/customize/heart.png" alt="love" /> from <img class="bottom-bar-fr" src="/customize/fr.png" title="France" alt="France"/> by <img src="/customize/logo-xwiki.png" alt="XWiki SAS" class="bottom-bar-xwiki"/></a>';
|
||||
|
||||
out.header_support = '<a href="http://ng.open-paas.org/" title="OpenPaaS::ng" target="_blank" rel="noopener noreferrer"> <img src="/customize/openpaasng.png" alt="OpenPaaS-ng" class="bottom-bar-openpaas" /></a>';
|
||||
out.header_logoTitle = 'Go to the main page';
|
||||
out.updated_0_header_logoTitle = 'Go to your CryptDrive';
|
||||
out.header_logoTitle = out.updated_0_header_logoTitle;
|
||||
|
||||
// Initial states
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ body {
|
|||
transition: width 500ms, min-width 500ms, max-width 500ms;
|
||||
}
|
||||
.CodeMirror.fullPage {
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
resize: none;
|
||||
flex: 1;
|
||||
}
|
||||
.CodeMirror-focused .cm-matchhighlight {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
|
||||
|
|
|
@ -30,9 +30,10 @@ body {
|
|||
resize: horizontal;
|
||||
}
|
||||
.CodeMirror.fullPage {
|
||||
min-width: 100%;
|
||||
//min-width: 100%;
|
||||
max-width: 100%;
|
||||
resize: none;
|
||||
flex: 1;
|
||||
}
|
||||
.CodeMirror-focused .cm-matchhighlight {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
|
||||
|
|
|
@ -41,6 +41,7 @@ define([
|
|||
|
||||
var andThen = function (CMeditor) {
|
||||
var $iframe = $('#pad-iframe').contents();
|
||||
var $contentContainer = $iframe.find('#editorContainer');
|
||||
var $previewContainer = $iframe.find('#previewContainer');
|
||||
var $preview = $iframe.find('#preview');
|
||||
$preview.click(function (e) {
|
||||
|
@ -188,7 +189,8 @@ define([
|
|||
ifrw: ifrw,
|
||||
realtime: info.realtime,
|
||||
network: info.network,
|
||||
$container: $bar
|
||||
$container: $bar,
|
||||
$contentContainer: $contentContainer
|
||||
};
|
||||
toolbar = APP.toolbar = Toolbar.create(configTb);
|
||||
|
||||
|
|
|
@ -100,8 +100,6 @@ Version 1
|
|||
|
||||
var ret = {};
|
||||
|
||||
if (typeof href !== "string") { console.error(href); }
|
||||
|
||||
if (!href) { return ret; }
|
||||
if (href.slice(-1) !== '/') { href += '/'; }
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ define([
|
|||
History.readOnly = 2;
|
||||
}
|
||||
else if (!secret.keys.validateKey) {
|
||||
secret.keys.validateKey = true;
|
||||
History.readOnly = 0;
|
||||
}
|
||||
|
||||
|
@ -70,6 +69,10 @@ define([
|
|||
return;
|
||||
}
|
||||
if (parsed[0] !== 'FULL_HISTORY') { return; }
|
||||
if (parsed[1] && parsed[1].validateKey) { // First message
|
||||
secret.keys.validateKey = parsed[1].validateKey;
|
||||
return;
|
||||
}
|
||||
msg = parsed[1][4];
|
||||
if (msg) {
|
||||
msg = msg.replace(/^cp\|/, '');
|
||||
|
|
|
@ -419,7 +419,7 @@ define([
|
|||
};
|
||||
common.setAttribute = function (attr, value, cb) {
|
||||
getStore().set(["cryptpad", attr].join('.'), value, function (err, data) {
|
||||
cb(err, data);
|
||||
if (cb) { cb(err, data); }
|
||||
});
|
||||
};
|
||||
common.setLSAttribute = function (attr, value) {
|
||||
|
@ -925,7 +925,6 @@ define([
|
|||
common.createButton = function (type, rightside, data, callback) {
|
||||
var button;
|
||||
var size = "17px";
|
||||
console.log(type);
|
||||
switch (type) {
|
||||
case 'export':
|
||||
button = $('<button>', {
|
||||
|
|
|
@ -70,7 +70,7 @@ define([
|
|||
|
||||
var parsed = Cryptpad.parsePadUrl(window.location.href);
|
||||
if (typeof parsed.type === "string") {
|
||||
$toolbar.addClass(parsed.type);
|
||||
config.$container.parents('body').addClass('app-' + parsed.type);
|
||||
}
|
||||
|
||||
var $topContainer = $('<div>', {'class': TOP_CLS});
|
||||
|
@ -135,24 +135,22 @@ define([
|
|||
var getOtherUsers = function(config) {
|
||||
var userList = config.userList.list.users;
|
||||
var userData = config.userList.data;
|
||||
var userNetfluxId = config.userList.userNetfluxId;
|
||||
|
||||
var i = 0; // duplicates counter
|
||||
var list = [];
|
||||
|
||||
// Display only one time each user (if he is connected in multiple tabs)
|
||||
var myUid = userData[userNetfluxId] ? userData[userNetfluxId].uid : undefined;
|
||||
var uids = [];
|
||||
userList.forEach(function(user) {
|
||||
if (user !== userNetfluxId) {
|
||||
//if (user !== userNetfluxId) {
|
||||
var data = userData[user] || {};
|
||||
var userName = data.name;
|
||||
var userId = data.uid;
|
||||
if (userName && uids.indexOf(userId) === -1 && (!myUid || userId !== myUid)) {
|
||||
if (!data.uid) { return; }
|
||||
if (uids.indexOf(userId) === -1) {// && (!myUid || userId !== myUid)) {
|
||||
uids.push(userId);
|
||||
list.push(userName);
|
||||
} else if (userName) { i++; }
|
||||
}
|
||||
list.push(data);
|
||||
} else { i++; }
|
||||
//}
|
||||
});
|
||||
return {
|
||||
list: list,
|
||||
|
@ -167,6 +165,7 @@ define([
|
|||
var updateUserList = function (toolbar, config) {
|
||||
// Make sure the elements are displayed
|
||||
var $userButtons = toolbar.userlist;
|
||||
var $userlistContent = toolbar.userlistContent;
|
||||
|
||||
var userList = config.userList.list.users;
|
||||
var userData = config.userList.data;
|
||||
|
@ -185,38 +184,34 @@ define([
|
|||
var editUsersNames = others.list;
|
||||
var duplicates = others.duplicates; // Number of duplicates
|
||||
|
||||
editUsersNames.sort(function (a, b) {
|
||||
var na = a.name || Messages.anonymous;
|
||||
var nb = b.name || Messages.anonymous;
|
||||
return na.toLowerCase() > nb.toLowerCase();
|
||||
});
|
||||
|
||||
var numberOfEditUsers = userList.length - duplicates;
|
||||
var numberOfViewUsers = numberOfUsers - userList.length;
|
||||
|
||||
// Number of anonymous editing users
|
||||
var anonymous = numberOfEditUsers - editUsersNames.length;
|
||||
|
||||
// Update the userlist
|
||||
var $usersTitle = $('<h2>').text(Messages.users);
|
||||
var $editUsers = $userButtons.find('.' + USERLIST_CLS);
|
||||
var $editUsers = $userlistContent;
|
||||
$editUsers.html('').append($usersTitle);
|
||||
|
||||
var $editUsersList = $('<pre>');
|
||||
// Yourself (edit only)
|
||||
if (config.readOnly !== 1) {
|
||||
$editUsers.append('<span class="yourself">' + Messages.yourself + '</span>');
|
||||
anonymous--;
|
||||
}
|
||||
var $editUsersList = $('<div>', {'class': 'userlist-others'});
|
||||
|
||||
// Editors
|
||||
$editUsersList.text(editUsersNames.join('\n')); // .text() to avoid XSS
|
||||
editUsersNames.forEach(function (data) {
|
||||
var name = data.name || Messages.anonymous;
|
||||
var $span = $('<span>', {'title': name}).text(name);
|
||||
$span.data('uid', data.uid);
|
||||
$editUsersList.append($span);
|
||||
});
|
||||
$editUsers.append($editUsersList);
|
||||
// Anonymous editors
|
||||
if (anonymous > 0) {
|
||||
var text = anonymous === 1 ? Messages.anonymousUser : Messages.anonymousUsers;
|
||||
$editUsers.append('<span class="anonymous">' + anonymous + ' ' + text + '</span>');
|
||||
}
|
||||
|
||||
// Viewers
|
||||
if (numberOfViewUsers > 0) {
|
||||
var viewText = '<span class="viewer">';
|
||||
if (numberOfEditUsers > 0) {
|
||||
$editUsers.append('<br>');
|
||||
viewText += Messages.and + ' ';
|
||||
}
|
||||
var viewerText = numberOfViewUsers !== 1 ? Messages.viewers : Messages.viewer;
|
||||
viewText += numberOfViewUsers + ' ' + viewerText + '</span>';
|
||||
$editUsers.append(viewText);
|
||||
|
@ -269,18 +264,32 @@ define([
|
|||
!config.userList.data || !config.userList.userNetfluxId) {
|
||||
throw new Error("You must provide a `userList` object to display the userlist");
|
||||
}
|
||||
var dropdownConfig = {
|
||||
options: [{
|
||||
tag: 'p',
|
||||
attributes: {'class': USERLIST_CLS},
|
||||
}]
|
||||
};
|
||||
var $block = Cryptpad.createDropdown(dropdownConfig);
|
||||
$block.attr('id', 'userButtons');
|
||||
toolbar.$leftside.prepend($('<span>', {'class': 'separator'}));
|
||||
toolbar.$leftside.prepend($block);
|
||||
var $content = $('<div>', {'class': 'userlist-drawer'});
|
||||
$('<p>', {'class': USERLIST_CLS}).appendTo($content);
|
||||
toolbar.userlistContent = $content;
|
||||
|
||||
return $block;
|
||||
var $container = $('<span>', {id: 'userButtons'});
|
||||
|
||||
var $button = $('<button>').appendTo($container);
|
||||
$('<span>',{'class': 'buttonTitle'}).appendTo($button);
|
||||
|
||||
toolbar.$leftside.prepend($('<span>', {'class': 'separator'}));
|
||||
toolbar.$leftside.prepend($container);
|
||||
|
||||
if (config.$contentContainer) {
|
||||
config.$contentContainer.prepend($content);
|
||||
}
|
||||
|
||||
$button.click(function () {
|
||||
$content.toggle();
|
||||
Cryptpad.setAttribute('userlist-drawer', $content.is(':visible'));
|
||||
});
|
||||
|
||||
Cryptpad.getAttribute('userlist-drawer', function (err, val) {
|
||||
if (val === false) { $content.hide(); }
|
||||
});
|
||||
|
||||
return $container;
|
||||
};
|
||||
|
||||
var createShare = function (toolbar, config) {
|
||||
|
@ -391,8 +400,8 @@ define([
|
|||
throw new Error("Unable to display the share button: hash required in the URL");
|
||||
}
|
||||
var $shareIcon = $('<span>', {'class': 'fa fa-share-alt'});
|
||||
var $span = $('<span>', {'class': 'large'}).append(' ' +Messages.shareButton);
|
||||
var $button = $('<button>', {'id': 'shareButton'}).append($shareIcon).append($span);
|
||||
//var $span = $('<span>', {'class': 'large'}).append(' ' +Messages.shareButton);
|
||||
var $button = $('<button>', {'title': Messages.shareButton}).append($shareIcon);//:.append($span);
|
||||
$button.click(function () {
|
||||
var url = window.location.href;
|
||||
var success = Cryptpad.Clipboard.copy(url);
|
||||
|
|
|
@ -40,7 +40,7 @@ body {
|
|||
}
|
||||
media-tag img {
|
||||
max-width: 100%;
|
||||
max-height: calc(100vh - 64px);
|
||||
max-height: calc(100vh - 96px);
|
||||
}
|
||||
#upload-form,
|
||||
#download-form {
|
||||
|
|
|
@ -48,7 +48,7 @@ body {
|
|||
media-tag {
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: ~"calc(100vh - 64px)";
|
||||
max-height: ~"calc(100vh - 96px)";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body class="app-pad">
|
||||
<textarea style="display:none" id="editor1" name="editor1"></textarea>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -89,6 +89,7 @@ define([
|
|||
};
|
||||
|
||||
var andThen = function (Ckeditor) {
|
||||
var $iframe = $('#pad-iframe').contents();
|
||||
var secret = Cryptpad.getSecrets();
|
||||
var readOnly = secret.keys && !secret.keys.editKeyStr;
|
||||
if (!secret.keys) {
|
||||
|
@ -466,7 +467,8 @@ define([
|
|||
ifrw: ifrw,
|
||||
realtime: info.realtime,
|
||||
network: info.network,
|
||||
$container: $bar
|
||||
$container: $bar,
|
||||
$contentContainer: $iframe.find('#cke_1_contents')
|
||||
};
|
||||
toolbar = info.realtime.toolbar = Toolbar.create(configTb);
|
||||
|
||||
|
@ -562,6 +564,8 @@ define([
|
|||
editor.execCommand('maximize');
|
||||
}
|
||||
}
|
||||
// editor.execCommand('maximize') removes all the classes from the body tag
|
||||
$iframe.find('body').addClass('app-pad');
|
||||
|
||||
if (module.realtime !== info.realtime) {
|
||||
module.patchText = TextPatcher.create({
|
||||
|
|
|
@ -17,31 +17,34 @@
|
|||
<body>
|
||||
|
||||
<div id="toolbar" class="toolbar-container"></div>
|
||||
<div id="content">
|
||||
<div id="poll">
|
||||
<div id="howItWorks">
|
||||
<h1 id="mainTitle">CryptPoll</h1>
|
||||
<h2 data-localization="poll_subtitle"></h2>
|
||||
|
||||
<div id="howItWorks">
|
||||
<h1 id="mainTitle">CryptPoll</h1>
|
||||
<h2 data-localization="poll_subtitle"></h2>
|
||||
<p data-localization="poll_p_save"></p>
|
||||
<p data-localization="poll_p_encryption"></p>
|
||||
</div>
|
||||
|
||||
<p data-localization="poll_p_save"></p>
|
||||
<p data-localization="poll_p_encryption"></p>
|
||||
</div>
|
||||
<div class="upper">
|
||||
<button id="publish" data-localization-title="poll_publish_button" data-localization="poll_publish_button" style="display: none;">publish poll</button>
|
||||
<button id="admin" data-localization-title="poll_admin_button" data-localization="poll_admin_button" style="display: none;">admin</button>
|
||||
<button id="help" data-localization-title="poll_show_help_button" data-localization="poll_show_help_button">help</button>
|
||||
</div>
|
||||
|
||||
<div class="upper">
|
||||
<button id="publish" data-localization-title="poll_publish_button" data-localization="poll_publish_button" style="display: none;">publish poll</button>
|
||||
<button id="admin" data-localization-title="poll_admin_button" data-localization="poll_admin_button" style="display: none;">admin</button>
|
||||
<button id="help" data-localization-title="poll_show_help_button" data-localization="poll_show_help_button">help</button>
|
||||
</div>
|
||||
|
||||
<div class="realtime">
|
||||
<br />
|
||||
<center>
|
||||
<textarea rows=5 cols=50 disabled="disabled" id="description"></textarea><br />
|
||||
</center>
|
||||
<div id="tableContainer">
|
||||
<div id="tableScroll"></div>
|
||||
<button data-localization-title="poll_create_user" id="create-user"><span class="fa fa-plus"></span></button>
|
||||
<button data-localization-title="poll_create_option" id="create-option"><span class="fa fa-plus"></span></button>
|
||||
<button data-localization-title="poll_commit" id="commit"><span class="fa fa-check"></span></button>
|
||||
<div class="realtime">
|
||||
<br />
|
||||
<center>
|
||||
<textarea rows=5 cols=50 disabled="disabled" id="description"></textarea><br />
|
||||
</center>
|
||||
<div id="tableContainer">
|
||||
<div id="tableScroll"></div>
|
||||
<button data-localization-title="poll_create_user" id="create-user"><span class="fa fa-plus"></span></button>
|
||||
<button data-localization-title="poll_create_option" id="create-option"><span class="fa fa-plus"></span></button>
|
||||
<button data-localization-title="poll_commit" id="commit"><span class="fa fa-check"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -692,7 +692,8 @@ var create = function (info) {
|
|||
ifrw: window,
|
||||
realtime: info.realtime,
|
||||
network: info.network,
|
||||
$container: APP.$bar
|
||||
$container: APP.$bar,
|
||||
$contentContainer: $('#content')
|
||||
};
|
||||
APP.toolbar = Toolbar.create(configTb);
|
||||
|
||||
|
|
|
@ -6,6 +6,17 @@ body {
|
|||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
}
|
||||
#content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
#content #poll {
|
||||
flex: 1;
|
||||
}
|
||||
.cryptpad-toolbar h2 {
|
||||
font: normal normal normal 12px Arial, Helvetica, Tahoma, Verdana, Sans-Serif;
|
||||
color: #000;
|
||||
|
|
|
@ -19,6 +19,17 @@ html, body {
|
|||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
}
|
||||
#content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
#poll {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.cryptpad-toolbar h2 {
|
||||
font: normal normal normal 12px Arial, Helvetica, Tahoma, Verdana, Sans-Serif;
|
||||
|
|
|
@ -49,6 +49,7 @@ define([
|
|||
|
||||
var andThen = function (CMeditor) {
|
||||
var $iframe = $('#pad-iframe').contents();
|
||||
var $contentContainer = $iframe.find('#editorContainer');
|
||||
var CodeMirror = Cryptpad.createCodemirror(CMeditor, ifrw, Cryptpad);
|
||||
editor = CodeMirror.editor;
|
||||
|
||||
|
@ -358,7 +359,8 @@ define([
|
|||
ifrw: ifrw,
|
||||
realtime: info.realtime,
|
||||
network: info.network,
|
||||
$container: $bar
|
||||
$container: $bar,
|
||||
$contentContainer: $contentContainer
|
||||
};
|
||||
toolbar = module.toolbar = Toolbar.create(configTb);
|
||||
|
||||
|
|
|
@ -312,7 +312,8 @@ window.canvas = canvas;
|
|||
ifrw: window,
|
||||
realtime: info.realtime,
|
||||
network: info.network,
|
||||
$container: $bar
|
||||
$container: $bar,
|
||||
$contentContainer: $('#canvas-area')
|
||||
};
|
||||
|
||||
toolbar = module.toolbar = Toolbar.create(configTb);
|
||||
|
|
Loading…
Reference in New Issue