Fix style and usability issues in slides

pull/1/head
yflory 8 years ago
parent 85105a1382
commit 26edb77cf0

@ -77,7 +77,7 @@ define(function () {
out.backgroundButtonTitle = 'Changer la couleur de fond de la présentation'; out.backgroundButtonTitle = 'Changer la couleur de fond de la présentation';
out.colorButtonTitle = 'Changer la couleur du texte en mode présentation'; out.colorButtonTitle = 'Changer la couleur du texte en mode présentation';
out.printButton = "Imprimer"; out.printButton = "Imprimer (Entrée)";
out.printButtonTitle = "Imprimer votre présentation ou l'enregistrer au format PDF"; out.printButtonTitle = "Imprimer votre présentation ou l'enregistrer au format PDF";
out.printOptions = "Options de mise en page"; out.printOptions = "Options de mise en page";
out.printSlideNumber = "Afficher le numéro des slides"; out.printSlideNumber = "Afficher le numéro des slides";
@ -86,6 +86,7 @@ define(function () {
out.printCSS = "Personnaliser l'apparence (CSS):"; out.printCSS = "Personnaliser l'apparence (CSS):";
out.slideOptionsTitle = "Personnaliser la présentation"; out.slideOptionsTitle = "Personnaliser la présentation";
out.slideOptionsButton = "Enregistrer (Entrée)";
out.editShare = "Lien d'édition"; out.editShare = "Lien d'édition";
out.editShareTitle = "Copier le lien d'édition dans le presse-papiers"; out.editShareTitle = "Copier le lien d'édition dans le presse-papiers";

@ -79,7 +79,7 @@ define(function () {
out.backgroundButtonTitle = 'Change the background color in the presentation'; out.backgroundButtonTitle = 'Change the background color in the presentation';
out.colorButtonTitle = 'Change the text color in presentation mode'; out.colorButtonTitle = 'Change the text color in presentation mode';
out.printButton = "Print"; out.printButton = "Print (enter)";
out.printButtonTitle = "Print your slides or export them as a PDF file"; out.printButtonTitle = "Print your slides or export them as a PDF file";
out.printOptions = "Layout options"; out.printOptions = "Layout options";
out.printSlideNumber = "Display the slide number"; out.printSlideNumber = "Display the slide number";
@ -88,6 +88,7 @@ define(function () {
out.printCSS = "Custom style rules (CSS):"; out.printCSS = "Custom style rules (CSS):";
out.slideOptionsTitle = "Customize your slides"; out.slideOptionsTitle = "Customize your slides";
out.slideOptionsButton = "Save (enter)";
out.editShare = "Editing link"; out.editShare = "Editing link";
out.editShareTitle = "Copy the editing link to clipboard"; out.editShareTitle = "Copy the editing link to clipboard";

@ -1493,7 +1493,7 @@ define([
return $('button.ok'); return $('button.ok');
}; };
var listenForKeys = function (yes, no) { var listenForKeys = common.listenForKeys = function (yes, no) {
var handler = function (e) { var handler = function (e) {
switch (e.which) { switch (e.which) {
case 27: // cancel case 27: // cancel
@ -1510,7 +1510,7 @@ define([
return handler; return handler;
}; };
var stopListening = function (handler) { var stopListening = common.stopListening = function (handler) {
$(window).off('keyup', handler); $(window).off('keyup', handler);
}; };

@ -434,9 +434,9 @@ define([
var createPrintDialog = function () { var createPrintDialog = function () {
var slideOptionsTmp = { var slideOptionsTmp = {
title: true, title: false,
slide: true, slide: false,
date: true, date: false,
style: '' style: ''
}; };
@ -474,21 +474,28 @@ define([
$p.append($('<br>')); $p.append($('<br>'));
var $textarea = $('<textarea>', {'id':'cssPrint'}).css({'width':'100%', 'height':'100px'}).appendTo($p); var $textarea = $('<textarea>', {'id':'cssPrint'}).css({'width':'100%', 'height':'100px'}).appendTo($p);
$textarea.val(slideOptionsTmp.style); $textarea.val(slideOptionsTmp.style);
window.setTimeout(function () { $textarea.focus(); }, 0);
var h;
var todo = function () { var todo = function () {
$.extend(slideOptions, slideOptionsTmp); $.extend(slideOptions, slideOptionsTmp);
slideOptions.style = $textarea.val(); slideOptions.style = $textarea.val();
onLocal(); onLocal();
$container.remove(); $container.remove();
Cryptpad.stopListening(h);
};
var todoCancel = function () {
$container.remove();
Cryptpad.stopListening(h);
}; };
h = Cryptpad.listenForKeys(todo, todoCancel);
var $nav = $('<nav>').appendTo($div); var $nav = $('<nav>').appendTo($div);
var $ok = $('<button>', {'class': 'ok'}).text(Messages.settings_save).appendTo($nav).click(todo); var $cancel = $('<button>', {'class': 'cancel'}).text(Messages.cancelButton).appendTo($nav).click(todoCancel);
var $cancel = $('<button>', {'class': 'cancel'}).text(Messages.cancel).appendTo($nav).click(function () { var $ok = $('<button>', {'class': 'ok'}).text(Messages.slideOptionsButton).appendTo($nav).click(todo);
$container.remove();
});
return $container; return $container;
}; };

@ -131,7 +131,7 @@ define([
var fixCSS = function (css) { var fixCSS = function (css) {
var append = '.cp #print .slide-frame '; var append = '.cp #print .slide-frame ';
var append2 = '.cp div#modal #content .slide-frame '; var append2 = '.cp div#modal #content .slide-frame ';
return css.replace(/(\n*)([^\n]+)\s*\{/g, '$1' + append + '$2,' + append2 + '$2 {'); return css.replace(/(\n*)([^\n}]+)\s*\{/g, '$1' + append + '$2,' + append2 + '$2 {');
}; };
var draw = Slide.draw = function (i) { var draw = Slide.draw = function (i) {
i = i || 0; i = i || 0;

Loading…
Cancel
Save