Create a gist now

Instantly share code, notes, and snippets.

anonymous /component.css
Created Jul 16, 2013

What would you like to do?
title
.mfiddle-Owner-overlay {
border: 1px solid black;
padding: 15px;
}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MFiddle</title>
<script type="text/montage-serialization">{
"owner": {
"properties": {
"element": {"#": "component"}
}
},
"overlay": {
"prototype": "montage/ui/overlay.reel",
"properties": {
"element": {"#": "overlay"},
"position": {
"left": 100,
"top": 150
}
}
},
"button": {
"prototype": "digit/ui/button.reel",
"properties": {
"label": "Show Overlay",
"element": {"#": "button"}
},
"listeners": [
{
"type": "action",
"listener": {"@": "owner"}
}
]
}
}</script></head>
<body>
<div data-montage-id="component">
<button data-montage-id="button"></button>
<div data-montage-id="overlay" class="mfiddle-Owner-overlay">Hello there</div>
</div>
</body>
</html>
var Component = require("montage/ui/component").Component;
exports.Owner = Component.specialize({
handleButtonAction: {
value: function() {
this.templateObjects.overlay.show();
}
}
});
{"version":1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment