Created
February 7, 2014 23:29
-
-
Save anareyna/8874079 to your computer and use it in GitHub Desktop.
addModule
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
/** | |
* ${2:Descripción del módulo} | |
* @submodule ${3:nombre_del_modulo} | |
* @main ${1:default} | |
* @author ${4:Nombre del Autor} | |
*/ | |
yOSON.AppCore.addModule("${3:nombre_del_modulo}", function(Sb){ | |
var st = { | |
${5:container}: '${6:#container}', | |
${7:btnSearch}: '${8:#btnSearch}' | |
}, | |
dom = {}, | |
catchDom = function() { | |
dom.${5:container} = \$(st.${5:container}); | |
dom.${7:btnSearch} = \$(st.${7:btnSearch}); | |
}, | |
suscribeEvents = function() { | |
dom.${10:btnSearch}.on('${11:click}', ${12:search}); | |
}, | |
${13:search} = function() { | |
${14} | |
}, | |
initialize = function(oP) { | |
\$.extend(st, oP); | |
catchDom(); | |
suscribeEvents(); | |
}; | |
return { | |
init: initialize | |
}; | |
}, ['${15:ruta_del_archivo_de_dependencia.js}']); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>addModule</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.js</scope> --> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment