Sha256: 804900dee566de21d86cb256e0eb69cd5179ed1f380c24567477194ba4610e84
Contents?: true
Size: 970 Bytes
Versions: 19
Compression:
Stored size: 970 Bytes
Contents
define -> 'use strict' type: 'Base' version: '0.1.2' initialize: (options) -> names = [] {identifier} = options # TODO access omit method throuhgh underscore widget_options = _.omit options, 'el', 'ref', '_ref', 'name', 'require', 'baseUrl', 'resource' # TODO remove jquery dependency for name, suboptions of widget_options when $.type(suboptions) is "object" names.push suboptions.name || name @add suboptions.name || name, suboptions @$el.addClass ['tray', 'widget'].concat(names).join(' ') @identifier = options.identifier # TODO find a way to build the id beased on content if identifier? @identifier = identifier @$el.attr 'id', identifier @sandbox.start() add: (name, options) -> # TODO add widgets as childrens of the tray widget sandbox element = jQuery '<div class="widget"></div>' options.el = element @$el.append element @inject name, options
Version data entries
19 entries across 19 versions & 1 rubygems