Node.js based forum software built for the modern web
Move tpl and less to core
pichaliteb757f563df3c
diff --git a/public/less/generics.less b/public/less/generics.lessindex 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.jsindex 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.tplnew file mode 100644index 0000000000..d3bf8e075b--- /dev/null+++ b/src/views/modals/crop_picture.tpl@@ -0,0 +1,22 @@+ <div id="crop-picture-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="crop-picture" aria-hidden="true">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h3 id="crop-picture">[[user:crop_picture]]</h3>+ </div>+ <div class="modal-body">+ <div id="upload-progress-box" class="progress hide">+ <div id="upload-progress-bar" class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0">+ </div>+ </div>++ <img id="cropped-image" src="{url}" >+ </div>+ <div class="modal-footer">+ <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>+ <button class="btn btn-primary crop-btn">[[user:upload_cropped_picture]]</button>+ </div>+ </div>+ </div>+ </div>\ No newline at end of file