Skip to content

Commit 3537c4e

Browse files
authored
Components, UI-helpers, adding mixin definitions, converting UI-helpers to class-style (#286)
* UI-helpers, converting UI-helpers to class-style. #00000 * Components, adding mixin definitions. #00000
1 parent d486646 commit 3537c4e

10 files changed

+40
-14
lines changed

cosmoz-omnitable-column-amount.html

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ <h3 style="margin: 0;">[[ title ]]</h3>
4343
<script type="text/javascript">
4444
window.Cosmoz = window.Cosmoz || {};
4545

46+
Cosmoz.Mixins = Cosmoz.Mixins || {};
47+
4648
/**
4749
* @polymer
4850
* @customElement

cosmoz-omnitable-column-date.html

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ <h3 style="margin: 0;">[[ title ]]</h3>
4545
<script>
4646
window.Cosmoz = window.Cosmoz || {};
4747

48+
Cosmoz.Mixins = Cosmoz.Mixins || {};
49+
4850
/**
4951
* @polymer
5052
* @customElement

cosmoz-omnitable-column-datetime.html

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ <h3 style="margin: 0;">[[ title ]]</h3>
4444
<script>
4545
window.Cosmoz = window.Cosmoz || {};
4646

47+
Cosmoz.Mixins = Cosmoz.Mixins || {};
48+
4749
/**
4850
* @polymer
4951
* @customElement

cosmoz-omnitable-column-list-data.html

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
<script>
4747
window.Cosmoz = window.Cosmoz || {};
4848

49+
Cosmoz.Mixins = Cosmoz.Mixins || {};
50+
4951
class OmnitableColumnListData extends Cosmoz.Mixins.translatable(
5052
Polymer.mixinBehaviors([Cosmoz.TemplateHelperBehavior], Polymer.Element)
5153
) {

cosmoz-omnitable-column-list-horizontal.html

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
<script type="text/javascript">
5151
window.Cosmoz = window.Cosmoz || {};
5252

53+
Cosmoz.Mixins = Cosmoz.Mixins || {};
54+
5355
/**
5456
* @polymer
5557
* @customElement

cosmoz-omnitable-column-list.html

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
<script type="text/javascript">
3535
window.Cosmoz = window.Cosmoz || {};
3636

37+
Cosmoz.Mixins = Cosmoz.Mixins || {};
38+
3739
/**
3840
* @polymer
3941
* @customElement

cosmoz-omnitable-column-number.html

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ <h3 style="margin: 0;">[[ title ]]</h3>
4343
<script>
4444
window.Cosmoz = window.Cosmoz || {};
4545

46+
Cosmoz.Mixins = Cosmoz.Mixins || {};
47+
4648
/**
4749
* @polymer
4850
* @customElement

cosmoz-omnitable-column-time.html

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ <h3 style="margin: 0;">[[ title ]]</h3>
4141
<script>
4242
window.Cosmoz = window.Cosmoz || {};
4343

44+
Cosmoz.Mixins = Cosmoz.Mixins || {};
45+
4446
/**
4547
* @polymer
4648
* @customElement

cosmoz-omnitable.js

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
'use strict';
55

6+
window.Cosmoz = window.Cosmoz || {};
7+
8+
Cosmoz.Mixins = Cosmoz.Mixins || {};
9+
610
const PROPERTY_HASH_PARAMS = ['sortOn', 'groupOn', 'descending', 'groupOnDescending'];
711
const {
812
FlattenedNodesObserver,

ui-helpers/cosmoz-clear-button.html

+20-14
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,27 @@
3939
<iron-icon icon="clear"></iron-icon>
4040
</template>
4141
<script type="text/javascript">
42-
Polymer({
43-
is: 'cosmoz-clear-button',
44-
properties: {
45-
visible: {
46-
type: Boolean,
47-
value: false,
48-
reflectToAttribute: true
49-
},
42+
/*global Polymer*/
5043

51-
light: {
52-
type: Boolean,
53-
reflectToAttribute: true,
54-
value: false
55-
}
44+
class CosmozClearButton extends Polymer.Element {
45+
static get is() {
46+
return 'cosmoz-clear-button';
5647
}
57-
});
48+
static get properties() {
49+
return {
50+
light: {
51+
reflectToAttribute: true,
52+
type: Boolean,
53+
value: false
54+
},
55+
visible: {
56+
reflectToAttribute: true,
57+
type: Boolean,
58+
value: false
59+
}
60+
};
61+
}
62+
}
63+
customElements.define(CosmozClearButton.is, CosmozClearButton);
5864
</script>
5965
</dom-module>

0 commit comments

Comments
 (0)