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
// Simple general-purpose "grid" binding | |
// Note: this is just a spike | |
ko.bindingHandlers.grid = { | |
init: function(element, valueAccessor) { | |
var value = valueAccessor(); | |
var grid = $(element).grid({ | |
columns: value.columns, | |
source: ko.utils.unwrapObservable(value.data).slice(0), | |
selectMode: value.selectMode, |
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
gifts = [ | |
{ | |
image: "http://ecx.images-amazon.com/images/I/41MS0md3RJL._SL500_AA300_.jpg", | |
asin: "-1", | |
gifter_image: "/images/unknown_user.gif", | |
gifter_id: -1 | |
}, { | |
image: "http://ecx.images-amazon.com/images/I/41MS0md3RJL._SL500_AA300_.jpg", | |
asin: "-1", | |
gifter_image: "/images/unknown_user.gif", |
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
<html><head> | |
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js"></script> | |
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.ui/1.8.5/jquery-ui.js"></script> | |
<script src="http://knockoutjs.com/js/jquery.tmpl.js"></script> | |
<script src="http://github.com/SteveSanderson/knockout/raw/master/build/output/knockout-latest.js"></script> | |
<style type="text/css"> | |
#sortable1, #sortable2 { | |
list-style-type: none; |
NewerOlder