From c820b3485c2c3c4cedbbbcca35d424fcd044ccf3 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 28 Apr 2017 12:16:05 +0200 Subject: [PATCH 01/10] Fix function undefined when loading a template --- www/common/userObject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/userObject.js b/www/common/userObject.js index 66d507a27..0acb44c68 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -727,7 +727,7 @@ define([ parentEl[newName] = element; parentEl[oldName] = undefined; delete parentEl[oldName]; - cb(); + if (typeof cb === "function") { cb(); } }; // REPLACE From ab1dc48b6dede9fb881dbc67448798299eb5e6e7 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 28 Apr 2017 12:32:49 +0200 Subject: [PATCH 02/10] Fix the 'limit reached' icon in the pad app --- customize.dist/src/less/toolbar.less | 4 ++-- customize.dist/toolbar.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index f67e2ee96..2248c8e63 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -80,7 +80,6 @@ } .cryptpad-limit { - color: red; box-sizing: content-box; height: 16px; width: 16px; @@ -88,10 +87,11 @@ padding: 3px; margin: 3px; margin-right: 6px; - font-size: 20px; span { + color: red; cursor: pointer; margin: auto; + font-size: 20px; } } diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index 4ef7a4567..58fa58033 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -151,7 +151,6 @@ display: none; } .cryptpad-toolbar .cryptpad-limit { - color: red; box-sizing: content-box; height: 16px; width: 16px; @@ -159,11 +158,12 @@ padding: 3px; margin: 3px; margin-right: 6px; - font-size: 20px; } .cryptpad-toolbar .cryptpad-limit span { + color: red; cursor: pointer; margin: auto; + font-size: 20px; } .cryptpad-toolbar .cryptpad-lag { box-sizing: content-box; From 0ee228666b3e3d37b6bd2fea4af2ad289a51a81f Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 28 Apr 2017 12:40:39 +0200 Subject: [PATCH 03/10] Replace the IRC link by the Matrix one --- customize.dist/about.html | 2 +- customize.dist/contact.html | 2 +- customize.dist/index.html | 2 +- customize.dist/privacy.html | 2 +- customize.dist/src/fragments/footer.html | 2 +- customize.dist/terms.html | 2 +- www/settings/index.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/customize.dist/about.html b/customize.dist/about.html index c751125a7..2b13aca95 100644 --- a/customize.dist/about.html +++ b/customize.dist/about.html @@ -106,7 +106,7 @@
  • -
  • IRC
  • +
  • Chat
  • Twitter
  • GitHub
  • Email
  • diff --git a/customize.dist/contact.html b/customize.dist/contact.html index 619f98df4..eff9c1869 100644 --- a/customize.dist/contact.html +++ b/customize.dist/contact.html @@ -103,7 +103,7 @@
    • -
    • IRC
    • +
    • Chat
    • Twitter
    • GitHub
    • Email
    • diff --git a/customize.dist/index.html b/customize.dist/index.html index 7aa29d8e9..f6ab10fa6 100644 --- a/customize.dist/index.html +++ b/customize.dist/index.html @@ -225,7 +225,7 @@
      • -
      • IRC
      • +
      • Chat
      • Twitter
      • GitHub
      • Email
      • diff --git a/customize.dist/privacy.html b/customize.dist/privacy.html index 8d2e09f5f..a7751db84 100644 --- a/customize.dist/privacy.html +++ b/customize.dist/privacy.html @@ -124,7 +124,7 @@
        • -
        • IRC
        • +
        • Chat
        • Twitter
        • GitHub
        • Email
        • diff --git a/customize.dist/src/fragments/footer.html b/customize.dist/src/fragments/footer.html index ec80ed27d..b15a2b5da 100644 --- a/customize.dist/src/fragments/footer.html +++ b/customize.dist/src/fragments/footer.html @@ -31,7 +31,7 @@
          • -
          • IRC
          • +
          • Chat
          • Twitter
          • GitHub
          • Email
          • diff --git a/customize.dist/terms.html b/customize.dist/terms.html index 73a13cea7..edfd77f86 100644 --- a/customize.dist/terms.html +++ b/customize.dist/terms.html @@ -107,7 +107,7 @@
            • -
            • IRC
            • +
            • Chat
            • Twitter
            • GitHub
            • Email
            • diff --git a/www/settings/index.html b/www/settings/index.html index a84a60963..c24748490 100644 --- a/www/settings/index.html +++ b/www/settings/index.html @@ -97,7 +97,7 @@
              • -
              • IRC
              • +
              • Chat
              • Twitter
              • GitHub
              • Email
              • From 16f6ab813c8df795a9468601239f636cba41ca16 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 28 Apr 2017 13:06:55 +0200 Subject: [PATCH 04/10] Make it clear that the number is the history represents a version --- customize.dist/src/less/toolbar.less | 37 ++++++++------ customize.dist/toolbar.css | 57 ++++++++++++++-------- customize.dist/translations/messages.fr.js | 1 + customize.dist/translations/messages.js | 1 + www/common/common-history.js | 28 +++++------ 5 files changed, 72 insertions(+), 52 deletions(-) diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index 2248c8e63..40f895c24 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -42,7 +42,7 @@ } button { - &#shareButton { + &#shareButton, &.btn.btn-success { // Bootstrap 4 colors color: #fff; background: @toolbar-green; @@ -58,7 +58,7 @@ margin-left: 5px; } } - &#newdoc { + &#newdoc, &.btn.btn-primary { // Bootstrap 4 colors color: #fff; background: #0275d8; @@ -77,6 +77,18 @@ &.hidden { display: none; } + + // Bootstrap 4 colors (btn-secondary) + border: 1px solid transparent; + border-radius: .25rem; + color: #292b2c; + background-color: #fff; + border-color: #ccc; + &:hover { + color: #292b2c; + background-color: #e6e6e6; + border-color: #adadad; + } } .cryptpad-limit { @@ -195,17 +207,6 @@ margin-right: 2px; } - button { - color: #000; - background-color: inherit; - background-image: linear-gradient(to bottom,#fff,#e4e4e4); - border: 1px solid #A6A6A6; - border-bottom-color: #979797; - border-radius: 3px; - &:hover { - background-image:linear-gradient(to bottom,#f2f2f2,#ccc); - } - } .cryptpad-state { line-height: 32px; /* equivalent to 26px + 2*2px margin used for buttons */ } @@ -429,13 +430,19 @@ display: none; text-align: center; .next { - float: right; + display: inline-block; + vertical-align: middle; + margin: 20px; } .previous { - float: left; + display: inline-block; + vertical-align: middle; + margin: 20px; } .goto { display: inline-block; + vertical-align: middle; + text-align: center; input { width: 50px; } } .gotoInput { diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index 58fa58033..76eeb5b4d 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -117,39 +117,59 @@ .cryptpad-toolbar a { float: right; } -.cryptpad-toolbar button#shareButton { +.cryptpad-toolbar button { + border: 1px solid transparent; + border-radius: .25rem; + color: #292b2c; + background-color: #fff; + border-color: #ccc; +} +.cryptpad-toolbar button#shareButton, +.cryptpad-toolbar button.btn.btn-success { color: #fff; background: #5cb85c; border-color: #5cb85c; } -.cryptpad-toolbar button#shareButton:hover { +.cryptpad-toolbar button#shareButton:hover, +.cryptpad-toolbar button.btn.btn-success:hover { background: #449d44; border: 1px solid #419641; } -.cryptpad-toolbar button#shareButton span { +.cryptpad-toolbar button#shareButton span, +.cryptpad-toolbar button.btn.btn-success span { color: #fff; } -.cryptpad-toolbar button#shareButton .large { +.cryptpad-toolbar button#shareButton .large, +.cryptpad-toolbar button.btn.btn-success .large { margin-left: 5px; } -.cryptpad-toolbar button#newdoc { +.cryptpad-toolbar button#newdoc, +.cryptpad-toolbar button.btn.btn-primary { color: #fff; background: #0275d8; border-color: #0275d8; } -.cryptpad-toolbar button#newdoc:hover { +.cryptpad-toolbar button#newdoc:hover, +.cryptpad-toolbar button.btn.btn-primary:hover { background: #025aa5; border: 1px solid #01549b; } -.cryptpad-toolbar button#newdoc span { +.cryptpad-toolbar button#newdoc span, +.cryptpad-toolbar button.btn.btn-primary span { color: #fff; } -.cryptpad-toolbar button#newdoc .large { +.cryptpad-toolbar button#newdoc .large, +.cryptpad-toolbar button.btn.btn-primary .large { margin-left: 5px; } .cryptpad-toolbar button.hidden { display: none; } +.cryptpad-toolbar button:hover { + color: #292b2c; + background-color: #e6e6e6; + border-color: #adadad; +} .cryptpad-toolbar .cryptpad-limit { box-sizing: content-box; height: 16px; @@ -265,17 +285,6 @@ margin-top: -3px; margin-right: 2px; } -.cryptpad-toolbar button { - color: #000; - background-color: inherit; - background-image: linear-gradient(to bottom, #fff, #e4e4e4); - border: 1px solid #A6A6A6; - border-bottom-color: #979797; - border-radius: 3px; -} -.cryptpad-toolbar button:hover { - background-image: linear-gradient(to bottom, #f2f2f2, #ccc); -} .cryptpad-toolbar .cryptpad-state { line-height: 32px; /* equivalent to 26px + 2*2px margin used for buttons */ @@ -492,13 +501,19 @@ text-align: center; } .cryptpad-toolbar-history .next { - float: right; + display: inline-block; + vertical-align: middle; + margin: 20px; } .cryptpad-toolbar-history .previous { - float: left; + display: inline-block; + vertical-align: middle; + margin: 20px; } .cryptpad-toolbar-history .goto { display: inline-block; + vertical-align: middle; + text-align: center; } .cryptpad-toolbar-history .goto input { width: 50px; diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 50a2bf667..030817836 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -133,6 +133,7 @@ define(function () { out.history_restoreTitle = "Restaurer la version du document sélectionnée"; out.history_restorePrompt = "Êtes-vous sûr de vouloir remplacer la version actuelle du document par la version affichée ?"; out.history_restoreDone = "Document restauré"; + out.history_version = "Version :"; // Polls diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 7c5fd8df5..0c4c74a95 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -135,6 +135,7 @@ define(function () { out.history_restoreTitle = "Restore the selected version of the document"; out.history_restorePrompt = "Are you sure you want to replace the current version of the document by the displayed one?"; out.history_restoreDone = "Document restored"; + out.history_version = "Version:"; // Polls diff --git a/www/common/common-history.js b/www/common/common-history.js index e006210a6..58fd54900 100644 --- a/www/common/common-history.js +++ b/www/common/common-history.js @@ -112,9 +112,9 @@ define([ var val = states[i].getContent().doc; c = i; if (typeof onUpdate === "function") { onUpdate(); } - $hist.find('.next, .previous').show(); - if (c === states.length - 1) { $hist.find('.next').hide(); } - if (c === 0) { $hist.find('.previous').hide(); } + $hist.find('.next, .previous').css('visibility', ''); + if (c === states.length - 1) { $hist.find('.next').css('visibility', 'hidden'); } + if (c === 0) { $hist.find('.previous').css('visibility', 'hidden'); } return val || ''; }; @@ -132,15 +132,16 @@ define([ $right.hide(); $cke.hide(); var $prev =$('