forked from google/skia-buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CTFE] Make custom-webpages-sk more generic
Bug: skia:7872 Change-Id: Ic10c98703f4ab310ea9fe8ecfba9bd668da1d6ff Reviewed-on: https://skia-review.googlesource.com/126762 Commit-Queue: Ravi Mistry <[email protected]> Reviewed-by: Ben Wagner <[email protected]>
- Loading branch information
Showing
7 changed files
with
101 additions
and
111 deletions.
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!-- | ||
The <expanding-textarea-sk> custom element declaration. Displays a clickable | ||
text link that expands a textarea. The value of the textarea is accessible by | ||
callers via the value attribute. | ||
Attributes: | ||
value: Contains the text entered into the textarea. | ||
displayText: The clickable text that will open/close the textarea. | ||
placeholderText: Is used as a placeholder in the textarea. | ||
Events: | ||
None. | ||
Methods: | ||
None. | ||
--> | ||
|
||
<dom-module id="expanding-textarea-sk"> | ||
<style> | ||
paper-input { | ||
width: 20em; | ||
} | ||
|
||
.long-field { | ||
width: 40em; | ||
} | ||
</style> | ||
<template> | ||
<a href="javascript:void(0);" id="expander"> | ||
<iron-icon icon="{{expanderIcon(opened)}}"></iron-icon> | ||
{{displayText}} | ||
</a> | ||
<span class="long-field"> | ||
<iron-collapse id="collapser" opened="{{opened}}"> | ||
<iron-autogrow-textarea class="long-field" rows=5 max-rows=20 bind-value="{{value}}" placeholder="{{placeholderText}}"> | ||
</iron-autogrow-textarea> | ||
</iron-collapse> | ||
</span> | ||
</template> | ||
<script> | ||
Polymer({ | ||
is: "expanding-textarea-sk", | ||
properties: { | ||
opened: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
value: { | ||
type: String, | ||
notify: true, | ||
}, | ||
displayText: { | ||
type: String, | ||
value: "Expand/Collapse textarea", | ||
}, | ||
placeholderText: { | ||
type: String, | ||
value: "", | ||
}, | ||
}, | ||
|
||
ready: function() { | ||
var that = this; | ||
this.$.expander.addEventListener('click', function(e) { | ||
that.$.collapser.toggle(); | ||
}); | ||
}, | ||
|
||
expanderIcon: function(opened) { | ||
if (opened) { | ||
return "expand-less"; | ||
} else { | ||
return "expand-more"; | ||
} | ||
}, | ||
}); | ||
</script> | ||
|
||
</dom-module> |
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
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