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
| // ========================================================================== | |
| // Project: Currencyconverter.converterController | |
| // Copyright: ©2009 My Company, Inc. | |
| // ========================================================================== | |
| /*globals Currencyconverter */ | |
| /** @class | |
| Converts one form of currency to another. |
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
| // dynamically apply a mixin specified in an object property | |
| var MyClass = SC.Object.extend({ | |
| extraMixin: null, | |
| foo: "bar", | |
| init: function() { | |
| this.mixin(this.extraMixin); | |
| arguments.callee.base.apply(this, arguments); | |
| }, |
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
| labelView: SC.LabelView.design({ | |
| layout: { centerX: 0, centerY: 0, width: 200, height: 18 }, | |
| textAlign: SC.ALIGN_CENTER, | |
| tagName: "h1", | |
| value: "Welcome to SproutCore!", | |
| // Adds 'didClick' as a display property | |
| displayProperties: ['didClick'], | |
| didClick: NO, |
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
| contentView: SC.SourceListView.design({ | |
| contentBinding: 'Authoring.reportTemplatesArrayController.content', | |
| selectionBinding: 'Authoring.reportTemplatesArrayController.selection', | |
| exampleView: SC.View.design({ | |
| classNames: 'sc-list-item-view'.w(), | |
| childViews: 'nameLabel'.w(), | |
| /** | |
| Add 'sel' class in render method. | |
| */ | |
| render: function(context) { |
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
| testBoth('should fire observer that contains a path', function(get, set) { | |
| var CarMixin = SC.Mixin.create({ | |
| acceleration: 0 | |
| }); | |
| var car = SC.mixin({}, CarMixin); | |
| var tireAcceleration; | |
| var TireMixin = SC.Mixin.create({ |
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
| jQuery.get('/templates/foo.handlebars', function(data) { | |
| var template = SC.Handlebars.compile(data); | |
| SC.TEMPLATES['foo'] = template; | |
| }) |
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
| SC.Object.extend | |
| name: SC.attr 'string', { option: 'foo' } |
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
| local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
| PROMPT=' | |
| %{$fg[green]%}%c \ | |
| $(git_prompt_info)\ | |
| %{$fg[red]%}%(!.#.»)%{$reset_color%} ' | |
| PROMPT2='%{$fg[red]%}\ %{$reset_color%}' | |
| RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} ' |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title>Collection Example</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| </head> | |
| <body> |
OlderNewer