Skip to content

Instantly share code, notes, and snippets.

View gorbach's full-sized avatar

Gorbach Oleksii gorbach

  • Turnkey lender
  • Kharkiv, Ukraine
View GitHub Profile
namespace.views.MyWizard = Backbone.Views.extend({
initialize: function() {
_.bindAll(this, 'render', 'wizardMethod');
}
render: function() {
this.wizardMethod();
return this;
},
@gorbach
gorbach / JqModalRegion.coffee
Created November 17, 2012 21:16
Marionette.Region to show jquery dialog modal
class JqModalRegion extends Backbone.Marionette.Region
constructor: ->
@on 'view:show', @showModal, @
@dialog = $('<div/>')
super()
el: 'fake'
getEl: (selector) ->
@dialog
@gorbach
gorbach / BoundItemView.coffee
Created November 29, 2012 19:24
Bound Item View. Uses Backbone.Marionette and Model.Binder
BoundItemView extends Backbone.Marionette.ItemView
events: {}
initialize: ->
@events['click .btn-primary'] = 'save'
@modelBinder = new Backbone.ModelBinder()
super()
onRender: () ->
@modelBinder.bind @model, @el, @bindings
@gorbach
gorbach / gauge.js
Created March 12, 2014 06:56 — forked from tomerd/gauge.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
{
this.config = configuration;