blob: c89d0230a992aabb3d63209a6d79e1a418813f5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/html/list_property_update_behavior.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
<link rel="import" href="cups_printer_types.html">
<link rel="import" href="cups_printers_browser_proxy.html">
<link rel="import" href="cups_printers_entry_list_behavior.html">
<link rel="import" href="cups_printers_entry.html">
<link rel="import" href="../settings_shared_css.html">
<dom-module id="settings-cups-saved-printers">
<template>
<style include="cups-printer-shared iron-flex iron-flex-alignment
iron-flex-factors">
:host {
display: flex;
flex-direction: column;
}
#no-search-results {
margin-bottom: 20px;
}
/** Height of iron list row entry. */
#show-more-container {
min-height: var(--settings-row-min-height);
}
/** Border line that is the same size as a list entry's border. */
#show-more-line-separator {
border-bottom: var(--cr-separator-line);
left: 60px;
position: relative;
right: 20px;
width: 596px;
}
#show-more-icon {
--cr-icon-button-margin-end: 0;
}
#show-more-text {
flex: 1;
}
</style>
<cr-action-menu>
<button id="editButton" class="dropdown-item" on-click="onEditTap_">
$i18n{editPrinter}
</button>
<button id="removeButton" class="dropdown-item" on-click="onRemoveTap_">
$i18n{removePrinter}
</button>
</cr-action-menu>
<iron-list class="list-frame vertical-list flex-auto" id="printerEntryList"
items="[[filteredPrinters_]]">
<template>
<settings-cups-printers-entry printer-entry="[[item]]">
</settings-cups-printers-entry>
</template>
</iron-list>
<template is="dom-if" id="show-more-button-section"
if="[[shouldPrinterListBeCollapsed_(searchTerm, savedPrinters.*,
newPrinters_.*, hasShowMoreBeenTapped_)]]" restamp>
<div id="show-more-line-separator"></div>
<div class="list-frame layout horizontal" id="show-more-container">
<div id="show-more-text">$i18n{showMorePrinters}</div>
<cr-icon-button class="action-button" id="show-more-icon"
iron-icon="cr:expand-more"
on-click="onShowMoreTap_"
title=$i18n{showMorePrinters}>
</cr-icon-button>
</div>
</template>
<div id="no-search-results"
hidden="[[!showNoSearchResultsMessage_(searchTerm,
filteredPrinters_.*)]]">
$i18n{noSearchResults}
</div>
</template>
<script src="cups_saved_printers.js"></script>
</dom-module>
|