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.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.printOptions = "Options de mise en page";
out.printSlideNumber = "Afficher le numéro des slides";
@ -86,6 +86,7 @@ define(function () {
out.printCSS = "Personnaliser l'apparence (CSS):";
out.slideOptionsTitle = "Personnaliser la présentation";
out.slideOptionsButton = "Enregistrer (Entrée)";
out.editShare = "Lien d'édition";
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.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.printOptions = "Layout options";
out.printSlideNumber = "Display the slide number";
@ -88,6 +88,7 @@ define(function () {
out.printCSS = "Custom style rules (CSS):";
out.slideOptionsTitle = "Customize your slides";
out.slideOptionsButton = "Save (enter)";
out.editShare = "Editing link";
out.editShareTitle = "Copy the editing link to clipboard";

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

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

@ -131,7 +131,7 @@ define([
var fixCSS = function (css) {
var append = '.cp #print .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) {
i = i || 0;

Loading…
Cancel
Save