-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear button element instead of iron-icon with class #117
Changes from 2 commits
a17dbdd
ddc8731
dae3d74
c1a703d
5b9ad88
bbb3c5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
<link rel="import" href="../cosmoz-i18next/cosmoz-i18next.html"> | ||
|
||
<link rel="import" href="ui-helpers/cosmoz-clear-button.html"> | ||
<link rel="import" href="cosmoz-omnitable-column-date-behavior.html"> | ||
|
||
<dom-module id="cosmoz-omnitable-column-date"> | ||
|
@@ -34,8 +35,7 @@ <h3 style="margin: 0;">[[ title ]]</h3> | |
</paper-input> | ||
</div> | ||
</paper-dropdown-menu> | ||
<iron-icon icon="clear" class="header-clear-filter" | ||
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon> | ||
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer |
||
</template> | ||
</template> | ||
<script> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
<link rel="import" href="../datetime-local/datetime-local.html"> | ||
<link rel="import" href="../paper-dropdown-menu/paper-dropdown-menu.html"> | ||
|
||
<link rel="import" href="ui-helpers/cosmoz-clear-button.html"> | ||
<link rel="import" href="../cosmoz-i18next/cosmoz-i18next.html"> | ||
|
||
<dom-module id="cosmoz-omnitable-column-datetime"> | ||
|
@@ -33,8 +34,7 @@ <h3 style="margin: 0;">[[ title ]]</h3> | |
</datetime-local> | ||
</div> | ||
</paper-dropdown-menu> | ||
<iron-icon icon="clear" class="header-clear-filter" | ||
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon> | ||
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer |
||
</template> | ||
</template> | ||
<script> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<link rel="import" href="cosmoz-omnitable-column-behavior.html"> | ||
<link rel="import" href="cosmoz-omnitable-column-range-behavior.html"> | ||
<link rel="import" href="../cosmoz-i18next/cosmoz-i18next.html"> | ||
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> | ||
|
||
<link rel="import" href="../paper-input/paper-input.html"> | ||
<link rel="import" href="../paper-dropdown-menu/paper-dropdown-menu.html"> | ||
|
||
<link rel="import" href="../cosmoz-i18next/cosmoz-i18next.html"> | ||
|
||
<link rel="import" href="ui-helpers/cosmoz-clear-button.html"> | ||
<link rel="import" href="cosmoz-omnitable-column-behavior.html"> | ||
<link rel="import" href="cosmoz-omnitable-column-range-behavior.html"> | ||
|
||
<dom-module id="cosmoz-omnitable-column-number"> | ||
<template> | ||
<template class="cell"> | ||
|
@@ -28,8 +32,7 @@ <h3 style="margin: 0;">[[ title ]]</h3> | |
</paper-input> | ||
</div> | ||
</paper-dropdown-menu> | ||
<iron-icon icon="clear" class="header-clear-filter" | ||
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon> | ||
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer |
||
</template> | ||
</template> | ||
<script> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<link rel="import" href="cosmoz-omnitable-column-behavior.html"> | ||
<link rel="import" href="../paper-dropdown-menu/paper-dropdown-menu.html"> | ||
<link rel="import" href="../paper-input/paper-input.html"> | ||
|
||
<link rel="import" href="ui-helpers/cosmoz-clear-button.html"> | ||
<link rel="import" href="cosmoz-omnitable-column-behavior.html"> | ||
<link rel="import" href="../cosmoz-i18next/cosmoz-i18next.html"> | ||
<link rel="import" href="cosmoz-omnitable-column-date-behavior.html"> | ||
|
||
|
@@ -30,8 +31,7 @@ <h3 style="margin: 0;">[[ title ]]</h3> | |
</paper-input> | ||
</div> | ||
</paper-dropdown-menu> | ||
<iron-icon icon="clear" class="header-clear-filter" | ||
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon> | ||
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer |
||
</template> | ||
|
||
</template> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<link rel="import" href="../../iron-icon/iron-icon.html"> | ||
<link rel="import" href="../../iron-icons/iron-icons.html"> | ||
|
||
<dom-module id="cosmoz-clear-button"> | ||
<template> | ||
<style is="custom-style"> | ||
:host { | ||
display: block; | ||
} | ||
|
||
iron-icon { | ||
margin: 2px 4px; | ||
color: #cdcdcd; | ||
background-color: #a6a6a6; | ||
border-radius: 500px; | ||
cursor: pointer; | ||
min-width: 16px; | ||
width: 16px !important; | ||
min-height: 16px; | ||
height: 16px; | ||
position: absolute; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
top: 8px; | ||
right: 2px; | ||
padding: 2px; | ||
box-sizing: border-box; | ||
transition: background-color 0.25s, color 0.25s; | ||
} | ||
|
||
iron-icon:hover { | ||
background-color: #b0b0b0; | ||
color: #dfdfdf; | ||
} | ||
</style> | ||
<iron-icon icon="clear"></iron-icon> | ||
</template> | ||
<script type="text/javascript"> | ||
Polymer({ | ||
is: 'cosmoz-clear-button' | ||
}); | ||
</script> | ||
</dom-module> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use
click
instead oftap
event. See https://www.polymer-project.org/2.0/docs/devguide/gesture-events