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
| diff --git a/frameworks/runtime/core.js b/frameworks/runtime/core.js | |
| index 67bef70..a852a22 100644 | |
| --- a/frameworks/runtime/core.js | |
| +++ b/frameworks/runtime/core.js | |
| @@ -756,8 +756,37 @@ SC.mixin(/** @scope SC */ { | |
| stringsFor: function(lang, strings) { | |
| SC.mixin(SC.STRINGS, strings); | |
| return this ; | |
| - } | |
| + }, |
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
| var record = MyApp.store.find(MyApp.Record, 1); | |
| record.addObserver('status', this, function() { | |
| if (record.get('status') === SC.Record.READY_CLEAN) { | |
| record.removeObserver('status', this, arguments.callee); | |
| // code here | |
| } | |
| }); |
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.Request = SC.Request.extend({ | |
| _address: null, | |
| address: function(key, value) { | |
| if (value !== undefined) this._address = value; | |
| else value = this._address; | |
| return this.get('baseUrl') + value; | |
| } | |
| }); |
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: TestApp - mainPage | |
| // Copyright: ©2011 My Company, Inc. | |
| // ========================================================================== | |
| /*globals TestApp */ | |
| sc_require('views/tweet'); | |
| TestApp.mainPage = SC.Page.design({ |
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
| diff --git a/frameworks/core_foundation/views/view/animation.js b/frameworks/core_foundation/views/view/animation.js | |
| index 39f9c56..a14115c 100644 | |
| --- a/frameworks/core_foundation/views/view/animation.js | |
| +++ b/frameworks/core_foundation/views/view/animation.js | |
| @@ -86,21 +86,24 @@ SC.View.reopen( | |
| value = hash[key]; | |
| cur = layout[key]; | |
| - if (cur !== value) { didChange = YES; } | |
| + if (cur !== value) { |
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
| diff --git a/frameworks/core_foundation/tests/views/view/animation.js b/frameworks/core_foundation/tests/views/view/animation.js | |
| index fe6f663..b738b77 100644 | |
| --- a/frameworks/core_foundation/tests/views/view/animation.js | |
| +++ b/frameworks/core_foundation/tests/views/view/animation.js | |
| @@ -289,6 +289,32 @@ if (SC.platform.supportsCSSTransitions) { | |
| SC.RunLoop.end(); | |
| }); | |
| + test("should not add animation for properties that have the same value as existing layout", function() { | |
| + var callbacks = 0; |
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
| diff --git a/frameworks/core_foundation/tests/views/template_view/handlebars.js b/frameworks/core_foundation/tests/views/template_view/handlebars.js | |
| index 8d80c05..626d0e8 100644 | |
| --- a/frameworks/core_foundation/tests/views/template_view/handlebars.js | |
| +++ b/frameworks/core_foundation/tests/views/template_view/handlebars.js | |
| @@ -578,3 +578,25 @@ test("should be able to bind boolean element attributes using {{bindAttr}}", fun | |
| ok(view.$('input').attr('disabled'), 'attribute exists after update'); | |
| ok(!view.$('input').attr('checked'), 'attribute is not present after update'); | |
| }); | |
| + | |
| +test("should be able to add multiple classes using {{bindAttr class}}", function() { |
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
| // controllers/accounts_page.js | |
| MyApp.accountsPageController = SC.Object.create({ | |
| nowShowing: 'MyApp.accountsPage.defaultView' | |
| }); | |
| // resources/main_page.js |
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
| Copyright (C) 2011 by Strobe Inc | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in |