mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
fix file modal + fix file link in audit log + high quality thumbs
This commit is contained in:
parent
6596eba6ca
commit
dc28ebfa50
@ -171,7 +171,7 @@ public class File implements Loggable {
|
|||||||
@Override
|
@Override
|
||||||
public String toMessage() {
|
public String toMessage() {
|
||||||
// Attached document ID and name concatenated
|
// Attached document ID and name concatenated
|
||||||
return documentId + name;
|
return (documentId == null ? Strings.repeat(" ", 36) : documentId) + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -129,8 +129,8 @@ public class FileUtil {
|
|||||||
|
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
// Generate thumbnails from image
|
// Generate thumbnails from image
|
||||||
BufferedImage web = Scalr.resize(image, Scalr.Method.AUTOMATIC, Scalr.Mode.AUTOMATIC, 1280, Scalr.OP_ANTIALIAS);
|
BufferedImage web = Scalr.resize(image, Scalr.Method.ULTRA_QUALITY, Scalr.Mode.AUTOMATIC, 1280);
|
||||||
BufferedImage thumbnail = Scalr.resize(image, Scalr.Method.AUTOMATIC, Scalr.Mode.AUTOMATIC, 256, Scalr.OP_ANTIALIAS);
|
BufferedImage thumbnail = Scalr.resize(image, Scalr.Method.ULTRA_QUALITY, Scalr.Mode.AUTOMATIC, 256);
|
||||||
image.flush();
|
image.flush();
|
||||||
|
|
||||||
// Write "web" encrypted image
|
// Write "web" encrypted image
|
||||||
|
@ -20,7 +20,7 @@ angular.module('docs').controller('FileView', function($uibModal, $state, $state
|
|||||||
$timeout(function () {
|
$timeout(function () {
|
||||||
// After all router transitions are passed,
|
// After all router transitions are passed,
|
||||||
// if we are still on the file route, go back to the document
|
// if we are still on the file route, go back to the document
|
||||||
if ($state.current.name === 'document.view.content.file') {
|
if ($state.current.name === 'document.view.content.file' || $state.current.name === 'document.default.file') {
|
||||||
$state.go('^', {id: $stateParams.id});
|
$state.go('^', {id: $stateParams.id});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -15,7 +15,7 @@ angular.module('share').controller('FileView', function($uibModal, $state, $stat
|
|||||||
modal.closed = false;
|
modal.closed = false;
|
||||||
modal.result.then(function() {
|
modal.result.then(function() {
|
||||||
modal.closed = true;
|
modal.closed = true;
|
||||||
},function() {
|
}, function() {
|
||||||
modal.closed = true;
|
modal.closed = true;
|
||||||
$timeout(function () {
|
$timeout(function () {
|
||||||
// After all router transitions are passed,
|
// After all router transitions are passed,
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
<span ng-switch-when="Document">
|
<span ng-switch-when="Document">
|
||||||
<a ng-href="#/document/view/{{ log.target }}">{{ log.message }}</a>
|
<a ng-href="#/document/view/{{ log.target }}">{{ log.message }}</a>
|
||||||
</span>
|
</span>
|
||||||
<span ng-switch-when="File">
|
<span ng-switch-when="File" ng-init="hasDocument = log.message.substring(0, 36).trim().length > 0">
|
||||||
<a ng-if="log.message" ng-href="#/document/view/{{ log.message | limitTo: 36 }}/content/file/{{ log.target }}">
|
<a ng-if="log.message" ng-href="#/document/{{ hasDocument ? 'view/' + log.message.substring(0, 36) + '/content/' : '' }}file/{{ log.target }}">
|
||||||
<span ng-if="log.message.length > 36">{{ log.message | limitTo: 1000 : 36 }}</span>
|
<span ng-if="log.message.length > 36">{{ log.message | limitTo: 1000 : 36 }}</span>
|
||||||
<span ng-if="log.message.length == 36">{{ 'open' | translate }}</span>
|
<span ng-if="log.message.length == 36">{{ 'open' | translate }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -159,7 +159,7 @@
|
|||||||
next-text="{{ 'pagination.next' | translate }}"
|
next-text="{{ 'pagination.next' | translate }}"
|
||||||
first-text="{{ 'pagination.first' | translate }}"
|
first-text="{{ 'pagination.first' | translate }}"
|
||||||
last-text="{{ 'pagination.last' | translate }}"
|
last-text="{{ 'pagination.last' | translate }}"
|
||||||
total-items="totalDocuments" items-per-page="limit" max-size="5" ng-model="$parent.currentPage"></ul>
|
total-items="totalDocuments" items-per-page="$parent.limit" max-size="5" ng-model="$parent.currentPage"></ul>
|
||||||
<label class="sr-only" for="pagesizeSelect">{{ 'document.page_size' | translate }}</label>
|
<label class="sr-only" for="pagesizeSelect">{{ 'document.page_size' | translate }}</label>
|
||||||
<select ng-model="limit" id="pagesizeSelect" class="form-control">
|
<select ng-model="limit" id="pagesizeSelect" class="form-control">
|
||||||
<option value="10">{{ 'document.page_size_10' | translate }}</option>
|
<option value="10">{{ 'document.page_size_10' | translate }}</option>
|
||||||
|
Loading…
Reference in New Issue
Block a user