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
Backbone.Collection = function (models, options) { | |
options || (options = {}); | |
if (options.comparator) { | |
this.comparator = options.comparator; | |
delete options.comparator; | |
} | |
this._boundOnModelEvent = _.bind(this._onModelEvent, this); | |
this._reset(); | |
if (models) this.refresh(models, { silent: true }); |
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
_contracts = new _widgetCollections.Contracts(); | |
_contractDropDown = new _widgetViews.contractDropDown({ | |
collection: _contracts | |
}); | |
And in a seperate file this is the collection definition: |
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
removeContractProfileFromGrid = function (event) { | |
var | |
contractProfileId = $(event.currentTarget).parent().data('dataKey'), | |
contractProfileRecord = _contractProfileGridRecords.get(contractProfileId); | |
_contractProfileGridRecords.remove(contractProfileRecord); | |
}, |
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
removeFacilitySpecificItemsFromGrid = function (facilityId) { | |
var | |
bindingStorageElement = $('#ProductNames'), | |
productCollection = $(bindingStorageElement).data('products'), | |
newSelectionsParent = {}, | |
newSelections = []; | |
if (productCollection !== undefined) { | |
$.each(productCollection.Items, function (key, item) { | |
if (item.FacilityId !== facilityId.toString()) { |
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
_.pluck(_productCollection.Items, "Id"), function (Id) { | |
return Id === product.Id; | |
}) | |
_productCollection = { | |
CriteriaType: "Products", | |
Items: { | |
Facility: null, | |
FacilityId: null, | |
Name: "", |
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
require 'rubygems' | |
require 'albacore' | |
task :default => :build | |
msbuild :build do |msb| | |
msb.solution = "source/ContractManager.sln" | |
msb.targets :clean, :build | |
msb.properties :configuration => :release | |
end |
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
criteria.formbuilder = (function () { | |
var reloadCriteria = function () { | |
console.log('hi'); | |
}; | |
return { | |
reloadCriteria: reloadCriteria, | |
}; |
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
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(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
Use.Transaction(GetSessionFactory(facilityId), session => { | |
facilityName = session | |
.Linq<FacilityHierarchy>() | |
.Where(x => x.FACID == facilityId) | |
.Select(x => x.DOM_NAME) | |
.SingleOrDefault(); | |
}); |
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
<body> | |
<div id="Container"> | |
<div id="Header"> | |
<div id="TopNav"> | |
<div class="wrapper"> | |
Download at: [codeplex link here] <span><a href="#">Overview</a></span> <span><a | |
href="#">Screencasts</a></span> <span><a href="#">Api Documentation</a></span> | |
</div> | |
</div> | |
<div id="MastHead"> |