Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
contacts-v2: hide toolbar in contact details if tablet
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvonne Yip committed Oct 10, 2013
1 parent 22a54e8 commit e1dff79
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions shiny/Contacts-v2/components/contacts-detail.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<link href="../../../../polymer-elements/polymer-flex-layout/polymer-flex-layout.html" rel="import">
<link href="../../../../polymer-elements/polymer-media-query/polymer-media-query.html" rel="import">
<link href="../../../../polymer-ui-elements/polymer-ui-toolbar/polymer-ui-toolbar.html" rel="import">
<link href="contacts-detail-item.html" rel="import">
<link href="contacts-icon.html" rel="import">
Expand Down Expand Up @@ -32,14 +33,17 @@
}
</style>
<div class="detailHeader">
<polymer-media-query query="min-width: 768px" queryMatches="{{wideLayout}}"></polymer-media-query>
<polymer-flex-layout vertical="true"></polymer-flex-layout>
<polymer-ui-toolbar theme="polymer-ui-dark-theme">
<polymer-ui-icon-button icon="shrink" on-tap="shrinkAction"></polymer-ui-icon-button>
<div flex></div>
<!-- <polymer-ui-icon-button icon="edit"></polymer-ui-icon-button> no such icon -->
<polymer-ui-icon-button icon="shortcut"></polymer-ui-icon-button>
<polymer-ui-icon-button icon="favorite"></polymer-ui-icon-button>
</polymer-ui-toolbar>
<template if="{{!wideLayout}}">
<polymer-ui-toolbar theme="polymer-ui-dark-theme">
<polymer-ui-icon-button icon="shrink" on-tap="shrinkAction"></polymer-ui-icon-button>
<div flex></div>
<!-- <polymer-ui-icon-button icon="edit"></polymer-ui-icon-button> no such icon -->
<polymer-ui-icon-button icon="shortcut"></polymer-ui-icon-button>
<polymer-ui-icon-button icon="favorite"></polymer-ui-icon-button>
</polymer-ui-toolbar>
</template>
<div flex></div>
<div class="detailIconContainer">
<contacts-icon contact="{{contact}}" large></contacts-icon>
Expand All @@ -55,6 +59,7 @@
</template>
<script>
Polymer('contacts-detail', {
wideLayout: false,
shrinkAction: function() {
this.fire('contacts-detail-shrink');
}
Expand Down

0 comments on commit e1dff79

Please sign in to comment.