Skip to content

Commit

Permalink
Adding href property to ButtonView for bindable functionality on href…
Browse files Browse the repository at this point in the history
… attributes.

git-svn-id: http://is-svn/svn/uieng/frameworks/sproutcore_1b/trunk@24126 280ce282-5f28-0410-b095-e054cb237d46
  • Loading branch information
atesf committed Jun 4, 2008
1 parent e6a912f commit ee8f6b3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions views/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,21 @@ SC.ButtonView = SC.View.extend(SC.Control,
return this._title ;
}.property(),

/**
The button href value.
This property is observable and bindable. Can be used to create localized button href values.
*/
href: function(key, value) {
var el = this.rootElement;
if (value !== undefined) {
if (el) {
el.setAttribute('href', value);
}
}
return (el) ? el.getAttribute('href') : null;
}.property(),

/**
The name of the action you want triggered when the button is pressed.
Expand Down

0 comments on commit ee8f6b3

Please sign in to comment.