| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'cr-settings-date-time-page' is the settings page containing date-time | 7 * 'cr-settings-date-time-page' is the settings page containing date-time |
| 8 * settings. | 8 * settings. |
| 9 * | 9 * |
| 10 * Example: | 10 * Example: |
| 11 * | 11 * |
| 12 * <core-animated-pages> | 12 * <core-animated-pages> |
| 13 * <cr-settings-date-time-page prefs="{{prefs}}"> | 13 * <cr-settings-date-time-page prefs="{{prefs}}"> |
| 14 * </cr-settings-date-time-page> | 14 * </cr-settings-date-time-page> |
| 15 * ... other pages ... | 15 * ... other pages ... |
| 16 * </core-animated-pages> | 16 * </core-animated-pages> |
| 17 * | 17 * |
| 18 * @group Chrome Settings Elements | 18 * @group Chrome Settings Elements |
| 19 * @element cr-settings-date-time-page | 19 * @element cr-settings-date-time-page |
| 20 */ | 20 */ |
| 21 Polymer('cr-settings-date-time-page', { | 21 Polymer({ |
| 22 publish: { | 22 is: 'cr-settings-date-time-page', |
| 23 |
| 24 properties: { |
| 23 /** | 25 /** |
| 24 * Preferences state. | 26 * Preferences state. |
| 25 * | 27 * @type {?CrSettingsPrefsElement} |
| 26 * @attribute prefs | |
| 27 * @type CrSettingsPrefsElement | |
| 28 * @default null | |
| 29 */ | 28 */ |
| 30 prefs: null, | 29 prefs: { |
| 30 type: Object, |
| 31 notify: true |
| 32 }, |
| 31 | 33 |
| 32 /** | 34 /** |
| 33 * Route for the page. | 35 * Route for the page. |
| 34 * | |
| 35 * @attribute route | |
| 36 * @type string | |
| 37 * @default '' | |
| 38 */ | 36 */ |
| 39 route: '', | 37 route: { |
| 38 type: String, |
| 39 value: '' |
| 40 }, |
| 40 | 41 |
| 41 /** | 42 /** |
| 42 * Whether the page is a subpage. | 43 * Whether the page is a subpage. |
| 43 * | |
| 44 * @attribute subpage | |
| 45 * @type boolean | |
| 46 * @default false | |
| 47 */ | 44 */ |
| 48 subpage: false, | 45 subpage: { |
| 46 type: Boolean, |
| 47 value: false |
| 48 } |
| 49 | 49 |
| 50 /** | 50 /** |
| 51 * ID of the page. | 51 * ID of the page. |
| 52 * | |
| 53 * @attribute PAGE_ID | |
| 54 * @const string | |
| 55 * @default 'date-time' | |
| 56 */ | 52 */ |
| 57 PAGE_ID: 'date-time', | 53 PAGE_ID: { |
| 54 type: String, |
| 55 value: 'date-time' |
| 56 }, |
| 58 | 57 |
| 59 /** | 58 /** |
| 60 * Title for the page header and navigation menu. | 59 * Title for the page header and navigation menu. |
| 61 * | |
| 62 * @attribute pageTitle | |
| 63 * @type string | |
| 64 * @default 'Date & Time' | |
| 65 */ | 60 */ |
| 66 pageTitle: 'Date & Time', | 61 pageTitle: { |
| 62 type: String, |
| 63 value: function() { return loadTimeData.getString('dateTimePageTitle'); } |
| 64 }, |
| 67 | 65 |
| 68 /** | 66 /** |
| 69 * Name of the 'core-icon' to show. | 67 * Name of the 'core-icon' to show. |
| 70 * | |
| 71 * @attribute icon | |
| 72 * @type string | |
| 73 * @default 'device:access-time' | |
| 74 */ | 68 */ |
| 75 icon: 'device:access-time', | 69 icon: { |
| 70 type: String, |
| 71 value: 'device:access-time' |
| 72 }, |
| 76 }, | 73 }, |
| 77 }); | 74 }); |
| OLD | NEW |