Skip to content

Instantly share code, notes, and snippets.

View sumitngupta's full-sized avatar

Sumit Gupta sumitngupta

View GitHub Profile
<div class="tabs">
<% tabs.each(function (tab) { %>
<div class="tab">
<%= tab.name %>
</div>
<% }) %>
<% tabs.each(function (tab) { %>
<div class="tab-container <% tab.active ? 'active' : '' %>">
<%= tab.content %>
index: function() {
var brands = window.Pipeline.collections.brands;
brands.fetch({
success: function () {
var brandsView = new window.Pipeline.Views.Brands({ collection: window.Pipeline.collections.brands });
$('#panel-container').empty().append(brandsView.render().el);
},
error: function () {
displayNotification('Error fetching Brands.', 'error');
/*jslint white: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, indent: 2, browser: true, sloppy: true */
/*global $, JST, Backbone, Pipeline, window */
Pipeline.Views.PaginatedView = Backbone.View.extend({
tagName: 'tr',
className: 'pagination',
initialize: function () {
_.bindAll(this, 'previous', 'next', 'render');
this.collection.bind('refresh', this.render);