first commit

This commit is contained in:
Senad Uka
2018-05-07 16:07:00 +02:00
commit 8b4f09f9d5
3368 changed files with 852614 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
class ThemeSelector extends Backbone.View
tagName: 'ul'
className: 'theme-selector'
events:
'click li': 'handleClick'
render: ->
@$el.html ''
for theme in @options.themes
$li = $ '<li>'
$li.attr 'data-id', theme
$li.text theme
@$el.append $li
handleClick: (e) ->
$li = $ e.target
@trigger 'update', $li.attr('data-id')
$.fn.themeSelector = (opts) ->
sel = new ThemeSelector $.extend {}, opts,
el: this
$(this).addClass sel.className
sel.render()
sel