FEATURE: more translations

This commit is contained in:
Peter Hrdlica
2016-09-29 23:11:42 +02:00
250 changed files with 77827 additions and 1670 deletions
+4
View File
@@ -2770,3 +2770,7 @@ span a {
@media (max-width: 767px) {
.header .header-block-nav .profile-dropdown-menu {
margin-top: 8px; } }
.tag-primary {
background-color: #52BCD3;
}
+4
View File
@@ -2770,3 +2770,7 @@ span a {
@media (max-width: 767px) {
.header .header-block-nav .profile-dropdown-menu {
margin-top: 8px; } }
.tag-primary {
background-color: #59c2e6;
}
+4
View File
@@ -2770,3 +2770,7 @@ span a {
@media (max-width: 767px) {
.header .header-block-nav .profile-dropdown-menu {
margin-top: 8px; } }
.tag-primary {
background-color: #85CE36;
}
+4
View File
@@ -2770,3 +2770,7 @@ span a {
@media (max-width: 767px) {
.header .header-block-nav .profile-dropdown-menu {
margin-top: 8px; } }
.tag-primary {
background-color: #fe821d;
}
+4
View File
@@ -2770,3 +2770,7 @@ span a {
@media (max-width: 767px) {
.header .header-block-nav .profile-dropdown-menu {
margin-top: 8px; } }
.tag-primary {
background-color: #7867A7;
}
+4
View File
@@ -2770,3 +2770,7 @@ span a {
@media (max-width: 767px) {
.header .header-block-nav .profile-dropdown-menu {
margin-top: 8px; } }
.tag-primary {
background-color: #FF6161;
}
+4
View File
@@ -2770,3 +2770,7 @@ span a {
@media (max-width: 767px) {
.header .header-block-nav .profile-dropdown-menu {
margin-top: 8px; } }
.tag-primary {
background-color: #4bcf99;
}
+4
View File
@@ -2883,3 +2883,7 @@ pre {
@media (max-width: 767px) {
.header .header-block-nav .profile-dropdown-menu {
margin-top: 8px; } }
.tag-primary {
background-color: #85CE36;
}
+103 -1
View File
@@ -14375,11 +14375,113 @@ img {
.bold {
font-weight: bold;
}
.m-l-10 {
margin-left: 10px;
}
.m-t-15 {
margin-top: 15px;
}
.p-tb-15 {
padding-top: 15px;
padding-bottom: 15px;
}
.card .card-header .title {
line-height: 1.5em;
}
.card .card-header .title small {
padding-left: 10px;
}
.card.file-preview .card-block {
padding: 0;
height: 6em;
overflow: hidden;
}
.card.file-preview .card-block p {
padding: 1em 5px;
}
.card.file-preview .card-footer {
padding: 5px !important;
}
.card.file-preview .card-block img {
width: 100%;
}
.tag {
display: inline-block;
padding: 0.25em 0.4em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
}
.tag:empty {
display: none;
}
.btn .tag {
position: relative;
top: -1px;
}
a.tag:focus, a.tag:hover {
color: #fff;
text-decoration: none;
cursor: pointer;
}
.tag-pill {
padding-right: 0.6em;
padding-left: 0.6em;
border-radius: 10rem;
}
.tag-default {
background-color: #818a91;
}
.tag-default[href]:focus, .tag-default[href]:hover {
background-color: #687077;
}
.tag-success {
background-color: #5cb85c;
}
.tag-success[href]:focus, .tag-success[href]:hover {
background-color: #449d44;
}
.tag-info {
background-color: #5bc0de;
}
.tag-info[href]:focus, .tag-info[href]:hover {
background-color: #31b0d5;
}
.tag-warning {
background-color: #f0ad4e;
}
.tag-warning[href]:focus, .tag-warning[href]:hover {
background-color: #ec971f;
}
.tag-danger {
background-color: #d9534f;
}
.tag-danger[href]:focus, .tag-danger[href]:hover {
background-color: #c9302c;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,577 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* 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.
*/
/* globals VBArray, PDFJS */
'use strict';
// Initializing PDFJS global object here, it case if we need to change/disable
// some PDF.js features, e.g. range requests
if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
// Checking if the typed arrays are supported
// Support: iOS<6.0 (subarray), IE<10, Android<4.0
(function checkTypedArrayCompatibility() {
if (typeof Uint8Array !== 'undefined') {
// Support: iOS<6.0
if (typeof Uint8Array.prototype.subarray === 'undefined') {
Uint8Array.prototype.subarray = function subarray(start, end) {
return new Uint8Array(this.slice(start, end));
};
Float32Array.prototype.subarray = function subarray(start, end) {
return new Float32Array(this.slice(start, end));
};
}
// Support: Android<4.1
if (typeof Float64Array === 'undefined') {
window.Float64Array = Float32Array;
}
return;
}
function subarray(start, end) {
return new TypedArray(this.slice(start, end));
}
function setArrayOffset(array, offset) {
if (arguments.length < 2) {
offset = 0;
}
for (var i = 0, n = array.length; i < n; ++i, ++offset) {
this[offset] = array[i] & 0xFF;
}
}
function TypedArray(arg1) {
var result, i, n;
if (typeof arg1 === 'number') {
result = [];
for (i = 0; i < arg1; ++i) {
result[i] = 0;
}
} else if ('slice' in arg1) {
result = arg1.slice(0);
} else {
result = [];
for (i = 0, n = arg1.length; i < n; ++i) {
result[i] = arg1[i];
}
}
result.subarray = subarray;
result.buffer = result;
result.byteLength = result.length;
result.set = setArrayOffset;
if (typeof arg1 === 'object' && arg1.buffer) {
result.buffer = arg1.buffer;
}
return result;
}
window.Uint8Array = TypedArray;
window.Int8Array = TypedArray;
// we don't need support for set, byteLength for 32-bit array
// so we can use the TypedArray as well
window.Uint32Array = TypedArray;
window.Int32Array = TypedArray;
window.Uint16Array = TypedArray;
window.Float32Array = TypedArray;
window.Float64Array = TypedArray;
})();
// URL = URL || webkitURL
// Support: Safari<7, Android 4.2+
(function normalizeURLObject() {
if (!window.URL) {
window.URL = window.webkitURL;
}
})();
// Object.defineProperty()?
// Support: Android<4.0, Safari<5.1
(function checkObjectDefinePropertyCompatibility() {
if (typeof Object.defineProperty !== 'undefined') {
var definePropertyPossible = true;
try {
// some browsers (e.g. safari) cannot use defineProperty() on DOM objects
// and thus the native version is not sufficient
Object.defineProperty(new Image(), 'id', { value: 'test' });
// ... another test for android gb browser for non-DOM objects
var Test = function Test() {};
Test.prototype = { get id() { } };
Object.defineProperty(new Test(), 'id',
{ value: '', configurable: true, enumerable: true, writable: false });
} catch (e) {
definePropertyPossible = false;
}
if (definePropertyPossible) {
return;
}
}
Object.defineProperty = function objectDefineProperty(obj, name, def) {
delete obj[name];
if ('get' in def) {
obj.__defineGetter__(name, def['get']);
}
if ('set' in def) {
obj.__defineSetter__(name, def['set']);
}
if ('value' in def) {
obj.__defineSetter__(name, function objectDefinePropertySetter(value) {
this.__defineGetter__(name, function objectDefinePropertyGetter() {
return value;
});
return value;
});
obj[name] = def.value;
}
};
})();
// No XMLHttpRequest#response?
// Support: IE<11, Android <4.0
(function checkXMLHttpRequestResponseCompatibility() {
var xhrPrototype = XMLHttpRequest.prototype;
var xhr = new XMLHttpRequest();
if (!('overrideMimeType' in xhr)) {
// IE10 might have response, but not overrideMimeType
// Support: IE10
Object.defineProperty(xhrPrototype, 'overrideMimeType', {
value: function xmlHttpRequestOverrideMimeType(mimeType) {}
});
}
if ('responseType' in xhr) {
return;
}
// The worker will be using XHR, so we can save time and disable worker.
PDFJS.disableWorker = true;
Object.defineProperty(xhrPrototype, 'responseType', {
get: function xmlHttpRequestGetResponseType() {
return this._responseType || 'text';
},
set: function xmlHttpRequestSetResponseType(value) {
if (value === 'text' || value === 'arraybuffer') {
this._responseType = value;
if (value === 'arraybuffer' &&
typeof this.overrideMimeType === 'function') {
this.overrideMimeType('text/plain; charset=x-user-defined');
}
}
}
});
// Support: IE9
if (typeof VBArray !== 'undefined') {
Object.defineProperty(xhrPrototype, 'response', {
get: function xmlHttpRequestResponseGet() {
if (this.responseType === 'arraybuffer') {
return new Uint8Array(new VBArray(this.responseBody).toArray());
} else {
return this.responseText;
}
}
});
return;
}
Object.defineProperty(xhrPrototype, 'response', {
get: function xmlHttpRequestResponseGet() {
if (this.responseType !== 'arraybuffer') {
return this.responseText;
}
var text = this.responseText;
var i, n = text.length;
var result = new Uint8Array(n);
for (i = 0; i < n; ++i) {
result[i] = text.charCodeAt(i) & 0xFF;
}
return result.buffer;
}
});
})();
// window.btoa (base64 encode function) ?
// Support: IE<10
(function checkWindowBtoaCompatibility() {
if ('btoa' in window) {
return;
}
var digits =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
window.btoa = function windowBtoa(chars) {
var buffer = '';
var i, n;
for (i = 0, n = chars.length; i < n; i += 3) {
var b1 = chars.charCodeAt(i) & 0xFF;
var b2 = chars.charCodeAt(i + 1) & 0xFF;
var b3 = chars.charCodeAt(i + 2) & 0xFF;
var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);
var d3 = i + 1 < n ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;
var d4 = i + 2 < n ? (b3 & 0x3F) : 64;
buffer += (digits.charAt(d1) + digits.charAt(d2) +
digits.charAt(d3) + digits.charAt(d4));
}
return buffer;
};
})();
// window.atob (base64 encode function)?
// Support: IE<10
(function checkWindowAtobCompatibility() {
if ('atob' in window) {
return;
}
// https://github.com/davidchambers/Base64.js
var digits =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
window.atob = function (input) {
input = input.replace(/=+$/, '');
if (input.length % 4 === 1) {
throw new Error('bad atob input');
}
for (
// initialize result and counters
var bc = 0, bs, buffer, idx = 0, output = '';
// get next character
buffer = input.charAt(idx++);
// character found in table?
// initialize bit storage and add its ascii value
~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
// and if not first of each 4 characters,
// convert the first 8 bits to one ascii character
bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
) {
// try to find character in table (0-63, not found => -1)
buffer = digits.indexOf(buffer);
}
return output;
};
})();
// Function.prototype.bind?
// Support: Android<4.0, iOS<6.0
(function checkFunctionPrototypeBindCompatibility() {
if (typeof Function.prototype.bind !== 'undefined') {
return;
}
Function.prototype.bind = function functionPrototypeBind(obj) {
var fn = this, headArgs = Array.prototype.slice.call(arguments, 1);
var bound = function functionPrototypeBindBound() {
var args = headArgs.concat(Array.prototype.slice.call(arguments));
return fn.apply(obj, args);
};
return bound;
};
})();
// HTMLElement dataset property
// Support: IE<11, Safari<5.1, Android<4.0
(function checkDatasetProperty() {
var div = document.createElement('div');
if ('dataset' in div) {
return; // dataset property exists
}
Object.defineProperty(HTMLElement.prototype, 'dataset', {
get: function() {
if (this._dataset) {
return this._dataset;
}
var dataset = {};
for (var j = 0, jj = this.attributes.length; j < jj; j++) {
var attribute = this.attributes[j];
if (attribute.name.substring(0, 5) !== 'data-') {
continue;
}
var key = attribute.name.substring(5).replace(/\-([a-z])/g,
function(all, ch) {
return ch.toUpperCase();
});
dataset[key] = attribute.value;
}
Object.defineProperty(this, '_dataset', {
value: dataset,
writable: false,
enumerable: false
});
return dataset;
},
enumerable: true
});
})();
// HTMLElement classList property
// Support: IE<10, Android<4.0, iOS<5.0
(function checkClassListProperty() {
var div = document.createElement('div');
if ('classList' in div) {
return; // classList property exists
}
function changeList(element, itemName, add, remove) {
var s = element.className || '';
var list = s.split(/\s+/g);
if (list[0] === '') {
list.shift();
}
var index = list.indexOf(itemName);
if (index < 0 && add) {
list.push(itemName);
}
if (index >= 0 && remove) {
list.splice(index, 1);
}
element.className = list.join(' ');
return (index >= 0);
}
var classListPrototype = {
add: function(name) {
changeList(this.element, name, true, false);
},
contains: function(name) {
return changeList(this.element, name, false, false);
},
remove: function(name) {
changeList(this.element, name, false, true);
},
toggle: function(name) {
changeList(this.element, name, true, true);
}
};
Object.defineProperty(HTMLElement.prototype, 'classList', {
get: function() {
if (this._classList) {
return this._classList;
}
var classList = Object.create(classListPrototype, {
element: {
value: this,
writable: false,
enumerable: true
}
});
Object.defineProperty(this, '_classList', {
value: classList,
writable: false,
enumerable: false
});
return classList;
},
enumerable: true
});
})();
// Check console compatibility
// In older IE versions the console object is not available
// unless console is open.
// Support: IE<10
(function checkConsoleCompatibility() {
if (!('console' in window)) {
window.console = {
log: function() {},
error: function() {},
warn: function() {}
};
} else if (!('bind' in console.log)) {
// native functions in IE9 might not have bind
console.log = (function(fn) {
return function(msg) { return fn(msg); };
})(console.log);
console.error = (function(fn) {
return function(msg) { return fn(msg); };
})(console.error);
console.warn = (function(fn) {
return function(msg) { return fn(msg); };
})(console.warn);
}
})();
// Check onclick compatibility in Opera
// Support: Opera<15
(function checkOnClickCompatibility() {
// workaround for reported Opera bug DSK-354448:
// onclick fires on disabled buttons with opaque content
function ignoreIfTargetDisabled(event) {
if (isDisabled(event.target)) {
event.stopPropagation();
}
}
function isDisabled(node) {
return node.disabled || (node.parentNode && isDisabled(node.parentNode));
}
if (navigator.userAgent.indexOf('Opera') !== -1) {
// use browser detection since we cannot feature-check this bug
document.addEventListener('click', ignoreIfTargetDisabled, true);
}
})();
// Checks if possible to use URL.createObjectURL()
// Support: IE
(function checkOnBlobSupport() {
// sometimes IE loosing the data created with createObjectURL(), see #3977
if (navigator.userAgent.indexOf('Trident') >= 0) {
PDFJS.disableCreateObjectURL = true;
}
})();
// Checks if navigator.language is supported
(function checkNavigatorLanguage() {
if ('language' in navigator) {
return;
}
PDFJS.locale = navigator.userLanguage || 'en-US';
})();
(function checkRangeRequests() {
// Safari has issues with cached range requests see:
// https://github.com/mozilla/pdf.js/issues/3260
// Last tested with version 6.0.4.
// Support: Safari 6.0+
var isSafari = Object.prototype.toString.call(
window.HTMLElement).indexOf('Constructor') > 0;
// Older versions of Android (pre 3.0) has issues with range requests, see:
// https://github.com/mozilla/pdf.js/issues/3381.
// Make sure that we only match webkit-based Android browsers,
// since Firefox/Fennec works as expected.
// Support: Android<3.0
var regex = /Android\s[0-2][^\d]/;
var isOldAndroid = regex.test(navigator.userAgent);
// Range requests are broken in Chrome 39 and 40, https://crbug.com/442318
var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(navigator.userAgent);
if (isSafari || isOldAndroid || isChromeWithRangeBug) {
PDFJS.disableRange = true;
PDFJS.disableStream = true;
}
})();
// Check if the browser supports manipulation of the history.
// Support: IE<10, Android<4.2
(function checkHistoryManipulation() {
// Android 2.x has so buggy pushState support that it was removed in
// Android 3.0 and restored as late as in Android 4.2.
// Support: Android 2.x
if (!history.pushState || navigator.userAgent.indexOf('Android 2.') >= 0) {
PDFJS.disableHistory = true;
}
})();
// Support: IE<11, Chrome<21, Android<4.4, Safari<6
(function checkSetPresenceInImageData() {
// IE < 11 will use window.CanvasPixelArray which lacks set function.
if (window.CanvasPixelArray) {
if (typeof window.CanvasPixelArray.prototype.set !== 'function') {
window.CanvasPixelArray.prototype.set = function(arr) {
for (var i = 0, ii = this.length; i < ii; i++) {
this[i] = arr[i];
}
};
}
} else {
// Old Chrome and Android use an inaccessible CanvasPixelArray prototype.
// Because we cannot feature detect it, we rely on user agent parsing.
var polyfill = false, versionMatch;
if (navigator.userAgent.indexOf('Chrom') >= 0) {
versionMatch = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
// Chrome < 21 lacks the set function.
polyfill = versionMatch && parseInt(versionMatch[2]) < 21;
} else if (navigator.userAgent.indexOf('Android') >= 0) {
// Android < 4.4 lacks the set function.
// Android >= 4.4 will contain Chrome in the user agent,
// thus pass the Chrome check above and not reach this block.
polyfill = /Android\s[0-4][^\d]/g.test(navigator.userAgent);
} else if (navigator.userAgent.indexOf('Safari') >= 0) {
versionMatch = navigator.userAgent.
match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//);
// Safari < 6 lacks the set function.
polyfill = versionMatch && parseInt(versionMatch[1]) < 6;
}
if (polyfill) {
var contextPrototype = window.CanvasRenderingContext2D.prototype;
contextPrototype._createImageData = contextPrototype.createImageData;
contextPrototype.createImageData = function(w, h) {
var imageData = this._createImageData(w, h);
imageData.data.set = function(arr) {
for (var i = 0, ii = this.length; i < ii; i++) {
this[i] = arr[i];
}
};
return imageData;
};
}
}
})();
// Support: IE<10, Android<4.0, iOS
(function checkRequestAnimationFrame() {
function fakeRequestAnimationFrame(callback) {
window.setTimeout(callback, 20);
}
var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);
if (isIOS) {
// requestAnimationFrame on iOS is broken, replacing with fake one.
window.requestAnimationFrame = fakeRequestAnimationFrame;
return;
}
if ('requestAnimationFrame' in window) {
return;
}
window.requestAnimationFrame =
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
fakeRequestAnimationFrame;
})();
(function checkCanvasSizeLimitation() {
var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);
var isAndroid = /Android/g.test(navigator.userAgent);
if (isIOS || isAndroid) {
// 5MP
PDFJS.maxCanvasPixels = 5242880;
}
})();
// Disable fullscreen support for certain problematic configurations.
// Support: IE11+ (when embedded).
(function checkFullscreenSupport() {
var isEmbeddedIE = (navigator.userAgent.indexOf('Trident') >= 0 &&
window.parent !== window);
if (isEmbeddedIE) {
PDFJS.disableFullscreen = true;
}
})();
+27
View File
@@ -0,0 +1,27 @@
/* 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;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
var /**@const{!string}*/pdfjs_version = "v1.1.114";
@@ -0,0 +1,419 @@
/* -*- 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.
*/
/* globals CustomStyle, PDFJS */
'use strict';
var MAX_TEXT_DIVS_TO_RENDER = 100000;
var NonWhitespaceRegexp = /\S/;
function isAllWhitespace(str) {
return !NonWhitespaceRegexp.test(str);
}
/**
* @typedef {Object} TextLayerBuilderOptions
* @property {HTMLDivElement} textLayerDiv - The text layer container.
* @property {number} pageIndex - The page index.
* @property {PageViewport} viewport - The viewport of the text layer.
* @property {PDFFindController} findController
*/
/**
* TextLayerBuilder provides text-selection functionality for the PDF.
* It does this by creating overlay divs over the PDF text. These divs
* contain text that matches the PDF text they are overlaying. This object
* also provides a way to highlight text that is being searched for.
* @class
*/
var TextLayerBuilder = (function TextLayerBuilderClosure() {
function TextLayerBuilder(options) {
this.textLayerDiv = options.textLayerDiv;
this.renderingDone = false;
this.divContentDone = false;
this.pageIdx = options.pageIndex;
this.pageNumber = this.pageIdx + 1;
this.matches = [];
this.viewport = options.viewport;
this.textDivs = [];
this.findController = options.findController || null;
}
TextLayerBuilder.prototype = {
_finishRendering: function TextLayerBuilder_finishRendering() {
this.renderingDone = true;
var event = document.createEvent('CustomEvent');
event.initCustomEvent('textlayerrendered', true, true, {
pageNumber: this.pageNumber
});
this.textLayerDiv.dispatchEvent(event);
},
renderLayer: function TextLayerBuilder_renderLayer() {
var textLayerFrag = document.createDocumentFragment();
var textDivs = this.textDivs;
var textDivsLength = textDivs.length;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
// No point in rendering many divs as it would make the browser
// unusable even after the divs are rendered.
if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) {
this._finishRendering();
return;
}
var lastFontSize;
var lastFontFamily;
for (var i = 0; i < textDivsLength; i++) {
var textDiv = textDivs[i];
if (textDiv.dataset.isWhitespace !== undefined) {
continue;
}
var fontSize = textDiv.style.fontSize;
var fontFamily = textDiv.style.fontFamily;
// Only build font string and set to context if different from last.
if (fontSize !== lastFontSize || fontFamily !== lastFontFamily) {
ctx.font = fontSize + ' ' + fontFamily;
lastFontSize = fontSize;
lastFontFamily = fontFamily;
}
var width = ctx.measureText(textDiv.textContent).width;
if (width > 0) {
textLayerFrag.appendChild(textDiv);
var transform;
if (textDiv.dataset.canvasWidth !== undefined) {
// Dataset values come of type string.
var textScale = textDiv.dataset.canvasWidth / width;
transform = 'scaleX(' + textScale + ')';
} else {
transform = '';
}
var rotation = textDiv.dataset.angle;
if (rotation) {
transform = 'rotate(' + rotation + 'deg) ' + transform;
}
if (transform) {
CustomStyle.setProp('transform' , textDiv, transform);
}
}
}
this.textLayerDiv.appendChild(textLayerFrag);
this._finishRendering();
this.updateMatches();
},
/**
* Renders the text layer.
* @param {number} timeout (optional) if specified, the rendering waits
* for specified amount of ms.
*/
render: function TextLayerBuilder_render(timeout) {
if (!this.divContentDone || this.renderingDone) {
return;
}
if (this.renderTimer) {
clearTimeout(this.renderTimer);
this.renderTimer = null;
}
if (!timeout) { // Render right away
this.renderLayer();
} else { // Schedule
var self = this;
this.renderTimer = setTimeout(function() {
self.renderLayer();
self.renderTimer = null;
}, timeout);
}
},
appendText: function TextLayerBuilder_appendText(geom, styles) {
var style = styles[geom.fontName];
var textDiv = document.createElement('div');
this.textDivs.push(textDiv);
if (isAllWhitespace(geom.str)) {
textDiv.dataset.isWhitespace = true;
return;
}
var tx = PDFJS.Util.transform(this.viewport.transform, geom.transform);
var angle = Math.atan2(tx[1], tx[0]);
if (style.vertical) {
angle += Math.PI / 2;
}
var fontHeight = Math.sqrt((tx[2] * tx[2]) + (tx[3] * tx[3]));
var fontAscent = fontHeight;
if (style.ascent) {
fontAscent = style.ascent * fontAscent;
} else if (style.descent) {
fontAscent = (1 + style.descent) * fontAscent;
}
var left;
var top;
if (angle === 0) {
left = tx[4];
top = tx[5] - fontAscent;
} else {
left = tx[4] + (fontAscent * Math.sin(angle));
top = tx[5] - (fontAscent * Math.cos(angle));
}
textDiv.style.left = left + 'px';
textDiv.style.top = top + 'px';
textDiv.style.fontSize = fontHeight + 'px';
textDiv.style.fontFamily = style.fontFamily;
textDiv.textContent = geom.str;
// |fontName| is only used by the Font Inspector. This test will succeed
// when e.g. the Font Inspector is off but the Stepper is on, but it's
// not worth the effort to do a more accurate test.
if (PDFJS.pdfBug) {
textDiv.dataset.fontName = geom.fontName;
}
// Storing into dataset will convert number into string.
if (angle !== 0) {
textDiv.dataset.angle = angle * (180 / Math.PI);
}
// We don't bother scaling single-char text divs, because it has very
// little effect on text highlighting. This makes scrolling on docs with
// lots of such divs a lot faster.
if (textDiv.textContent.length > 1) {
if (style.vertical) {
textDiv.dataset.canvasWidth = geom.height * this.viewport.scale;
} else {
textDiv.dataset.canvasWidth = geom.width * this.viewport.scale;
}
}
},
setTextContent: function TextLayerBuilder_setTextContent(textContent) {
this.textContent = textContent;
var textItems = textContent.items;
for (var i = 0, len = textItems.length; i < len; i++) {
this.appendText(textItems[i], textContent.styles);
}
this.divContentDone = true;
},
convertMatches: function TextLayerBuilder_convertMatches(matches) {
var i = 0;
var iIndex = 0;
var bidiTexts = this.textContent.items;
var end = bidiTexts.length - 1;
var queryLen = (this.findController === null ?
0 : this.findController.state.query.length);
var ret = [];
for (var m = 0, len = matches.length; m < len; m++) {
// Calculate the start position.
var matchIdx = matches[m];
// Loop over the divIdxs.
while (i !== end && matchIdx >= (iIndex + bidiTexts[i].str.length)) {
iIndex += bidiTexts[i].str.length;
i++;
}
if (i === bidiTexts.length) {
console.error('Could not find a matching mapping');
}
var match = {
begin: {
divIdx: i,
offset: matchIdx - iIndex
}
};
// Calculate the end position.
matchIdx += queryLen;
// Somewhat the same array as above, but use > instead of >= to get
// the end position right.
while (i !== end && matchIdx > (iIndex + bidiTexts[i].str.length)) {
iIndex += bidiTexts[i].str.length;
i++;
}
match.end = {
divIdx: i,
offset: matchIdx - iIndex
};
ret.push(match);
}
return ret;
},
renderMatches: function TextLayerBuilder_renderMatches(matches) {
// Early exit if there is nothing to render.
if (matches.length === 0) {
return;
}
var bidiTexts = this.textContent.items;
var textDivs = this.textDivs;
var prevEnd = null;
var pageIdx = this.pageIdx;
var isSelectedPage = (this.findController === null ?
false : (pageIdx === this.findController.selected.pageIdx));
var selectedMatchIdx = (this.findController === null ?
-1 : this.findController.selected.matchIdx);
var highlightAll = (this.findController === null ?
false : this.findController.state.highlightAll);
var infinity = {
divIdx: -1,
offset: undefined
};
function beginText(begin, className) {
var divIdx = begin.divIdx;
textDivs[divIdx].textContent = '';
appendTextToDiv(divIdx, 0, begin.offset, className);
}
function appendTextToDiv(divIdx, fromOffset, toOffset, className) {
var div = textDivs[divIdx];
var content = bidiTexts[divIdx].str.substring(fromOffset, toOffset);
var node = document.createTextNode(content);
if (className) {
var span = document.createElement('span');
span.className = className;
span.appendChild(node);
div.appendChild(span);
return;
}
div.appendChild(node);
}
var i0 = selectedMatchIdx, i1 = i0 + 1;
if (highlightAll) {
i0 = 0;
i1 = matches.length;
} else if (!isSelectedPage) {
// Not highlighting all and this isn't the selected page, so do nothing.
return;
}
for (var i = i0; i < i1; i++) {
var match = matches[i];
var begin = match.begin;
var end = match.end;
var isSelected = (isSelectedPage && i === selectedMatchIdx);
var highlightSuffix = (isSelected ? ' selected' : '');
if (this.findController) {
this.findController.updateMatchPosition(pageIdx, i, textDivs,
begin.divIdx, end.divIdx);
}
// Match inside new div.
if (!prevEnd || begin.divIdx !== prevEnd.divIdx) {
// If there was a previous div, then add the text at the end.
if (prevEnd !== null) {
appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset);
}
// Clear the divs and set the content until the starting point.
beginText(begin);
} else {
appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset);
}
if (begin.divIdx === end.divIdx) {
appendTextToDiv(begin.divIdx, begin.offset, end.offset,
'highlight' + highlightSuffix);
} else {
appendTextToDiv(begin.divIdx, begin.offset, infinity.offset,
'highlight begin' + highlightSuffix);
for (var n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) {
textDivs[n0].className = 'highlight middle' + highlightSuffix;
}
beginText(end, 'highlight end' + highlightSuffix);
}
prevEnd = end;
}
if (prevEnd) {
appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset);
}
},
updateMatches: function TextLayerBuilder_updateMatches() {
// Only show matches when all rendering is done.
if (!this.renderingDone) {
return;
}
// Clear all matches.
var matches = this.matches;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.items;
var clearedUntilDivIdx = -1;
// Clear all current matches.
for (var i = 0, len = matches.length; i < len; i++) {
var match = matches[i];
var begin = Math.max(clearedUntilDivIdx, match.begin.divIdx);
for (var n = begin, end = match.end.divIdx; n <= end; n++) {
var div = textDivs[n];
div.textContent = bidiTexts[n].str;
div.className = '';
}
clearedUntilDivIdx = match.end.divIdx + 1;
}
if (this.findController === null || !this.findController.active) {
return;
}
// Convert the matches on the page controller into the match format
// used for the textLayer.
this.matches = this.convertMatches(this.findController === null ?
[] : (this.findController.pageMatches[this.pageIdx] || []));
this.renderMatches(this.matches);
}
};
return TextLayerBuilder;
})();
/**
* @constructor
* @implements IPDFTextLayerFactory
*/
function DefaultTextLayerFactory() {}
DefaultTextLayerFactory.prototype = {
/**
* @param {HTMLDivElement} textLayerDiv
* @param {number} pageIndex
* @param {PageViewport} viewport
* @returns {TextLayerBuilder}
*/
createTextLayerBuilder: function (textLayerDiv, pageIndex, viewport) {
return new TextLayerBuilder({
textLayerDiv: textLayerDiv,
pageIndex: pageIndex,
viewport: viewport
});
}
};
@@ -0,0 +1,394 @@
/* -*- 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';
var CSS_UNITS = 96.0 / 72.0;
var DEFAULT_SCALE = 'auto';
var UNKNOWN_SCALE = 0;
var MAX_AUTO_SCALE = 1.25;
var SCROLLBAR_PADDING = 40;
var VERTICAL_PADDING = 5;
// optimised CSS custom property getter/setter
var CustomStyle = (function CustomStyleClosure() {
// As noted on: http://www.zachstronaut.com/posts/2009/02/17/
// animate-css-transforms-firefox-webkit.html
// in some versions of IE9 it is critical that ms appear in this list
// before Moz
var prefixes = ['ms', 'Moz', 'Webkit', 'O'];
var _cache = {};
function CustomStyle() {}
CustomStyle.getProp = function get(propName, element) {
// check cache only when no element is given
if (arguments.length === 1 && typeof _cache[propName] === 'string') {
return _cache[propName];
}
element = element || document.documentElement;
var style = element.style, prefixed, uPropName;
// test standard property first
if (typeof style[propName] === 'string') {
return (_cache[propName] = propName);
}
// capitalize
uPropName = propName.charAt(0).toUpperCase() + propName.slice(1);
// test vendor specific properties
for (var i = 0, l = prefixes.length; i < l; i++) {
prefixed = prefixes[i] + uPropName;
if (typeof style[prefixed] === 'string') {
return (_cache[propName] = prefixed);
}
}
//if all fails then set to undefined
return (_cache[propName] = 'undefined');
};
CustomStyle.setProp = function set(propName, element, str) {
var prop = this.getProp(propName);
if (prop !== 'undefined') {
element.style[prop] = str;
}
};
return CustomStyle;
})();
function getFileName(url) {
var anchor = url.indexOf('#');
var query = url.indexOf('?');
var end = Math.min(
anchor > 0 ? anchor : url.length,
query > 0 ? query : url.length);
return url.substring(url.lastIndexOf('/', end) + 1, end);
}
/**
* Returns scale factor for the canvas. It makes sense for the HiDPI displays.
* @return {Object} The object with horizontal (sx) and vertical (sy)
scales. The scaled property is set to false if scaling is
not required, true otherwise.
*/
function getOutputScale(ctx) {
var devicePixelRatio = window.devicePixelRatio || 1;
var backingStoreRatio = ctx.webkitBackingStorePixelRatio ||
ctx.mozBackingStorePixelRatio ||
ctx.msBackingStorePixelRatio ||
ctx.oBackingStorePixelRatio ||
ctx.backingStorePixelRatio || 1;
var pixelRatio = devicePixelRatio / backingStoreRatio;
return {
sx: pixelRatio,
sy: pixelRatio,
scaled: pixelRatio !== 1
};
}
/**
* Scrolls specified element into view of its parent.
* element {Object} The element to be visible.
* spot {Object} An object with optional top and left properties,
* specifying the offset from the top left edge.
*/
function scrollIntoView(element, spot) {
// Assuming offsetParent is available (it's not available when viewer is in
// hidden iframe or object). We have to scroll: if the offsetParent is not set
// producing the error. See also animationStartedClosure.
var parent = element.offsetParent;
var offsetY = element.offsetTop + element.clientTop;
var offsetX = element.offsetLeft + element.clientLeft;
if (!parent) {
console.error('offsetParent is not set -- cannot scroll');
return;
}
while (parent.clientHeight === parent.scrollHeight) {
if (parent.dataset._scaleY) {
offsetY /= parent.dataset._scaleY;
offsetX /= parent.dataset._scaleX;
}
offsetY += parent.offsetTop;
offsetX += parent.offsetLeft;
parent = parent.offsetParent;
if (!parent) {
return; // no need to scroll
}
}
if (spot) {
if (spot.top !== undefined) {
offsetY += spot.top;
}
if (spot.left !== undefined) {
offsetX += spot.left;
parent.scrollLeft = offsetX;
}
}
parent.scrollTop = offsetY;
}
/**
* Helper function to start monitoring the scroll event and converting them into
* PDF.js friendly one: with scroll debounce and scroll direction.
*/
function watchScroll(viewAreaElement, callback) {
var debounceScroll = function debounceScroll(evt) {
if (rAF) {
return;
}
// schedule an invocation of scroll for next animation frame.
rAF = window.requestAnimationFrame(function viewAreaElementScrolled() {
rAF = null;
var currentY = viewAreaElement.scrollTop;
var lastY = state.lastY;
if (currentY !== lastY) {
state.down = currentY > lastY;
}
state.lastY = currentY;
callback(state);
});
};
var state = {
down: true,
lastY: viewAreaElement.scrollTop,
_eventHandler: debounceScroll
};
var rAF = null;
viewAreaElement.addEventListener('scroll', debounceScroll, true);
return state;
}
/**
* Use binary search to find the index of the first item in a given array which
* passes a given condition. The items are expected to be sorted in the sense
* that if the condition is true for one item in the array, then it is also true
* for all following items.
*
* @returns {Number} Index of the first array element to pass the test,
* or |items.length| if no such element exists.
*/
function binarySearchFirstItem(items, condition) {
var minIndex = 0;
var maxIndex = items.length - 1;
if (items.length === 0 || !condition(items[maxIndex])) {
return items.length;
}
if (condition(items[minIndex])) {
return minIndex;
}
while (minIndex < maxIndex) {
var currentIndex = (minIndex + maxIndex) >> 1;
var currentItem = items[currentIndex];
if (condition(currentItem)) {
maxIndex = currentIndex;
} else {
minIndex = currentIndex + 1;
}
}
return minIndex; /* === maxIndex */
}
/**
* Generic helper to find out what elements are visible within a scroll pane.
*/
function getVisibleElements(scrollEl, views, sortByVisibility) {
var top = scrollEl.scrollTop, bottom = top + scrollEl.clientHeight;
var left = scrollEl.scrollLeft, right = left + scrollEl.clientWidth;
function isElementBottomBelowViewTop(view) {
var element = view.div;
var elementBottom =
element.offsetTop + element.clientTop + element.clientHeight;
return elementBottom > top;
}
var visible = [], view, element;
var currentHeight, viewHeight, hiddenHeight, percentHeight;
var currentWidth, viewWidth;
var firstVisibleElementInd = (views.length === 0) ? 0 :
binarySearchFirstItem(views, isElementBottomBelowViewTop);
for (var i = firstVisibleElementInd, ii = views.length; i < ii; i++) {
view = views[i];
element = view.div;
currentHeight = element.offsetTop + element.clientTop;
viewHeight = element.clientHeight;
if (currentHeight > bottom) {
break;
}
currentWidth = element.offsetLeft + element.clientLeft;
viewWidth = element.clientWidth;
if (currentWidth + viewWidth < left || currentWidth > right) {
continue;
}
hiddenHeight = Math.max(0, top - currentHeight) +
Math.max(0, currentHeight + viewHeight - bottom);
percentHeight = ((viewHeight - hiddenHeight) * 100 / viewHeight) | 0;
visible.push({
id: view.id,
x: currentWidth,
y: currentHeight,
view: view,
percent: percentHeight
});
}
var first = visible[0];
var last = visible[visible.length - 1];
if (sortByVisibility) {
visible.sort(function(a, b) {
var pc = a.percent - b.percent;
if (Math.abs(pc) > 0.001) {
return -pc;
}
return a.id - b.id; // ensure stability
});
}
return {first: first, last: last, views: visible};
}
/**
* Event handler to suppress context menu.
*/
function noContextMenuHandler(e) {
e.preventDefault();
}
/**
* Returns the filename or guessed filename from the url (see issue 3455).
* url {String} The original PDF location.
* @return {String} Guessed PDF file name.
*/
function getPDFFileNameFromURL(url) {
var reURI = /^(?:([^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/;
// SCHEME HOST 1.PATH 2.QUERY 3.REF
// Pattern to get last matching NAME.pdf
var reFilename = /[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i;
var splitURI = reURI.exec(url);
var suggestedFilename = reFilename.exec(splitURI[1]) ||
reFilename.exec(splitURI[2]) ||
reFilename.exec(splitURI[3]);
if (suggestedFilename) {
suggestedFilename = suggestedFilename[0];
if (suggestedFilename.indexOf('%') !== -1) {
// URL-encoded %2Fpath%2Fto%2Ffile.pdf should be file.pdf
try {
suggestedFilename =
reFilename.exec(decodeURIComponent(suggestedFilename))[0];
} catch(e) { // Possible (extremely rare) errors:
// URIError "Malformed URI", e.g. for "%AA.pdf"
// TypeError "null has no properties", e.g. for "%2F.pdf"
}
}
}
return suggestedFilename || 'document.pdf';
}
var ProgressBar = (function ProgressBarClosure() {
function clamp(v, min, max) {
return Math.min(Math.max(v, min), max);
}
function ProgressBar(id, opts) {
this.visible = true;
// Fetch the sub-elements for later.
this.div = document.querySelector(id + ' .progress');
// Get the loading bar element, so it can be resized to fit the viewer.
this.bar = this.div.parentNode;
// Get options, with sensible defaults.
this.height = opts.height || 100;
this.width = opts.width || 100;
this.units = opts.units || '%';
// Initialize heights.
this.div.style.height = this.height + this.units;
this.percent = 0;
}
ProgressBar.prototype = {
updateBar: function ProgressBar_updateBar() {
if (this._indeterminate) {
this.div.classList.add('indeterminate');
this.div.style.width = this.width + this.units;
return;
}
this.div.classList.remove('indeterminate');
var progressSize = this.width * this._percent / 100;
this.div.style.width = progressSize + this.units;
},
get percent() {
return this._percent;
},
set percent(val) {
this._indeterminate = isNaN(val);
this._percent = clamp(val, 0, 100);
this.updateBar();
},
setWidth: function ProgressBar_setWidth(viewer) {
if (viewer) {
var container = viewer.parentNode;
var scrollbarWidth = container.offsetWidth - viewer.offsetWidth;
if (scrollbarWidth > 0) {
this.bar.setAttribute('style', 'width: calc(100% - ' +
scrollbarWidth + 'px);');
}
}
},
hide: function ProgressBar_hide() {
if (!this.visible) {
return;
}
this.visible = false;
this.bar.classList.add('hidden');
document.body.classList.remove('loadingInProgress');
},
show: function ProgressBar_show() {
if (this.visible) {
return;
}
this.visible = true;
document.body.classList.add('loadingInProgress');
this.bar.classList.remove('hidden');
}
};
return ProgressBar;
})();
File diff suppressed because one or more lines are too long
+3
View File
@@ -3,9 +3,11 @@ return [
"assignWidget" => "Přiřadil widget :widgetName (#:widgetId) do plochy :widgetAreaName (#:widgetAreaId)",
"changeSettings" => "Změna nastavení",
"createNewContent" => "Vytvořena nová obsahová stránka. Titulek <strong>:title</strong>, url :url a ID #:id",
"createUser" => "Vytvořen nový uživatel :name s e-mailem :email.",
"deleteContent" => 'Smazána stránka ":title", url "url a ID #:id. Tato změna je zaznamenána v revizi :revision.',
"deleteCustomField" => "a",
"deleteWidgetArea" => "Smazal plochu pro widget :name",
"displayingUsersActions" => "Zobrazuji všechny akce od uživatele :name (:email).",
"draftFromContent" => "Upraven widget :name (#:id)",
"editContent" => 'Editace stránky - nový titulek je ":title", url :url a ID #:id. Revize změny: :revision.',
"editCustomField" => "a",
@@ -18,6 +20,7 @@ return [
"nameAssignWidget" => "Přiřazení widgetu",
"nameChangeSettings" => "Změna nastavení",
"nameCreateNewContent" => "Vytvoření nové stránky",
"nameCreateUser" => "Vytvořen uživatel",
"nameDeleteContent" => "Smazání stránky",
"nameDeleteCustomField" => "Smazání uživatelského pole",
"nameDeleteWidgetArea" => "Smazání plochy pro widgety",
+2
View File
@@ -8,6 +8,7 @@ return [
"content" => "Obsah stránky",
"createdAt" => "Vytvořeno",
"deletePage" => "Smazat",
"deleteTitlePhoto" => "Smazat titulní obrázek",
"edit" => "Editace :name",
"editPlain" => "Editace",
"field_meta_description" => "Popis stránky",
@@ -21,6 +22,7 @@ return [
"homepageSetup" => "Domovská stránka úspěšně nastavena.",
"invalidPage" => "Požadovaná stránka neexistuje.",
"invalidStatus" => "Nelze změnit stav stránky na něco nedefinovaného.",
"invalidTemplateSelected" => "Není zvolena šablona pro vykreslení stránky! Stránka nebude pro návštěvníky vykreslena!",
"lockUrl" => "Zachovat URL?",
"makeDraft" => "Převést na koncept",
"makeProtected" => "Zobrazit jen pro přihlášené",
+38 -37
View File
@@ -1,41 +1,42 @@
<?php
return [
"createSubdirectoryFor" => "Vytvořit podadresář v :directory.",
"createdAt" => "Nahráno",
"description" => "Popis souboru",
"directories" => "Podadresáře v adresáři :directory",
"directoryDescription" => "Popis",
"directoryHidden" => "Skrytý adresář",
"directoryName" => "Jméno adresáře",
"edit" => "Upravit soubor :name",
"editButton" => "Upravit",
"editDirectory" => "Upravit adresář",
"editDirectorySuccess" => "Úspěšně uloženo",
"encoding" => "Kódování",
"fileDeleted" => "Soubor smazán",
"fileInfo" => "Informace",
"fileSize" => "Velikost",
"hash" => "Hash",
"invalidFile" => "Nahrávaný soubor nelze nahrát, z nějakého důvodu není validní.",
"keywords" => "Klíčová slova (oddělena čárkou)",
"mime" => "MIME typ",
"name" => "Jméno",
"newDirectory" => "Vytvořit nový adresář",
"newDirectorySuccess" => "Nový adresář úspěšně vytvořen",
"newFile" => "Nový soubor",
"noFileSpecified" => "Nebyl zvolen žádný soubor k nahrávání",
"noFiles" => "Žádný soubor nebyl nalezen",
"noSubdirectories" => "Žádné podadresáře",
"originalFilename" => "Původní jméno",
"overview" => "Seznam všech souborů",
"parentDirectory" => "Rodičovský adresář",
"resolution" => "Rozlišení",
"rootDirectories" => "Kořenové adresáře",
"selectFile" => "Vybrat soubor",
"subdirectoryExists" => "Adresář s tímto jménem tu již eixstuje",
"successfullyChanged" => "Úspěšně uloženo",
"updatedAt" => "Poslední změna",
"upload" => "Nahrát nový soubor",
"uploadSuccessfull" => "Soubor úspěšně nahrán|:count soubory úspěšně nahrány|:count souborů úspěšně nahráno",
"url" => "Veřejná URL",
"createdAt" => "Nahráno",
"delete" => "Smazat",
"description" => "Popis souboru",
"directories" => "Podadresáře v adresáři :directory",
"directoryDescription" => "Popis",
"directoryHidden" => "Skrytý adresář",
"directoryName" => "Jméno adresáře",
"edit" => "Upravit soubor :name",
"editButton" => "Upravit",
"editDirectory" => "Upravit adresář",
"editDirectorySuccess" => "Úspěšně uloženo",
"encoding" => "Kódování",
"fileDeleted" => "Soubor smazán",
"fileInfo" => "Informace",
"fileSize" => "Velikost",
"hash" => "Hash",
"invalidFile" => "Nahrávaný soubor nelze nahrát, z nějakého důvodu není validní.",
"keywords" => "Klíčová slova (oddělena čárkou)",
"mime" => "MIME typ",
"name" => "Jméno",
"newDirectory" => "Vytvořit nový adresář",
"newDirectorySuccess" => "Nový adresář úspěšně vytvořen",
"newFile" => "Nový soubor",
"noFileSpecified" => "Nebyl zvolen žádný soubor k nahrávání",
"noFiles" => "Žádný soubor nebyl nalezen",
"noSubdirectories" => "Žádné podadresáře",
"originalFilename" => "Původní jméno",
"overview" => "Seznam všech souborů",
"parentDirectory" => "Rodičovský adresář",
"resolution" => "Rozlišení",
"rootDirectories" => "Kořenové adresáře",
"selectFile" => "Vybrat soubor",
"subdirectoryExists" => "Adresář s tímto jménem tu již eixstuje",
"successfullyChanged" => "Úspěšně uloženo",
"updatedAt" => "Poslední změna",
"upload" => "Nahrát nový soubor",
"uploadSuccessfull" => "Soubor úspěšně nahrán|:count soubory úspěšně nahrány|:count souborů úspěšně nahráno",
"url" => "Veřejná URL",
];
+26 -26
View File
@@ -1,30 +1,30 @@
<?php
return [
"actionLog" => "Záznam událostí",
"assignWidgets" => "Přidat widget",
"contentPageOverview" => "Přehled",
"contentPages" => "Stránky",
"customFields" => "Uživatelská pole",
"customFieldsNew" => "Nové pole",
"actionLog" => "Záznam událostí",
"assignWidgets" => "Přidat widget",
"contentPageOverview" => "Přehled",
"contentPages" => "Stránky",
"customFields" => "Uživatelská pole",
"customFieldsNew" => "Nové pole",
"customFieldsOverview" => "Přehled",
"dashboard" => "Nástěnka",
"directories" => "Adresáře",
"fileManager" => "Správce souborů",
"newContentPage" => "Nová stránka",
"newUser" => "Nový uživatel",
"newWidget" => "Nový widget",
"newWidgetArea" => "Nová plocha",
"settings" => "Nastavení",
"system" => "Systém",
"templates" => "Šablony",
"uploadFile" => "Nový soubor",
"uploadImage" => "Nový obrázek",
"uploadedFiles" => "Přehled",
"userDetail" => "Můj profil",
"userManagement" => "Uživatelé",
"usersOverview" => "Přehled",
"widgetAreaOverview" => "Seznam všech ploch pro widgety",
"widgetAreas" => "Plochy pro widgety",
"widgets" => "Widgety",
"widgetsOverview" => "Všechny widgety",
"dashboard" => "Nástěnka",
"directories" => "Adresáře",
"fileManager" => "Správce souborů",
"newContentPage" => "Nová stránka",
"newUser" => "Nový uživatel",
"newWidget" => "Nový widget",
"newWidgetArea" => "Nová plocha",
"settings" => "Nastavení",
"system" => "Systém",
"templates" => "Šablony",
"uploadFile" => "Nový soubor",
"uploadImage" => "Nový obrázek",
"uploadedFiles" => "Přehled",
"userDetail" => "Můj profil",
"userManagement" => "Uživatelé",
"usersOverview" => "Přehled",
"widgetAreaOverview" => "Všechny plochy",
"widgetAreas" => "Plochy pro widgety",
"widgets" => "Widgety",
"widgetsOverview" => "Všechny widgety",
];
@@ -7,6 +7,7 @@ return [
"editUser" => "Editace uživatele :name (:email)",
"email" => "E-mail",
"gravatarLink" => 'Nastavte si avatar na <a href="http://gravatar.com">gravatar.com</a>',
"moreUserActions" => "Zobrazit více...",
"name" => "Celé jméno",
"noActions" => "Uživatel zatím v systému nic neudělal.",
"noUsers" => "Žádní uživatelé.",
+20 -20
View File
@@ -1,23 +1,23 @@
<?php
return [
"actions" => "Akce",
"associateWidgets" => "Přiřadit widgety do této plochy",
"code" => "Unikátní kód (používá se v šablonách pro vykreslení)",
"createNew" => "Vytvořit novou plochu",
"delete" => "Smazat",
"description" => "Popis",
"edit" => "Upravuji plochu :name",
"editButton" => "Upravit",
"editSuccessfull" => "Změny úspěšně uloženy",
"editTooltip" => "Upravit plochu pro widgety",
"invalidArea" => "Zvolená plocha pro widgety není platná. Vyberte prosím nějakou jinou.",
"name" => "Jméno",
"new" => "Nová plocha pro widgety",
"noEntries" => "Zatím nebyla definována žádná plocha pro widgety.",
"notDeletableArea" => "Nelze smazat požadovanou plochu. Tato plocha je nezbytnou součástí nainstalované šablony a její odstranění by znefunkčnilo celou šablonu.",
"overview" => "Seznam všech ploch pro widgety",
"save" => "Uložit",
"successfullyCreated" => "Plocha pro widgety úspěšně vytvořena",
"successfullyDeleted" => "Úspěšně smazáno",
"uniqueCode" => "Unikátní kód",
"actions" => "Akce",
"associateWidgets" => "Přiřadit widgety do této plochy",
"code" => "Unikátní kód (používá se v šablonách pro vykreslení)",
"createNew" => "Vytvořit novou plochu",
"delete" => "Smazat",
"description" => "Popis",
"edit" => "Upravuji plochu :name",
"editButton" => "Upravit",
"editSuccessfull" => "Změny úspěšně uloženy",
"editTooltip" => "Upravit plochu pro widgety",
"invalidArea" => "Zvolená plocha pro widgety není platná. Vyberte prosím nějakou jinou.",
"name" => "Jméno",
"new" => "Nová plocha pro widgety",
"noEntries" => "Zatím nebyla definována žádná plocha pro widgety.",
"notDeletableArea" => "Nelze smazat požadovanou plochu. Tato plocha je nezbytnou součástí nainstalované šablony a její odstranění by znefunkčnilo celou šablonu.",
"overview" => "Všechny plochy",
"save" => "Uložit",
"successfullyCreated" => "Plocha pro widgety úspěšně vytvořena",
"successfullyDeleted" => "Úspěšně smazáno",
"uniqueCode" => "Unikátní kód",
];
+3
View File
@@ -1,11 +1,13 @@
<?php
return [
'displayingUsersActions' => 'Displaying actions performed by user :name (:email)',
'ip' => 'IP address',
'userAgent' => 'Browser identification',
'overview' => 'List of all actions',
'login' => 'Logged in',
'logout' => 'Logged out',
'userEdit' => 'Updated user :name (:email)',
'createUser' => 'Created user :name (:email)',
'newCustomField' => 'Added new custom field with ID #:id and name ":name"',
'editCustomField' => 'Edited custom field with ID #:id and name ":name"',
'deleteCustomField' => 'Deleted custom field ID #:id and name ":name"',
@@ -42,6 +44,7 @@ return [
'nameEditWidgetArea' => 'Edit widget area',
'nameInvalidEditContentAttempt' => 'Tried to edit invalid page',
'nameCreateNewContent' => 'Created new page',
'nameCreateUser' => 'Created new user',
'nameDeleteContent' => 'Deleted page',
'namePublishContent' => 'Published page',
'nameDraftFromContent' => 'Made draft from published page',
+3 -1
View File
@@ -9,6 +9,7 @@ return [
'edit' => 'Edit :name',
'editPlain' => 'Edit',
'content' => 'Page content',
'homepage' => 'Homepage',
'save' => 'Save page',
'basicInfo' => 'Basic information',
'metaOptions' => 'Meta information',
@@ -53,5 +54,6 @@ return [
'status' => 'Status',
'moduleName' => 'Module',
'actions' => 'Actions',
'invalidTemplateSelected' => 'Invalid template selected! This page cannot be rendered!'
'invalidTemplateSelected' => 'Invalid template selected! This page cannot be rendered!',
'deleteTitlePhoto' => 'Delete title photo'
];
+2 -1
View File
@@ -28,5 +28,6 @@ return [
'userDetail' => 'Information',
'edit' => 'Edit user',
'noActions' => 'There are no actions yet.',
'gravatarLink' => 'Setup avatar at <a href="http://gravatar.com">gravatar.com</a>'
'gravatarLink' => 'Setup avatar at <a href="http://gravatar.com">gravatar.com</a>',
'moreUserActions' => 'More actions of this user'
];
+3
View File
@@ -3,9 +3,11 @@ return [
"assignWidget" => "Priradil widget :widgetName (#:widgetId) do plochy :widgetAreaName (#:widgetAreaId)",
"changeSettings" => "Zmena nastavenia",
"createNewContent" => "Vytvorená nová obsahová stránka. Titulok <strong>:title</strong>, url :url a ID #:id",
"createUser" => "Vytvorený nový užívateľ :name s e-mailom :email.",
"deleteContent" => 'Zmazaná stránka ":title", url "url a ID #:id. Táto zmena je zaznamenaná v revízii :revision.',
"deleteCustomField" => "a",
"deleteWidgetArea" => "Zmazal plochy pre widget :name",
"displayingUsersActions" => "Zobrazujem všetky akcie užívateľa :name (:email).",
"draftFromContent" => "Upravený widget :name (#:id)",
"editContent" => 'Úprava stránky - nový titulok je ":title", url :url a ID #:id. Revízia zmeny: :revision.',
"editCustomField" => "a",
@@ -18,6 +20,7 @@ return [
"nameAssignWidget" => "Priradenie widgetu",
"nameChangeSettings" => "Zmena nastavení",
"nameCreateNewContent" => "Vytvorenie novej stránky",
"nameCreateUser" => "Vytvorený užívateľ",
"nameDeleteContent" => "Zmazanie stránky",
"nameDeleteCustomField" => "Zmazanie užívateľského poľa",
"nameDeleteWidgetArea" => "Zmazanie plochy pre widgety",
+1
View File
@@ -8,6 +8,7 @@ return [
"content" => "Obsah stránky",
"createdAt" => "Vytvorené",
"deletePage" => "Zmazať",
"deleteTitlePhoto" => "Zmazať titulný obrázok",
"edit" => "Úprava :name",
"editPlain" => "Úprava",
"field_meta_description" => "Popis stránky",
@@ -7,6 +7,7 @@ return [
"editUser" => "Úprava užívateľa :name (:email)",
"email" => "E-mail",
"gravatarLink" => 'Nastavte si avatar na <a href="http://gravatar.com">gravatar.com</a>',
"moreUserActions" => "Zobraziť viac...",
"name" => "Celé meno",
"noActions" => "Užívateľ zatiaľ v systéme nič neurobil.",
"noUsers" => "Žiadni užívatelia.",
@@ -2,33 +2,43 @@
@section('pageHeading', @trans('admin/actionLog.overview'))
@section('content')
@if (!empty($actions))
<ul class="timeline">
<?php $odd = false; ?>
@if($user)
@section('pageDescription', @trans('admin/actionLog.displayingUsersActions', ['name' => $user->name, 'email' => $user->email]))
@endif
@foreach($actions as $action)
<li @if($odd) class="timeline-inverted" @endif>
<?php $odd = !$odd;?>
<div class="timeline-badge big" style="background: url('{{\App\Helpers\Gravatar::img($action->email, 40)}}') no-repeat center center" data-toggle="tooltip" data-placement="top" title="{{$action->user_name}} {{$action->email}}"></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h5 class="timeline-title">{{$action->name}} <small class="text-muted">
@date($action->created_at)
</small></h5>
</div>
<div class="timeline-body">
<p>{!! $action->value !!}</p>
</div>
</div>
</li>
@endforeach
</ul>
@else
<div class="alert alert-info">
<em>@lang('admin/userManagement.noActions')</em>
</div>
@endif
@section('content')
@if (!empty($actions))
<ul class="timeline">
<?php $odd = false; ?>
@foreach($actions as $action)
<li @if($odd) class="timeline-inverted" @endif>
<?php $odd = !$odd;?>
<div class="timeline-badge big"
style="background: url('{{\App\Helpers\Gravatar::img($action->email, 40)}}') no-repeat center center"
data-toggle="tooltip" data-placement="top"
title="{{$action->user_name}} {{$action->email}}"></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h5 class="timeline-title">{{$action->name}}
<small class="text-muted">
@date($action->created_at)
</small>
</h5>
</div>
<div class="timeline-body">
<p>{!! $action->value !!}</p>
</div>
</div>
</li>
@endforeach
</ul>
@else
<div class="alert alert-info">
<em>@lang('admin/userManagement.noActions')</em>
</div>
@endif
<div class="row text-center">
{!! $actions->render() !!}
+1 -1
View File
@@ -1,6 +1,6 @@
@extends('admin.layoutWithNavigation')
@section('pageHeading', @trans('admin/contents.edit', ['name' => e($page->title)]))
@section('pageHeading', $pageHeading)
@section('content')
@@ -1,7 +1,14 @@
@if($page->title_photo)
<div class="row">
<div class="col-lg-12 title-photo text-center">
<img src="{{config('app.upload_url')}}/{{$page->title_photo}}" alt="" />
<div id="titlePhotoContainer"
class="col-lg-4 col-lg-offset-4 col-md-6 col-md-offset-3 col-sm-12 title-photo text-center">
<input type="hidden" id="existingTitlePhoto" value="{{$page->title_photo}}" name="existingTitlePhoto">
<p><img src="@thumbnail($page->title_photo)" alt="" /></p>
<p>
<a href="javascript:void(0)" id="removeTitlePhoto" class="btn btn-warning" data-toggle="tooltip"
title="@lang('admin/contents.deleteTitlePhoto')"><i
class="fa fa-trash"></i></a>
</p>
</div>
</div>
@endif
@@ -11,32 +18,34 @@
<label class="control-label">
@lang('admin/contents.uploadTitleImage')
</label>
<input type="file" id="titlePhoto" name="titlePhoto" class="form-control" />
<input type="file" id="titlePhoto" accept=".jpg,.jpeg,.png" name="titlePhoto" class="form-control" />
@include('admin.snippets.hasError', ['field' => 'titlePhoto'])
</div>
</div>
<div class="row">
<div class="col-lg-12">
<label class="control-label">
@lang('admin/contents.template')
</label>
@if (count($templates))
<div class="row">
<div class="col-lg-12">
<label class="control-label">
@lang('admin/contents.template')
</label>
<select class="form-control" name="template">
@foreach($templates as $template)
<option value="{{$template->template_name}}"
@if(old('template', $page->template) == $template->template_name) selected @endif>
{{$template->name}}
@if($template->description != '')
- {{str_limit($template->description, 60)}}
@endif
<select class="form-control" name="template">
@foreach($templates as $template)
<option value="{{$template->template_name}}"
@if(old('template', $page->template) == $template->template_name) selected @endif>
{{$template->name}}
@if($template->description != '')
- {{str_limit($template->description, 60)}}
@endif
</option>
@endforeach
</select>
</option>
@endforeach
</select>
@include('admin.snippets.hasError', ['field' => 'template'])
@include('admin.snippets.hasError', ['field' => 'template'])
</div>
</div>
</div>
@endif
+1 -1
View File
@@ -1,6 +1,6 @@
@extends('admin.layoutWithNavigation')
@section('pageHeading', @trans('admin/contents.new', ['name' => $moduleName]))
@section('pageHeading', trans($pageHeading))
@section('content')
@@ -40,7 +40,8 @@
title="@lang('admin/contents.invalidTemplateSelected')"></i>
@else
@if(!empty($page->title_photo))
<img src="@upload($page->title_photo)" class="placeholder" alt="{{$page->title}}" />
<img src="@thumbnail($page->title_photo)" class="placeholder"
alt="{{$page->title}}" />
@else
<img src="{{asset('resources/assets/admin/img/placeholder.png')}}"
class="placeholder"
@@ -53,8 +54,14 @@
<a href="{{route('content.edit', ['id' => $page->id])}}">
{{$page->title}}
</a>
@if($page->is_homepage) <span class="m-l-10 tag tag-primary">@lang('admin/contents.homepage')</span> @endif
</div>
<div class="col-lg-2 col-md-3 hidden-sm-down">
<span class="tag @if($page->status == \App\Models\Content::STATUS_PUBLIC) tag-success
@elseif ($page->status == \App\Models\Content::STATUS_DRAFT) tag-danger
@else tag-warning @endif">{{$statuses[$page->status]}}</span>
</div>
<div class="col-lg-2 col-md-3 hidden-sm-down">{{$statuses[$page->status]}}</div>
<div class="col-lg-2 col-md-3 hidden-sm-down">
<a href="{{route('content.overview', ['moduleId' => $page->module_id])}}">
{{trans($page->module_name)}}
@@ -6,6 +6,13 @@
<textarea name="description" class="form-control" placeholder="@lang('admin/fileManager.directoryDescription')"
rows="3">{{old('description', $directory->description)}}</textarea>
<button type="submit" class="btn btn-primary">@lang('admin/fileManager.editDirectory')</button>
<button type="submit" class="btn btn-primary">
@if ($directory->id)
@lang('admin/fileManager.editDirectory')
@else
@lang('admin/fileManager.newDirectory')
@endif
</button>
</form>
@@ -1,30 +1,18 @@
<div class="row">
@forelse($files as $file)
<div class="col-sm-4 col-md-2 text-center file-preview">
<div class="preview">
<a href="{{route('upload.detail', ['id' => $file->id])}}">
{!! \App\Helpers\FileManager::getPreview($file) !!}
</a>
</div>
<div>
<a href="{{route('upload.detail', ['id' => $file->id])}}">
{{str_limit($file->original_filename, 10)}}
</a>
</div>
@if(!isset($hideDelete) || !$hideDelete)
<a href="{{route('upload.delete', ['id' => $file->id])}}" data-toggle="tooltip"
class="btn btn-sm rounded btn-danger confirm"
title="@lang('admin/fileManager.delete')">
<div class="col-sm-4 col-md-3 text-center">
@include('admin.snippets.card', [
'body' => '<a href="'.route('upload.detail', ['id' => $file->id]).'">'.\App\Helpers\FileManager::getPreview($file).'</a>',
'footerClass' => 'text-right',
'cardClass' => 'file-preview',
'footer' => (!isset($hideDelete) || !$hideDelete) ? '<a href="'.route('upload.delete', ['id' => $file->id]).'" data-toggle="tooltip"
class="btn btn-sm btn-danger confirm"
title="'.trans('admin/fileManager.delete').'">
<i class="fa fa-trash"></i>
</a>
@endif
</a>' : '',
])
</div>
@empty
<div class="alert alert-info">
<em>@lang('admin/fileManager.noFiles')</em>
</div>
@endforelse
</div>
@endforelse
@@ -60,40 +60,11 @@
</h5>
</div>
<div id="new-dir" class="panel-collapse collapse" role="tabpanel"
aria-labelledby="new-file-title">
@include('admin.fileManager.directories.form', ['directory' => new \App\Models\Directory(), 'action' => route('upload.postEditDirectory', ['id' => $directory->id])])
aria-labelledby="new-dir-title">
@include('admin.fileManager.directories.form', ['directory' => new \App\Models\Directory(), 'action' => route('upload.postNewDirectory')])
</div>
</div>
</div>
{{--<ul class="accordion" data-accordion data-allow-all-closed="true">--}}
{{--<li class="accordion-item is-active" data-accordion-item>--}}
{{--<a href="#" class="accordion-title">@lang('admin/fileManager.newFile')</a>--}}
{{--<div class="accordion-content" data-tab-content>--}}
{{--@include('admin.fileManager.newFileForm')--}}
{{--</div>--}}
{{--</li>--}}
{{--<li class="accordion-item" data-accordion-item>--}}
{{--<a href="#" class="accordion-title">@lang('admin/fileManager.editDirectory')</a>--}}
{{--<div class="accordion-content" data-tab-content>--}}
{{--@include('admin.fileManager.directories.editForm')--}}
{{--</div>--}}
{{--</li>--}}
{{--@endif--}}
{{--<li class="accordion-item" data-accordion-item>--}}
{{--<a href="#" class="accordion-title">@lang('admin/fileManager.newDirectory')</a>--}}
{{--<div class="accordion-content" data-tab-content>--}}
{{--@include('admin.fileManager.directories.newForm')--}}
{{--</div>--}}
{{--</li>--}}
{{--</ul>--}}
</div>
</div>
@stop
@endsection
+1 -1
View File
@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>@yield('pageHeading') {{isset($pageName) ? ' | '.$pageName: ''}}</title>
<title>@yield('pageHeading') {{setting('pageName')}}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{asset('resources/assets/css/font-awesome.min.css')}}" />
@@ -23,23 +23,27 @@
<div class="header-block header-block-nav">
<ul class="nav-profile">
<li class="profile dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button"
aria-haspopup="true" aria-expanded="false">
@lang(LaravelLocalization::getCurrentLocaleName())
</a>
<div class="dropdown-menu">
@foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties)
<a hreflang="{{$localeCode}}"
href="{{LaravelLocalization::getLocalizedURL($localeCode) }}"
class="dropdown-item">
{{ $properties['native'] }}
</a>
@endforeach
</div>
@if(count(LaravelLocalization::getSupportedLocales()) > 1)
<li class="profile dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button"
aria-haspopup="true" aria-expanded="false">
@lang(LaravelLocalization::getCurrentLocaleName())
</a>
<div class="dropdown-menu">
@foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties)
<a hreflang="{{$localeCode}}"
href="{{LaravelLocalization::getLocalizedURL($localeCode) }}"
class="dropdown-item">
{{ $properties['native'] }}
</a>
@endforeach
</div>
</li>
@endif
<li class="profile">
<a href="{{route('page.index')}}" target="_blank" class="nav-link" data-toggle="tooltip" data-placement="bottom" title="@lang('common.goToWeb')"><i class="fa fa-fw fa-globe"></i></a>
<a href="{{route('page.index')}}" target="_blank" class="nav-link" data-toggle="tooltip"
data-placement="bottom" title="@lang('common.goToWeb')"><i class="fa fa-fw fa-globe"></i></a>
</li>
@@ -60,7 +64,7 @@
<div class="sidebar-container">
<div class="sidebar-header">
<div class="m-t-15 text-center text-primary">
<h4>{{isset($pageName) ? str_limit($pageName, 15) : ''}}</h4>
<h4>{{str_limit(setting('pageName'), 15)}}</h4>
</div>
</div>
<nav class="menu">
@@ -75,11 +79,14 @@
<div class="customize-item">
<div class="row customize-header">
<div class="col-xs-4"></div>
<div class="col-xs-4"><label class="title">@lang('common.positionFixed')</label></div>
<div class="col-xs-4"><label class="title">@lang('common.positionStatic')</label></div>
<div class="col-xs-4"><label
class="title">@lang('common.positionFixed')</label></div>
<div class="col-xs-4"><label
class="title">@lang('common.positionStatic')</label></div>
</div>
<div class="row hidden-md-down">
<div class="col-xs-4"><label class="title">@lang('common.sidebar')</label></div>
<div class="col-xs-4"><label class="title">@lang('common.sidebar')</label>
</div>
<div class="col-xs-4"><label>
<input class="radio" type="radio" name="sidebarPosition"
value="sidebar-fixed">
@@ -91,7 +98,8 @@
</label></div>
</div>
<div class="row">
<div class="col-xs-4"><label class="title">@lang('common.header')</label></div>
<div class="col-xs-4"><label class="title">@lang('common.header')</label>
</div>
<div class="col-xs-4"><label>
<input class="radio" type="radio" name="headerPosition"
value="header-fixed">
@@ -103,7 +111,8 @@
</label></div>
</div>
<div class="row">
<div class="col-xs-4"><label class="title">@lang('common.footer')</label></div>
<div class="col-xs-4"><label class="title">@lang('common.footer')</label>
</div>
<div class="col-xs-4"><label>
<input class="radio" type="radio" name="footerPosition"
value="footer-fixed">
@@ -0,0 +1,15 @@
<div class="card {{isset($type) ? 'card-'.$type : 'card-default'}} {{$cardClass or ''}}">
@if(!empty($title))
<div class="card-header">
<div class="header-block">
<p class="title"> {!! $title !!} </p>
</div>
</div>
@endif
<div class="card-block">
{!! $body !!}
</div>
<div class="card-footer {{$footerClass or ''}}">
{!! $footer !!}
</div>
</div>
@@ -2,6 +2,12 @@
@section('pageHeading', trans('admin/userManagement.profile'))
@section('pageDescription', @trans('admin/userManagement.detail', ['name' => $user->name, 'email' => $user->email]))
@section('headerButtons')
<a href="{{route('users.overview')}}" class="btn btn-secondary btn-sm rounded"
title="@lang('admin/userManagement.overview')">
<i class="fa fa-list"></i>
</a>
@endsection
@section('content')
@@ -80,6 +86,14 @@
</li>
@endforeach
</ul>
<div class="text-center">
<a href="{{route('log.overview', ['userId' => $user->id])}}"
class="btn btn-secondary">@lang('admin/userManagement.moreUserActions')</a>
</div>
@else
<div class="alert alert-info">
<em>@lang('admin/userManagement.noActions')</em>
@@ -1,6 +1,11 @@
@extends('admin.layoutWithNavigation')
@section('pageHeading', @trans('admin/userManagement.editUser', ['name' => str_limit($user->name, 20), 'email' => $user->email]))
@section('headerButtons')
<a href="{{route('users.overview')}}" class="btn btn-secondary btn-sm rounded" title="@lang('admin/userManagement.overview')">
<i class="fa fa-list"></i>
</a>
@endsection
@section('content')
<div class="row">
@@ -3,6 +3,19 @@
@section('pageHeading', @trans('admin/widgetAreas.edit', ['name' => $area->name]))
@section('content')
@include('admin.widgets.area.form', ['action' => route('widgetareas.postEdit', ['id' => $area->id])])
@stop
<div class="row">
<div class="col-lg-8">
@include('admin.widgets.area.form', ['action' => route('widgetareas.postEdit', ['id' => $area->id])])
<h2 class="m-t-15">@lang('admin/widgets.overview')</h2>
@include('admin.widgets.widgetsToAssociate', ['tileClass' => 'col-md-4 col-sm-6 col-xs-12', 'widgetArea' => $area])
</div>
<div class="col-lg-4">
<h3>@lang('admin/widgets.preview')</h3>
@widgetArea($area->code)
</div>
</div>
@endsection
@@ -5,14 +5,15 @@
@lang('admin/widgetAreas.name')
</label>
<input type="text" class="form-control" name="name" value="{{$area->name}}"
<input type="text" class="form-control" name="name" value="{{old('name', $area->name)}}"
placeholder="@lang('admin/widgetAreas.name')" />
<label class="control-label">
@lang('admin/widgetAreas.code')
</label>
<input type="text" class="form-control" name="code" @if($area->code) disabled @endif value="{{$area->code}}"
<input type="text" class="form-control" name="code" @if($area->code) disabled
@endif value="{{old('code', $area->code)}}"
placeholder="@lang('admin/widgetAreas.code')" />
<label class="control-label">
@@ -20,7 +21,7 @@
</label>
<textarea rows="3" class="form-control" name="description"
placeholder="@lang('admin/widgetAreas.description')">{{$area->description}}</textarea>
placeholder="@lang('admin/widgetAreas.description')">{{old('description', $area->description)}}</textarea>
<button type="submit" class="btn btn-primary">@lang('admin/widgetAreas.save')</button>
</form>
@@ -1,61 +1,15 @@
@extends('admin.layout')
@extends('admin.layoutWithNavigation')
@section('pageName', @trans('admin/widgets.overview'))
@section('content')
<div class="row">
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
<div class="column large-9 tile-overview" data-equalizer>
<div class="col-lg-9 sameheight-container">
<h2>@lang('admin/widgets.overview')</h2>
@forelse($widgets as $widget)
<div class="column large-4">
<div class="item" data-equalizer-watch>
<h4>{{str_limit($widget->name, 20)}}</h4>
<p>
{{trans(call_user_func([$widget->widget_type_handler, 'getName']))}}
</p>
<p>
{{str_limit($widget->description, 150)}}
</p>
<div class="controls row text-center">
<a href="{{route('widgets.edit', ['id' => $widget->id])}}" class="button column large-6 primary"><i class="fa fa-edit"></i></a>
@if (in_array($widget->id, $associatedWidgetIds))
<a href="{{route('widgets.deleteAssociation', ['widgetId' => $widget->id, 'widgetArea' => $widgetArea->id])}}"
class="button column confirm large-6 alert">
<i class="fa fa-trash"></i>
</a>
@else
<a href="{{route('widgets.makeAssociation', ['widgetId' => $widget->id, 'widgetArea' => $widgetArea->id])}}"
class="button column large-6 success"><i class="fa fa-plus"></i></a>
@endif
</div>
</div>
</div>
@empty
<em>@lang('admin/widgets.noEntries')</em>
@endforelse
<div class="row">
{!! $widgets->render() !!}
</div>
@include('admin.widgets.widgetsToAssociate', ['tileClass' => 'col-lg-3 col-md-4 col-sm-6 col-xs-12'])
</div>
<div class="column large-3">
<div class="col-lg-3">
<h2>{{$widgetArea->name}}</h2>
<p>
@@ -63,11 +17,11 @@
</p>
<ul>
<li>@lang('admin/widgets.createdAt'): {{$widgetArea->created_at}}</li>
<li>@lang('admin/widgets.updatedAt'): {{$widgetArea->updated_at}}</li>
<li>@lang('admin/widgets.createdAt'): @date($widgetArea->created_at)</li>
<li>@lang('admin/widgets.updatedAt'): @date($widgetArea->updated_at)</li>
</ul>
<a href="{{route('widgetareas.edit', ['id' => $widgetArea->id])}}">@lang('admin/widgetAreas.editButton')</a>
<a href="{{route('widgetareas.edit', ['id' => $widgetArea->id])}}" class="btn btn-secondary col-sm-12">@lang('admin/widgetAreas.editButton')</a>
@if (!empty($associatedWidgetIds))
<h3>@lang('admin/widgets.preview')</h3>
@@ -2,7 +2,7 @@
<div class="{{$tileClass}}">
<div class=" card @if (in_array($widget->id, $associatedWidgetIds)) card-info @else card-success @endif">
<div class="card-header">
<div class="card-header sameheight-item ">
<div class="header-block">
<p class="title" title="{{$widget->name}}"
data-toggle="tooltip"> {{str_limit($widget->name, 15)}}</p>