mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-22 21:50:32 +00:00
Improve JavaScript coding style
To comitted code now passes the Airbnb pattern using jscs
This commit is contained in:
@@ -1,53 +1,53 @@
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* JavaScript for common UI services for mobile theme */
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @name Dialog
|
||||
* @constructor
|
||||
*/
|
||||
function Dialog() {
|
||||
}
|
||||
/**
|
||||
* @name Dialog
|
||||
* @constructor
|
||||
*/
|
||||
function Dialog() {
|
||||
}
|
||||
|
||||
Dialog.alert = function(title, content) {
|
||||
var alertPopup = this.$ionicPopup.alert({
|
||||
title: title,
|
||||
template: content
|
||||
});
|
||||
return alertPopup;
|
||||
};
|
||||
Dialog.alert = function(title, content) {
|
||||
var alertPopup = this.$ionicPopup.alert({
|
||||
title: title,
|
||||
template: content
|
||||
});
|
||||
return alertPopup;
|
||||
};
|
||||
|
||||
Dialog.confirm = function(title, content) {
|
||||
var confirmPopup = this.$ionicPopup.confirm({
|
||||
title: title,
|
||||
template: content
|
||||
});
|
||||
return confirmPopup;
|
||||
};
|
||||
Dialog.confirm = function(title, content) {
|
||||
var confirmPopup = this.$ionicPopup.confirm({
|
||||
title: title,
|
||||
template: content
|
||||
});
|
||||
return confirmPopup;
|
||||
};
|
||||
|
||||
Dialog.prompt = function(title, content) {
|
||||
var promptPopup = this.$ionicPopup.prompt({
|
||||
title: title,
|
||||
inputPlaceholder: content
|
||||
});
|
||||
return promptPopup;
|
||||
};
|
||||
Dialog.prompt = function(title, content) {
|
||||
var promptPopup = this.$ionicPopup.prompt({
|
||||
title: title,
|
||||
inputPlaceholder: content
|
||||
});
|
||||
return promptPopup;
|
||||
};
|
||||
|
||||
/**
|
||||
* @memberof Dialog
|
||||
* @desc The factory we'll register as sgDialog in the Angular module SOGo.UIMobile
|
||||
*/
|
||||
Dialog.$factory = ['$ionicPopup', function($ionicPopup) {
|
||||
angular.extend(Dialog, { $ionicPopup: $ionicPopup });
|
||||
/**
|
||||
* @memberof Dialog
|
||||
* @desc The factory we'll register as sgDialog in the Angular module SOGo.UIMobile
|
||||
*/
|
||||
Dialog.$factory = ['$ionicPopup', function($ionicPopup) {
|
||||
angular.extend(Dialog, { $ionicPopup: $ionicPopup });
|
||||
|
||||
return Dialog; // return constructor
|
||||
}];
|
||||
return Dialog; // return constructor
|
||||
}];
|
||||
|
||||
/* Angular module instanciation */
|
||||
angular.module('SOGo.UIMobile', ['ionic'])
|
||||
/* Angular module instanciation */
|
||||
angular.module('SOGo.UIMobile', ['ionic'])
|
||||
|
||||
/* Factory registration in Angular module */
|
||||
/* Factory registration in Angular module */
|
||||
.factory('sgDialog', Dialog.$factory);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user