we-plugin-menu
Version:
We.js menu and links plugin
21 lines (16 loc) • 478 B
JavaScript
/**
* Dragable indentation helper
*
* usage: {{tabledrag-indentation depth=depthCount}}
*/
module.exports = function(we) {
return function tabledragIndentationHelper() {
const options = arguments[arguments.length-1];
if (!options.hash.depth || !Number(options.hash.depth) ) return '';
let html = '';
for (let i = 0; i < options.hash.depth; i++) {
html += '<div class="indentation"> </div>';
}
return new we.hbs.SafeString(html);
};
};