angular.module('egHome', ['ngRoute', 'ui.bootstrap', 'egCoreMod', 'egUiMod'])
-.config(function($routeProvider, $locationProvider) {
+.config(
+ ['$routeProvider','$locationProvider',
+function($routeProvider , $locationProvider) {
+ $locationProvider.html5Mode(true);
/**
* Route resolvers allow us to run async commands
controller : 'SplashCtrl',
resolve : resolver
});
-
- // HTML5 pushstate support
- $locationProvider.html5Mode(true);
-})
+}])
/**
* Login controller.
template : '<div id="eg-print-container-for-html"></div>',
controller :
['$scope','$window','$timeout','egHatch',
- function($scope , $window , $timeout, egHatch) {
+ function($scope , $window , $timeout , egHatch) {
egHatch.onBrowserPrint = function(contentType, content) {
switch(contentType) {
* resolver. The PCRUDContext object can be used to make subsequent
* pcrud calls directly.
*
- * egPCRUD.connnect().then(
- * function(ctx) {
- * ctx.retrieve('aou', 1).then(
- * function(org) {
- * console.log(org.id());
- * ctx.disconnect();
- * }
- * )
- * }
- * );
+ * egPCRUD.connnect()
+ * .then(function(ctx) { return ctx.retrieve('aou', 1) })
+ * .then(function(org) { console.log(org.id()); ctx.disconnect() })
+ *
*/
angular.module('egCoreMod')
-// env fetcher
.factory('egPCRUD', ['$q', 'egAuth', 'egIDL', function($q, egAuth, egIDL) {
var service = {};
replace : true,
templateUrl : 'eg-status-bar-template',
controller : [
- '$scope', '$rootScope', 'egHatch',
- function($scope, $rootScope, egHatch) {
+ '$scope','$rootScope','egHatch',
+ function($scope , $rootScope , egHatch) {
$scope.messages = []; // keep a log of recent messages
$scope.netConnected = function() {
* $scope.iAmOpen = true;
*/
.directive('focusMe',
-['$timeout', '$parse',
-function($timeout, $parse) {
+ ['$timeout','$parse',
+function($timeout , $parse) {
return {
link: function(scope, element, attrs) {
var model = $parse(attrs.focusMe);
* Useful for de-focusing when no other obvious focus target exists
*/
.directive('blurMe',
-['$timeout', '$parse',
-function($timeout, $parse) {
+ ['$timeout','$parse',
+function($timeout , $parse) {
return {
link: function(scope, element, attrs) {
var model = $parse(attrs.blurMe);
// <input select-me="iWantToBeSelected"/>
// $scope.iWantToBeSelected = true;
.directive('selectMe',
-['$timeout', '$parse',
-function($timeout, $parse) {
+ ['$timeout','$parse',
+function($timeout , $parse) {
return {
link: function(scope, element, attrs) {
var model = $parse(attrs.selectMe);
* egAlertDialog.open({message : 'hello {{name}}'}).result.then(
* function() { console.log('alert closed') });
*/
-.factory('egAlertDialog', function($modal, $interpolate) {
+.factory('egAlertDialog',
+
+ ['$modal','$interpolate',
+function($modal , $interpolate) {
var service = {};
service.open = function(message, msg_scope) {
}
return service;
-})
+}])
/**
* egConfirmDialog.open("some message goes {{here}}", {
* here : 'foo', ok : function() {}, cancel : function() {}});
*/
-.factory('egConfirmDialog', function($modal, $interpolate) {
+.factory('egConfirmDialog',
+
+ ['$modal','$interpolate',
+function($modal, $interpolate) {
var service = {};
service.open = function(title, message, msg_scope) {
}
return service;
-})
+}])
/**
* Nested org unit selector modeled as a Bootstrap dropdown button.