From 09793e0d7d505d595e5c23b4ee0a79b79655f987 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jul 2017 18:21:10 +0200 Subject: [PATCH 1/2] jshint --- www/common/common-messaging.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js index 6349bca0f..0fccf2f17 100644 --- a/www/common/common-messaging.js +++ b/www/common/common-messaging.js @@ -294,12 +294,12 @@ define([ title: common.Messages.contacts_removeHistoryTitle }) .click(function () { - Cryptpad.confirm(common.Messages.contacts_confirmRemoveHistory, function (yes) { + common.confirm(common.Messages.contacts_confirmRemoveHistory, function (yes) { if (!yes) { return; } - Cryptpad.clearOwnedChannel(data.channel, function (e) { + common.clearOwnedChannel(data.channel, function (e) { if (e) { console.error(e); - Cryptpad.alert(common.Messages.contacts_removeHistoryServerError); + common.alert(common.Messages.contacts_removeHistoryServerError); return; } }); From a80b00a7655036a1814cd54b0b4cf8c7517f51c2 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jul 2017 18:32:03 +0200 Subject: [PATCH 2/2] Move the file picker in common --- customize.dist/src/less/mixins.less | 53 ++++++++++++++++++++ www/common/cryptpad-common.js | 62 +++++++++++++++++++++++ www/common/diffMarked.js | 1 - www/drive/file.less | 49 +----------------- www/slide/main.js | 77 +++++------------------------ 5 files changed, 128 insertions(+), 114 deletions(-) diff --git a/customize.dist/src/less/mixins.less b/customize.dist/src/less/mixins.less index cd900a60c..0ef09dd36 100644 --- a/customize.dist/src/less/mixins.less +++ b/customize.dist/src/less/mixins.less @@ -138,3 +138,56 @@ background: white; } } + +.fileIcon { + li { + display: inline-block; + margin: 10px 10px; + width: 140px; + height: 140px; + text-align: center; + vertical-align: top; + overflow: hidden; + text-overflow: ellipsis; + padding-top: 5px; + padding-bottom: 5px; + + &:not(.selected):not(.selectedTmp) { + border: 1px solid #CCC; + } + .name { + width: 100%; + height: 48px; + margin: 8px 0; + display: inline-block; + //align-items: center; + //justify-content: center; + overflow: hidden; + //text-overflow: ellipsis; + word-wrap: break-word; + } + .truncated { + display: block; + position: absolute; + bottom: 0px; + left: 0; right: 0; + text-align: center; + } + img.icon { + height: 48px; + max-height: none; + max-width: none; + margin: 8px 0; + } + .fa { + display: block; + margin: auto; + font-size: 48px; + margin: 8px 0; + text-align: center; + &.listonly { + display: none; + } + } + } +} diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 5b7e5a15a..9a3e7abf4 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1098,6 +1098,7 @@ define([ } break; case 'upload': + console.log('UPLOAD'); button = $('