Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: ui/webui/resources/cr_elements/v0_8/cr_checkbox/cr_checkbox.js

Issue 1105743003: Add a 0.8 version of cr-checkbox with a demo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@polymer08
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/webui/resources/cr_elements/v0_8/cr_checkbox/cr_checkbox.js
diff --git a/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js b/ui/webui/resources/cr_elements/v0_8/cr_checkbox/cr_checkbox.js
similarity index 72%
copy from ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js
copy to ui/webui/resources/cr_elements/v0_8/cr_checkbox/cr_checkbox.js
index 3c53b64faaa7c31654f5957dd2d26c8857d758a8..dcf12a0d4ff53499e7f9be39852abdf3972d69e4 100644
--- a/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js
+++ b/ui/webui/resources/cr_elements/v0_8/cr_checkbox/cr_checkbox.js
@@ -17,40 +17,37 @@
* @element cr-checkbox
*/
Polymer({
- publish: {
+ is: 'cr-checkbox',
+
+ properties: {
/**
* Gets or sets the state. `true` is checked and `false` is unchecked.
*
* @attribute checked
- * @type boolean
+ * @type {boolean}
* @default false
*/
- checked: {value: false, reflect: true},
-
- /**
- * The label for the checkbox.
- *
- * @attribute label
- * @type string
- * @default ''
- */
- label: '',
+ checked: {
+ type: Boolean,
+ value: false,
+ reflectToAttribute: true
+ },
/**
* If true, the user cannot interact with this element.
*
* @attribute disabled
- * @type boolean
+ * @type {boolean}
* @default false
*/
- disabled: {value: false, reflect: true},
+ disabled: {
+ type: Boolean,
+ value: false,
+ reflectToAttribute: true
+ },
},
toggle: function() {
this.$.checkbox.toggle();
},
-
- ready: function() {
- this.$.events.forward(this.$.checkbox, ['change']);
Jeremy Klein 2015/04/24 03:27:42 Got rid of this because it's never actually fired
- },
});

Powered by Google App Engine
This is Rietveld 408576698