var poconsole = angular.module('poconsole', ['ngJustGage', 'n3-line-chart', "ngQuickDate"]);
poconsole.config(function(ngQuickDateDefaultsProvider) {
// Configure with icons from font-awesome
return ngQuickDateDefaultsProvider.set({
closeButtonHtml: "",
buttonIconHtml: "",
nextLinkHtml: "",
prevLinkHtml: "",
// Take advantage of Sugar.js date parsing
parseDateFunction: function(str) {
d = Date.create(str);
return d.isValid() ? d : null;
}
});
});
poconsole.controller('mainCtrl', function($scope, Page) {
$scope.Page = Page;
});
//*---- FILTERS -----*//
poconsole.filter('dString', function myDateFormat($filter){
return function(text){
var tempdate= new Date(text);
return $filter('date')(tempdate, "yyyyMMdd'_'HHmmss");
};
});
poconsole.filter('sqlite_to_local', function sqliteformat($filter){
return function(text){
var utcdate= new Date(text + " UTC");
return $filter('date')(utcdate, "yyyy-MM-dd hh:mm:ss a");
};
});