From 08d61766dbe4c732bb296a3a8e205315a515291f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 16 Oct 2019 22:40:13 +0000 Subject: [PATCH 1/2] Fix for issue 2734 where export file formats were showing up for mbtiles export. Removed that field. --- templates/Metadata._ | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/Metadata._ b/templates/Metadata._ index 13f153a65..8b7ed1104 100644 --- a/templates/Metadata._ +++ b/templates/Metadata._ @@ -62,7 +62,7 @@ var get = _(project.get).bind(project); Enter a custom Mapnik format string. <% } %> - <% if (model !== project && model.get('format') !== 'sync') { %> + <% if (type === 'image') { %>
  • + <% } %> + <% if (model !== project && model.get('format') !== 'sync') { %>
  • <% if (model.get('filename')) { %> @@ -128,6 +130,7 @@ var get = _(project.get).bind(project);
  • + <% if (type === 'image') { %>
  • <%=model.get('aspectwidth')%><% } else { %>8.5<% } %>' size='4' disabled /> : @@ -135,7 +138,6 @@ var get = _(project.get).bind(project); lock Any units - lock to edit
  • - <% if (type === 'image') { %>
  • 1: From 0f524cdbf9e9a16fc3a3d56feabb5c325e341389 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 17 Oct 2019 03:44:33 +0000 Subject: [PATCH 2/2] Fixed an issue where the aspect field is needed in the mbtiles view. So, added it back and then hid the fields in the display. --- templates/Metadata._ | 16 +++++++++------- views/Metadata.bones | 4 ++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/templates/Metadata._ b/templates/Metadata._ index 8b7ed1104..7aad57fad 100644 --- a/templates/Metadata._ +++ b/templates/Metadata._ @@ -130,14 +130,16 @@ var get = _(project.get).bind(project);
  • +
    +
  • + + <%=model.get('aspectwidth')%><% } else { %>8.5<% } %>' size='4' disabled /> : + <%=model.get('aspectheight')%><% } else { %>11<% } %>' size='4' disabled /> + lock + Any units - lock to edit +
  • +
    <% if (type === 'image') { %> -
  • - - <%=model.get('aspectwidth')%><% } else { %>8.5<% } %>' size='4' disabled /> : - <%=model.get('aspectheight')%><% } else { %>11<% } %>' size='4' disabled /> - lock - Any units - lock to edit -
  • 1: diff --git a/views/Metadata.bones b/views/Metadata.bones index fe3032db8..ec6c151b1 100644 --- a/views/Metadata.bones +++ b/views/Metadata.bones @@ -167,6 +167,10 @@ view.prototype.render = function() { width: "120px" }); + // Hide the aspect ratio fields for mbtiles exports. + if (this.model.get('format') === 'mbtiles') + this.$('div[id=aspect-ratio-fields]')[0].setAttribute('hidden',true); + return this; };