Commit 80a0c3f1 by Billy Larru

[EDIT registro justificacion, usando file chooser con vista previa]

parent fcb1748c
......@@ -24,8 +24,77 @@ const formControls = {
});
},
initializeChooseFile() {
$(".file-styled-primary").uniform({
fileButtonClass: 'action btn bg-blue'
// Modal template
var modalTemplate = '<div class="modal-dialog modal-lg" role="document">\n' +
' <div class="modal-content">\n' +
' <div class="modal-header">\n' +
' <div class="kv-zoom-actions btn-group">{toggleheader}{fullscreen}{borderless}{close}</div>\n' +
' <h6 class="modal-title">{heading} <small><span class="kv-zoom-title"></span></small></h6>\n' +
' </div>\n' +
' <div class="modal-body">\n' +
' <div class="floating-buttons btn-group"></div>\n' +
' <div class="kv-zoom-body file-zoom-content"></div>\n' + '{prev} {next}\n' +
' </div>\n' +
' </div>\n' +
'</div>\n';
// Buttons inside zoom modal
var previewZoomButtonClasses = {
toggleheader: 'btn btn-default btn-icon btn-xs btn-header-toggle',
fullscreen: 'btn btn-default btn-icon btn-xs',
borderless: 'btn btn-default btn-icon btn-xs',
close: 'btn btn-default btn-icon btn-xs'
};
// Icons inside zoom modal classes
var previewZoomButtonIcons = {
prev: '<i class="icon-arrow-left32"></i>',
next: '<i class="icon-arrow-right32"></i>',
toggleheader: '<i class="icon-menu-open"></i>',
fullscreen: '<i class="icon-screen-full"></i>',
borderless: '<i class="icon-alignment-unalign"></i>',
close: '<i class="icon-cross3"></i>'
};
// File actions
var fileActionSettings = {
zoomClass: 'btn btn-link btn-xs btn-icon',
zoomIcon: '<i class="icon-zoomin3"></i>',
dragClass: 'btn btn-link btn-xs btn-icon',
dragIcon: '<i class="icon-three-bars"></i>',
removeClass: 'btn btn-link btn-icon btn-xs',
removeIcon: '<i class="icon-trash"></i>',
indicatorNew: '<i class="icon-file-plus text-slate"></i>',
indicatorSuccess: '<i class="icon-checkmark3 file-icon-large text-success"></i>',
indicatorError: '<i class="icon-cross2 text-danger"></i>',
indicatorLoading: '<i class="icon-spinner2 spinner text-muted"></i>'
};
$(".file-input-ajax").fileinput({
uploadUrl: "http://localhost", // server upload action
uploadAsync: true,
maxFileCount: 5,
initialPreview: [],
fileActionSettings: {
removeIcon: '<i class="icon-bin"></i>',
removeClass: 'btn btn-link btn-xs btn-icon',
uploadIcon: '<i class="icon-upload"></i>',
uploadClass: 'btn btn-link btn-xs btn-icon',
zoomIcon: '<i class="icon-zoomin3"></i>',
zoomClass: 'btn btn-link btn-xs btn-icon',
indicatorNew: '<i class="icon-file-plus text-slate"></i>',
indicatorSuccess: '<i class="icon-checkmark3 file-icon-large text-success"></i>',
indicatorError: '<i class="icon-cross2 text-danger"></i>',
indicatorLoading: '<i class="icon-spinner2 spinner text-muted"></i>',
},
layoutTemplates: {
icon: '<i class="icon-file-check"></i>',
modal: modalTemplate
},
initialCaption: "Ningún archivo seleccionado",
previewZoomButtonClasses: previewZoomButtonClasses,
previewZoomButtonIcons: previewZoomButtonIcons
});
}
}
......
......@@ -62,7 +62,7 @@
</div>
<div class="form-group col-md-10">
<label class="control-label">Adjuntar documentos</label>
<input type="file" class="file-styled-primary form-control" id="cfDocumentos" multiple>
<input type="file" class="file-input-ajax" multiple="multiple" id="cfDocumentos">
</div>
</div>
......@@ -90,6 +90,9 @@
<script src="../js/lib/lodash.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/plugins/forms/selects/select2.min.js"></script>
<script src="../js/lib/bootstrap-select.min.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/plugins/uploaders/fileinput/plugins/purify.min.js"></script>
<script src="../plantilla/assets/js/plugins/uploaders/fileinput/plugins/sortable.min.js"></script>
<script src="../plantilla/assets/js/plugins/uploaders/fileinput/fileinput.min.js"></script>
<script src="../js/pages/registroJustificacion.js" type="text/javascript"></script>
<!--js-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment