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
App.FoosController = Ember.ArrayController.extend({ | |
myOptions: Ember.A([]), | |
addOptionItem: function(option) { | |
this.pushObject(option); | |
}, | |
removeOptionItem: function(option) { | |
this.get('myOptions').forEach(function(item, i, myOptions) { | |
if (item.get('id') === option.get('id')) { |
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> | |
<head> | |
<meta name="description" content="An example of working through the ember nest routes" /> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com/ember-latest.js"></script> | |
<script src=" http://builds.emberjs.com.s3.amazonaws.com/ember-data-0.13.js"></script> | |
<title>Ember JS</title> | |
</head> |
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
def attributes | |
@attr_statements ||= begin | |
result = {} | |
stmt_element = xpath_first_from_signed_assertion('/a:AttributeStatement') | |
return {} if stmt_element.nil? | |
stmt_element.elements.each do |attr_element| | |
name = attr_element.attributes["Name"] | |
value = attr_element.elements.map { |e| e.text } |
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
// Setup the variables | |
var theDocument = app.activeDocument; | |
var myInputs = {}; | |
myInputs.inputDocumentName = "Foo Document Name"; | |
myInputs.inputDocumentType = "Bar Doc Type"; | |
var myOptions = {}; | |
// Call the doAction function |
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
// Functional edits added by Green4ever from Adobe forums. | |
// http://forums.adobe.com/thread/940934 | |
// Logic behind this script | |
// theScript() | |
// is a wrapper function to provide functional scope to the entire script | |
// This function is invoked at the very bottom of the file | |
// main(); |
NewerOlder