Commit 2188bae8 authored by Evren Kutar's avatar Evren Kutar

ADD refs GH-6 dgeni configuration for proper links, add missing docstrings

FIX rclose #5044 fixes zetaops/ulakbusGH-153 fixes GH-75
parent f0592803
......@@ -8,7 +8,14 @@
'use strict';
var app = angular.module(
/**
* @ngdoc module
* @name ulakbus
* @description
* Ulakbus module is the main module of ulakbus-ui. All application-wide configurations and definings of constants
* handled in this module.
*/
angular.module(
'ulakbus', [
'ui.bootstrap',
'angular-loading-bar',
......@@ -26,43 +33,47 @@ var app = angular.module(
//'schemaForm',
'gettext',
'ulakbus.uitemplates'
]).
/**
* RESTURL is the url of rest api to talk
* Based on the environment it changes from dev to prod
*/
constant("RESTURL", (function () {
// todo: below backendurl definition is for development purpose and will be deleted
var backendurl = location.href.indexOf('nightly') > -1 ? "//nightly.api.ulakbus.net/" : "//api.ulakbus.net/";
if (document.cookie.indexOf("backendurl") > -1) {
var cookiearray = document.cookie.split(';');
angular.forEach(cookiearray, function (item) {
if (item.indexOf("backendurl") > -1) {
backendurl = item.split('=')[1];
}
});
}
])
/**
* @ngdoc object
* @name RESTURL
* @module ulakbus
* @description
* RESTURL is the url of rest api to talk
* Based on the environment it changes from dev to prod
*/
.constant("RESTURL", (function () {
// todo: below backendurl definition is for development purpose and will be deleted
var backendurl = location.href.indexOf('nightly') > -1 ? "//nightly.api.ulakbus.net/" : "//api.ulakbus.net/";
if (document.cookie.indexOf("backendurl") > -1) {
var cookiearray = document.cookie.split(';');
angular.forEach(cookiearray, function (item) {
if (item.indexOf("backendurl") > -1) {
backendurl = item.split('=')[1];
}
});
}
if (location.href.indexOf("backendurl") > -1) {
var urlfromqstr = location.href.split('?')[1].split('=')[1];
backendurl = decodeURIComponent(urlfromqstr.replace(/\+/g, " "));
document.cookie = "backendurl=" + backendurl;
window.location.href = window.location.href.split('?')[0];
}
if (location.href.indexOf("backendurl") > -1) {
var urlfromqstr = location.href.split('?')[1].split('=')[1];
backendurl = decodeURIComponent(urlfromqstr.replace(/\+/g, " "));
document.cookie = "backendurl=" + backendurl;
window.location.href = window.location.href.split('?')[0];
}
return {url: backendurl};
})()).
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
*/
constant("USER_ROLES", {
all: "*",
admin: "admin",
student: "student",
staff: "staff",
dean: "dean"
}).
constant('AUTH_EVENTS', {
return {url: backendurl};
})()).
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
*/
constant("USER_ROLES", {
all: "*",
admin: "admin",
student: "student",
staff: "staff",
dean: "dean"
})
.constant('AUTH_EVENTS', {
loginSuccess: 'auth-login-success',
loginFailed: 'auth-login-failed',
logoutSuccess: 'auth-logout-success',
......@@ -72,10 +83,4 @@ constant("USER_ROLES", {
})
.config(function ($logProvider) {
$logProvider.debugEnabled(true);
});
// test the code with strict di mode to see if it works when minified
//angular.bootstrap(document, ['ulakbus'], {
// strictDi: true
//});
});
\ No newline at end of file
'use strict';
app.config(['$routeProvider', function ($routeProvider, $route) {
$routeProvider
.when('/login', {
templateUrl: 'components/auth/login.html',
controller: 'LoginCtrl'
})
.when('/dashboard', {
templateUrl: 'components/dashboard/dashboard.html',
controller: 'DashCtrl'
})
.when('/dev/settings', {
templateUrl: 'components/devSettings/devSettings.html',
controller: 'DevSettingsCtrl'
})
.when('/debug/list', {
templateUrl: 'components/debug/debug.html',
controller: 'DebugCtrl'
})
angular.module('ulakbus')
.config(['$routeProvider', function ($routeProvider, $route) {
$routeProvider
.when('/login', {
templateUrl: 'components/auth/login.html',
controller: 'LoginCtrl'
})
.when('/dashboard', {
templateUrl: 'components/dashboard/dashboard.html',
controller: 'DashCtrl'
})
.when('/dev/settings', {
templateUrl: 'components/devSettings/devSettings.html',
controller: 'DevSettingsCtrl'
})
.when('/debug/list', {
templateUrl: 'components/debug/debug.html',
controller: 'DebugCtrl'
})
// use crud without selected user
// important: regex urls must be defined later than static ones
.when('/:wf/', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDCtrl'
})
.when('/:wf/do/:cmd', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDListFormCtrl'
})
.when('/:wf/do/:cmd/:key', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDListFormCtrl'
})
.when('/:wf/:model', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDCtrl'
})
.when('/:wf/:model/do/:cmd', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDListFormCtrl'
})
.when('/:wf/:model/do/:cmd/:key', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDListFormCtrl'
})
// use crud without selected user
// important: regex urls must be defined later than static ones
.when('/:wf/', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDCtrl'
})
.when('/:wf/do/:cmd', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDListFormCtrl'
})
.when('/:wf/do/:cmd/:key', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDListFormCtrl'
})
.when('/:wf/:model', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDCtrl'
})
.when('/:wf/:model/do/:cmd', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDListFormCtrl'
})
.when('/:wf/:model/do/:cmd/:key', {
templateUrl: 'components/crud/templates/crud.html',
controller: 'CRUDListFormCtrl'
})
.otherwise({redirectTo: '/dashboard'});
}])
.otherwise({redirectTo: '/dashboard'});
}])
.run(function ($rootScope) {
$rootScope.loggedInUser = true;
......
......@@ -8,36 +8,54 @@
'use strict';
var auth = angular.module('ulakbus.auth', ['ngRoute', 'schemaForm', 'ngCookies']);
auth.controller('LoginCtrl', function ($scope, $q, $timeout, $routeParams, $rootScope, $log, Generator, LoginService) {
$scope.url = 'login';
$scope.form_params = {};
$scope.form_params['clear_wf'] = 1;
Generator.get_form($scope).then(function(data){
$scope.form = [
{ key: "username", type: "string", title: "Kullanıcı Adı"},
{ key: "password", type: "password", title: "Şifre"},
{ type: 'submit', title: 'Giriş Yap' }
];
});
$scope.loggingIn = false;
$scope.onSubmit = function (form) {
$scope.$broadcast('schemaFormValidate');
if (form.$valid) {
$scope.loggingIn = true;
$rootScope.loginAttempt = 1;
LoginService.login($scope.url, $scope.model)
.error(function(data){
$scope.message = data.title;
})
.then(function () {
$scope.loggingIn = false;
})
}
else {
$log.debug("not valid");
}
};
$log.debug('login attempt: ', $rootScope.loginAttempt);
/**
* @ngdoc module
* @name ulakbus.auth
* @description
* ulakbus.auth module handles authorization process of ulakbus-ui.
*
* @requires ngRoute
* @requires schemaForm
* @requires ngCookies
*/
angular.module('ulakbus.auth', ['ngRoute', 'schemaForm', 'ngCookies'])
/**
* @ngdoc controller
* @name LoginCtrl
* @module ulakbus.auth
* @description
* LoginCtrl responsible to handle login process.
* Using 'formService.get_form' function generates the login form and post it to the API with input datas.
*/
.controller('LoginCtrl', function ($scope, $q, $timeout, $routeParams, $rootScope, $log, Generator, LoginService) {
$scope.url = 'login';
$scope.form_params = {};
$scope.form_params['clear_wf'] = 1;
Generator.get_form($scope).then(function (data) {
$scope.form = [
{key: "username", type: "string", title: "Kullanıcı Adı"},
{key: "password", type: "password", title: "Şifre"},
{type: 'submit', title: 'Giriş Yap'}
];
});
$scope.loggingIn = false;
$scope.onSubmit = function (form) {
$scope.$broadcast('schemaFormValidate');
if (form.$valid) {
$scope.loggingIn = true;
$rootScope.loginAttempt = 1;
LoginService.login($scope.url, $scope.model)
.error(function (data) {
$scope.message = data.title;
})
.then(function () {
$scope.loggingIn = false;
})
}
else {
$log.debug("not valid");
}
};
$log.debug('login attempt: ', $rootScope.loginAttempt);
});
\ No newline at end of file
});
\ No newline at end of file
......@@ -8,39 +8,44 @@
"use strict";
// TODO: login url change with correct one
auth.factory('LoginService', function ($http, $rootScope, $location, $log, RESTURL) {
var loginService = {};
loginService.login = function (url, credentials) {
credentials['cmd'] = "do";
return $http
.post(RESTURL.url + url, credentials)
.success(function (data, status, headers, config) {
//$window.sessionStorage.token = data.token;
$rootScope.loggedInUser = true;
})
.error(function (data, status, headers, config) {
// Handle login errors here
return data;
angular.module('ulakbus.auth')
/**
* @ngdoc service
* @name LoginService
* @description
* LoginService provides generic functions for authorization process.
*/
.factory('LoginService', function ($http, $rootScope, $location, $log, RESTURL) {
var loginService = {};
loginService.login = function (url, credentials) {
credentials['cmd'] = "do";
return $http
.post(RESTURL.url + url, credentials)
.success(function (data, status, headers, config) {
//$window.sessionStorage.token = data.token;
$rootScope.loggedInUser = true;
})
.error(function (data, status, headers, config) {
// Handle login errors here
return data;
});
};
loginService.logout = function () {
$log.debug("logout");
return $http.post(RESTURL.url + 'logout', {}).success(function (data) {
$rootScope.loggedInUser = false;
$log.debug("loggedout");
$location.path("/login");
});
};
loginService.logout = function () {
$log.debug("logout");
return $http.post(RESTURL.url + 'logout', {}).success(function (data) {
$rootScope.loggedInUser = false;
$log.debug("loggedout");
$location.path("/login");
});
};
};
loginService.isValidEmail = function (email) {
var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
return re.test(email);
};
loginService.isValidEmail = function (email) {
var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
return re.test(email);
};
return loginService;
});
\ No newline at end of file
return loginService;
});
\ No newline at end of file
......@@ -258,6 +258,10 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
CrudUtility.generateParam($scope, $routeParams, $routeParams.cmd);
Generator.get_wf($scope);
}
if ($scope.object) {
$scope.createListObjects();
}
};
$scope.reloadCmd = function () {
$scope.reload({});
......@@ -280,6 +284,14 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
})
/**
* @ngdoc directive
* @name crudListDirective
* @module ulakbus.crud
* @description
* directive for listing objects.
* provides template for `scope.objects` object.
*/
.directive('crudListDirective', function () {
return {
templateUrl: 'components/crud/templates/list.html',
......@@ -287,7 +299,14 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
replace: true
};
})
/**
* @ngdoc directive
* @name crudFormDirective
* @module ulakbus.crud
* @description
* directive for form generation.
* provides template for `scope.forms` object.
*/
.directive('crudFormDirective', function () {
return {
templateUrl: 'components/crud/templates/form.html',
......@@ -295,7 +314,14 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
replace: true
};
})
/**
* @ngdoc directive
* @name crudShowDirective
* @module ulakbus.crud
* @description
* directive for single object or detail of an object.
* provides template for `scope.object` object.
*/
.directive('crudShowDirective', function () {
return {
templateUrl: 'components/crud/templates/show.html',
......@@ -303,7 +329,14 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
replace: true
};
})
/**
* @ngdoc directive
* @name formLocator
* @module ulakbus.crud
* @description
* directive for finding form element. we use this directive because when form dynamically generated using
* schemaform it belongs to a scope which is hard to reach. This makes it easy to locate form object.
*/
.directive('formLocator', function () {
return {
link: function (scope) {
......@@ -312,6 +345,14 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
}
})
/**
* @ngdoc directive
* @name crudFilters
* @module ulakbus.crud
* @description
* directive for filtering functionality. There are three types of filters; `check`, `select`, and `date`.
* @todo filter items returns unselected in response object
*/
.directive('crudFilters', function(Generator) {
return {
templateUrl: 'components/crud/templates/filter.html',
......
......@@ -8,7 +8,7 @@
'use strict';
app.config(['$routeProvider', function ($routeProvider) {
angular.module('ulakbus').config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/error/500', {
templateUrl: 'components/error_pages/500.html',
......
......@@ -8,7 +8,14 @@
'use strict';
var app = angular.module(
/**
* @ngdoc module
* @name ulakbus
* @description
* Ulakbus module is the main module of ulakbus-ui. All application-wide configurations and definings of constants
* handled in this module.
*/
angular.module(
'ulakbus', [
'ui.bootstrap',
'angular-loading-bar',
......@@ -31,43 +38,47 @@ var app = angular.module(
// @if NODE_ENV='DEVELOPMENT'
'ulakbus.uitemplates'
// @endif
]).
/**
* RESTURL is the url of rest api to talk
* Based on the environment it changes from dev to prod
*/
constant("RESTURL", (function () {
// todo: below backendurl definition is for development purpose and will be deleted
var backendurl = location.href.indexOf('nightly') > -1 ? "//nightly.api.ulakbus.net/" : "//api.ulakbus.net/";
if (document.cookie.indexOf("backendurl") > -1) {
var cookiearray = document.cookie.split(';');
angular.forEach(cookiearray, function (item) {
if (item.indexOf("backendurl") > -1) {
backendurl = item.split('=')[1];
}
});
}
])
/**
* @ngdoc object
* @name RESTURL
* @module ulakbus
* @description
* RESTURL is the url of rest api to talk
* Based on the environment it changes from dev to prod
*/
.constant("RESTURL", (function () {
// todo: below backendurl definition is for development purpose and will be deleted
var backendurl = location.href.indexOf('nightly') > -1 ? "//nightly.api.ulakbus.net/" : "//api.ulakbus.net/";
if (document.cookie.indexOf("backendurl") > -1) {
var cookiearray = document.cookie.split(';');
angular.forEach(cookiearray, function (item) {
if (item.indexOf("backendurl") > -1) {
backendurl = item.split('=')[1];
}
});
}
if (location.href.indexOf("backendurl") > -1) {
var urlfromqstr = location.href.split('?')[1].split('=')[1];
backendurl = decodeURIComponent(urlfromqstr.replace(/\+/g, " "));
document.cookie = "backendurl=" + backendurl;
window.location.href = window.location.href.split('?')[0];
}
if (location.href.indexOf("backendurl") > -1) {
var urlfromqstr = location.href.split('?')[1].split('=')[1];
backendurl = decodeURIComponent(urlfromqstr.replace(/\+/g, " "));
document.cookie = "backendurl=" + backendurl;
window.location.href = window.location.href.split('?')[0];
}
return {url: backendurl};
})()).
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
*/
constant("USER_ROLES", {
all: "*",
admin: "admin",
student: "student",
staff: "staff",
dean: "dean"
}).
constant('AUTH_EVENTS', {
return {url: backendurl};
})()).
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
*/
constant("USER_ROLES", {
all: "*",
admin: "admin",
student: "student",
staff: "staff",
dean: "dean"
})
.constant('AUTH_EVENTS', {
loginSuccess: 'auth-login-success',
loginFailed: 'auth-login-failed',
logoutSuccess: 'auth-logout-success',
......@@ -82,10 +93,4 @@ constant("USER_ROLES", {
// @if NODE_ENV='DEVELOPMENT'
$logProvider.debugEnabled(true);
// @endif
});
// test the code with strict di mode to see if it works when minified
//angular.bootstrap(document, ['ulakbus'], {
// strictDi: true
//});
});
\ No newline at end of file
......@@ -6,11 +6,14 @@
* (GPLv3). See LICENSE.txt for details.
*/
/**
* logout directive
*/
app.directive('logout', function ($http, $location, RESTURL) {
angular.module('ulakbus')
/**
* @ngdoc directive
* @name logout
* @description
* logout directive provides a button with click event. When triggered it post to /logout path of the API.
*/
.directive('logout', function ($http, $location, RESTURL) {
return {
link: function ($scope, $element, $rootScope) {
$element.on('click', function () {
......@@ -22,11 +25,16 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* headerNotification directive for header
* @ngdoc directive
* @name headerNotification
* @description
* This directive is responsible to get and show notification.
* It calls API's /notify path with given interval and broadcasts `notifications` application-wide.
* There are 4 types of notifications:
* 1: tasks, 2: messages, 3: announcements, 4: recents
* - Notifications can be disabled in /dev/settings page
*/
.directive('headerNotification', function ($http, $rootScope, $cookies, $interval, RESTURL) {
return {
templateUrl: 'shared/templates/directives/header-notification.html',
......@@ -61,6 +69,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
// when clicked mark as read notification
// it can be list of notifications
// todo: do it in detail page of notification
$scope.markAsRead = function (items) {
$http.post(RESTURL.url + "notify", {ignoreLoadingBar: true, read: [items]})
.success(function (data) {
......@@ -76,9 +85,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
*
* @ngdoc directive
* @name searchDirective
* @description
* This directive provides reusable search form application-wide.
* When search form submitted and response returns, it broadcasts the result with key `updateObjects`.
*/
.directive('searchDirective', function (Generator, $log, $rootScope) {
return {
......@@ -130,8 +142,10 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* @ngdoc directive
* @name sortDirective
* @description
*
*/
.directive('sortDirective', function (Generator, $log) {
......@@ -180,13 +194,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* collapseMenu directive
* @ngdoc directive
* @name collapseMenu
* @description
* toggle collapses sidebar menu when clicked menu button
*/
.directive('collapseMenu', function ($timeout, $window, $cookies) {
return {
templateUrl: 'shared/templates/directives/menuCollapse.html',
......@@ -224,11 +237,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* headerSubmenu directive
* @ngdoc directive
* @name headerSubmenu
* @description
*
*/
.directive('headerSubMenu', function ($location) {
return {
templateUrl: 'shared/templates/directives/header-sub-menu.html',
......@@ -243,12 +257,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* breadcrumb directive
* @ngdoc directive
* @name breadcrumb
* @description
* produces breadcrumb with related links
*/
.directive('headerBreadcrumb', function ($location) {
return {
templateUrl: 'shared/templates/directives/header-breadcrumb.html',
......@@ -261,12 +275,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* selected user directive
* todo: unused
* @ngdoc directive
* @name selectedUser
* @description
*
*/
.directive('selectedUser', function ($http, RESTURL) {
return {
templateUrl: 'shared/templates/directives/selected-user.html',
......@@ -295,14 +309,14 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* sidebar directive
* @ngdoc directive
* @name sidebar
* @description
* changes breadcrumb when an item selected
* consists of menu items of related user or transaction
* controller communicates with dashboard controller to shape menu items and authz
*/
.directive('sidebar', ['$location', function () {
return {
templateUrl: 'shared/templates/directives/sidebar.html',
......@@ -459,7 +473,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
}])
/**
* @ngdoc directive
* @name stats
* @description
*
*/
.directive('stats', function () {
return {
templateUrl: 'shared/templates/directives/stats.html',
......@@ -478,11 +497,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
};
})
/**
* header menu notifications directive
* @ngdoc directive
* @name notifications
* @description
*
*/
.directive('notifications', function () {
return {
templateUrl: 'shared/templates/directives/notifications.html',
......@@ -490,11 +510,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
replace: true
};
})
/**
* msgbox directive
* @ngdoc directive
* @name msgbox
* @description
*
*/
.directive('msgbox', function () {
return {
templateUrl: 'shared/templates/directives/msgbox.html',
......@@ -502,12 +523,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
replace: false
};
})
/**
* alert directive
* @ngdoc directive
* @name alertBox
* @description
*
*/
.directive('alertBox', function ($timeout) {
return {
templateUrl: 'shared/templates/directives/alert.html',
......@@ -523,11 +544,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* search directive in sidebar
* @ngdoc directive
* @name sidebarSearch
* @description
*
*/
.directive('sidebarSearch', function () {
return {
templateUrl: 'shared/templates/directives/sidebar-search.html',
......@@ -539,7 +561,12 @@ app.directive('logout', function ($http, $location, RESTURL) {
}
};
})
/**
* @ngdoc directive
* @name fileread
* @description
*
*/
.directive("fileread", function ($timeout) {
return {
scope: {
......@@ -564,20 +591,4 @@ app.directive('logout', function ($http, $location, RESTURL) {
});
}
}
});
//app.directive('timeline', function () {
// return {
// templateUrl: 'shared/templates/directives/timeline.html',
// restrict: 'E',
// replace: true,
// };
//});
//
//app.directive('chat', function () {
// return {
// templateUrl: 'shared/templates/directives/chat.html',
// restrict: 'E',
// replace: true,
// };
//});
\ No newline at end of file
});
\ No newline at end of file
......@@ -576,7 +576,7 @@ angular.module('formService', ['ui.bootstrap'])
url: scope.url,
wf: scope.wf,
nodeModelChange: function (item) {
debugger;
//debugger;
}
});
......@@ -1045,10 +1045,11 @@ angular.module('formService', ['ui.bootstrap'])
* @description
* controller for listnode, node and linkedmodel modal and save data of it
* @param items
* @requires $scope, $uibModalInstance, $route
* @param $scope
* @param $uibModalInstance
* @param $route
* @returns returns value for modal
*/
.controller('ModalCtrl', function ($scope, $uibModalInstance, Generator, items) {
angular.forEach(items, function (value, key) {
$scope[key] = items[key];
......@@ -1091,7 +1092,9 @@ angular.module('formService', ['ui.bootstrap'])
})
/**
* @ngdoc directive
* @name modalForNodes
* @module formService
* @description
* add modal directive for nodes
* @param $uibModal
......@@ -1210,13 +1213,15 @@ angular.module('formService', ['ui.bootstrap'])
/**
* @ngdoc directive
* @name addModalForLinkedModel
* @module formService
* @description
* add modal directive for linked models
* @param $uibModal, Generator
* @param $uibModal
* @param Generator
* @returns openmodal directive
*/
.directive('addModalForLinkedModel', function ($uibModal, $rootScope, $route, Generator) {
return {
link: function (scope, element, attributes) {
......@@ -1292,7 +1297,7 @@ angular.module('formService', ['ui.bootstrap'])
scope.$emit('modalFormLocator');
}
}
})
});
/**
* @name editModalForLinkedModel
......@@ -1304,29 +1309,29 @@ angular.module('formService', ['ui.bootstrap'])
// todo: useless modal check if any use cases?? and delete if useless
.directive('editModalForLinkedModel', function ($uibModal, Generator) {
return {
link: function (scope, element) {
element.on('click', function () {
var modalInstance = $uibModal.open({
animation: false,
templateUrl: 'shared/templates/linkedModelModalContent.html',
controller: 'ModalCtrl',
size: 'lg',
resolve: {
items: function () {
return Generator.get_form({
url: 'crud',
form_params: {'model': scope.form.title, "cmd": "form"}
});
}
}
});
modalInstance.result.then(function (childmodel, key) {
Generator.submit(childmodel);
});
});
}
};
});
\ No newline at end of file
//.directive('editModalForLinkedModel', function ($uibModal, Generator) {
// return {
// link: function (scope, element) {
// element.on('click', function () {
// var modalInstance = $uibModal.open({
// animation: false,
// templateUrl: 'shared/templates/linkedModelModalContent.html',
// controller: 'ModalCtrl',
// size: 'lg',
// resolve: {
// items: function () {
// return Generator.get_form({
// url: 'crud',
// form_params: {'model': scope.form.title, "cmd": "form"}
// });
// }
// }
// });
//
// modalInstance.result.then(function (childmodel, key) {
// Generator.submit(childmodel);
// });
// });
// }
// };
//});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
// Canonical path provides a consistent path (i.e. always forward slashes) across different OSes
var path = require('canonical-path');
var Package = require('dgeni').Package;
// Create and export a new Dgeni package called dgeni-example. This package depends upon
// the jsdoc and nunjucks packages defined in the dgeni-packages npm module.
module.exports = new Package('docs_conf', [
require('dgeni-packages/base'),
require('dgeni-packages/jsdoc'),
......@@ -13,48 +10,64 @@ module.exports = new Package('docs_conf', [
require('dgeni-packages/links')
])
// Configure our dgeni-example package. We can ask the Dgeni dependency injector
// to provide us with access to services and processors that we wish to configure
.config(function(log, readFilesProcessor, templateFinder, writeFilesProcessor, computeIdsProcessor, computePathsProcessor, getAliases) {
// Set logging level
log.level = 'info';
// Specify the base path used when resolving relative paths to source and output files
readFilesProcessor.basePath = path.resolve(__dirname, '..');
console.log(readFilesProcessor.basePath);
// Specify collections of source files that should contain the documentation to extract
readFilesProcessor.sourceFiles = [
{
// Process all js files in `app` and its subfolders ...
include: ['app/components/**/*.js', 'app/zetalib/*.js', 'app/shared/**/*.js'],
// ... except for this one!
exclude: 'app/**/*_test.js',
// When calculating the relative path to these files use this as the base path.
// So `src/foo/bar.js` will have relative path of `foo/bar.js`
basePath: 'app'
}
];
// Specify where the writeFilesProcessor will write our generated doc files
writeFilesProcessor.outputFolder = 'docs/html';
templateFinder.templateFolders.push(path.resolve(__dirname, 'templates'));
// Specify how to match docs to templates.
// In this case we just use the same static template for all docs
templateFinder.templatePatterns.push('common.template.html');
computeIdsProcessor.idTemplates.push({
docTypes: [ 'controller' ],
idTemplate: 'module:${module}.${docType}:${name}',
getAliases: getAliases
});
computePathsProcessor.pathTemplates.push({
docTypes: [ 'controller' ],
pathTemplate: '${area}/${module}/${docType}/${name}.html',
outputPathTemplate: '/partials/${area}/${module}/${docType}/${name}.html'
});
computeIdsProcessor.idTemplates = [
{
docTypes: ['module' ],
idTemplate: 'module:${name}',
getAliases: getAliases
},
{
docTypes: ['method', 'property', 'event'],
getId: function(doc) {
var parts = doc.name.split('#');
var name = parts.pop();
parts.push(doc.docType + ':' + name);
return parts.join('#');
},
getAliases: getAliases
},
{
docTypes: [ 'controller', 'provider', 'service', 'directive', 'input', 'object', 'function', 'filter', 'type' ],
idTemplate: 'module:${module}.${docType}:${name}',
getAliases: getAliases
}
];
computePathsProcessor.pathTemplates = [
{
docTypes: [ 'controller', 'provider', 'service', 'directive', 'input', 'object', 'function', 'filter', 'type' ],
pathTemplate: '${docType}/${name}.html',
outputPathTemplate: 'partials/${area}/${module}/${docType}/${name}.html'
},
{
docTypes: ['module' ],
pathTemplate: '/${area}/${name}',
outputPathTemplate: 'partials/${area}/${name}/index.html'
},
{
docTypes: ['componentGroup' ],
pathTemplate: '${area}/${moduleName}/${groupType}',
outputPathTemplate: 'partials/${area}/${moduleName}/${groupType}/index.html'
}
];
});
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]>
<html lang="en" ng-app="ulakbus" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html lang="en" ng-app="ulakbus" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html lang="en" ng-app="ulakbus" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en" ng-app="ulakbus" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ULAKBUS-UI API DOCUMENTATION</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="/img/favicon.ico">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="static/style.css">
<link href="styles/roboto/roboto.css" rel="stylesheet">
<link href="styles/jquery-ui.min.css" rel="stylesheet">
<link href="styles/monokai-sublime.css" rel="stylesheet">
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css" type="text/css">
</head>
<body>
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0"
ng-if="$root.loggedInUser">
<collapse-menu></collapse-menu>
<!--<ul class="header-menu">-->
<!--<li><a href="">Mesajlar</a></li>-->
<!--<li><a href="">Görevler</a></li>-->
<!--<li><a href="">Raporlar</a></li>-->
<!--<li><a href="">Ayarlar</a></li>-->
<!--</ul>-->
<div class="navbar-header">
<div class="brand">
<a href="#/dashboard" ng-click="$root.breadcrumbLinks = ['Panel']" class="logo"><img
src="/img/brand-logo.png"/></a>
</div>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- /.navbar-header -->
<header-notification></header-notification>
</nav>
<div class="manager-view">
<div class="manager-view-inner">
<div class="manager-view-content">
<div class="row">
<div class="main" ng-view>
</div>
</div>
</div>
</div>
</div>
<alert-box></alert-box>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-i18n/angular-locale_tr.js"></script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular-route/angular-route.min.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.min.js"></script>
<script src="bower_components/angular-resource/angular-resource.min.js"></script>
<script src="app.js"></script>
</body>
</html>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">ModalCtrl</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- controller in module <a href=""></a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>controller for listnode, node and linkedmodel modal and save data of it</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>ModalCtrl(items, $scope, $uibModalInstance, $route);</code></p>
<section class="api-section">
<h3>Arguments</h3>
<table class="variables-matrix input-arguments">
<thead>
<tr>
<th>Param</th>
<th>Type</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>
items
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
$scope
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
$uibModalInstance
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
$route
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td></td>
<td><p>returns value for modal</p>
</td>
</tr>
</table>
</div>
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -12,13 +12,13 @@
</tr>
<tr>
<td><a href="api/formService/function/makeUrl">makeUrl</a></td>
<td><a href="function/makeUrl.html">makeUrl</a></td>
<td><p>this function generates url combining backend url and the related object properties for http requests</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/generate">generate</a></td>
<td><a href="function/generate.html">generate</a></td>
<td><ul>
<li>generate function is inclusive for form generation
defines given scope&#39;s client_cmd, model, schema, form, token, object_id objects</li>
......@@ -27,13 +27,13 @@ defines given scope&#39;s client_cmd, model, schema, form, token, object_id obje
</tr>
<tr>
<td><a href="api/formService/function/group">group</a></td>
<td><a href="function/group.html">group</a></td>
<td><p>group function to group form layout by form meta data for layout</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/prepareFormItems">prepareFormItems</a></td>
<td><a href="function/prepareFormItems.html">prepareFormItems</a></td>
<td><p>prepareFormItems looks up fields of schema objects and changes their types to proper type for schemaform
for listnode, node and model types it uses templates to generate modal
prepareforms checks input types and convert if necessary</p>
......@@ -41,13 +41,13 @@ prepareforms checks input types and convert if necessary</p>
</tr>
<tr>
<td><a href="api/formService/function/dateformatter">dateformatter</a></td>
<td><a href="function/dateformatter.html">dateformatter</a></td>
<td><p>dateformatter handles all date fields and returns humanized and jquery datepicker format dates</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/doItemAction">doItemAction</a></td>
<td><a href="function/doItemAction.html">doItemAction</a></td>
<td><p>mode could be in [&#39;normal&#39;, &#39;modal&#39;, &#39;new&#39;] . the default mode is &#39;normal&#39; and it loads data on same
tab without modal. &#39;modal&#39; will use modal to manipulate data and do all actions in that modal. &#39;new&#39;
will be open new page with response data</p>
......@@ -55,57 +55,57 @@ will be open new page with response data</p>
</tr>
<tr>
<td><a href="api/formService/function/get_form">get_form</a></td>
<td><a href="function/get_form.html">get_form</a></td>
<td><p>Communicates with api with given scope object.</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_list">get_list</a></td>
<td><a href="function/get_list.html">get_list</a></td>
<td><p>gets list of related wf/model</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_wf">get_wf</a></td>
<td><a href="function/get_wf.html">get_wf</a></td>
<td><p>get_wf is the main function for client_cmd based api calls
based on response content it redirects to related path/controller with pathDecider function</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/isValidEmail">isValidEmail</a></td>
<td><a href="function/isValidEmail.html">isValidEmail</a></td>
<td><p>checks if given value is a valid email address.</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/isValidTCNo">isValidTCNo</a></td>
<td><a href="function/isValidTCNo.html">isValidTCNo</a></td>
<td><p>checks if given value is a valid identity number for Turkey.</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/isValidDate">isValidDate</a></td>
<td><a href="function/isValidDate.html">isValidDate</a></td>
<td><p>checks if given value can be parsed as Date object</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/pageData">pageData</a></td>
<td><a href="function/pageData.html">pageData</a></td>
<td><p>pageData object is moving object from response to controller
with this object controller will not need to call the api for response object to work on to</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/pathDecider">pathDecider</a></td>
<td><a href="function/pathDecider.html">pathDecider</a></td>
<td><p>pathDecider is used to redirect related path by looking up the data in response</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/redirectTo">redirectTo</a></td>
<td><a href="function/redirectTo.html">redirectTo</a></td>
<td><p>redirectTo function redirects to related controller and path with given data
before redirect setPageData must be called and pageData need to be defined
otherwise redirected path will call api for its data</p>
......@@ -113,24 +113,24 @@ otherwise redirected path will call api for its data</p>
</tr>
<tr>
<td><a href="api/formService/function/get_diff">get_diff</a></td>
<td><a href="function/get_diff.html">get_diff</a></td>
<td></td>
</tr>
<tr>
<td><a href="api/formService/function/get_diff_array">get_diff_array</a></td>
<td><a href="function/get_diff_array.html">get_diff_array</a></td>
<td><p>extracts items of second array from the first array</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/item_from_array">item_from_array</a></td>
<td><a href="function/item_from_array.html">item_from_array</a></td>
<td><p>get item unicode name from titleMap</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/submit">submit</a></td>
<td><a href="function/submit.html">submit</a></td>
<td><p>submit function is general function for submiting forms.
redirectTo param is used for redirect if return value will be evaluated in a new page.</p>
</td>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
- function in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -47,7 +47,7 @@
</tr>
<tr>
<td><a href="api/formService/service/Generator">Generator</a></td>
<td><a href="service/Generator.html">Generator</a></td>
<td><p>form service&#39;s Generator factory service handles all generic form operations</p>
</td>
</tr>
......@@ -64,13 +64,13 @@
</tr>
<tr>
<td><a href="api/formService/function/makeUrl">makeUrl</a></td>
<td><a href="function/makeUrl.html">makeUrl</a></td>
<td><p>this function generates url combining backend url and the related object properties for http requests</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/generate">generate</a></td>
<td><a href="function/generate.html">generate</a></td>
<td><ul>
<li>generate function is inclusive for form generation
defines given scope&#39;s client_cmd, model, schema, form, token, object_id objects</li>
......@@ -79,13 +79,13 @@ defines given scope&#39;s client_cmd, model, schema, form, token, object_id obje
</tr>
<tr>
<td><a href="api/formService/function/group">group</a></td>
<td><a href="function/group.html">group</a></td>
<td><p>group function to group form layout by form meta data for layout</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/prepareFormItems">prepareFormItems</a></td>
<td><a href="function/prepareFormItems.html">prepareFormItems</a></td>
<td><p>prepareFormItems looks up fields of schema objects and changes their types to proper type for schemaform
for listnode, node and model types it uses templates to generate modal
prepareforms checks input types and convert if necessary</p>
......@@ -93,13 +93,13 @@ prepareforms checks input types and convert if necessary</p>
</tr>
<tr>
<td><a href="api/formService/function/dateformatter">dateformatter</a></td>
<td><a href="function/dateformatter.html">dateformatter</a></td>
<td><p>dateformatter handles all date fields and returns humanized and jquery datepicker format dates</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/doItemAction">doItemAction</a></td>
<td><a href="function/doItemAction.html">doItemAction</a></td>
<td><p>mode could be in [&#39;normal&#39;, &#39;modal&#39;, &#39;new&#39;] . the default mode is &#39;normal&#39; and it loads data on same
tab without modal. &#39;modal&#39; will use modal to manipulate data and do all actions in that modal. &#39;new&#39;
will be open new page with response data</p>
......@@ -107,57 +107,57 @@ will be open new page with response data</p>
</tr>
<tr>
<td><a href="api/formService/function/get_form">get_form</a></td>
<td><a href="function/get_form.html">get_form</a></td>
<td><p>Communicates with api with given scope object.</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_list">get_list</a></td>
<td><a href="function/get_list.html">get_list</a></td>
<td><p>gets list of related wf/model</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_wf">get_wf</a></td>
<td><a href="function/get_wf.html">get_wf</a></td>
<td><p>get_wf is the main function for client_cmd based api calls
based on response content it redirects to related path/controller with pathDecider function</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/isValidEmail">isValidEmail</a></td>
<td><a href="function/isValidEmail.html">isValidEmail</a></td>
<td><p>checks if given value is a valid email address.</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/isValidTCNo">isValidTCNo</a></td>
<td><a href="function/isValidTCNo.html">isValidTCNo</a></td>
<td><p>checks if given value is a valid identity number for Turkey.</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/isValidDate">isValidDate</a></td>
<td><a href="function/isValidDate.html">isValidDate</a></td>
<td><p>checks if given value can be parsed as Date object</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/pageData">pageData</a></td>
<td><a href="function/pageData.html">pageData</a></td>
<td><p>pageData object is moving object from response to controller
with this object controller will not need to call the api for response object to work on to</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/pathDecider">pathDecider</a></td>
<td><a href="function/pathDecider.html">pathDecider</a></td>
<td><p>pathDecider is used to redirect related path by looking up the data in response</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/redirectTo">redirectTo</a></td>
<td><a href="function/redirectTo.html">redirectTo</a></td>
<td><p>redirectTo function redirects to related controller and path with given data
before redirect setPageData must be called and pageData need to be defined
otherwise redirected path will call api for its data</p>
......@@ -165,24 +165,24 @@ otherwise redirected path will call api for its data</p>
</tr>
<tr>
<td><a href="api/formService/function/get_diff">get_diff</a></td>
<td><a href="function/get_diff.html">get_diff</a></td>
<td></td>
</tr>
<tr>
<td><a href="api/formService/function/get_diff_array">get_diff_array</a></td>
<td><a href="function/get_diff_array.html">get_diff_array</a></td>
<td><p>extracts items of second array from the first array</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/item_from_array">item_from_array</a></td>
<td><a href="function/item_from_array.html">item_from_array</a></td>
<td><p>get item unicode name from titleMap</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/submit">submit</a></td>
<td><a href="function/submit.html">submit</a></td>
<td><p>submit function is general function for submiting forms.
redirectTo param is used for redirect if return value will be evaluated in a new page.</p>
</td>
......@@ -191,6 +191,29 @@ redirectTo param is used for redirect if return value will be evaluated in a new
</table>
</div>
<div>
<h3 class="component-heading" id="directive">Directive</h3>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="directive/modalForNodes.html">modalForNodes</a></td>
<td><p>add modal directive for nodes</p>
</td>
</tr>
<tr>
<td><a href="directive/addModalForLinkedModel.html">addModalForLinkedModel</a></td>
<td><p>add modal directive for linked models</p>
</td>
</tr>
</table>
</div>
</div>
......
......@@ -8,7 +8,7 @@
<li>
- service in module <a href="api/formService">formService</a>
- service in module <a href="/api/formService">formService</a>
</li>
</ol>
</header>
......
......@@ -12,7 +12,7 @@
</tr>
<tr>
<td><a href="api/formService/service/Generator">Generator</a></td>
<td><a href="service/Generator.html">Generator</a></td>
<td><p>form service&#39;s Generator factory service handles all generic form operations</p>
</td>
</tr>
......
<header class="api-profile-header">
<h1 class="api-profile-header-heading">CRUDCtrl</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- controller in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>CRUDCtrl controller is base controller for crud module to redirect to related controller
This controller play an empty role for api calls.
With response data, location path change to related controller</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>CRUDCtrl();</code></p>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">object</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">CRUDListFormCtrl</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- controller in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>CRUDListFormCtrl is the main controller for crud module
Based on the client_cmd parameter it generates its scope items.
client_cmd can be in [&#39;show&#39;, &#39;list&#39;, &#39;form&#39;, &#39;reload&#39;, &#39;refresh&#39;]
There are 3 directives to manipulate controllers scope objects in crud.html</p>
<p>The controller works in 2 ways, with and without pageData.
pageData is generated by formService.Generator and it contains data to manipulate page.
If pageData has set, using Generator&#39;s getPageData() function, sets its scope items. After getting pageData
pageData must be set to <code>{pageData: false}</code> for clear scope of next job.</p>
<p>If pageData has not set using Generator&#39;s get_wf() function gets scope items from api call.</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>CRUDListFormCtrl();</code></p>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">object</a></td>
<td></td>
</tr>
</table>
</div>
......@@ -12,7 +12,7 @@
</tr>
<tr>
<td><a href="api/ulakbus.crud/controller/CRUDCtrl.html">CRUDCtrl</a></td>
<td><a href="controller/CRUDCtrl.html">CRUDCtrl</a></td>
<td><p>CRUDCtrl controller is base controller for crud module to redirect to related controller
This controller play an empty role for api calls.
With response data, location path change to related controller</p>
......@@ -20,7 +20,7 @@ With response data, location path change to related controller</p>
</tr>
<tr>
<td><a href="api/ulakbus.crud/controller/CRUDListFormCtrl.html">CRUDListFormCtrl</a></td>
<td><a href="controller/CRUDListFormCtrl.html">CRUDListFormCtrl</a></td>
<td><p>CRUDListFormCtrl is the main controller for crud module
Based on the client_cmd parameter it generates its scope items.
client_cmd can be in [&#39;show&#39;, &#39;list&#39;, &#39;form&#39;, &#39;reload&#39;, &#39;refresh&#39;]
......
<header class="api-profile-header">
<h1 class="api-profile-header-heading">crudFilters</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- directive in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>directive for filtering functionality. There are three types of filters; <code>check</code>, <code>select</code>, and <code>date</code>.</p>
</div>
<div>
<h2>Directive Info</h2>
<ul>
<li>This directive executes at priority level 0.</li>
</ul>
<h2 id="usage">Usage</h2>
<div class="usage">
<ul>
<li>as attribute:
<pre><code>&lt;ANY&gt;&#10;...&#10;&lt;/ANY&gt;</code></pre>
</li>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">crudFormDirective</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- directive in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>directive for form generation.
provides template for <code>scope.forms</code> object.</p>
</div>
<div>
<h2>Directive Info</h2>
<ul>
<li>This directive executes at priority level 0.</li>
</ul>
<h2 id="usage">Usage</h2>
<div class="usage">
<ul>
<li>as attribute:
<pre><code>&lt;ANY&gt;&#10;...&#10;&lt;/ANY&gt;</code></pre>
</li>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">crudListDirective</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- directive in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>directive for listing objects.
provides template for <code>scope.objects</code> object.</p>
</div>
<div>
<h2>Directive Info</h2>
<ul>
<li>This directive executes at priority level 0.</li>
</ul>
<h2 id="usage">Usage</h2>
<div class="usage">
<ul>
<li>as attribute:
<pre><code>&lt;ANY&gt;&#10;...&#10;&lt;/ANY&gt;</code></pre>
</li>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">crudShowDirective</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- directive in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>directive for single object or detail of an object.
provides template for <code>scope.object</code> object.</p>
</div>
<div>
<h2>Directive Info</h2>
<ul>
<li>This directive executes at priority level 0.</li>
</ul>
<h2 id="usage">Usage</h2>
<div class="usage">
<ul>
<li>as attribute:
<pre><code>&lt;ANY&gt;&#10;...&#10;&lt;/ANY&gt;</code></pre>
</li>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">formLocator</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- directive in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>directive for finding form element. we use this directive because when form dynamically generated using
schemaform it belongs to a scope which is hard to reach. This makes it easy to locate form object.</p>
</div>
<div>
<h2>Directive Info</h2>
<ul>
<li>This directive executes at priority level 0.</li>
</ul>
<h2 id="usage">Usage</h2>
<div class="usage">
<ul>
<li>as attribute:
<pre><code>&lt;ANY&gt;&#10;...&#10;&lt;/ANY&gt;</code></pre>
</li>
</div>
</div>
<h1>Directive components in <code>ulakbus.crud</code></h1>
<div class="component-breakdown">
<div>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="directive/crudListDirective.html">crudListDirective</a></td>
<td><p>directive for listing objects.
provides template for <code>scope.objects</code> object.</p>
</td>
</tr>
<tr>
<td><a href="directive/crudFormDirective.html">crudFormDirective</a></td>
<td><p>directive for form generation.
provides template for <code>scope.forms</code> object.</p>
</td>
</tr>
<tr>
<td><a href="directive/crudShowDirective.html">crudShowDirective</a></td>
<td><p>directive for single object or detail of an object.
provides template for <code>scope.object</code> object.</p>
</td>
</tr>
<tr>
<td><a href="directive/formLocator.html">formLocator</a></td>
<td><p>directive for finding form element. we use this directive because when form dynamically generated using
schemaform it belongs to a scope which is hard to reach. This makes it easy to locate form object.</p>
</td>
</tr>
<tr>
<td><a href="directive/crudFilters.html">crudFilters</a></td>
<td><p>directive for filtering functionality. There are three types of filters; <code>check</code>, <code>select</code>, and <code>date</code>.</p>
</td>
</tr>
</table>
</div>
</div>
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/ulakbus.crud">ulakbus.crud</a>
- function in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
......
......@@ -12,13 +12,13 @@
</tr>
<tr>
<td><a href="api/ulakbus.crud/function/generateParam">generateParam</a></td>
<td><a href="function/generateParam.html">generateParam</a></td>
<td><p>generateParam is a function to generate required params to post backend api.</p>
</td>
</tr>
<tr>
<td><a href="api/ulakbus.crud/function/listPageItems">listPageItems</a></td>
<td><a href="function/listPageItems.html">listPageItems</a></td>
<td><p>listPageItems is a function to prepare objects to list in the list page.</p>
</td>
</tr>
......
......@@ -6,7 +6,7 @@
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/ulakbus.crud">ulakbus.crud</a>
- function in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
......
......@@ -47,7 +47,7 @@
</tr>
<tr>
<td><a href="api/ulakbus.crud/service/CrudUtility">CrudUtility</a></td>
<td><a href="service/CrudUtility.html">CrudUtility</a></td>
<td><p>Crud Utility is a service to provide generic functions for Crud controllers to format data and scope object.</p>
</td>
</tr>
......@@ -64,13 +64,13 @@
</tr>
<tr>
<td><a href="api/ulakbus.crud/function/generateParam">generateParam</a></td>
<td><a href="function/generateParam.html">generateParam</a></td>
<td><p>generateParam is a function to generate required params to post backend api.</p>
</td>
</tr>
<tr>
<td><a href="api/ulakbus.crud/function/listPageItems">listPageItems</a></td>
<td><a href="function/listPageItems.html">listPageItems</a></td>
<td><p>listPageItems is a function to prepare objects to list in the list page.</p>
</td>
</tr>
......@@ -87,7 +87,7 @@
</tr>
<tr>
<td><a href="api/ulakbus.crud/controller/CRUDCtrl.html">CRUDCtrl</a></td>
<td><a href="controller/CRUDCtrl.html">CRUDCtrl</a></td>
<td><p>CRUDCtrl controller is base controller for crud module to redirect to related controller
This controller play an empty role for api calls.
With response data, location path change to related controller</p>
......@@ -95,7 +95,7 @@ With response data, location path change to related controller</p>
</tr>
<tr>
<td><a href="api/ulakbus.crud/controller/CRUDListFormCtrl.html">CRUDListFormCtrl</a></td>
<td><a href="controller/CRUDListFormCtrl.html">CRUDListFormCtrl</a></td>
<td><p>CRUDListFormCtrl is the main controller for crud module
Based on the client_cmd parameter it generates its scope items.
client_cmd can be in [&#39;show&#39;, &#39;list&#39;, &#39;form&#39;, &#39;reload&#39;, &#39;refresh&#39;]
......@@ -106,6 +106,51 @@ There are 3 directives to manipulate controllers scope objects in crud.html</p>
</table>
</div>
<div>
<h3 class="component-heading" id="directive">Directive</h3>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="directive/crudListDirective.html">crudListDirective</a></td>
<td><p>directive for listing objects.
provides template for <code>scope.objects</code> object.</p>
</td>
</tr>
<tr>
<td><a href="directive/crudFormDirective.html">crudFormDirective</a></td>
<td><p>directive for form generation.
provides template for <code>scope.forms</code> object.</p>
</td>
</tr>
<tr>
<td><a href="directive/crudShowDirective.html">crudShowDirective</a></td>
<td><p>directive for single object or detail of an object.
provides template for <code>scope.object</code> object.</p>
</td>
</tr>
<tr>
<td><a href="directive/formLocator.html">formLocator</a></td>
<td><p>directive for finding form element. we use this directive because when form dynamically generated using
schemaform it belongs to a scope which is hard to reach. This makes it easy to locate form object.</p>
</td>
</tr>
<tr>
<td><a href="directive/crudFilters.html">crudFilters</a></td>
<td><p>directive for filtering functionality. There are three types of filters; <code>check</code>, <code>select</code>, and <code>date</code>.</p>
</td>
</tr>
</table>
</div>
</div>
......
......@@ -8,7 +8,7 @@
<li>
- service in module <a href="api/ulakbus.crud">ulakbus.crud</a>
- service in module <a href="/api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
......
......@@ -12,7 +12,7 @@
</tr>
<tr>
<td><a href="api/ulakbus.crud/service/CrudUtility">CrudUtility</a></td>
<td><a href="service/CrudUtility.html">CrudUtility</a></td>
<td><p>Crud Utility is a service to provide generic functions for Crud controllers to format data and scope object.</p>
</td>
</tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment