Created
November 23, 2012 22:22
-
-
Save gpittau/4137563 to your computer and use it in GitHub Desktop.
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Stream Mustache Demo</title> | |
<!--[if lt IE 9]> | |
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<div id="detailsContainer"></div></br> | |
<div id="replyContainer"></div></br> | |
<div id="drillDownContainer"></div> | |
<script type='text/javascript' src='../../../../steal/steal.js'></script> | |
</body> | |
</html> | |
<script type="text/javascript"> | |
steal( | |
'sigma/stock/controls/details' | |
, 'can/view/mustache' | |
).then( | |
'sigma/stock/controls/details/details_view_adapters.js' | |
, 'sigma/stock/controls/details/fixtures.js' | |
, 'sigma/stock/controls/details/drilldown.js' | |
, 'sigma/stock/controls/details/comments.js' | |
, 'sigma/lib/style.js' | |
).then( | |
function() | |
{ | |
Sigma.HypermediaContainer( | |
'Sigma.Hypermedia.DetailsView.Container' | |
, { | |
defaults: | |
{ | |
media_types: | |
{ | |
'details': | |
{ | |
Handler: Sigma.Hypermedia.Details | |
, options: | |
{ | |
target: 'details' | |
} | |
} | |
, 'drilldown': | |
{ | |
Handler: Sigma.Hypermedia.DrillDown | |
, options: | |
{ | |
target: 'drilldown' | |
} | |
} | |
, 'reply': | |
{ | |
Handler: Sigma.Hypermedia.Comments | |
, options: | |
{ | |
target: 'comments' | |
} | |
} | |
} | |
} | |
} | |
, { | |
} | |
) | |
new Sigma.Hypermedia.DetailsView.Container( | |
$('#detailsContainer') | |
, { | |
id:'Details' | |
, target: 'Details' | |
, slot: Sigma.Model.HAL.Resource.Details.getRoot(1) | |
} | |
) | |
new Sigma.Hypermedia.DetailsView.Container( | |
$('#replyContainer') | |
, { | |
id:'Reply' | |
, target: 'Reply' | |
, slot: Sigma.Model.HAL.Resource.Comments.getRoot(1) | |
} | |
) | |
new Sigma.Hypermedia.DetailsView.Container( | |
$('#drillDownContainer') | |
, { | |
id:'DrillDown' | |
, target: 'DrillDown' | |
, slot: Sigma.Model.HAL.Resource.DrillDown.getRoot(1) | |
} | |
) | |
} | |
) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment