').append(UI.getIcon(p)).html() + Messages.type[p]
});
});
- if (Config.displayCreationScreen) {
- pads_options.push({
- tag: 'a',
- attributes: {
- id: 'cp-app-toolbar-creation-advanced',
- href: origin
- },
- content: '
' + Messages.creation_appMenuName
- });
- $(window).keydown(function (e) {
- if (e.which === 69 && e.ctrlKey) {
- Common.createNewPadModal();
- }
- });
- }
+ pads_options.push({
+ tag: 'a',
+ attributes: {
+ id: 'cp-app-toolbar-creation-advanced',
+ href: origin
+ },
+ content: '
' + Messages.creation_appMenuName
+ });
+ $(window).keydown(function (e) {
+ if (e.which === 69 && (e.ctrlKey || (navigator.platform === "MacIntel" && e.metaKey))) {
+ Common.createNewPadModal();
+ }
+ });
var dropdownConfig = {
text: '', // Button initial text
options: pads_options, // Entries displayed in the menu
diff --git a/www/drive/app-drive.less b/www/drive/app-drive.less
index 083eeebe4..188fcf0bf 100644
--- a/www/drive/app-drive.less
+++ b/www/drive/app-drive.less
@@ -724,7 +724,7 @@ span {
}
}
- .history {
+ .cp-toolbar-icon-history {
float: right;
.cp-toolbar-drawer-element {
display: none;
diff --git a/www/drive/inner.js b/www/drive/inner.js
index cbeb0b08f..58d547b0e 100644
--- a/www/drive/inner.js
+++ b/www/drive/inner.js
@@ -41,7 +41,8 @@ define([
{
var APP = window.APP = {
editable: false,
- mobile: function () { return $('body').width() <= 600; } // Menu and content area are not inline-block anymore for mobiles
+ mobile: function () { return $('body').width() <= 600; }, // Menu and content area are not inline-block anymore for mobiles
+ isMac: navigator.platform === "MacIntel"
};
var stringify = function (obj) {
@@ -548,6 +549,13 @@ define([
return;
}
+ // Ctrl+A select all
+ if (e.which === 65 && (e.ctrlKey || (e.metaKey && APP.isMac))) {
+ $content.find('.cp-app-drive-element:not(.cp-app-drive-element-selected)')
+ .addClass('cp-app-drive-element-selected');
+ return;
+ }
+
// [Left, Up, Right, Down]
if ([37, 38, 39, 40].indexOf(e.which) === -1) { return; }
e.preventDefault();
@@ -2908,6 +2916,7 @@ define([
}
// else move to trash
moveElements(paths, [TRASH], false, refresh);
+ return;
}
});
var isCharacterKey = function (e) {
diff --git a/www/file/app-file.less b/www/file/app-file.less
index a777b6014..ec22a2e0c 100644
--- a/www/file/app-file.less
+++ b/www/file/app-file.less
@@ -30,6 +30,8 @@ flex-flow: column;
display: flex;
justify-content: center;
align-items: center;
+ flex-flow: column;
+ min-height: 0;
}
#cp-app-file-content.ready {
@@ -134,3 +136,25 @@ media-tag {
z-index: 10000;
display: block;
}
+
+#cp-app-file-download-view {
+ flex: 1;
+ display: flex;
+ min-height: 0;
+ align-items: center;
+ justify-content: center;
+ flex-flow: column;
+ media-tag {
+ flex: 1;
+ min-height: 0;
+ max-width: 100vw;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ &> * {
+ max-height: 100%;
+ max-width: 100%;
+ }
+ }
+
+}
diff --git a/www/file/inner.js b/www/file/inner.js
index b4b327998..b90f392a1 100644
--- a/www/file/inner.js
+++ b/www/file/inner.js
@@ -100,6 +100,11 @@ define([
var title = document.title = metadata.name;
Title.updateTitle(title || Title.defaultTitle);
toolbar.addElement(['pageTitle'], {pageTitle: title});
+ toolbar.$rightside.append(common.createButton('forget', true));
+ if (common.isLoggedIn()) {
+ toolbar.$rightside.append(common.createButton('hashtag', true));
+ }
+
common.setPadAttribute('fileType', metadata.type);
@@ -118,7 +123,6 @@ define([
$mt.attr('data-crypto-key', 'cryptpad:'+cryptKey);
var rightsideDisplayed = false;
-
$(window.document).on('decryption', function (e) {
var decrypted = e.originalEvent;
if (decrypted.callback) {
@@ -142,13 +146,7 @@ define([
toolbar.$rightside
.append(common.createButton('export', true, {}, function () {
saveAs(decrypted.blob, decrypted.metadata.name);
- }))
- .append(common.createButton('forget', true, {}, function () {
- // not sure what to do here
}));
- if (common.isLoggedIn()) {
- toolbar.$rightside.append(common.createButton('hashtag', true));
- }
rightsideDisplayed = true;
}
diff --git a/www/pad/app-pad.less b/www/pad/app-pad.less
index 9e1b1da78..fa7d1142a 100644
--- a/www/pad/app-pad.less
+++ b/www/pad/app-pad.less
@@ -13,7 +13,6 @@
#cke_1_top {
overflow: visible;
padding: 0px;
- display: flex;
}
.cke_toolbox_main {
background-color: @colortheme_pad-toolbar-bg;
@@ -23,10 +22,7 @@
}
}
.cke_wysiwyg_frame {
- min-width: 60%;
- }
- #cke_1_toolbox {
- flex: 1;
+ width: 100%;
}
#cke_editor1 {
display: flex;
diff --git a/www/pad/inner.js b/www/pad/inner.js
index c1a2adbf2..5d161142b 100644
--- a/www/pad/inner.js
+++ b/www/pad/inner.js
@@ -143,7 +143,7 @@ define([
$(helpMenu.text).html(Messages.initialState);
- framework._.toolbar.$rightside.append(helpMenu.button);
+ framework._.toolbar.$drawer.append(helpMenu.button);
};
var mkDiffOptions = function (cursor, readOnly) {
@@ -437,6 +437,8 @@ define([
}
framework.onReady(function (newPad) {
+ editor.focus();
+
if (!module.isMaximized) {
module.isMaximized = true;
$('iframe.cke_wysiwyg_frame').css('width', '');
@@ -444,7 +446,6 @@ define([
}
$('body').addClass('app-pad');
- editor.focus();
if (newPad) {
cursor.setToEnd();
} else if (framework.isReadOnly()) {
@@ -474,9 +475,18 @@ define([
$iframe.find('html').addClass('cke_body_width');
}
});
+ /*setTimeout(function () {
+ $('iframe.cke_wysiwyg_frame').focus();
+ editor.focus();
+ console.log(editor);
+ console.log(editor.focusManager);
+ $(window).trigger('resize');
+ });*/
});
- framework.onDefaultContentNeeded(function () { });
+ framework.onDefaultContentNeeded(function () {
+ inner.innerHTML = '
';
+ });
var importMediaTags = function (dom, cb) {
var $dom = $(dom);
@@ -616,9 +626,10 @@ define([
var backColor = AppConfig.appBackgroundColor;
var newCss = '.cke_body_width { background: '+ backColor +'; height: 100%; }' +
'.cke_body_width body {' +
- 'max-width: 50em; padding: 10px 30px; margin: 0 auto; min-height: 100%;'+
- 'box-sizing: border-box;'+
- '}';
+ 'max-width: 50em; padding: 20px 30px; margin: 0 auto; min-height: 100%;'+
+ 'box-sizing: border-box; overflow: auto;'+
+ '}' +
+ '.cke_body_width body > *:first-child { margin-top: 0; }';
Ckeditor.addCss(newCss);
Ckeditor.plugins.addExternal('mediatag','/pad/', 'mediatag-plugin.js');
module.ckeditor = editor = Ckeditor.replace('editor1', {
@@ -640,6 +651,7 @@ define([
$contentContainer.prepend($toolbarContainer.find('.cke_toolbox_main'));
$mainContainer.prepend($toolbarContainer);
$contentContainer.find('.cke_toolbox_main').addClass('cke_reset_all');
+ $toolbarContainer.removeClass('cke_reset_all');
}).nThen(waitFor());
}).nThen(function (/*waitFor*/) {
diff --git a/www/poll/inner.js b/www/poll/inner.js
index 2c7c4d7e0..a8deebbfe 100644
--- a/www/poll/inner.js
+++ b/www/poll/inner.js
@@ -820,6 +820,7 @@ define([
var checkDeletedCells = function () {
// faster than forEach?
var c;
+ if (!APP.proxy || !APP.proxy.content) { return; }
for (var k in APP.proxy.content.cells) {
c = Render.getCoordinates(k);
if (APP.proxy.content.colsOrder.indexOf(c[0]) === -1 ||
@@ -1064,7 +1065,7 @@ define([
setTimeout(waitFor());
}).nThen(function (waitFor) {
// Switch to non-admin mode
- $('.cp-toolbar-rightside-button.fa-check').click();
+ $('.cp-toolbar-icon-publish').click();
setTimeout(waitFor());
}).nThen(function (waitFor) {
$('.cp-app-poll-comments-add-name').val("Mr.Me").keyup();
@@ -1200,7 +1201,7 @@ define([
var helpMenu = common.createHelpMenu();
$('#cp-app-poll-form').prepend(helpMenu.menu);
- $rightside.append(helpMenu.button);
+ $drawer.append(helpMenu.button);
var setHTML = function (e, html) {
e.innerHTML = html;
return e;
@@ -1213,9 +1214,11 @@ define([
$(helpMenu.text).html($(help).html());
if (APP.readOnly) { publish(true); return; }
- var $publish = common.createButton('', true)
- .removeClass('fa-question').addClass('fa-check')
- .click(function () { publish(!APP.proxy.published); }).appendTo($rightside);
+ var $publish = common.createButton('', true, {
+ name: 'publish',
+ icon: 'fa-check',
+ hiddenReadOnly: true
+ }).click(function () { publish(!APP.proxy.published); }).appendTo($rightside);
APP.$publishButton = $publish;
updatePublishButton();
@@ -1230,11 +1233,7 @@ define([
}
};
common.initFilePicker(fileDialogCfg);
- APP.$mediaTagButton = $('