Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation #1

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f803018
documentation - account module
gabrielmuscalu Nov 23, 2016
211c325
documentation - activity module
gabrielmuscalu Nov 23, 2016
ffd1f69
documentation - admin module
gabrielmuscalu Nov 24, 2016
090fcc6
documentation - contact module
gabrielmuscalu Nov 24, 2016
17385c4
documentation - dashboard module
gabrielmuscalu Nov 24, 2016
e172686
documentation - help module
gabrielmuscalu Nov 24, 2016
c265c20
documentation - issues module
gabrielmuscalu Nov 24, 2016
3f85811
documentation - main module
gabrielmuscalu Nov 24, 2016
c16202a
documentation - map controllers
gabrielmuscalu Nov 24, 2016
abe899c
documentation - map filters
gabrielmuscalu Nov 24, 2016
f585c55
documentation - finished map module
gabrielmuscalu Nov 25, 2016
14820a6
documentation - privacy and terms modules
gabrielmuscalu Nov 25, 2016
784718c
documentation - services
gabrielmuscalu Nov 25, 2016
e02fcb7
documentation - directives and filters
gabrielmuscalu Nov 25, 2016
8743335
documentation - date picker
gabrielmuscalu Nov 28, 2016
d0dc1f9
documentation - activity module
gabrielmuscalu Nov 28, 2016
7cf12e6
documentation - authorities, city module
gabrielmuscalu Nov 28, 2016
417cdf9
documentation - comments, contact, counter, country, county, environm…
gabrielmuscalu Nov 28, 2016
b04ad4b
documentation - pile module
gabrielmuscalu Nov 28, 2016
4c5e641
documentation - authorities module
gabrielmuscalu Nov 28, 2016
876113b
documentation - user module
gabrielmuscalu Nov 28, 2016
6fb0cdf
documentation - server auth service
gabrielmuscalu Nov 28, 2016
4593e49
documentation - server components
gabrielmuscalu Nov 28, 2016
91ac776
fixed web documentation
gabrielmuscalu Nov 29, 2016
bfe7bf7
added gulp tasks, ngdocs to package.json
gabrielmuscalu Nov 29, 2016
6ed6a59
documented routes
gabrielmuscalu Nov 29, 2016
7b704d9
test push
Dec 5, 2016
b230d12
remove test comment
Dec 5, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions client/app/account/activate/activate.controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
'use strict';

angular.module('ldrWebApp')
/**
* @ngdoc controller
* @name ActivateCtrl
* @description activate account controller
* @requires activate
* @requires $scope
* @property {Boolean} activate - user has active account
*/
.controller('ActivateCtrl', ['activate', '$scope', function (activate, $scope) {
$scope.activate = activate;
}]);
23 changes: 23 additions & 0 deletions client/app/account/fpw/fpw.controller.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
'use strict';

angular.module('ldrWebApp')
/**
* @ngdoc controller
* @name FpwCtrl
* @description reset password controller
* @requires $scope
* @requires User
* @requires LxNotificationService
* @requires responseHandler
* @requires $translate
* @property {Object} errors - errors object
* @property {Object} user - user object
* @property {Boolean} success - reset password email sent with success
*/
.controller('FpwCtrl', ['$scope', 'User', 'LxNotificationService', 'responseHandler', '$translate',
function ($scope, User, LxNotificationService, responseHandler, $translate) {
$scope.errors = {};
$scope.user = {};
$scope.success = false;

/**
* @ngdoc
* @name FpwCtrl#reset
* @methodOf FpwCtrl
* @param {Object} form - reset password form object
* @example
* <pre><form class="form" name="form" ng-submit="reset(form)" novalidate ng-if="!success"></pre>
* @description
* sends reset password email
*/
$scope.reset = function (form) {
$scope.submitted = true;

Expand Down
40 changes: 39 additions & 1 deletion client/app/account/login/login.controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
'use strict';

angular.module('ldrWebApp')
/**
* @ngdoc controller
* @name LoginCtrl
* @description login controller
* @requires $scope
* @requires Auth
* @requires $location
* @requires $window
* @requires LxNotificationService
* @requires $state
* @requires $stateParams
* @requires User
* @requires $translate
* @requires responseHandler
* @requires AUTH_URL
* @property {Object} errors - errors object
* @property {Object} user - user object
* @property {Object} fail - error response flag
*/
.controller('LoginCtrl', ['$scope', 'Auth', '$location', '$window', 'LxNotificationService', '$state',
'$stateParams', 'User', '$translate', 'responseHandler', 'AUTH_URL',
function ($scope, Auth, $location, $window, LxNotificationService, $state,
Expand All @@ -16,6 +35,15 @@ angular.module('ldrWebApp')
$stateParams.error = null;
}

/**
* @ngdoc
* @name LoginCtrl#resend
* @methodOf LoginCtrl
* @example
* <pre><a href='#' ng-click="resend()" class="tc-white"></pre>
* @description
* resends confirmation email
*/
$scope.resend = function () {

LxNotificationService.confirm($translate.instant('views.login.resendConfirmTitle'),
Expand All @@ -37,6 +65,17 @@ angular.module('ldrWebApp')

};

/**
* @ngdoc
* @name LoginCtrl#login
* @methodOf LoginCtrl
* @example
* <pre><button ng-click="login(user, form)" class="btn btn--xl btn--white btn--raised" lx-ripple
* type="submit">{{'views.login.loginButton' | translate}}
</button></pre>
* @description
* login and redirect to dashboard
*/
$scope.login = function (user, form) {
$scope.submitted = true;
$scope.fail.flag = false;
Expand All @@ -47,7 +86,6 @@ angular.module('ldrWebApp')
password: user.password
})
.then(function () {
// Logged in, redirect to dashboard
$state.go(Auth.getDefaultScreen());
})
.catch(function (err) {
Expand Down
25 changes: 25 additions & 0 deletions client/app/account/password/password.controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
'use strict';

angular.module('ldrWebApp')
/**
* @ngdoc controller
* @name PasswordCtrl
* @description change password controller
* @requires $scope
* @requires $state
* @requires User
* @requires LxNotificationService
* @requires $translate
* @property {Object} errors - errors object
* @property {Object} user - user object
* @property {Object} success - success response flag
*/
.controller('PasswordCtrl', [
'$scope',
'$state',
Expand All @@ -12,6 +25,18 @@ angular.module('ldrWebApp')
$scope.success = false;

$scope.user = {};

/**
* @ngdoc
* @name PasswordCtrl#changePassword
* @methodOf PasswordCtrl
* @param {Object} form - change password form object
* @example
* <pre><form class="form" name="changePassForm" ng-submit="changePassword(changePassForm)" novalidate
ng-if="!success"></pre>
* @description
* changes user password
*/
$scope.changePassword = function (form) {

$scope.submitted = true;
Expand Down
79 changes: 79 additions & 0 deletions client/app/account/profile/profile.controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
'use strict';

angular.module('ldrWebApp')
/**
* @ngdoc controller
* @name ProfileCtrl
* @description profile controller
* @requires CountyService
* @requires LxNotificationService
* @requires LxDialogService
* @requires Auth
* @requires $filter
* @requires ImageUpload
* @requires $rootScope
* @requires $timeout
* @requires LxProgressService
* @requires $state
* @requires CountryService
* @requires $translate
* @requires HelperService
* @requires responseHandler
* @property {Object} user - current user object
* @property {Object} selectedLanguage - selected language object
* @property {Object} country - current user country object
* @property {Array} countries - all countries array
* @property {Array} counties - all counties array
* @property {Object} availableLanguages - available languages object
* @property {Object} errors - error response object
*/
.controller('ProfileCtrl', ['$scope',
'CountyService',
'LxNotificationService',
Expand Down Expand Up @@ -53,6 +79,16 @@ angular.module('ldrWebApp')
$scope.errors = {};
};

/**
* @ngdoc
* @name ProfileCtrl#resetCounties
* @methodOf ProfileCtrl
* @param {Object} selectedCountry - selected country
* @example
* <pre><ui-select name="country" ng-model="country" required ng-change="resetCounties(country)"></pre>
* @description
* gets counties depending on selected country
*/
$scope.resetCounties = function (selectedCountry) {
var params = {
id: selectedCountry._id
Expand All @@ -68,6 +104,15 @@ angular.module('ldrWebApp')
);
};

/**
* @ngdoc
* @name ProfileCtrl#openPasswordDialog
* @methodOf ProfileCtrl
* @example
* <pre><button class="btn btn--xl btn--black btn--flat" lx-ripple ng-click="openPasswordDialog()" type="button"></pre>
* @description
* opens change password dialog
*/
$scope.openPasswordDialog = function () {
$scope.submitted = false;
$scope.pass = {
Expand All @@ -79,6 +124,17 @@ angular.module('ldrWebApp')
LxDialogService.open('password');
};

/**
* @ngdoc
* @name ProfileCtrl#closePasswordDialog
* @methodOf ProfileCtrl
* @param {Object} form - change password form object
* @param {Object} user - user form object
* @example
* <pre><form name="pwd" ng-submit="closePasswordDialog(pwd, user)" novalidate></pre>
* @description
* saves new password on dialog close
*/
$scope.closePasswordDialog = function (form, user) {

$scope.submitted = true;
Expand Down Expand Up @@ -106,6 +162,17 @@ angular.module('ldrWebApp')
}
};

/**
* @ngdoc
* @name ProfileCtrl#update
* @methodOf ProfileCtrl
* @param {Object} form - user profile form object
* @example
* <pre><button data-ng-click="update(form)" style="float: right" class="btn btn--xl btn--green btn--raised"
lx-ripple type="submit">{{'views.profile.saveChanges' | translate}}</button></pre>
* @description
* updates user profile
*/
$scope.update = function (form) {
$scope.submitted = true;

Expand Down Expand Up @@ -134,6 +201,18 @@ angular.module('ldrWebApp')

}
};

/**
* @ngdoc
* @name ProfileCtrl#changeProfilePic
* @methodOf ProfileCtrl
* @param {Array} $files - array containing new profile image
* @example
* <pre><button class="btn btn--m btn--green btn--fab" lx-ripple ngf-select="changeProfilePic($files)"
ngf-multiple="false" ngf-accept="'image/*'"><i class="mdi mdi-camera"></i></button></pre>
* @description
* uploads new profile image, then updates the user profile
*/
$scope.changeProfilePic = function ($files) {
if ($files && $files[0]) {
var file = $files[0];
Expand Down
38 changes: 38 additions & 0 deletions client/app/account/signup/signup.controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
'use strict';

angular.module('ldrWebApp')
/**
* @ngdoc controller
* @name SignupCtrl
* @description user sign in controller
* @requires $scope
* @requires Auth
* @requires User
* @requires $location
* @requires LxNotificationService
* @requires $translate
* @requires responseHandler
* @requires AUTH_URL
* @property {Object} errors - errors object
* @property {Object} user - user object
* @property {Object} success - success response flag
*/
.controller('SignupCtrl', ['$scope', 'Auth', 'User', '$location', '$window', 'LxNotificationService', '$translate',
'responseHandler', 'AUTH_URL',
function ($scope, Auth, User, $location, $window, LxNotificationService, $translate,
Expand All @@ -12,6 +28,18 @@ angular.module('ldrWebApp')

var email_created;

/**
* @ngdoc
* @name SignupCtrl#register
* @methodOf SignupCtrl
* @param {Object} user - user object
* @param {Object} form - new user form object
* @example
* <pre><form class="form" name="form" ng-submit="register(user, form)" novalidate ng-if="!success">
</pre>
* @description
* resends confirmation email
*/
$scope.register = function (user, form) {
$scope.submitted = true;
var mailLanguage = $translate.use();
Expand Down Expand Up @@ -43,6 +71,16 @@ angular.module('ldrWebApp')
}
};

/**
* @ngdoc
* @name SignupCtrl#resend
* @methodOf SignupCtrl
* @example
* <pre><button class="btn btn--xl btn--white btn--raised" lx-ripple ng-click="resend()">
* {{'views.signup.resend' | translate}}</button></pre>
* @description
* resends confirmation email
*/
$scope.resend = function () {
User.resendActivation({email: email_created}).$promise
.then(function () {
Expand Down
7 changes: 7 additions & 0 deletions client/app/account/signup/signup.directive.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
'use strict';

angular.module('ldrWebApp')
/**
* @ngdoc directive
* @name checkRequired
* @description returns true if model value is true
* @example
* <pre><input type="checkbox" name="terms" ng-model="user.terms" id="checkbox1" check-required></pre>
*/
.directive('checkRequired', [function () {
return {
require: 'ngModel',
Expand Down
Loading