diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/File.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/File.java index 243e0386..3db2ab7b 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/File.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/File.java @@ -171,7 +171,7 @@ public class File implements Loggable { @Override public String toMessage() { // Attached document ID and name concatenated - return documentId + name; + return (documentId == null ? Strings.repeat(" ", 36) : documentId) + name; } /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/FileUtil.java b/docs-core/src/main/java/com/sismics/docs/core/util/FileUtil.java index 6a511bf0..3d67a6a7 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/FileUtil.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/FileUtil.java @@ -129,8 +129,8 @@ public class FileUtil { if (image != null) { // Generate thumbnails from image - BufferedImage web = Scalr.resize(image, Scalr.Method.AUTOMATIC, Scalr.Mode.AUTOMATIC, 1280, Scalr.OP_ANTIALIAS); - BufferedImage thumbnail = Scalr.resize(image, Scalr.Method.AUTOMATIC, Scalr.Mode.AUTOMATIC, 256, Scalr.OP_ANTIALIAS); + BufferedImage web = Scalr.resize(image, Scalr.Method.ULTRA_QUALITY, Scalr.Mode.AUTOMATIC, 1280); + BufferedImage thumbnail = Scalr.resize(image, Scalr.Method.ULTRA_QUALITY, Scalr.Mode.AUTOMATIC, 256); image.flush(); // Write "web" encrypted image diff --git a/docs-web/src/main/webapp/src/app/docs/controller/document/FileView.js b/docs-web/src/main/webapp/src/app/docs/controller/document/FileView.js index d625314a..e6407e6e 100644 --- a/docs-web/src/main/webapp/src/app/docs/controller/document/FileView.js +++ b/docs-web/src/main/webapp/src/app/docs/controller/document/FileView.js @@ -20,7 +20,7 @@ angular.module('docs').controller('FileView', function($uibModal, $state, $state $timeout(function () { // After all router transitions are passed, // 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}); } }); diff --git a/docs-web/src/main/webapp/src/app/share/controller/FileView.js b/docs-web/src/main/webapp/src/app/share/controller/FileView.js index 800a7ceb..7b431a5b 100644 --- a/docs-web/src/main/webapp/src/app/share/controller/FileView.js +++ b/docs-web/src/main/webapp/src/app/share/controller/FileView.js @@ -15,7 +15,7 @@ angular.module('share').controller('FileView', function($uibModal, $state, $stat modal.closed = false; modal.result.then(function() { modal.closed = true; - },function() { + }, function() { modal.closed = true; $timeout(function () { // After all router transitions are passed, diff --git a/docs-web/src/main/webapp/src/partial/docs/directive.auditlog.html b/docs-web/src/main/webapp/src/partial/docs/directive.auditlog.html index 554a9dc1..072552ae 100644 --- a/docs-web/src/main/webapp/src/partial/docs/directive.auditlog.html +++ b/docs-web/src/main/webapp/src/partial/docs/directive.auditlog.html @@ -20,8 +20,8 @@ {{ log.message }} - - + + {{ log.message | limitTo: 1000 : 36 }} {{ 'open' | translate }} diff --git a/docs-web/src/main/webapp/src/partial/docs/document.html b/docs-web/src/main/webapp/src/partial/docs/document.html index 7b0d2722..e98d9bd8 100644 --- a/docs-web/src/main/webapp/src/partial/docs/document.html +++ b/docs-web/src/main/webapp/src/partial/docs/document.html @@ -159,7 +159,7 @@ next-text="{{ 'pagination.next' | translate }}" first-text="{{ 'pagination.first' | translate }}" last-text="{{ 'pagination.last' | translate }}" - total-items="totalDocuments" items-per-page="limit" max-size="5" ng-model="$parent.currentPage"> + total-items="totalDocuments" items-per-page="$parent.limit" max-size="5" ng-model="$parent.currentPage">