Created
January 22, 2014 16:09
-
-
Save jjhoncv/8561513 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Descripcion del Modulo | |
* @submodule nombre-del-modulo | |
* @main empresas | |
* @author Jan Sanchez | |
*/ | |
yOSON.AppCore.addModule('nombre-del-modulo', function(Sb) { | |
var afterCatchDom, catchDom, changeFile, clearFields, collection, defaults, dom, st, submitFiles, suscribeEvents; | |
st = {}; | |
dom = {}; | |
collection = []; | |
defaults = { | |
form: 'formProyStep2', | |
container: '#divPdfManager', | |
txtFile: '#pdfUploader', | |
olList: '#olPdfList', | |
tpl: '#tplPdf', | |
template: null, | |
flag: true, | |
files: null, | |
regExPdfFile: /\.(pdf)$/i, | |
postUrl: yOSON.baseHost + 'empresas/proyecto/upload', | |
deleteUrl: yOSON.baseHost + 'empresas/proyecto/delete' | |
}; | |
catchDom = function() { | |
dom.form = $('#' + st.form); | |
dom.container = $(st.container, dom.form); | |
dom.txtFile = $(st.txtFile, dom.container); | |
dom.olList = $(st.olList, dom.container); | |
dom.tpl = $(st.tpl); | |
}; | |
afterCatchDom = function() { | |
st.template = st.template || $.trim(dom.tpl.html()); | |
}; | |
suscribeEvents = function() { | |
dom.txtFile.on('change', changeFile); | |
}; | |
changeFile = function(e) { | |
}; | |
return { | |
init: function(oP) { | |
st = $.extend(defaults, oP); | |
catchDom(); | |
afterCatchDom(); | |
suscribeEvents(); | |
} | |
}; | |
}, ['libs/plugins/jqCustomfile.js', 'backbone/libs/underscore/underscore.js']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment