Button to clear the search field, bug fix on share modal

This commit is contained in:
jendib 2014-05-12 21:39:20 +02:00
parent 20c2b0460b
commit c0a963e845
5 changed files with 18 additions and 8 deletions

View File

@ -1,3 +1,2 @@
- Automatic backup system using Quartz (server)
- Handle error while uploading a file (client)
- "X" button next to the search field to clear it (client)

View File

@ -0,0 +1,11 @@
'use strict';
/**
* Document modal share controller.
*/
angular.module('docs').controller('DocumentModalShare', function ($scope, $modalInstance) {
$scope.name = '';
$scope.close = function (name) {
$modalInstance.close(name);
}
});

View File

@ -92,12 +92,7 @@ angular.module('docs').controller('DocumentView', function ($scope, $state, $sta
$scope.share = function () {
$modal.open({
templateUrl: 'partial/docs/document.share.html',
controller: function ($scope, $modalInstance) {
$scope.name = '';
$scope.close = function (name) {
$modalInstance.close(name);
}
}
controller: 'DocumentModalShare'
}).result.then(function (name) {
if (name == null) {
return;

View File

@ -42,6 +42,7 @@
<script src="app/docs/controller/DocumentDefault.js" type="text/javascript"></script>
<script src="app/docs/controller/DocumentEdit.js" type="text/javascript"></script>
<script src="app/docs/controller/DocumentView.js" type="text/javascript"></script>
<script src="app/docs/controller/DocumentModalShare.js" type="text/javascript"></script>
<script src="app/docs/controller/FileView.js" type="text/javascript"></script>
<script src="app/docs/controller/FileModalView.js" type="text/javascript"></script>
<script src="app/docs/controller/Login.js" type="text/javascript"></script>

View File

@ -7,7 +7,7 @@
<div class="input-group">
<span class="input-group-addon">
<span class="glyphicon glyphicon-search"
<span class="glyphicon glyphicon glyphicon-info-sign"
tooltip-placement="bottom"
tooltip-html-unsafe="before:2012-05<br/>
after:2012-05<br/>
@ -18,6 +18,10 @@
lang:fra"></span>
</span>
<input type="search" class="form-control" placeholder="Search" ng-model="search" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-search" ng-show="search.length == 0"></span>
<span class="glyphicon glyphicon-remove" ng-show="search.length > 0" ng-click="search = ''"></span>
</span>
</div>
<table class="row table table-striped table-hover table-documents">