Commit 4f31d594 authored by Виталий Мурашко's avatar Виталий Мурашко

Merge branch 'master' of http://git.task-on.com/ktask/task-on.com

Conflicts:
	common/modules/school/models/Lessons.php
parents 928e4ffa 11028771
/**
* @license
* Copyright (C) 2012 KO GmbH <copyright@kogmbh.com>
*
* @licstart
* The JavaScript code in this page is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public License
* (GNU AGPL) as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. The code is distributed
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this code. If not, see <http://www.gnu.org/licenses/>.
*
* As additional permission under GNU AGPL version 3 section 7, you
* may distribute non-source (e.g., minimized or compacted) forms of
* that code without the copy of the GNU GPL normally required by
* section 4, provided you include this license notice and a URL
* through which recipients can access the Corresponding Source.
*
* As a special exception to the AGPL, any HTML file which merely makes function
* calls to this code, and for that purpose includes it by reference shall be
* deemed a separate work for copyright law purposes. In addition, the copyright
* holders of this code give you permission to combine this code with free
* software libraries that are released under the GNU LGPL. You may copy and
* distribute such a system following the terms of the GNU AGPL for this code
* and the LGPL for the libraries. If you modify this code, you may extend this
* exception to your version of the code, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your
* version.
*
* This license applies to this entire compilation.
* @licend
* @source: http://viewerjs.org/
* @source: http://github.com/kogmbh/ViewerJS
*/
/*global document, window, Viewer, ODFViewerPlugin, PDFViewerPlugin*/
var viewer;
function loadPlugin(pluginName, callback) {
"use strict";
var script, style;
// Load script
script = document.createElement('script');
script.async = false;
script.onload = callback;
script.src = pluginName + '.js';
script.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(script);
}
function loadDocument(documentUrl) {
"use strict";
if (documentUrl) {
var extension = documentUrl.split('.').pop(),
Plugin;
extension = extension.toLowerCase();
switch (extension) {
case 'odt':
case 'fodt':
case 'ott':
case 'odp':
case 'fodp':
case 'otp':
case 'ods':
case 'fods':
case 'ots':
loadPlugin('./ODFViewerPlugin', function () {
Plugin = ODFViewerPlugin;
});
break;
case 'pdf':
loadPlugin('./PDFViewerPlugin', function () {
Plugin = PDFViewerPlugin;
});
break;
}
window.onload = function () {
if (Plugin) {
viewer = new Viewer(new Plugin());
}
};
}
}
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/* globals PDFFindController, FindStates, mozL10n */
/**
* Creates a "search bar" given set of DOM elements
* that act as controls for searching, or for setting
* search preferences in the UI. This object also sets
* up the appropriate events for the controls. Actual
* searching is done by PDFFindController
*/
var PDFFindBar = {
opened: false,
bar: null,
toggleButton: null,
findField: null,
highlightAll: null,
caseSensitive: null,
findMsg: null,
findStatusIcon: null,
findPreviousButton: null,
findNextButton: null,
initialize: function(options) {
if(typeof PDFFindController === 'undefined' || PDFFindController === null) {
throw 'PDFFindBar cannot be initialized ' +
'without a PDFFindController instance.';
}
this.bar = options.bar;
this.toggleButton = options.toggleButton;
this.findField = options.findField;
this.highlightAll = options.highlightAllCheckbox;
this.caseSensitive = options.caseSensitiveCheckbox;
this.findMsg = options.findMsg;
this.findStatusIcon = options.findStatusIcon;
this.findPreviousButton = options.findPreviousButton;
this.findNextButton = options.findNextButton;
var self = this;
this.toggleButton.addEventListener('click', function() {
self.toggle();
});
this.findField.addEventListener('input', function() {
self.dispatchEvent('');
});
this.bar.addEventListener('keydown', function(evt) {
switch (evt.keyCode) {
case 13: // Enter
if (evt.target === self.findField) {
self.dispatchEvent('again', evt.shiftKey);
}
break;
case 27: // Escape
self.close();
break;
}
});
this.findPreviousButton.addEventListener('click',
function() { self.dispatchEvent('again', true); }
);
this.findNextButton.addEventListener('click', function() {
self.dispatchEvent('again', false);
});
this.highlightAll.addEventListener('click', function() {
self.dispatchEvent('highlightallchange');
});
this.caseSensitive.addEventListener('click', function() {
self.dispatchEvent('casesensitivitychange');
});
},
dispatchEvent: function(aType, aFindPrevious) {
var event = document.createEvent('CustomEvent');
event.initCustomEvent('find' + aType, true, true, {
query: this.findField.value,
caseSensitive: this.caseSensitive.checked,
highlightAll: this.highlightAll.checked,
findPrevious: aFindPrevious
});
return window.dispatchEvent(event);
},
updateUIState: function(state, previous) {
var notFound = false;
var findMsg = '';
var status = '';
switch (state) {
case FindStates.FIND_FOUND:
break;
case FindStates.FIND_PENDING:
status = 'pending';
break;
case FindStates.FIND_NOTFOUND:
findMsg = mozL10n.get('find_not_found', null, 'Phrase not found');
notFound = true;
break;
case FindStates.FIND_WRAPPED:
if (previous) {
findMsg = mozL10n.get('find_reached_top', null,
'Reached top of document, continued from bottom');
} else {
findMsg = mozL10n.get('find_reached_bottom', null,
'Reached end of document, continued from top');
}
break;
}
if (notFound) {
this.findField.classList.add('notFound');
} else {
this.findField.classList.remove('notFound');
}
this.findField.setAttribute('data-status', status);
this.findMsg.textContent = findMsg;
},
open: function() {
if (!this.opened) {
this.opened = true;
this.toggleButton.classList.add('toggled');
this.bar.classList.remove('hidden');
}
this.findField.select();
this.findField.focus();
},
close: function() {
if (!this.opened) return;
this.opened = false;
this.toggleButton.classList.remove('toggled');
this.bar.classList.add('hidden');
PDFFindController.active = false;
},
toggle: function() {
if (this.opened) {
this.close();
} else {
this.open();
}
}
};
var /**@const{!string}*/pdfjs_version = "d45d7bc";
This diff is collapsed.
function Viewer(c){function O(){var a,b,C,d,f;c&&(C=c.getPluginName(),d=c.getPluginVersion(),f=c.getPluginURL());a=document.createElement("div");a.id="aboutDialogCentererTable";b=document.createElement("div");b.id="aboutDialogCentererCell";q=document.createElement("div");q.id="aboutDialog";q.innerHTML='<h1>ViewerJS</h1><p>Open Source document viewer for webpages, built with HTML and JavaScript.</p><p>Learn more and get your own copy on the <a href="http://viewerjs.org/" target="_blank">ViewerJS website</a>.</p>'+
(c?'<p>Using the <a href = "'+f+'" target="_blank">'+C+'</a> (<span id = "pluginVersion">'+d+"</span>) plugin to show you this document.</p>":"")+'<p>Supported by <a href="http://nlnet.nl" target="_blank"><br><img src="images/nlnet.png" width="160" height="60" alt="NLnet Foundation"></a></p><p>Made by <a href="http://kogmbh.com" target="_blank"><br><img src="images/kogmbh.png" width="172" height="40" alt="KO GmbH"></a></p><button id = "aboutDialogCloseButton" class = "toolbarButton textButton">Close</button>';
u.appendChild(a);a.appendChild(b);b.appendChild(q);a=document.createElement("button");a.id="about";a.className="toolbarButton textButton about";a.title="About";a.innerHTML="ViewerJS";P.appendChild(a);a.addEventListener("click",function(){u.style.display="block"});document.getElementById("aboutDialogCloseButton").addEventListener("click",function(){u.style.display="none"})}function D(a){var b=Q.options,c,d=!1,f;for(f=0;f<b.length;f+=1)c=b[f],c.value!==a?c.selected=!1:d=c.selected=!0;return d}function E(a,
c,d){a!==b.getZoomLevel()&&(b.setZoomLevel(a),d=document.createEvent("UIEvents"),d.initUIEvent("scalechange",!1,!1,window,0),d.scale=a,d.resetAutoSettings=c,window.dispatchEvent(d))}function F(){var a;if(c.onScroll)c.onScroll();c.getPageInView&&(a=c.getPageInView())&&(l=a,document.getElementById("pageNumber").value=a)}function G(a){window.clearTimeout(H);H=window.setTimeout(function(){F()},a)}function e(a,b,g){var e,f;if(e="custom"===a?parseFloat(document.getElementById("customScaleOption").textContent)/
100:parseFloat(a))E(e,!0,g);else{e=d.clientWidth-r;f=d.clientHeight-r;switch(a){case "page-actual":E(1,b,g);break;case "page-width":c.fitToWidth(e);break;case "page-height":c.fitToHeight(f);break;case "page-fit":c.fitToPage(e,f);break;case "auto":c.isSlideshow()?c.fitToPage(e+r,f+r):c.fitSmart(e)}D(a)}G(300)}function s(){m=!m;h&&!m&&b.togglePresentationMode()}function v(){t&&(w.className="viewer-touched",window.clearTimeout(I),I=window.setTimeout(function(){w.className=""},5E3))}function x(){k.classList.add("viewer-touched");
n.classList.add("viewer-touched");window.clearTimeout(J);J=window.setTimeout(function(){y()},5E3)}function y(){k.classList.remove("viewer-touched");n.classList.remove("viewer-touched")}function z(){k.classList.contains("viewer-touched")?y():x()}function K(a){blanked.style.display="block";blanked.style.backgroundColor=a;y()}var b=this,r=40,h=!1,m=!1,L=!1,t=!1,A,g=document.getElementById("viewer"),d=document.getElementById("canvasContainer"),w=document.getElementById("overlayNavigator"),k=document.getElementById("titlebar"),
n=document.getElementById("toolbarContainer"),M=document.getElementById("toolbarLeft"),R=document.getElementById("toolbarMiddleContainer"),Q=document.getElementById("scaleSelect"),u=document.getElementById("dialogOverlay"),P=document.getElementById("toolbarRight"),q,N,p=[],l,H,I,J;this.initialize=function(){var a=String(document.location),B=a.indexOf("#"),a=a.substr(B+1);-1===B||0===a.length?console.log("Could not parse file path argument."):(A=a,N=A.replace(/^.*[\\\/]/,""),document.title=N,document.getElementById("documentName").innerHTML=
document.title,c.onLoad=function(){document.getElementById("pluginVersion").innerHTML=c.getPluginVersion();(t=c.isSlideshow())?(d.classList.add("slideshow"),M.style.visibility="visible"):(R.style.visibility="visible",c.getPageInView&&(M.style.visibility="visible"));L=!0;p=c.getPages();document.getElementById("numPages").innerHTML="of "+p.length;b.showPage(1);e("auto");d.onscroll=F;G()},c.initialize(d,a))};this.showPage=function(a){0>=a?a=1:a>p.length&&(a=p.length);c.showPage(a);l=a;document.getElementById("pageNumber").value=
l};this.showNextPage=function(){b.showPage(l+1)};this.showPreviousPage=function(){b.showPage(l-1)};this.download=function(){var a=A.split("#")[0];window.open(a+"#viewer.action=download","_parent")};this.toggleFullScreen=function(){m?document.exitFullscreen?document.exitFullscreen():document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():
document.msExitFullscreen&&document.msExitFullscreen():g.requestFullscreen?g.requestFullscreen():g.mozRequestFullScreen?g.mozRequestFullScreen():g.webkitRequestFullscreen?g.webkitRequestFullscreen():g.webkitRequestFullScreen?g.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):g.msRequestFullscreen&&g.msRequestFullscreen()};this.togglePresentationMode=function(){var a=document.getElementById("overlayCloseButton");h?("block"===blanked.style.display&&(blanked.style.display="none",z()),k.style.display=
n.style.display="block",a.style.display="none",d.classList.remove("presentationMode"),d.onmouseup=function(){},d.oncontextmenu=function(){},d.onmousedown=function(){},e("auto"),t=c.isSlideshow()):(k.style.display=n.style.display="none",a.style.display="block",d.classList.add("presentationMode"),t=!0,d.onmousedown=function(a){a.preventDefault()},d.oncontextmenu=function(a){a.preventDefault()},d.onmouseup=function(a){a.preventDefault();1===a.which?b.showNextPage():b.showPreviousPage()},e("page-fit"));
h=!h};this.getZoomLevel=function(){return c.getZoomLevel()};this.setZoomLevel=function(a){c.setZoomLevel(a)};this.zoomOut=function(){var a=(b.getZoomLevel()/1.1).toFixed(2),a=Math.max(0.25,a);e(a,!0)};this.zoomIn=function(){var a=(1.1*b.getZoomLevel()).toFixed(2),a=Math.min(4,a);e(a,!0)};(function(){O();c&&(b.initialize(),document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.webkitCancelFullScreen||document.msExitFullscreen||(document.getElementById("fullscreen").style.visibility=
"hidden",document.getElementById("presentation").style.visibility="hidden"),document.getElementById("overlayCloseButton").addEventListener("click",b.toggleFullScreen),document.getElementById("fullscreen").addEventListener("click",b.toggleFullScreen),document.getElementById("presentation").addEventListener("click",function(){m||b.toggleFullScreen();b.togglePresentationMode()}),document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),document.addEventListener("mozfullscreenchange",
s),document.addEventListener("MSFullscreenChange",s),document.getElementById("download").addEventListener("click",function(){b.download()}),document.getElementById("zoomOut").addEventListener("click",function(){b.zoomOut()}),document.getElementById("zoomIn").addEventListener("click",function(){b.zoomIn()}),document.getElementById("previous").addEventListener("click",function(){b.showPreviousPage()}),document.getElementById("next").addEventListener("click",function(){b.showNextPage()}),document.getElementById("previousPage").addEventListener("click",
function(){b.showPreviousPage()}),document.getElementById("nextPage").addEventListener("click",function(){b.showNextPage()}),document.getElementById("pageNumber").addEventListener("change",function(){b.showPage(this.value)}),document.getElementById("scaleSelect").addEventListener("change",function(){e(this.value)}),d.addEventListener("click",v),w.addEventListener("click",v),d.addEventListener("click",z),k.addEventListener("click",x),n.addEventListener("click",x),window.addEventListener("scalechange",
function(a){var b=document.getElementById("customScaleOption"),c=D(String(a.scale));b.selected=!1;c||(b.textContent=Math.round(1E4*a.scale)/100+"%",b.selected=!0)},!0),window.addEventListener("resize",function(a){L&&(document.getElementById("pageWidthOption").selected||document.getElementById("pageAutoOption").selected)&&e(document.getElementById("scaleSelect").value);v()}),window.addEventListener("keydown",function(a){var c=a.keyCode;a=a.shiftKey;if("block"===blanked.style.display)switch(c){case 16:case 17:case 18:case 91:case 93:case 224:case 225:break;
default:blanked.style.display="none",z()}else switch(c){case 8:case 33:case 37:case 38:case 80:b.showPreviousPage();break;case 13:case 34:case 39:case 40:case 78:b.showNextPage();break;case 32:a?b.showPreviousPage():b.showNextPage();break;case 66:case 190:h&&K("#000");break;case 87:case 188:h&&K("#FFF");break;case 36:b.showPage(0);break;case 35:b.showPage(p.length)}}))})()};
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php <?php
include 'config/config.php';
if($_SESSION['RF']["verify"] != "RESPONSIVEfilemanager") die('forbiden'); $config = include 'config/config.php';
//TODO switch to array
extract($config, EXTR_OVERWRITE);
include 'include/utils.php'; include 'include/utils.php';
if ($_SESSION['RF']["verify"] != "RESPONSIVEfilemanager")
{
response('forbiden', 403)->send();
exit;
}
include 'include/mime_type_lib.php'; include 'include/mime_type_lib.php';
if(strpos($_POST['path'],'/')===0 if (
|| strpos($_POST['path'],'../')!==FALSE strpos($_POST['path'], '/') === 0
|| strpos($_POST['path'],'./')===0) || strpos($_POST['path'], '../') !== false
die('wrong path'); || strpos($_POST['path'], './') === 0
)
{
response('wrong path', 400)->send();
exit;
}
if (strpos($_POST['name'], '/') !== false)
{
response('wrong path', 400)->send();
exit;
}
$path = $current_path . $_POST['path'];
$name = $_POST['name'];
if(strpos($_POST['name'],'/')!==FALSE) $info = pathinfo($name);
die('wrong path');
$path=$current_path.$_POST['path']; if ( ! in_array(fix_strtolower($info['extension']), $ext))
$name=$_POST['name']; {
response('wrong extension', 400)->send();
exit;
}
$info=pathinfo($name); if ( ! file_exists($path . $name))
if(!in_array(fix_strtolower($info['extension']), $ext)){ {
die('wrong extension'); response('File not found', 404)->send();
exit;
} }
$img_size = (string)(filesize($path.$name)); // Get the image size as string $img_size = (string) (filesize($path . $name)); // Get the image size as string
$mime_type = get_file_mime_type( $path.$name ); // Get the correct MIME type depending on the file. $mime_type = get_file_mime_type($path . $name); // Get the correct MIME type depending on the file.
header('Pragma: private'); response(file_get_contents($path . $name), 200, array(
header('Cache-control: private, must-revalidate'); 'Pragma' => 'private',
header("Content-Type: " . $mime_type); // Set the correct MIME type 'Cache-control' => 'private, must-revalidate',
header("Content-Length: " . $img_size ); 'Content-Type' => $mime_type,
header('Content-Disposition: attachment; filename="'.($name).'"'); 'Content-Length' => $img_size,
readfile($path.$name); 'Content-Disposition' => 'attachment; filename="' . ($name) . '"'
))->send();
exit; exit;
?> \ No newline at end of file
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*
* Playlist Object for the jPlayer Plugin
* http://www.jplayer.org
*
* Copyright (c) 2009 - 2013 Happyworm Ltd
* Dual licensed under the MIT and GPL licenses.
* - http://www.opensource.org/licenses/mit-license.php
* - http://www.gnu.org/copyleft/gpl.html
*
* Author: Mark J Panaghiston
* Version: 2.3.0
* Date: 20th April 2013
*
* Requires:
* - jQuery 1.7.0+
* - jPlayer 2.3.0+
*/
(function(b,f){jPlayerPlaylist=function(a,c,d){var e=this;this.current=0;this.removing=this.shuffled=this.loop=!1;this.cssSelector=b.extend({},this._cssSelector,a);this.options=b.extend(!0,{keyBindings:{next:{key:39,fn:function(){e.next()}},previous:{key:37,fn:function(){e.previous()}}}},this._options,d);this.playlist=[];this.original=[];this._initPlaylist(c);this.cssSelector.title=this.cssSelector.cssSelectorAncestor+" .jp-title";this.cssSelector.playlist=this.cssSelector.cssSelectorAncestor+" .jp-playlist";
this.cssSelector.next=this.cssSelector.cssSelectorAncestor+" .jp-next";this.cssSelector.previous=this.cssSelector.cssSelectorAncestor+" .jp-previous";this.cssSelector.shuffle=this.cssSelector.cssSelectorAncestor+" .jp-shuffle";this.cssSelector.shuffleOff=this.cssSelector.cssSelectorAncestor+" .jp-shuffle-off";this.options.cssSelectorAncestor=this.cssSelector.cssSelectorAncestor;this.options.repeat=function(a){e.loop=a.jPlayer.options.loop};b(this.cssSelector.jPlayer).bind(b.jPlayer.event.ready,function(){e._init()});
b(this.cssSelector.jPlayer).bind(b.jPlayer.event.ended,function(){e.next()});b(this.cssSelector.jPlayer).bind(b.jPlayer.event.play,function(){b(this).jPlayer("pauseOthers")});b(this.cssSelector.jPlayer).bind(b.jPlayer.event.resize,function(a){a.jPlayer.options.fullScreen?b(e.cssSelector.title).show():b(e.cssSelector.title).hide()});b(this.cssSelector.previous).click(function(){e.previous();b(this).blur();return!1});b(this.cssSelector.next).click(function(){e.next();b(this).blur();return!1});b(this.cssSelector.shuffle).click(function(){e.shuffle(!0);
return!1});b(this.cssSelector.shuffleOff).click(function(){e.shuffle(!1);return!1}).hide();this.options.fullScreen||b(this.cssSelector.title).hide();b(this.cssSelector.playlist+" ul").empty();this._createItemHandlers();b(this.cssSelector.jPlayer).jPlayer(this.options)};jPlayerPlaylist.prototype={_cssSelector:{jPlayer:"#jquery_jplayer_1",cssSelectorAncestor:"#jp_container_1"},_options:{playlistOptions:{autoPlay:!1,loopOnPrevious:!1,shuffleOnLoop:!0,enableRemoveControls:!1,displayTime:"slow",addTime:"fast",
removeTime:"fast",shuffleTime:"slow",itemClass:"jp-playlist-item",freeGroupClass:"jp-free-media",freeItemClass:"jp-playlist-item-free",removeItemClass:"jp-playlist-item-remove"}},option:function(a,b){if(b===f)return this.options.playlistOptions[a];this.options.playlistOptions[a]=b;switch(a){case "enableRemoveControls":this._updateControls();break;case "itemClass":case "freeGroupClass":case "freeItemClass":case "removeItemClass":this._refresh(!0),this._createItemHandlers()}return this},_init:function(){var a=
this;this._refresh(function(){a.options.playlistOptions.autoPlay?a.play(a.current):a.select(a.current)})},_initPlaylist:function(a){this.current=0;this.removing=this.shuffled=!1;this.original=b.extend(!0,[],a);this._originalPlaylist()},_originalPlaylist:function(){var a=this;this.playlist=[];b.each(this.original,function(b){a.playlist[b]=a.original[b]})},_refresh:function(a){var c=this;if(a&&!b.isFunction(a))b(this.cssSelector.playlist+" ul").empty(),b.each(this.playlist,function(a){b(c.cssSelector.playlist+
" ul").append(c._createListItem(c.playlist[a]))}),this._updateControls();else{var d=b(this.cssSelector.playlist+" ul").children().length?this.options.playlistOptions.displayTime:0;b(this.cssSelector.playlist+" ul").slideUp(d,function(){var d=b(this);b(this).empty();b.each(c.playlist,function(a){d.append(c._createListItem(c.playlist[a]))});c._updateControls();b.isFunction(a)&&a();c.playlist.length?b(this).slideDown(c.options.playlistOptions.displayTime):b(this).show()})}},_createListItem:function(a){var c=
this,d="<li><div>",d=d+("<a href='javascript:;' class='"+this.options.playlistOptions.removeItemClass+"'>&times;</a>");if(a.free){var e=!0,d=d+("<span class='"+this.options.playlistOptions.freeGroupClass+"'>(");b.each(a,function(a,f){b.jPlayer.prototype.format[a]&&(e?e=!1:d+=" | ",d+="<a class='"+c.options.playlistOptions.freeItemClass+"' href='"+f+"' tabindex='1'>"+a+"</a>")});d+=")</span>"}d+="<a href='javascript:;' class='"+this.options.playlistOptions.itemClass+"' tabindex='1'>"+a.title+(a.artist?
" <span class='jp-artist'>by "+a.artist+"</span>":"")+"</a>";return d+="</div></li>"},_createItemHandlers:function(){var a=this;b(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.itemClass).on("click","a."+this.options.playlistOptions.itemClass,function(){var c=b(this).parent().parent().index();a.current!==c?a.play(c):b(a.cssSelector.jPlayer).jPlayer("play");b(this).blur();return!1});b(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.freeItemClass).on("click",
"a."+this.options.playlistOptions.freeItemClass,function(){b(this).parent().parent().find("."+a.options.playlistOptions.itemClass).click();b(this).blur();return!1});b(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.removeItemClass).on("click","a."+this.options.playlistOptions.removeItemClass,function(){var c=b(this).parent().parent().index();a.remove(c);b(this).blur();return!1})},_updateControls:function(){this.options.playlistOptions.enableRemoveControls?b(this.cssSelector.playlist+
" ."+this.options.playlistOptions.removeItemClass).show():b(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).hide();this.shuffled?(b(this.cssSelector.shuffleOff).show(),b(this.cssSelector.shuffle).hide()):(b(this.cssSelector.shuffleOff).hide(),b(this.cssSelector.shuffle).show())},_highlight:function(a){this.playlist.length&&a!==f&&(b(this.cssSelector.playlist+" .jp-playlist-current").removeClass("jp-playlist-current"),b(this.cssSelector.playlist+" li:nth-child("+(a+1)+
")").addClass("jp-playlist-current").find(".jp-playlist-item").addClass("jp-playlist-current"),b(this.cssSelector.title+" li").html(this.playlist[a].title+(this.playlist[a].artist?" <span class='jp-artist'>by "+this.playlist[a].artist+"</span>":"")))},setPlaylist:function(a){this._initPlaylist(a);this._init()},add:function(a,c){b(this.cssSelector.playlist+" ul").append(this._createListItem(a)).find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime);this._updateControls();this.original.push(a);
this.playlist.push(a);c?this.play(this.playlist.length-1):1===this.original.length&&this.select(0)},remove:function(a){var c=this;if(a===f)return this._initPlaylist([]),this._refresh(function(){b(c.cssSelector.jPlayer).jPlayer("clearMedia")}),!0;if(this.removing)return!1;a=0>a?c.original.length+a:a;0<=a&&a<this.playlist.length&&(this.removing=!0,b(this.cssSelector.playlist+" li:nth-child("+(a+1)+")").slideUp(this.options.playlistOptions.removeTime,function(){b(this).remove();if(c.shuffled){var d=
c.playlist[a];b.each(c.original,function(a){if(c.original[a]===d)return c.original.splice(a,1),!1})}else c.original.splice(a,1);c.playlist.splice(a,1);c.original.length?a===c.current?(c.current=a<c.original.length?c.current:c.original.length-1,c.select(c.current)):a<c.current&&c.current--:(b(c.cssSelector.jPlayer).jPlayer("clearMedia"),c.current=0,c.shuffled=!1,c._updateControls());c.removing=!1}));return!0},select:function(a){a=0>a?this.original.length+a:a;0<=a&&a<this.playlist.length?(this.current=
a,this._highlight(a),b(this.cssSelector.jPlayer).jPlayer("setMedia",this.playlist[this.current])):this.current=0},play:function(a){a=0>a?this.original.length+a:a;0<=a&&a<this.playlist.length?this.playlist.length&&(this.select(a),b(this.cssSelector.jPlayer).jPlayer("play")):a===f&&b(this.cssSelector.jPlayer).jPlayer("play")},pause:function(){b(this.cssSelector.jPlayer).jPlayer("pause")},next:function(){var a=this.current+1<this.playlist.length?this.current+1:0;this.loop?0===a&&this.shuffled&&this.options.playlistOptions.shuffleOnLoop&&
1<this.playlist.length?this.shuffle(!0,!0):this.play(a):0<a&&this.play(a)},previous:function(){var a=0<=this.current-1?this.current-1:this.playlist.length-1;(this.loop&&this.options.playlistOptions.loopOnPrevious||a<this.playlist.length-1)&&this.play(a)},shuffle:function(a,c){var d=this;a===f&&(a=!this.shuffled);(a||a!==this.shuffled)&&b(this.cssSelector.playlist+" ul").slideUp(this.options.playlistOptions.shuffleTime,function(){(d.shuffled=a)?d.playlist.sort(function(){return 0.5-Math.random()}):
d._originalPlaylist();d._refresh(!0);c||!b(d.cssSelector.jPlayer).data("jPlayer").status.paused?d.play(0):d.select(0);b(this).slideDown(d.options.playlistOptions.shuffleTime)})}}})(jQuery);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/* This is just a sample file with CSS rules. You should write your own @font-face declarations
* to add support for your desired fonts.
*/
@font-face {
font-family: 'Novecentowide Book';
src: url("/ViewerJS/fonts/Novecentowide-Bold-webfont.eot");
src: url("/ViewerJS/fonts/Novecentowide-Bold-webfont.eot?#iefix") format("embedded-opentype"),
url("/ViewerJS/fonts/Novecentowide-Bold-webfont.woff") format("woff"),
url("/fonts/Novecentowide-Bold-webfont.ttf") format("truetype"),
url("/fonts/Novecentowide-Bold-webfont.svg#NovecentowideBookBold") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'exotica';
src: url('/ViewerJS/fonts/Exotica-webfont.eot');
src: url('/ViewerJS/fonts/Exotica-webfont.eot?#iefix') format('embedded-opentype'),
url('/ViewerJS/fonts/Exotica-webfont.woff') format('woff'),
url('/ViewerJS/fonts/Exotica-webfont.ttf') format('truetype'),
url('/ViewerJS/fonts/Exotica-webfont.svg#exoticamedium') format('svg');
font-weight: normal;
font-style: normal;
}
...@@ -52,7 +52,7 @@ limitations under the License. ...@@ -52,7 +52,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="viewer.css" media="screen"/> <link rel="stylesheet" type="text/css" href="viewer.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="local.css" media="screen"/> <link rel="stylesheet" type="text/css" href="local.css" media="screen"/>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet">
<script src="viewer.js" type="text/javascript" charset="utf-8"></script> <script src="viewer.js" type="text/javascript" charset="utf-8"></script>
<script src="PluginLoader.js" type="text/javascript" charset="utf-8"></script> <script src="PluginLoader.js" type="text/javascript" charset="utf-8"></script>
<script> <script>
......
var /**@const{!string}*/pdfjs_version = "v1.1.114";
This diff is collapsed.
function Viewer(c,r){function P(){var a,f,b,d,h;c&&(b=c.getPluginName(),d=c.getPluginVersion(),h=c.getPluginURL());a=document.createElement("div");a.id="aboutDialogCentererTable";f=document.createElement("div");f.id="aboutDialogCentererCell";s=document.createElement("div");s.id="aboutDialog";s.innerHTML='<h1>ViewerJS</h1><p>Open Source document viewer for webpages, built with HTML and JavaScript.</p><p>Learn more and get your own copy on the <a href="http://viewerjs.org/" target="_blank">ViewerJS website</a>.</p>'+
(c?'<p>Using the <a href = "'+h+'" target="_blank">'+b+'</a> (<span id = "pluginVersion">'+d+"</span>) plugin to show you this document.</p>":"")+'<p>Supported by <a href="http://nlnet.nl" target="_blank"><br><img src="images/nlnet.png" width="160" height="60" alt="NLnet Foundation"></a></p><p>Made by <a href="http://kogmbh.com" target="_blank"><br><img src="images/kogmbh.png" width="172" height="40" alt="KO GmbH"></a></p><button id = "aboutDialogCloseButton" class = "toolbarButton textButton">Close</button>';
w.appendChild(a);a.appendChild(f);f.appendChild(s);a=document.createElement("button");a.id="about";a.className="toolbarButton textButton about";a.title="About";a.innerHTML="ViewerJS";Q.appendChild(a);a.addEventListener("click",function(){w.style.display="block"});document.getElementById("aboutDialogCloseButton").addEventListener("click",function(){w.style.display="none"})}function D(a){var f=R.options,b,c=!1,d;for(d=0;d<f.length;d+=1)b=f[d],b.value!==a?b.selected=!1:c=b.selected=!0;return c}function E(a,
f,c){a!==b.getZoomLevel()&&(b.setZoomLevel(a),c=document.createEvent("UIEvents"),c.initUIEvent("scalechange",!1,!1,window,0),c.scale=a,c.resetAutoSettings=f,window.dispatchEvent(c))}function F(){var a;if(c.onScroll)c.onScroll();c.getPageInView&&(a=c.getPageInView())&&(m=a,document.getElementById("pageNumber").value=a)}function G(a){window.clearTimeout(H);H=window.setTimeout(function(){F()},a)}function e(a,b,g){var e,h;if(e="custom"===a?parseFloat(document.getElementById("customScaleOption").textContent)/
100:parseFloat(a))E(e,!0,g);else{e=d.clientWidth-t;h=d.clientHeight-t;switch(a){case "page-actual":E(1,b,g);break;case "page-width":c.fitToWidth(e);break;case "page-height":c.fitToHeight(h);break;case "page-fit":c.fitToPage(e,h);break;case "auto":c.isSlideshow()?c.fitToPage(e+t,h+t):c.fitSmart(e)}D(a)}G(300)}function S(a){var b;return-1!==["auto","page-actual","page-width"].indexOf(a)?a:(b=parseFloat(a))&&I<=b&&b<=J?a:T}function u(){n=!n;k&&!n&&b.togglePresentationMode()}function x(){v&&(y.className=
"viewer-touched",window.clearTimeout(K),K=window.setTimeout(function(){y.className=""},5E3))}function z(){l.classList.add("viewer-touched");p.classList.add("viewer-touched");window.clearTimeout(L);L=window.setTimeout(function(){A()},5E3)}function A(){l.classList.remove("viewer-touched");p.classList.remove("viewer-touched")}function B(){l.classList.contains("viewer-touched")?A():z()}function M(a){blanked.style.display="block";blanked.style.backgroundColor=a;A()}var b=this,t=40,I=0.25,J=4,T="auto",
k=!1,n=!1,N=!1,v=!1,C,g=document.getElementById("viewer"),d=document.getElementById("canvasContainer"),y=document.getElementById("overlayNavigator"),l=document.getElementById("titlebar"),p=document.getElementById("toolbarContainer"),O=document.getElementById("toolbarLeft"),U=document.getElementById("toolbarMiddleContainer"),R=document.getElementById("scaleSelect"),w=document.getElementById("dialogOverlay"),Q=document.getElementById("toolbarRight"),s,q=[],m,H,K,L;this.initialize=function(){var a;a=
S(r.zoom);C=r.documentUrl;document.title=r.title;var f=document.getElementById("documentName");f.innerHTML="";f.appendChild(f.ownerDocument.createTextNode(r.title));c.onLoad=function(){document.getElementById("pluginVersion").innerHTML=c.getPluginVersion();(v=c.isSlideshow())?(d.classList.add("slideshow"),O.style.visibility="visible"):(U.style.visibility="visible",c.getPageInView&&(O.style.visibility="visible"));N=!0;q=c.getPages();document.getElementById("numPages").innerHTML="of "+q.length;b.showPage(1);
e(a);d.onscroll=F;G()};c.initialize(d,C)};this.showPage=function(a){0>=a?a=1:a>q.length&&(a=q.length);c.showPage(a);m=a;document.getElementById("pageNumber").value=m};this.showNextPage=function(){b.showPage(m+1)};this.showPreviousPage=function(){b.showPage(m-1)};this.download=function(){var a=C.split("#")[0];window.open(a+"#viewer.action=download","_parent")};this.toggleFullScreen=function(){n?document.exitFullscreen?document.exitFullscreen():document.cancelFullScreen?document.cancelFullScreen():
document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():g.requestFullscreen?g.requestFullscreen():g.mozRequestFullScreen?g.mozRequestFullScreen():g.webkitRequestFullscreen?g.webkitRequestFullscreen():g.webkitRequestFullScreen?g.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):g.msRequestFullscreen&&g.msRequestFullscreen()};
this.togglePresentationMode=function(){var a=document.getElementById("overlayCloseButton");k?("block"===blanked.style.display&&(blanked.style.display="none",B()),l.style.display=p.style.display="block",a.style.display="none",d.classList.remove("presentationMode"),d.onmouseup=function(){},d.oncontextmenu=function(){},d.onmousedown=function(){},e("auto"),v=c.isSlideshow()):(l.style.display=p.style.display="none",a.style.display="block",d.classList.add("presentationMode"),v=!0,d.onmousedown=function(a){a.preventDefault()},
d.oncontextmenu=function(a){a.preventDefault()},d.onmouseup=function(a){a.preventDefault();1===a.which?b.showNextPage():b.showPreviousPage()},e("page-fit"));k=!k};this.getZoomLevel=function(){return c.getZoomLevel()};this.setZoomLevel=function(a){c.setZoomLevel(a)};this.zoomOut=function(){var a=(b.getZoomLevel()/1.1).toFixed(2),a=Math.max(I,a);e(a,!0)};this.zoomIn=function(){var a=(1.1*b.getZoomLevel()).toFixed(2),a=Math.min(J,a);e(a,!0)};(function(){P();c&&(b.initialize(),document.exitFullscreen||
document.cancelFullScreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.webkitCancelFullScreen||document.msExitFullscreen||(document.getElementById("fullscreen").style.visibility="hidden",document.getElementById("presentation").style.visibility="hidden"),document.getElementById("overlayCloseButton").addEventListener("click",b.toggleFullScreen),document.getElementById("fullscreen").addEventListener("click",b.toggleFullScreen),document.getElementById("presentation").addEventListener("click",
function(){n||b.toggleFullScreen();b.togglePresentationMode()}),document.addEventListener("fullscreenchange",u),document.addEventListener("webkitfullscreenchange",u),document.addEventListener("mozfullscreenchange",u),document.addEventListener("MSFullscreenChange",u),document.getElementById("download").addEventListener("click",function(){b.download()}),document.getElementById("zoomOut").addEventListener("click",function(){b.zoomOut()}),document.getElementById("zoomIn").addEventListener("click",function(){b.zoomIn()}),
document.getElementById("previous").addEventListener("click",function(){b.showPreviousPage()}),document.getElementById("next").addEventListener("click",function(){b.showNextPage()}),document.getElementById("previousPage").addEventListener("click",function(){b.showPreviousPage()}),document.getElementById("nextPage").addEventListener("click",function(){b.showNextPage()}),document.getElementById("pageNumber").addEventListener("change",function(){b.showPage(this.value)}),document.getElementById("scaleSelect").addEventListener("change",
function(){e(this.value)}),d.addEventListener("click",x),y.addEventListener("click",x),d.addEventListener("click",B),l.addEventListener("click",z),p.addEventListener("click",z),window.addEventListener("scalechange",function(a){var b=document.getElementById("customScaleOption"),c=D(String(a.scale));b.selected=!1;c||(b.textContent=Math.round(1E4*a.scale)/100+"%",b.selected=!0)},!0),window.addEventListener("resize",function(a){N&&(document.getElementById("pageWidthOption").selected||document.getElementById("pageAutoOption").selected)&&
e(document.getElementById("scaleSelect").value);x()}),window.addEventListener("keydown",function(a){var c=a.keyCode;a=a.shiftKey;if("block"===blanked.style.display)switch(c){case 16:case 17:case 18:case 91:case 93:case 224:case 225:break;default:blanked.style.display="none",B()}else switch(c){case 8:case 33:case 37:case 38:case 80:b.showPreviousPage();break;case 13:case 34:case 39:case 40:case 78:b.showNextPage();break;case 32:a?b.showPreviousPage():b.showNextPage();break;case 66:case 190:k&&M("#000");
break;case 87:case 188:k&&M("#FFF");break;case 36:b.showPage(0);break;case 35:b.showPage(q.length)}}))})()};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment