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
| /*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); |
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
| 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'); |
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
| <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 %> |
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
| Sep 10, 2011 2:17:51 AM org.apache.solr.core.SolrCore execute | |
| INFO: [] webapp=/solr path=/admin/file/ params={file=schema.xml} status=0 QTime=0 | |
| Sep 10, 2011 8:23:03 AM org.apache.solr.common.SolrException log | |
| SEVERE: java.lang.NoSuchFieldError: rsp | |
| at nl.jteam.search.spatial.GeoDistanceComponent.process(GeoDistanceComponent.java:62) | |
| at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:195) | |
| at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) | |
| at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) | |
| at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) | |
| at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) |
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
| Pipeline.Views.Watchlists = Backbone.View.extend({ | |
| el: '#watchlists-container', | |
| initialize: function () { | |
| _.bindAll(this, 'render'); | |
| this.collection.bind('add', this.addToList); | |
| }, | |
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
| collection = new MyCollection(); | |
| collection.reset(this.get('attributesOfCollection')); | |
| this.setCollection(collection); | |
| setCollection: function (collection) { | |
| this.collection = collection; | |
| }, |
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
| ThresholdBackbone.Routers.Projects = Backbone.Router.extend({ | |
| routes: { | |
| '' : 'index', | |
| ':id' : 'show' | |
| }, | |
| index: function() { | |
| console.log("Index View!"); | |
| }, | |
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 Projects = Backbone.Collection.extend({ | |
| model : Project, | |
| url : '/projects' | |
| }); | |
| var Project = Backbone.Model.extend({ | |
| urlRoot : '/projects/:id' | |
| }); | |
| # these routes are going to enable: |
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
| initialize : function () { | |
| products = new Pipeline.Collections.CampaignProducts(); | |
| products.reset(this.get('products')); | |
| this.setProducts(products); | |
| }, | |
| setProducts: function (products) { | |
| this.products = products; | |
| }, |
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
| // Patch Model and Collection. | |
| _.each(["Model", "Collection"], function(name) { | |
| // Cache Backbone constructor. | |
| var ctor = Backbone[name]; | |
| // Cache original fetch. | |
| var fetch = ctor.prototype.fetch; | |
| // Override the fetch method to emit a fetch event. | |
| ctor.prototype.fetch = function() { | |
| // Trigger the fetch event on the instance. |
OlderNewer