Skip to content

Instantly share code, notes, and snippets.

"{"class":"go.GraphLinksModel",
"linkFromPortIdProperty":"from_port",
"linkToPortIdProperty":"to_port",
"nodeDataArray":[{"name":"Main",
"loc":"6.5280522199600455 -53.21714268120229",
"category":"Repeater",
"bundled":false,
"group":-4,
"key":-1,
"is_group":null,
@d3chapma
d3chapma / gist:8935863
Created February 11, 2014 14:31
Class comparison
.g-html .w-portfolio-item.type_extended:hover h2.w-portfolio-item-title {
color: #F00;
}
.g-html h2.w-portfolio-item-title {
text-align: center;
color: #31C5C7;
text-shadow: none;
}
MacBook Pro
13-inch, Mid 2012
Processor 2.5 GHz Intel Core i5
Memory 4 GB 1600 MHz DDR3
Graphics Intel HD Graphics 4000 512 MB
Serial Number C1MJ2HKGDTY3
Software OS X 10.8.5 (12F45)
@d3chapma
d3chapma / gist:6390235
Last active December 22, 2015 00:38 — forked from bruth/gist:2865951
Removed the assumption about get requests. Added a check if the client is online or not. If not online, just queue the request because we know the request will fail.
# Reference Backbone ajax function
_ajax = Backbone.ajax
requestQueue = []
requestPending = false
sendRequest = (options, promise, trigger=true) ->
options = _.clone options
if trigger
requestPending = true
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Entities.Resource = (function(_super) {
__extends(Resource, _super);
function Resource() {
return Resource.__super__.constructor.apply(this, arguments);
}
class List.SpreadsheetView extends App.Views.CompositeView
template: 'spreadsheets/list/_spreadsheet'
itemView: List.SpreadsheetRow
tagName: 'table'
className: 'table'
itemViewContainer: 'tbody'
class List.SpreadsheetRow extends App.Views.CollectionView
tagName: 'tr'
itemView: List.SpreadsheetCell
#PROPERTY BACKBONE MODEL ATTRIBUTES
Object {id: 622, name: "Manufacturer", value: "asdf", visible: false, resource_instance_id: 350}
#PARAMS FOR THE REQUEST TO RAILS API
{"id"=>"622",
"name"=>"Manufacturer",
"value"=>"asdf",
"visible"=>true,
{"id"=>"341",
"name"=>"Repeater",
"notes"=>"asdf",
"key"=>"-4",
"property_instances"=>
[{"name"=>"Model Number", "value"=>""},
{"name"=>"Radio ID", "value"=>""},
{"name"=>"Radio Model", "value"=>""},
{"name"=>"Serial Number", "value"=>""},
{"name"=>"Firmware Version", "value"=>""},
{"name"=>"Repeater",
"table_id"=>"repeater",
"id"=>"2677",
"manufacturer"=>"asdf",
"model_number"=>"",
"ethernet_ip"=>"",
"subnet_mask"=>"",
"gateway_ip"=>"",
"radio_id"=>"",
"radio_model"=>"",
Uncaught TypeError: Object function Spreadsheet() {
return Spreadsheet.__super__.constructor.apply(this, arguments);
} has no method 'toJSON' backbone.marionette.js:1785
Marionette.CompositeView.Marionette.CollectionView.extend.serializeData backbone.marionette.js:1785
Marionette.CompositeView.Marionette.CollectionView.extend.renderModel backbone.marionette.js:1827
Marionette.CompositeView.Marionette.CollectionView.extend.render backbone.marionette.js:1800
_.extend.show backbone.marionette.js:910
List.Controller.showSpreadsheetsNav list_controller.js:25
(anonymous function) list_controller.js:11
triggerEvents backbone.js:203