[Rt-commit] rt branch, 5.0/update-theme-editor, repushed
Craig Kaiser
craig at bestpractical.com
Wed Jun 17 12:06:24 EDT 2020
The branch 5.0/update-theme-editor was deleted and repushed:
was e0bf0d0048e16c87017d0b98915cc4e1a1842e86
now 3fd34c2e952c1cdb0650916f21e5209b6cd9ec47
1: 0254af0f95 = 1: 0254af0f95 Use padding in place of margin for spacing between page header
2: 8c694e8b23 = 2: 8c694e8b23 Add class for theme editor to use when setting 'Page content' CSS
3: c49956d360 = 3: c49956d360 Add default value for theme section select input
4: 9fe969e016 = 4: 9fe969e016 Use Bootstrap4 styles for Theme.html
5: b719fe7a23 ! 5: 8a2b08e218 Add Expand/Preview button to Theme.html logo image
@@ -13,7 +13,7 @@
- <input type="checkbox" checked="checked" class="custom-control-input" id="logo-size" value=1 onchange="setLogoSize()">
- <label class="custom-control-label" for="logo-size">Shrink logo</label>
- </div>
-+ <button onclick="setLogoSize()" class="button btn btn-primary" id="logo-size"><&|/l&>Preview</&></button>
++ <button onclick="setLogoSize()" class="button btn btn-primary" id="logo-size"><&|/l&>Full Size</&></button>
<form method="POST" enctype="multipart/form-data">
<div class="form-row">
@@ -35,18 +35,18 @@
+ var container = jQuery('#user_css');
+
+ var context = el_canvas.getContext("2d");
-+ var button = jQuery('#logo-size');
-+ if ( button.text() == 'Preview' ) {
++ var button = jQuery('#logo-size');
+
-+ el_canvas.width = container.width();
-+ el_canvas.height = container.height();
-+
++ if ( button.text() == '<&|/l&>Preview</&>' ) {
+ var ratio = Math.min(container.width() / logo.width(), container.height() / logo.height());
+
++ el_canvas.width = logo.width()*ratio;
++ el_canvas.height = logo.height()*ratio;
++
+ // Re-draw our scaled down image
-+ context.drawImage(logo.get(0), 0, 0, logo.width()*ratio, logo.height()*ratio );
++ context.drawImage(logo.get(0), 0, 0, logo.width()*ratio, logo.height()*ratio );
+
-+ button.text( <&|/l&>"Expand"</&> );
++ button.text( "<&|/l&>Full Size</&>" );
+ }
+ else {
el_canvas.width = logo.width();
@@ -69,9 +69,10 @@
- });
- $('#logo-picker-hint').show();
-});
-+ button.text( <&|/l&>"Preview"</&> );
+ context.drawImage(logo.get(0), 0, 0);
++ button.text( "<&|/l&>Preview</&>" );
+ }
++
+ logo.hide().after(canvas);
+ canvas.show().click(function(ev) {
+ ev.preventDefault();
6: e0bf0d0048 = 6: 3fd34c2e95 Add HTML section for setting header border color from Theme.html
More information about the rt-commit
mailing list