Migration of /document views

This commit is contained in:
jendib 2014-01-11 16:38:58 +01:00
parent 85aa16afba
commit 6963fd9770
16 changed files with 5559 additions and 172 deletions

View File

@ -109,13 +109,13 @@ App.controller('DocumentEdit', function($rootScope, $scope, $q, $http, $state, $
var formData = new FormData(); var formData = new FormData();
formData.append('id', data.id); formData.append('id', data.id);
formData.append('file', file); formData.append('file', file);
// Send the file // Send the file
var promiseFile = $http.put('api/file', var promiseFile = $http.put('api/file',
formData, { formData, {
headers: { 'Content-Type': false }, headers: { 'Content-Type': undefined },
transformRequest: function(data) { return data; } transformRequest: function(data) { return data; }
}); });
// TODO Handle progression when $q.notify will be released // TODO Handle progression when $q.notify will be released

View File

@ -7,7 +7,7 @@ App.controller('FileView', function($modal, $state, $stateParams) {
var modal = $modal.open({ var modal = $modal.open({
windowClass: 'modal modal-fileview', windowClass: 'modal modal-fileview',
templateUrl: 'partial/docs/file.view.html', templateUrl: 'partial/docs/file.view.html',
controller: function($scope, $state, $stateParams, Restangular, dialog) { controller: function($rootScope, $scope, $state, $stateParams, Restangular) {
// Load files // Load files
Restangular.one('file').getList('list', { id: $stateParams.id }).then(function(data) { Restangular.one('file').getList('list', { id: $stateParams.id }).then(function(data) {
$scope.files = data.files; $scope.files = data.files;
@ -28,7 +28,6 @@ App.controller('FileView', function($modal, $state, $stateParams) {
if (value.id == $stateParams.fileId) { if (value.id == $stateParams.fileId) {
var next = $scope.files[key + 1]; var next = $scope.files[key + 1];
if (next) { if (next) {
dialog.close({});
$state.transitionTo('document.view.file', { id: $stateParams.id, fileId: next.id }); $state.transitionTo('document.view.file', { id: $stateParams.id, fileId: next.id });
} }
} }
@ -43,7 +42,6 @@ App.controller('FileView', function($modal, $state, $stateParams) {
if (value.id == $stateParams.fileId) { if (value.id == $stateParams.fileId) {
var previous = $scope.files[key - 1]; var previous = $scope.files[key - 1];
if (previous) { if (previous) {
dialog.close({});
$state.transitionTo('document.view.file', { id: $stateParams.id, fileId: previous.id }); $state.transitionTo('document.view.file', { id: $stateParams.id, fileId: previous.id });
} }
} }
@ -61,13 +59,17 @@ App.controller('FileView', function($modal, $state, $stateParams) {
* Close the file preview. * Close the file preview.
*/ */
$scope.closeFile = function () { $scope.closeFile = function () {
dialog.close(); modal.dismiss();
}; };
// Close the modal when the user exits this state // Close the modal when the user exits this state
var off = $scope.$on('$stateChangeStart', function(event, toState){ var off = $rootScope.$on('$stateChangeStart', function(event, toState) {
if (dialog.isOpen()) { if (!modal.closed) {
dialog.close(toState.name == 'document.view.file' ? {} : null); if (toState.name == 'document.view.file') {
modal.close();
} else {
modal.dismiss();
}
} }
off(); off();
}); });
@ -75,9 +77,11 @@ App.controller('FileView', function($modal, $state, $stateParams) {
}); });
// Returns to document view on file close // Returns to document view on file close
modal.result.then(function(result) { modal.closed = false;
if (result == null) { modal.result.then(function() {
$state.transitionTo('document.view', { id: $stateParams.id }); modal.closed = true;
} }, function() {
modal.closed = true;
$state.transitionTo('document.view', { id: $stateParams.id });
}); });
}); });

View File

@ -4,7 +4,9 @@
* Navigation controller. * Navigation controller.
*/ */
App.controller('Navigation', function($scope, $http, $state, $rootScope, User, Restangular) { App.controller('Navigation', function($scope, $http, $state, $rootScope, User, Restangular) {
$rootScope.userInfo = User.userInfo(); User.userInfo().then(function(data) {
$rootScope.userInfo = data;
});
// Last time when the errors logs was checked // Last time when the errors logs was checked
$scope.lastLogCheck = new Date().getTime(); $scope.lastLogCheck = new Date().getTime();
@ -47,7 +49,9 @@ App.controller('Navigation', function($scope, $http, $state, $rootScope, User, R
*/ */
$scope.logout = function($event) { $scope.logout = function($event) {
User.logout().then(function() { User.logout().then(function() {
$rootScope.userInfo = User.userInfo(true); User.userInfo(true).then(function(data) {
$rootScope.userInfo = data;
});
$state.transitionTo('main'); $state.transitionTo('main');
}); });
$event.preventDefault(); $event.preventDefault();

View File

@ -57,34 +57,43 @@
<script src="app/docs/directive/InlineEdit.js" type="text/javascript"></script> <script src="app/docs/directive/InlineEdit.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div class="navbar" ng-controller="Navigation"> <nav class="navbar navbar-default" role="navigation" ng-controller="Navigation">
<div class="navbar-inner"> <div class="navbar-header">
<div class="container"> <div class="navbar-brand loader" ng-class="{'loader-hide': !isLoading() }">
<div class="brand loader hidden-phone" ng-class="{hide: !isLoading() }"> <img src="img/loader.gif" />
<img src="img/loader.gif" />
</div>
<a class="brand hidden-phone" href="#">Sismics Docs</a>
<ul class="nav" ng-show="!userInfo.anonymous">
<li ng-class="{active: $uiRoute}" ui-route="/document.*"><a href="#/document"><span class="icon-book"></span> Documents</a></li>
<li ng-class="{active: $uiRoute}" ui-route="/tag.*"><a href="#/tag"><span class="icon-tag"></span> Tags</a></li>
</ul>
<ul class="nav pull-right" ng-show="!userInfo.anonymous">
<li ng-show="errorNumber > 0">
<a href="#/settings/log" ng-click="openLogs()" class="nav-text-error">
<span class="icon-warning-sign"></span> {{ errorNumber }} new error{{ errorNumber > 1 ? 's' : '' }}
</a>
</li>
<li ng-class="{active: $uiRoute}" ui-route="/settings.*"><a href="#/settings/account"><span class="icon-cog"></span><span class="hidden-phone"> Settings</span></a></li>
<li><a href="#" ng-click="logout($event)"><span class="icon-off"></span><span class="hidden-phone"> Logout</span></a></li>
</ul>
</div> </div>
<a class="navbar-brand" href="#">Sismics Docs</a>
</div> </div>
</div>
<ul class="nav navbar-nav" ng-show="!userInfo.anonymous">
<li ng-class="{active: $uiRoute}" ui-route="/document.*">
<a href="#/document"><span class="glyphicon glyphicon-book"></span> Documents</a>
</li>
<li ng-class="{active: $uiRoute}" ui-route="/tag.*">
<a href="#/tag"><span class="glyphicon glyphicon-tags"></span> Tags</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" ng-show="!userInfo.anonymous">
<li ng-show="errorNumber > 0">
<a href="#/settings/log" ng-click="openLogs()" class="nav-text-error">
<span class="glyphicon glyphicon-warning-sign"></span> {{ errorNumber }} new error{{ errorNumber > 1 ? 's' : '' }}
</a>
</li>
<li ng-class="{active: $uiRoute}" ui-route="/settings.*">
<a href="#/settings/account">
<span class="glyphicon glyphicon-cog"></span> Settings
</a>
</li>
<li>
<a href="#" ng-click="logout($event)">
<span class="glyphicon glyphicon-off"></span> Logout
</a>
</li>
</ul>
</nav>
<main ui-view="page"> <div ui-view="page">
</main> </div>
</body> </body>
</html> </html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,11 @@
<div> <div>
<ul class="inline"> <ul class="list-inline">
<li ng-repeat="tag in tags"><span class="label label-info" ng-style="{ 'background': tag.color }">{{ tag.name }} <span class="icon-remove icon-white" ng-click="deleteTag(tag)" ng-show="!ngDisabled"></span></span></li> <li ng-repeat="tag in tags">
<span class="label label-info" ng-style="{ 'background': tag.color }">{{ tag.name }}
<span class="glyphicon glyphicon-remove" ng-click="deleteTag(tag)" ng-show="!ngDisabled"></span>
</span>
</li>
</ul> </ul>
<input class="span12" type="text" id="{{ ref }}" placeholder="Type a tag" ng-model="input" ng-disabled="ngDisabled" <input class="form-control" type="text" id="{{ ref }}" placeholder="Type a tag" ng-model="input" ng-disabled="ngDisabled"
autocomplete="off" typeahead="tag.name for tag in allTags | filter: $viewValue" typeahead-on-select="addTag()" /> autocomplete="off" typeahead="tag.name for tag in allTags | filter: $viewValue" typeahead-on-select="addTag()" />
</div> </div>

View File

@ -12,8 +12,8 @@
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="muted"> <div class="text-muted">
<ul class="inline"> <ul class="list-inline">
<li><strong>Version:</strong> {{ app.current_version }}</li> <li><strong>Version:</strong> {{ app.current_version }}</li>
<li><strong>Memory:</strong> {{ app.free_memory / 1000000 | number: 0 }}/{{ app.total_memory / 1000000 | number: 0 }} MB</li> <li><strong>Memory:</strong> {{ app.free_memory / 1000000 | number: 0 }}/{{ app.total_memory / 1000000 | number: 0 }} MB</li>
</ul> </ul>

View File

@ -1,62 +1,64 @@
<img src="img/loader.gif" ng-show="!document && isEdit()" /> <img src="img/loader.gif" ng-show="!document && isEdit()" />
<div ng-show="document || !isEdit()"> <div ng-show="document || !isEdit()">
<form class="form-horizontal" name="documentForm"> <form name="documentForm" class="form-horizontal">
<div class="control-group" ng-class="{ error: !documentForm.title.$valid }"> <div class="form-group" ng-class="{ error: !documentForm.title.$valid }">
<label class="control-label" for="inputTitle">Title</label> <label class="col-sm-2 control-label" for="inputTitle">Title</label>
<div class="controls"> <div class="col-sm-10">
<input required ng-maxlength="100" class="input-block-level" type="text" id="inputTitle" <input required ng-maxlength="100" class="form-control" type="text" id="inputTitle"
placeholder="Title" name="title" ng-model="document.title" autocomplete="off" placeholder="Title" name="title" ng-model="document.title" autocomplete="off"
typeahead="document for document in getTitleTypeahead($viewValue) | filter: $viewValue" typeahead="document for document in getTitleTypeahead($viewValue) | filter: $viewValue"
typeahead-wait-ms="200" ng-disabled="fileIsUploading" /> typeahead-wait-ms="200" ng-disabled="fileIsUploading" />
</div> </div>
</div> </div>
<div class="control-group" ng-class="{ error: !documentForm.description.$valid }"> <div class="form-group" ng-class="{ error: !documentForm.description.$valid }">
<label class="control-label" for="inputDescription">Description</label> <label class="col-sm-2 control-label" for="inputDescription">Description</label>
<div class="controls"> <div class="col-sm-10">
<textarea ng-maxlength="4000" class="input-block-level" rows="5" id="inputDescription" <textarea ng-maxlength="4000" class="form-control" rows="5" id="inputDescription"
name="description" ng-model="document.description" ng-disabled="fileIsUploading"></textarea> name="description" ng-model="document.description" ng-disabled="fileIsUploading"></textarea>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label" for="inputCreateDate">Creation date</label> <label class="col-sm-2 control-label" for="inputCreateDate">Creation date</label>
<div class="controls"> <div class="col-sm-10">
<input type="text" id="inputCreateDate" ng-readonly="true" datepicker-popup="yyyy-MM-dd" <input type="text" id="inputCreateDate" ng-readonly="true" datepicker-popup="yyyy-MM-dd" class="form-control"
ng-model="document.create_date" starting-day="1" show-weeks="false" ng-disabled="fileIsUploading" /> ng-model="document.create_date" starting-day="1" show-weeks="false" ng-disabled="fileIsUploading" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label" for="inputCreateDate">Language</label> <label class="col-sm-2 control-label" for="inputLanguage">Language</label>
<div class="controls"> <div class="col-sm-10">
<select id="inputLanguage" ng-model="document.language" ng-disabled="fileIsUploading"> <select class="form-control" id="inputLanguage" ng-model="document.language" ng-disabled="fileIsUploading">
<option value="fra">French</option> <option value="fra">French</option>
<option value="eng">English</option> <option value="eng">English</option>
<option value="jpn">Japanese</option> <option value="jpn">Japanese</option>
</select> </select>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label" for="inputFiles">New files</label> <label class="col-sm-2 control-label" for="inputFiles">New files</label>
<div class="controls"> <div class="col-sm-10">
<file class="input-block-level" id="inputFiles" multiple="multiple" ng-model="newFiles" <file class="form-control" id="inputFiles" multiple="multiple" ng-model="newFiles"
accept="image/png,image/jpg,image/jpeg,image/gif,application/pdf" ng-disabled="fileIsUploading" /> accept="image/png,image/jpg,image/jpeg,image/gif,application/pdf" ng-disabled="fileIsUploading"></file>
</div> </div>
</div> </div>
<div class="control-group"> <div class="form-group">
<label class="control-label" for="inputTags">Tags</label> <label class="col-sm-2 control-label" for="inputTags">Tags</label>
<div class="controls"> <div class="col-sm-10">
<select-tag tags="document.tags" class="input-block-level" ref="inputTags" ng-disabled="fileIsUploading" /> <select-tag tags="document.tags" ref="inputTags" ng-disabled="fileIsUploading"></select-tag>
</div> </div>
</div> </div>
<div class="form-actions"> <div class="form-group">
<button type="submit" class="btn btn-primary" ng-disabled="!documentForm.$valid || fileIsUploading" ng-click="edit()">{{ isEdit() ? 'Edit' : 'Add' }}</button> <div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn" ng-click="cancel()" ng-disabled="fileIsUploading">Cancel</button> <button type="submit" class="btn btn-primary" ng-disabled="!documentForm.$valid || fileIsUploading" ng-click="edit()">{{ isEdit() ? 'Edit' : 'Add' }}</button>
<button type="submit" class="btn btn-default" ng-click="cancel()" ng-disabled="fileIsUploading">Cancel</button>
</div>
</div> </div>
</form> </form>
<div class="row-fluid" ng-show="fileIsUploading"> <div class="row" ng-show="fileIsUploading">
<h4>Uploading files...</h4> <h4>Uploading files...</h4>
<div class="span6"><progress percent="fileProgress" class="progress-info active"></progress></div> <div class="col-md-6"><progressbar value="fileProgress" class="progress-info active"></progressbar></div>
</div> </div>
<alert ng-repeat="alert in alerts" type="alert.type" close="closeAlert($index)">{{ alert.msg }}</alert> <alert ng-repeat="alert in alerts" type="alert.type" close="closeAlert($index)">{{ alert.msg }}</alert>

View File

@ -1,13 +1,13 @@
<div class="container-fluid"> <div class="row">
<div class="row-fluid"> <div class="col-md-4">
<div class="span4 well"> <div class="well">
<p class="text-center"> <p class="text-center">
<button class="btn btn-primary" type="button" ng-click="addDocument()"><span class="icon-plus icon-white"></span> Add a document</button> <button class="btn btn-primary" type="button" ng-click="addDocument()"><span class="glyphicon glyphicon-plus"></span> Add a document</button>
</p> </p>
<p class="input-prepend text-center input-block-level"> <div class="input-group">
<span class="add-on"><span class="icon-search" <span class="input-group-addon">
<span class="glyphicon glyphicon-search"
tooltip-placement="bottom" tooltip-placement="bottom"
tooltip-html-unsafe="before:2012-05<br/> tooltip-html-unsafe="before:2012-05<br/>
after:2012-05<br/> after:2012-05<br/>
@ -15,43 +15,45 @@
tag:car<br/> tag:car<br/>
full:led<br/> full:led<br/>
shared:yes<br/> shared:yes<br/>
lang:fra" lang:fra"></span>
></span></span> </span>
<input type="text" placeholder="Search" ng-model="search" class="span10" /> <input type="search" class="form-control" placeholder="Search" ng-model="search" />
</p> </div>
<table class="table table-striped table-hover table-documents"> <table class="row table table-striped table-hover table-documents">
<thead> <thead>
<tr> <tr>
<th class="span6" ng-click="sortDocuments(1)"><span class="icon-chevron-{{ sortColumn == 1 ? (asc ? 'down' : 'up') : '' }}"></span> Title</th> <th class="col-xs-6" ng-click="sortDocuments(1)"><span class="glyphicon glyphicon-chevron-{{ sortColumn == 1 ? (asc ? 'down' : 'up') : '' }}"></span> Title</th>
<th class="span3" ng-click="sortDocuments(3)"><span class="icon-chevron-{{ sortColumn == 3 ? (asc ? 'down' : 'up') : '' }}"></span> Creation date</th> <th class="col-xs-3" ng-click="sortDocuments(3)"><span class="glyphicon glyphicon-chevron-{{ sortColumn == 3 ? (asc ? 'down' : 'up') : '' }}"></span> Creation date</th>
<th class="span3 hidden-phone">Tags</th> <th class="col-xs-3 hidden-xs">Tags</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-click="viewDocument(document.id)" ng-repeat="document in documents"> <tr ng-click="viewDocument(document.id)" ng-repeat="document in documents">
<td>{{ document.title }} ({{ document.file_count }})<span class="icon-share" ng-if="document.shared" tooltip="Shared"></span></td> <td>{{ document.title }} ({{ document.file_count }}) <span class="glyphicon glyphicon-share" ng-if="document.shared" tooltip="Shared"></span></td>
<td>{{ document.create_date | date: 'yyyy-MM-dd' }}</td> <td>{{ document.create_date | date: 'yyyy-MM-dd' }}</td>
<td class="hidden-phone cell-tags"> <td class="hidden-xs cell-tags">
<div class="tags"> <div class="tags">
<span class="label label-info" ng-repeat="tag in document.tags" ng-style="{ 'background': tag.color }"><span class="shorten">{{ tag.name | shorten }}</span><span class="full">{{ tag.name }}</span></span> <span class="label label-info" ng-repeat="tag in document.tags" ng-style="{ 'background': tag.color }">
<span class="shorten">{{ tag.name | shorten }}</span><span class="full">{{ tag.name }}</span>
</span>
</div> </div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="text-center"> <div class="text-center">
<pagination total-items="totalDocuments" max-size="5" page="currentPage"></pagination> <pagination total-items="totalDocuments" max-size="5" page="currentPage"></pagination>
</div> </div>
<div class="text-right"> <div class="text-right">
{{ totalDocuments }} document{{ totalDocuments > 1 ? 's' : '' }} found {{ totalDocuments }} document{{ totalDocuments > 1 ? 's' : '' }} found
</div> </div>
</div>
<div class="span8 well">
<div ui-view="document"></div>
</div> </div>
</div> </div>
<div class="col-md-8">
<div class="well" ui-view="document"></div>
</div>
</div> </div>

View File

@ -8,6 +8,8 @@
</p> </p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button ng-click="close(name)" class="btn btn-primary"><span class="icon-share icon-white"></span> Share</button> <button ng-click="close(name)" class="btn btn-primary">
<button ng-click="close(null)" class="btn">Cancel</button> <span class="glyphicon glyphicon-share"></span> Share
</button>
<button ng-click="close(null)" class="btn btn-default">Cancel</button>
</div> </div>

View File

@ -3,42 +3,48 @@
<div ng-show="document"> <div ng-show="document">
<div class="text-right"> <div class="text-right">
<div class="btn-group"> <div class="btn-group">
<button class="btn btn-danger" ng-click="deleteDocument(document)"><span class="icon-trash icon-white"></span> Delete</button> <button class="btn btn-danger" ng-click="deleteDocument(document)"><span class="glyphicon glyphicon-trash"></span> Delete</button>
<button class="btn btn-primary" ng-click="editDocument(document.id)"><span class="icon-pencil icon-white"></span> Edit</button> <button class="btn btn-primary" ng-click="editDocument(document.id)"><span class="glyphicon glyphicon-pencil"></span> Edit</button>
</div> </div>
</div> </div>
<div class="page-header"> <div class="page-header">
<h1>{{ document.title }} <small>{{ document.create_date | date: 'yyyy-MM-dd' }}</small> <img ng-if="document" ng-src="img/flag/{{ document.language }}.png" title="{{ document.language }}" /></h1> <h1>{{ document.title }} <small>{{ document.create_date | date: 'yyyy-MM-dd' }}</small> <img ng-if="document" ng-src="img/flag/{{ document.language }}.png" title="{{ document.language }}" /></h1>
<p> <p>
<button class="btn btn-small btn-inverse" ng-click="share()"><span class="icon-share icon-white"></span> Share</button> <button class="btn btn-sm btn-info" ng-click="share()">
<button class="btn btn-small" ng-repeat="share in document.shares" ng-click="showShare(share)"><span class="icon-ok"></span> {{ share.name ? share.name : 'shared' }}</button> <span class="glyphicon glyphicon-share"></span> Share
</button>
<button class="btn btn-default btn-sm" ng-repeat="share in document.shares" ng-click="showShare(share)">
<span class="glyphicon glyphicon-ok"></span> {{ share.name ? share.name : 'shared' }}
</button>
</p> </p>
<ul class="inline"> <ul class="list-inline">
<li ng-repeat="tag in document.tags"><span class="label label-info" ng-style="{ 'background': tag.color }">{{ tag.name }}</span></li> <li ng-repeat="tag in document.tags">
<span class="label label-info" ng-style="{ 'background': tag.color }">{{ tag.name }}</span>
</li>
</ul> </ul>
</div> </div>
<p ng-bind-html="document.description | newline"></p> <p ng-bind-html="document.description | newline"></p>
<ul class="thumbnails thumbnails-file" ui-sortable="fileSortableOptions" ng-model="files" ng-show="files.length > 0"> <div class="row" ui-sortable="fileSortableOptions" ng-model="files" ng-show="files.length > 0">
<li class="span2 text-center thumbnail-container" ng-repeat="file in files"> <div class="col-md-2 text-center" ng-repeat="file in files">
<div class="thumbnail"> <div class="thumbnail">
<a ng-click="openFile(file)"> <a ng-click="openFile(file)">
<img class="thumbnail-file" ng-src="api/file/{{ file.id }}/data?size=thumb" tooltip="{{ file.mimetype }}" tooltip-placement="top" /> <img class="thumbnail-file" ng-src="api/file/{{ file.id }}/data?size=thumb" tooltip="{{ file.mimetype }}" tooltip-placement="top" />
</a> </a>
<div class="caption"> <div class="caption">
<div class="pull-left"> <div class="pull-left">
<div class="btn handle"><span class="icon-resize-horizontal"></span></div> <div class="btn btn-default handle"><span class="glyphicon glyphicon-resize-horizontal"></span></div>
</div>
<div class="pull-right">
<button class="btn btn-danger" ng-click="deleteFile(file)"><span class="glyphicon glyphicon-trash"></span></button>
</div> </div>
<p class="pull-right">
<button class="btn btn-danger" ng-click="deleteFile(file)"><span class="icon-trash icon-white"></span></button>
</p>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
</div> </div>
</li> </div>
</ul> </div>
<div ui-view="file"></div> <div ui-view="file"></div>
</div> </div>

View File

@ -1,21 +1,23 @@
<div class="text-center"> <div class="text-center">
<div class="btn-group pull-left"> <div class="btn-group pull-left">
<button type="button" class="btn" ng-click="closeFile()"><span class="icon-remove"></span></button> <button type="button" class="btn btn-default" ng-click="closeFile()">
<span class="glyphicon glyphicon-remove"></span>
</button>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn" ng-click="previousFile()">Previous</button> <button type="button" class="btn btn-default" ng-click="previousFile()">Previous</button>
<button type="button" class="btn" ng-click="nextFile()">Next</button> <button type="button" class="btn btn-default" ng-click="nextFile()">Next</button>
</div> </div>
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<button type="button" class="btn" ng-click="openFile()"><span class="icon-download-alt"></span></button> <button type="button" class="btn btn-default" ng-click="openFile()">
<span class="glyphicon glyphicon-download-alt"></span>
</button>
</div> </div>
</div> </div>
<img ng-if="$stateParams.fileId && (file.mimetype == 'image/png' || file.mimetype == 'image/jpeg' || file.mimetype == 'image/gif')" ng-src="api/file/{{ $stateParams.fileId }}/data?size=web" /> <div class="text-center" ng-if="$stateParams.fileId">
<div class="text-center" ng-if="$stateParams.fileId && file.mimetype == 'application/pdf'">
<img ng-src="api/file/{{ $stateParams.fileId }}/data?size=web" /> <img ng-src="api/file/{{ $stateParams.fileId }}/data?size=web" />
</div> </div>

View File

@ -1,26 +1,25 @@
<div class="row-fluid"> <div class="row">
<div class="span4 offset4"> <div class="col-sm-offset-5 col-sm-3">
<form class="form-horizontal"> <form>
<div class="control-group"> <div class="form-group">
<label class="control-label" for="inputUsername">Username</label> <label class="sr-only" for="inputUsername">Username</label>
<div class="controls"> <input class="form-control" type="text" id="inputUsername" placeholder="Username" ng-model="user.username" />
<input type="text" id="inputUsername" placeholder="Username" ng-model="user.username" />
</div>
</div> </div>
<div class="control-group">
<label class="control-label" for="inputPassword">Password</label> <div class="form-group">
<div class="controls"> <label class="sr-only" for="inputPassword">Password</label>
<input type="password" id="inputPassword" placeholder="Password" ng-model="user.password" /> <input class="form-control" type="password" id="inputPassword" placeholder="Password" ng-model="user.password" />
</div>
</div> </div>
<div class="control-group">
<div class="controls"> <div class="checkbox">
<label class="checkbox"> <label>
<input type="checkbox" ng-model="user.remember" /> Remember me <input type="checkbox" ng-model="user.remember" /> Remember me
</label> </label>
<button type="submit" class="btn btn-primary" ng-click="login()"><span class="icon-ok icon-white"></span> Sign in</button>
</div>
</div> </div>
<button type="submit" class="btn btn-primary btn-block" ng-click="login()">
<span class="glyphicon glyphicon-ok"></span> Sign in
</button>
</form> </form>
</div> </div>
</div> </div>

View File

@ -1,5 +1,3 @@
<div class="row-fluid"> <div class="container">
<div class="span12"> <h4 class="text-center">Loading...</h4>
<h4 class="text-center">Loading...</h4>
</div>
</div> </div>

View File

@ -2,17 +2,12 @@
.table-documents { .table-documents {
thead th { thead th {
cursor: pointer; cursor: pointer;
width: 50%;
} }
tbody tr { tbody tr {
cursor: pointer; cursor: pointer;
} }
tbody td {
vertical-align: middle;
}
.cell-tags { .cell-tags {
padding: 2px; padding: 2px;
@ -27,8 +22,7 @@
&:hover { &:hover {
.tags { .tags {
position: absolute; position: absolute;
margin-top: -10px;
.label { .label {
.full { .full {
display: inline; display: inline;
@ -47,16 +41,9 @@
.loader { .loader {
position: relative; position: relative;
top: -2px; top: -2px;
&.hide {
visibility: hidden;
}
}
// Tags list &.loader-hide {
.table-tags { visibility: hidden;
tbody td {
vertical-align: middle;
} }
} }
@ -84,7 +71,11 @@
.modal-fileview { .modal-fileview {
top: 2%; top: 2%;
max-height: 96%; max-height: 96%;
overflow-y: scroll; overflow-y: scroll;
img {
width: 100%;
}
} }
// File thumbnails // File thumbnails
@ -144,4 +135,10 @@ input[readonly].share-link {
.nav-text-error { .nav-text-error {
color: #b94a48 !important; color: #b94a48 !important;
}
// Dirty Bootstrap 3 fix, see https://github.com/twbs/bootstrap/issues/6686
.row { margin: 0; padding: 0 }
.navbar-nav.navbar-right:last-child {
margin-right: auto;
} }