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
jQuery(function($) { | |
// create a modal view class | |
var Modal = Backbone.Modal.extend({ | |
template: _.template($('#modal-template').html()), | |
viewContainer: '.modal-view', | |
views: { | |
'click #first': { | |
view: _.template($('#modal-view1-template').html()) |
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
class Backbone.Marionette.Modals extends Backbone.Marionette.Region | |
modals: [] | |
zIndex: 0 | |
show: (modal, options = {}) -> | |
@ensureEl() | |
modal.render() | |
@$el.append modal.el | |
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
jQuery(function($) { | |
// create a layout class | |
var Layout = Backbone.Marionette.Layout.extend({ | |
template: _.template($('#modals-template').html()), | |
regions: { | |
modals: { | |
selector: '.modals-container', | |
regionClass: Backbone.Marionette.Modals | |
} | |
} |
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
views: { | |
'click #tab': { | |
myActiveTabClass: '.my-tab' | |
view: _.template($('#tab-view').html()), | |
onActive: 'setActive' | |
} | |
}, | |
setActive: function (options) { | |
this.$(options.myActiveTabClass).addClass('active') | |
} |
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
var Layout = Backbone.Marionette.Layout.extend({ | |
template: _.template($('#template').html()), | |
regions: { | |
modals: { | |
selector: '.your-modals-container', | |
regionClass: Backbone.Marionette.Modals | |
} | |
} | |
}); |
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
.bbm-modal__topbar | |
%h3.bbm-modal__title Hello | |
.bbm-modal__section | |
%p World! | |
.bbm-modal__bottombar | |
%a.bbm-button{:href => "#"} Close |
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
define ['templates/modal'], (template) -> | |
class Blog.Views.Modal extends Backbone.Modal | |
template: template | |
cancelEl: ".bbm-button" |
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
define ['templates/layout'], (template) -> | |
class Blog.Layouts.Index extends Backbone.Marionette.Layout | |
template: template | |
regions: | |
navigation: 'nav' | |
article: 'article' | |
modal: | |
selector: '.modal' | |
regionClass: Backbone.Marionette.Modals |
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
{ | |
"bold_folder_labels": true, | |
"caret_style": "smooth", | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"file_exclude_patterns": | |
[ | |
"smart.lock", | |
".DS_Store", | |
".bowerrc", | |
".gitignore", |
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
(function (window) { | |
'use strict'; | |
var c3 = window.c3 = {}; | |
var d3 = window.d3; | |
/* | |
* Generate chart according to config | |
*/ | |
c3.generate = function (config) { |