UNPKG

toloframework

Version:

Javascript/HTML/CSS compiler for Firefox OS or nodewebkit apps using modules in the nodejs style.

51 lines (40 loc) 1.19 kB
/** @module help.wdg.icon */require( 'help.wdg.icon', function(exports, module) { var _intl_={"en":{}},_$=require("$").intl;function _(){return _$(_intl_, arguments);} var $ = require("dom"); var Wdg = require("x-widget"); var Icon = require("wdg.icon"); var X = function() { var elem = $.elem( this, 'div', 'help-wdg-icon' ); var names = []; var key; for( key in Icon.Icons ) { names.push( key ); } names.sort(); names.forEach(function (name) { var icon = $.div( {title: name}, [ new Icon({content: name, size: '2em'}) ]); $.on( icon, { tap: function() { Wdg.getById('txtContent').value = name; }, doubletap: function() { Wdg.getById('txtContent').value = JSON.stringify( Icon.Icons[name], null, ' ' ); } }); $.add( elem, icon ); }); }; module.exports = X; module.exports._ = _; /** * @module help.wdg.icon * @see module:$ * @see module:dom * @see module:help.wdg.icon * @see module:wdg.icon * @see module:x-widget */ });