mirror of
https://github.com/sismics/docs.git
synced 2024-11-16 11:17:57 +01:00
Convert JS click event to <a/> links
This commit is contained in:
parent
a1af1f369f
commit
9b4b13a721
@ -95,20 +95,6 @@ angular.module('docs').controller('Document', function($scope, $timeout, $state,
|
|||||||
$scope.loadDocuments();
|
$scope.loadDocuments();
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* Go to add document form.
|
|
||||||
*/
|
|
||||||
$scope.addDocument = function() {
|
|
||||||
$state.transitionTo('document.add');
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Go to edit document form.
|
|
||||||
*/
|
|
||||||
$scope.editDocument = function(id) {
|
|
||||||
$state.transitionTo('document.edit', { id: id });
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a document.
|
* Display a document.
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="well">
|
<div class="well">
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<button class="btn btn-primary" type="button" ng-click="addDocument()"><span class="glyphicon glyphicon-plus"></span> Add a document</button>
|
<a href="#/document/add" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span> Add a document</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@ -34,7 +34,11 @@
|
|||||||
</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="glyphicon glyphicon-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>
|
||||||
|
<a href="#/document/view/{{ document.id }}" ng-click="$event.stopPropagation()"><span class="glyphicon glyphicon-link"></span></a>
|
||||||
|
</td>
|
||||||
<td>{{ document.create_date | date: 'yyyy-MM-dd' }}</td>
|
<td>{{ document.create_date | date: 'yyyy-MM-dd' }}</td>
|
||||||
<td class="hidden-xs cell-tags">
|
<td class="hidden-xs cell-tags">
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<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="glyphicon glyphicon-trash"></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="glyphicon glyphicon-pencil"></span> Edit</button>
|
<a href="#/document/edit/{{ document.id }}" class="btn btn-primary"><span class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user