From a93cd5996de3b39f288513d99715cb76b295e770 Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Sat, 28 Mar 2015 12:48:36 +0100 Subject: [PATCH] introduce eventman.js for our utilities --- angular_app/index.html | 1 + angular_app/js/app.js | 9 --------- static/js/eventman.js | 8 ++++++++ 3 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 static/js/eventman.js diff --git a/angular_app/index.html b/angular_app/index.html index 0ab365c..84f2065 100644 --- a/angular_app/index.html +++ b/angular_app/index.html @@ -9,6 +9,7 @@ + diff --git a/angular_app/js/app.js b/angular_app/js/app.js index ca18df0..b23463a 100644 --- a/angular_app/js/app.js +++ b/angular_app/js/app.js @@ -14,13 +14,6 @@ limitations under the License. */ - -String.prototype.getTime = function() { - var ms = Date.parse(this); - return new Date(ms); -}; - - /* Register our fantastic app. */ var eventManApp = angular.module('eventManApp', [ 'ngRoute', @@ -29,8 +22,6 @@ var eventManApp = angular.module('eventManApp', [ 'ui.bootstrap' ]); -//angular.module('eventManApp', ['ui.bootstrap']); - /* Directive that can be used to make an input field react to the press of Enter. */ eventManApp.directive('ngEnter', function () { diff --git a/static/js/eventman.js b/static/js/eventman.js new file mode 100644 index 0000000..85df7af --- /dev/null +++ b/static/js/eventman.js @@ -0,0 +1,8 @@ +/** Utilities for EventMan. */ + +/* getTime method for string to convert them into Date objects. */ +String.prototype.getTime = function() { + var ms = Date.parse(this); + return new Date(ms); +}; +