Fixed vim indentation rules.
This commit is contained in:
parent
b18006a055
commit
b9af0da8f8
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- /
|
||||
/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */
|
||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
|
||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||
|
||||
body {
|
||||
background-color: #929292;
|
||||
|
@ -3,11 +3,11 @@
|
||||
<head>
|
||||
<title>pdf.js Multi-Page Viewer</title>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
|
||||
<link rel="stylesheet" href="multi-page-viewer.css" type="text/css" media="screen"/>
|
||||
<link rel="stylesheet" href="multi_page_viewer.css" type="text/css" media="screen"/>
|
||||
<script type="text/javascript" src="pdf.js"></script>
|
||||
<script type="text/javascript" src="fonts.js"></script>
|
||||
<script type="text/javascript" src="glyphlist.js"></script>
|
||||
<script type="text/javascript" src="multi-page-viewer.js"></script>
|
||||
<script type="text/javascript" src="multi_page_viewer.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="controls">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- /
|
||||
/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */
|
||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
|
||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||
|
||||
"use strict";
|
||||
|
||||
@ -197,10 +197,8 @@ var PDFViewer = {
|
||||
|
||||
document.location.hash = PDFViewer.pageNumber;
|
||||
|
||||
PDFViewer.previousPageButton.className = (PDFViewer.pageNumber === 1) ?
|
||||
'disabled' : '';
|
||||
PDFViewer.nextPageButton.className = (PDFViewer.pageNumber === PDFViewer.numberOfPages) ?
|
||||
'disabled' : '';
|
||||
PDFViewer.previousPageButton.className = (PDFViewer.pageNumber === 1) ? 'disabled' : '';
|
||||
PDFViewer.nextPageButton.className = (PDFViewer.pageNumber === PDFViewer.numberOfPages) ? 'disabled' : '';
|
||||
}
|
||||
},
|
||||
|
||||
@ -227,10 +225,7 @@ var PDFViewer = {
|
||||
|
||||
req.onreadystatechange = function() {
|
||||
if (req.readyState === 4 && req.status === req.expected) {
|
||||
var data = req.mozResponseArrayBuffer ||
|
||||
req.mozResponse ||
|
||||
req.responseArrayBuffer ||
|
||||
req.response;
|
||||
var data = req.mozResponseArrayBuffer || req.mozResponse || req.responseArrayBuffer || req.response;
|
||||
|
||||
PDFViewer.readPDF(data);
|
||||
}
|
||||
@ -257,10 +252,8 @@ var PDFViewer = {
|
||||
document.location.hash = 1;
|
||||
}
|
||||
|
||||
PDFViewer.previousPageButton.className = (PDFViewer.pageNumber === 1) ?
|
||||
'disabled' : '';
|
||||
PDFViewer.nextPageButton.className = (PDFViewer.pageNumber === PDFViewer.numberOfPages) ?
|
||||
'disabled' : '';
|
||||
PDFViewer.previousPageButton.className = (PDFViewer.pageNumber === 1) ? 'disabled' : '';
|
||||
PDFViewer.nextPageButton.className = (PDFViewer.pageNumber === PDFViewer.numberOfPages) ? 'disabled' : '';
|
||||
}
|
||||
};
|
||||
|
||||
@ -271,6 +264,7 @@ window.onload = function() {
|
||||
var qs = window.location.search.substring(1);
|
||||
var kvs = qs.split('&');
|
||||
var params = {};
|
||||
|
||||
for (var i = 0; i < kvs.length; ++i) {
|
||||
var kv = kvs[i].split('=');
|
||||
params[unescape(kv[0])] = unescape(kv[1]);
|
||||
@ -455,10 +449,8 @@ window.onload = function() {
|
||||
// Update the page number input with the current page number.
|
||||
if (!PDFViewer.willJumpToPage && visiblePages.length > 0) {
|
||||
PDFViewer.pageNumber = PDFViewer.pageNumberInput.value = visiblePages[0];
|
||||
PDFViewer.previousPageButton.className = (PDFViewer.pageNumber === 1) ?
|
||||
'disabled' : '';
|
||||
PDFViewer.nextPageButton.className = (PDFViewer.pageNumber === PDFViewer.numberOfPages) ?
|
||||
'disabled' : '';
|
||||
PDFViewer.previousPageButton.className = (PDFViewer.pageNumber === 1) ? 'disabled' : '';
|
||||
PDFViewer.nextPageButton.className = (PDFViewer.pageNumber === PDFViewer.numberOfPages) ? 'disabled' : '';
|
||||
} else {
|
||||
PDFViewer.willJumpToPage = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user