From b757f563df3ce751bd8dab7ca22e5906ecb8efe7 Mon Sep 17 00:00:00 2001 From: pichalite Date: Mon, 6 Feb 2017 19:11:58 +0000 Subject: [PATCH] Move tpl and less to core --- public/less/generics.less | 12 +++++++++++- public/src/client/account/edit.js | 3 ++- src/views/modals/crop_picture.tpl | 22 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 src/views/modals/crop_picture.tpl diff --git a/public/less/generics.less b/public/less/generics.less index 8533dd33b9..0725264501 100644 --- a/public/less/generics.less +++ b/public/less/generics.less @@ -129,4 +129,14 @@ .admin .ban-modal .units { line-height: 1.846; -} \ No newline at end of file +} + +#crop-picture-modal { + .cropped-image { + max-width: 100%; + } + + .cropper-container.cropper-bg { + max-width: 100%; + } +} diff --git a/public/src/client/account/edit.js b/public/src/client/account/edit.js index 1239bc7074..57eea04782 100644 --- a/public/src/client/account/edit.js +++ b/public/src/client/account/edit.js @@ -212,7 +212,8 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator', } function handleImageCrop(data) { - templates.parse('partials/modals/crop_uploaded_picture', {url: data.url}, function (cropperHtml) { + $('#crop-picture-modal').remove(); + templates.parse('modals/crop_picture', {url: data.url}, function (cropperHtml) { translator.translate(cropperHtml, function (translated) { var cropperModal = $(translated); cropperModal.modal('show'); diff --git a/src/views/modals/crop_picture.tpl b/src/views/modals/crop_picture.tpl new file mode 100644 index 0000000000..d3bf8e075b --- /dev/null +++ b/src/views/modals/crop_picture.tpl @@ -0,0 +1,22 @@ + \ No newline at end of file