Skip to content

Commit d29465c

Browse files
committed
formatDate directive
1 parent eac79ae commit d29465c

File tree

8 files changed

+11
-291
lines changed

8 files changed

+11
-291
lines changed
Binary file not shown.

bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg

Lines changed: 0 additions & 288 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dist/angular-filemanager.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/app.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
};
5454
}]);
5555

56+
app.filter('formatDate', ['$filter', function($filter) {
57+
return function(input, limit) {
58+
return input instanceof Date ?
59+
input.toISOString().substring(0, 19).replace('T', ' '):
60+
input.toString();
61+
};
62+
}]);
63+
5664
/**
5765
* jQuery inits
5866
*/

src/templates/main-table.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
{{item.model.sizeKb()}}kb
3737
</td>
3838
<td class="hidden-sm hidden-xs">
39-
{{item.model.date.toString()}}
39+
{{item.model.date | formatDate }}
4040
</td>
4141
<td class="hidden-sm hidden-xs">
4242
{{item.model.perms.toCode(item.model.type === 'dir'?'d':'-')}}

0 commit comments

Comments
 (0)