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
App.Show = DS.Model.extend({ | |
title: DS.attr('string'), | |
airing: DS.hasMany('App.Airing') | |
}); | |
App.Airing = DS.Model.extend({ | |
channel: DS.attr('number'), | |
show: DS.belongsTo('App.Show') | |
}); |
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
App.S3Upload = Ember.Object.extend({ | |
progress: 0, | |
state: "pending", | |
bucket: 'your-bucket' | |
complete: false, | |
s3url: null, | |
xhr: null, | |
file: null, | |
fileName: function() { | |
var file = this.get('file'); |
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
App.CategoryController = Ember.ObjectController.extend({ | |
needs: ['documents'], | |
uploads: new Array() | |
}); | |
App.DocumentController = Ember.ObjectController.extend({ | |
isEditing:true, | |
editDocument: function () { | |
console.log('handling edit'); | |
this.set('isEditing', 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
// Working on getting html5sortable plugin working | |
// Key part is needing to call the sortable() method using Ember.run.next | |
// If called straight away the functionality quickly gets applied, but then is lost | |
// At least that's what it looks like when stepping through chrome debugger | |
// http://farhadi.ir/projects/html5sortable/ | |
App.SortableView = Ember.CollectionView.extend({ | |
tagName: 'ul', | |
itemViewClass: 'App.SortableItemView', |
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
<?php | |
//Configure Script | |
$server = "http://129.19.150.20/"; //include trailing backslash | |
//End Configure | |
$client = new SoapClient($server."CablecastWS/CablecastWS.asmx?WSDL"); // Creates New SOAP client using WSDL file | |
//Get the schedule from the web service | |
$result = $client->RenameDigitalFile(array( |
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
<script type="text/x-handlebars" data-template-name="tasks"> | |
<div class="row"> | |
<div class="span3"> | |
<h3>Task Sets</h2> | |
<ul> | |
{{#each taskSet in controller}} | |
<li>{{#linkTo "taskSet" taskSet}}{{ taskSet.name }}{{/linkTo}}</li> | |
{{/each}} | |
</ul> | |
</div> |
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><title>CreaTV Limelight Player Example</title></head> | |
<body> | |
<h1>Limelight Player From Cablecast API</h1> | |
<p> | |
<?php | |
//Setup Script | |
$server = "173.11.100.21"; //cablecast server address | |
$showID = isset($_GET['ShowID']) ? $_GET['ShowID'] : 15859; | |
$client = new SoapClient("http://$server/CablecastWS/CablecastWS.asmx?WSDL"); |
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
<!-- This is the form element that will be transformed into a datepicker --> | |
<div type="text" id="ScheduleDate style="float:left;margin-left:15px"> | |
<!-- This script finds the above datepicker and when a day is selected goes to the current url with a different date --> | |
<!-- EXAMPLE: http://YourServer/Schedule.php?date=2012-01-13 --> | |
<script> | |
$(function() { | |
$("#ScheduleDate").datepicker({ | |
onSelect: function(dateText, inst) { window.location.href = location.href.substring(0,location.href.lastIndexOf("?"))+"?date="+dateText}, | |
}); |
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
{ | |
"id": 24, | |
"boardName": "Ray's Kegboard", | |
"boardType": "uno", | |
"pins":[ | |
{"pinNumber": 1, "type": "flow", "name": "Flow Meter A"}, | |
{"pinNumber": 2, "type": "flow", "name": "Flow Meter B"}, | |
{"pinNumber": 5, "type": "buzzer", "name": "Buzzer"}, | |
{"pinNumber": 10, "type": "onewire-temp", "name": "Temperature"}, | |
{"pinNumber": 13, "type": "relay", "name": "Solenoid A"} |