From 084576ca2dcaaff1184338e0ec4a587ee0dacee7 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Tue, 1 May 2012 12:06:15 -0700 Subject: CSS Panel - Added code hinting and tooltips --- js/panels/css-panel/style.reel/style.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/panels/css-panel/style.reel/style.js') diff --git a/js/panels/css-panel/style.reel/style.js b/js/panels/css-panel/style.reel/style.js index a8939bc6..b079bc73 100644 --- a/js/panels/css-panel/style.reel/style.js +++ b/js/panels/css-panel/style.reel/style.js @@ -272,6 +272,8 @@ exports.Style = Montage.create(TreeNode, { templateDidLoad : { value: function() { this.delegate = this.treeView.contentController.delegate; + + this.propertyField.hints = this.propertyNames; } }, @@ -312,6 +314,13 @@ exports.Style = Montage.create(TreeNode, { } }, + setToolTips : { + value: function() { + this.propertyField.element.title = this.propertyField.value; + this.valueField.element.title = this.valueField.value; + } + }, + willDraw : { value: function() { if(this.invalid) { @@ -319,6 +328,8 @@ exports.Style = Montage.create(TreeNode, { } else { this._element.removeAttribute('title'); } + + this.setToolTips(); } }, -- cgit v1.2.3