diff --git a/q b/q deleted file mode 100644 index cbba0eb66..000000000 --- a/q +++ /dev/null @@ -1,478 +0,0 @@ -warning: LF will be replaced by CRLF in customize.dist/translations/messages.fr.js. -The file will have its original line endings in your working directory. -diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js -index 96e36a4..4ad51bd 100644 ---- a/customize.dist/translations/messages.fr.js -+++ b/customize.dist/translations/messages.fr.js -@@ -79,12 +79,14 @@ define(function () { -  - out.printButton = "Imprimer"; - out.printButtonTitle = "Imprimer votre présentation ou l'enregistrer au format PDF"; -- out.printOptions = "Options d'impression"; -+ out.printOptions = "Options de mise en page"; - out.printSlideNumber = "Afficher le numéro des slides"; - out.printDate = "Afficher la date"; - out.printTitle = "Afficher le titre du pad"; - out.printCSS = "Personnaliser l'apparence (CSS):"; -  -+ out.slideOptionsTitle = "Personnaliser la présentation"; -+ - out.editShare = "Lien d'édition"; - out.editShareTitle = "Copier le lien d'édition dans le presse-papiers"; - out.editOpen = "Éditer dans un nouvel onglet"; -diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js -index b463b48..15540fd 100644 ---- a/customize.dist/translations/messages.js -+++ b/customize.dist/translations/messages.js -@@ -81,12 +81,14 @@ define(function () { -  - out.printButton = "Print"; - out.printButtonTitle = "Print your slides or export them as a PDF file"; -- out.printOptions = "Print options"; -+ out.printOptions = "Layout options"; - out.printSlideNumber = "Display the slide number"; - out.printDate = "Display the date"; - out.printTitle = "Display the pad title"; - out.printCSS = "Custom style rules (CSS):"; -  -+ out.slideOptionsTitle = "Customize your slides"; -+ - out.editShare = "Editing link"; - out.editShareTitle = "Copy the editing link to clipboard"; - out.editOpen = "Open editing link in a new tab"; -diff --git a/www/slide/main.js b/www/slide/main.js -index 50f216e..0bc6f5f 100644 ---- a/www/slide/main.js -+++ b/www/slide/main.js -@@ -136,7 +136,8 @@ define([ -  - var $modal = $pad.contents().find('#modal'); - var $content = $pad.contents().find('#content'); -- var $print = $pad.contents().find('#print'); -+ var $print = $pad.contents().find('#print'); var slideOptions = {}; -+ - $( window ).resize(function() { - // 20vh - // 20 * 16 / 9vw -@@ -149,7 +150,13 @@ define([ - // $print.css('font-size', (20*9/16)+'vw'); - }); -  -- Slide.setModal($modal, $content, $pad, ifrw, initialState); -+ Slide.setModal(APP, $modal, $content, $pad, ifrw, slideOptions, initialState); -+ -+ var setStyleState = function (state) { -+ $pad.contents().find('#print, #content').find('style').each(function (i, el) { -+ el.disabled = !state; -+ }); -+ }; -  - var enterPresentationMode = function (shouldLog) { - Slide.show(true, editor.getValue()); -@@ -158,6 +165,7 @@ define([ - } - }; - var leavePresentationMode = function () { -+ setStyleState(false); - Slide.show(false); - }; -  -@@ -229,7 +237,8 @@ define([ - content: textValue, - metadata: { - users: userData, -- defaultTitle: defaultName -+ defaultTitle: defaultName, -+ slideOptions: slideOptions - } - }; - if (!initializing) { -@@ -370,6 +379,7 @@ define([ - setTabTitle(); - $bar.find('.' + Toolbar.constants.title).find('span.title').text(data); - $bar.find('.' + Toolbar.constants.title).find('input').val(data); -+ if (slideOptions.title) { Slide.updateOptions(); } - }); - }; -  -@@ -387,6 +397,15 @@ define([ - } - }; -  -+ var updateOptions = function (newOpt) { -+ if (stringify(newOpt) !== stringify(slideOptions)) { -+ $.extend(slideOptions, newOpt); -+ // TODO: manage realtime + cursor in the "options" modal ?? -+ console.log('updating options'); -+ Slide.updateOptions(); -+ } -+ }; -+ - var updateDefaultTitle = function (defaultTitle) { - defaultName = defaultTitle; - $bar.find('.' + Toolbar.constants.title).find('input').attr("placeholder", defaultName); -@@ -409,6 +428,7 @@ define([ - updateTitle(json.metadata.title || defaultName); - titleUpdated = true; - } -+ updateOptions(json.metadata.slideOptions); - updateColors(json.metadata.color, json.metadata.backColor); - } - if (!titleUpdated) { -@@ -424,12 +444,14 @@ define([ - }; -  - var createPrintDialog = function () { -- var printOptions = { -+ var slideOptionsTmp = { - title: true, - slide: true, -- date: true -+ date: true, -+ style: '' - }; -  -+ $.extend(slideOptionsTmp, slideOptions);  - var $container = $('
'); - var $container2 = $('
').appendTo($container); - var $div = $('
').appendTo($container2); -@@ -440,21 +462,21 @@ define([ - $('', {type: 'checkbox', id: 'checkNumber', checked: 'checked'}).on('change', function () { - var c = this.checked; - console.log(c); -- printOptions.slide = c; -+ slideOptionsTmp.slide = c; - }).appendTo($p).css('width', 'auto'); - $('