import pdf ui

This commit is contained in:
deepak1556 2017-01-17 19:57:16 +05:30
parent fdd574cea5
commit be480fb634
44 changed files with 4411 additions and 0 deletions

View file

@ -0,0 +1,7 @@
/* Copyright 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
.last-item {
margin-bottom: 24px;
}

View file

@ -0,0 +1,22 @@
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animations/fade-in-animation.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dialog.html">
<dom-module id="viewer-error-screen">
<link rel="import" type="css" href="viewer-error-screen.css">
<template>
<paper-dialog id="dialog" modal no-cancel-on-esc-key
entry-animation="fade-in-animation">
<div id="load-failed-message" class="last-item">
{{strings.pageLoadFailed}}
</div>
<div class="buttons" hidden$="{{!reloadFn}}">
<paper-button on-click="reload" autofocus>
{{strings.pageReload}}
</paper-button>
</div>
</paper-dialog>
</template>
</dom-module>
<script src="viewer-error-screen.js"></script>

View file

@ -0,0 +1,35 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
Polymer({
is: 'viewer-error-screen',
properties: {
reloadFn: {
type: Object,
value: null,
observer: 'reloadFnChanged_'
},
strings: Object,
},
reloadFnChanged_: function() {
// The default margins in paper-dialog don't work well with hiding/showing
// the .buttons div. We need to manually manage the bottom margin to get
// around this.
if (this.reloadFn)
this.$['load-failed-message'].classList.remove('last-item');
else
this.$['load-failed-message'].classList.add('last-item');
},
show: function() {
this.$.dialog.open();
},
reload: function() {
if (this.reloadFn)
this.reloadFn();
}
});