Working : Fix : Image Management + Document Management
This commit is contained in:
@@ -8,6 +8,8 @@ $(function($){
|
||||
|
||||
// Remove image on click
|
||||
$.documentUploadManager.initDocumentDropZone = function() {
|
||||
$.documentUploadManager.onClickDeleteDocument();
|
||||
|
||||
var documentDropzone = new Dropzone("#documents-dropzone", {
|
||||
dictDefaultMessage : $('.btn-browse').html(),
|
||||
uploadMultiple: false,
|
||||
@@ -95,5 +97,4 @@ $(function($){
|
||||
return false;
|
||||
});
|
||||
};
|
||||
$.documentUploadManager.onClickDeleteDocument();
|
||||
});
|
||||
|
||||
@@ -8,6 +8,8 @@ $(function($){
|
||||
|
||||
// Remove image on click
|
||||
$.imageUploadManager.initImageDropZone = function() {
|
||||
$.imageUploadManager.onClickDeleteImage();
|
||||
|
||||
var imageDropzone = new Dropzone("#images-dropzone", {
|
||||
dictDefaultMessage : $('.btn-browse').html(),
|
||||
uploadMultiple: false,
|
||||
@@ -96,5 +98,4 @@ $(function($){
|
||||
return false;
|
||||
});
|
||||
};
|
||||
$.imageUploadManager.onClickDeleteImage();
|
||||
});
|
||||
|
||||
@@ -250,6 +250,7 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="documents">
|
||||
{include file='includes/document-upload-form.html' documentType='content' parentId=$content_id}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="modules">
|
||||
@@ -293,10 +294,14 @@ form_content = {$smarty.capture.delete_content_dialog nofilter}
|
||||
{javascripts file='assets/js/image-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/document-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$.imageUploadManager.initImageDropZone();
|
||||
$.documentUploadManager.initDocumentDropZone();
|
||||
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="thelia.admin.category.document.modification"}
|
||||
{form name="$formId"}
|
||||
<form method="POST" action="{url path="/admin/document/type/{$documentType}/{$ID}/update"}" enctype="multipart/form-data" class="clearfix">
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
@@ -94,7 +94,14 @@
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
@@ -111,6 +118,11 @@
|
||||
{elseloop rel="document_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, document ID=$documentId was not found."}
|
||||
</div>
|
||||
|
||||
@@ -27,15 +27,16 @@
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="thelia.admin.category.image.modification"}
|
||||
{form name="$formId"}
|
||||
<form method="POST" action="{url path="/admin/image/type/{$imageType}/{$ID}/update"}" enctype="multipart/form-data" class="clearfix">
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
@@ -50,7 +51,11 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label">{intl l="Preview"} : </label>
|
||||
<p><img src="{$IMAGE_URL}" alt="{$TITLE}" class="img-thumbnail"></p>
|
||||
<p>
|
||||
<a href="{$ORIGINAL_IMAGE_URL}" alt="{$TITLE}" target="_blank">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" class="img-thumbnail">
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +98,15 @@
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
@@ -110,6 +123,11 @@
|
||||
{elseloop rel="image_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, image ID=$imageId was not found."}
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,9 @@ Parameters:
|
||||
{loop type="image" name="image" source="{$imageType}" order="manual-reverse" source_id="{$parentId}" width="200" height="100" resize_mode="borders"}
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" class="img-thumbnail">
|
||||
<a href="{url path="/admin/image/type/$imageType/$ID/update"}" alt="{intl l='Update this image'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" class="img-thumbnail">
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -70,7 +70,13 @@
|
||||
{intl l="Images"}
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
||||
<li>
|
||||
<a href="#documents"
|
||||
data-toggle="tab"
|
||||
data-href="{url path="/admin/document/type/product/{$product_id}/form-ajax"}"
|
||||
data-callback="$.documentUploadManager.initDocumentDropZone">
|
||||
{intl l="Documents"}
|
||||
</a>
|
||||
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -122,6 +128,9 @@
|
||||
{javascripts file='assets/js/image-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/document-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
Reference in New Issue
Block a user