Commit 1cffc00a authored by Evren Kutar's avatar Evren Kutar

FIX refs GH-6 dgeni controller tag and add ngdoc tag to items

parent 5e41c3c2
...@@ -7,7 +7,14 @@ ...@@ -7,7 +7,14 @@
*/ */
'use strict'; 'use strict';
/**
* @ngdoc module
* @name ulakbus.crud
* @packageFile crud_controller.js
* @description
* ulakbus.crud module is the main module for ui. It interacts with backend and manipulate data to screen generically.
*
*/
angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService']) angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
.config(function (sfErrorMessageProvider) { .config(function (sfErrorMessageProvider) {
sfErrorMessageProvider.setDefaultMessage(302, 'Bu alan zorunludur.'); sfErrorMessageProvider.setDefaultMessage(302, 'Bu alan zorunludur.');
...@@ -16,18 +23,24 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService']) ...@@ -16,18 +23,24 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
}) })
/** /**
* @ngdoc service
* @name CrudUtility * @name CrudUtility
* @module ulakbus.crud
* @description * @description
* Crud Utility is a service to provide functionality for Crud controllers * Crud Utility is a service to provide generic functions for Crud controllers to format data and scope object.
* @returns {object} * @returns {object}
*/ */
.service('CrudUtility', function ($log, $rootScope) { .service('CrudUtility', function ($log, $rootScope) {
return { return {
/** /**
* @ngdoc function
* @name generateParam * @name generateParam
* @module ulakbus.crud
* @description * @description
* generateParam is a function to generate required params to post backend api. * generateParam is a function to generate required params to post backend api.
* *
* scope
*
* @param scope * @param scope
* @param routeParams * @param routeParams
* @param cmd * @param cmd
...@@ -66,9 +79,11 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService']) ...@@ -66,9 +79,11 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
return scope; return scope;
}, },
/** /**
* @ngdoc function
* @name listPageItems * @name listPageItems
* @module ulakbus.crud
* @description * @description
* listPageItems is a function to prepare objects to list in list page. * listPageItems is a function to prepare objects to list in the list page.
* *
* @param scope * @param scope
* @param pageData * @param pageData
...@@ -104,7 +119,9 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService']) ...@@ -104,7 +119,9 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
}) })
/** /**
* @ngdoc controller
* @name CRUDCtrl * @name CRUDCtrl
* @module ulakbus.crud
* @description * @description
* CRUDCtrl controller is base controller for crud module to redirect to related controller * CRUDCtrl controller is base controller for crud module to redirect to related controller
* This controller play an empty role for api calls. * This controller play an empty role for api calls.
...@@ -119,7 +136,9 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService']) ...@@ -119,7 +136,9 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
}) })
/** /**
* @ngdoc controller
* @name CRUDListFormCtrl * @name CRUDListFormCtrl
* @module ulakbus.crud
* @description * @description
* CRUDListFormCtrl is the main controller for crud module * CRUDListFormCtrl is the main controller for crud module
* Based on the client_cmd parameter it generates its scope items. * Based on the client_cmd parameter it generates its scope items.
...@@ -127,6 +146,7 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService']) ...@@ -127,6 +146,7 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
* There are 3 directives to manipulate controllers scope objects in crud.html * There are 3 directives to manipulate controllers scope objects in crud.html
* *
* The controller works in 2 ways, with and without pageData. * 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's getPageData() function, sets its scope items. After getting pageData * If pageData has set, using Generator's getPageData() function, sets its scope items. After getting pageData
* pageData must be set to `{pageData: false}` for clear scope of next job. * pageData must be set to `{pageData: false}` for clear scope of next job.
* *
......
This diff is collapsed.
...@@ -6,14 +6,16 @@ var Package = require('dgeni').Package; ...@@ -6,14 +6,16 @@ var Package = require('dgeni').Package;
// Create and export a new Dgeni package called dgeni-example. This package depends upon // 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. // the jsdoc and nunjucks packages defined in the dgeni-packages npm module.
module.exports = new Package('docs_conf', [ module.exports = new Package('docs_conf', [
require('dgeni-packages/base'),
require('dgeni-packages/jsdoc'), require('dgeni-packages/jsdoc'),
require('dgeni-packages/nunjucks'), require('dgeni-packages/nunjucks'),
require('dgeni-packages/ngdoc'),
require('dgeni-packages/links') require('dgeni-packages/links')
]) ])
// Configure our dgeni-example package. We can ask the Dgeni dependency injector // 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 // to provide us with access to services and processors that we wish to configure
.config(function(log, readFilesProcessor, templateFinder, writeFilesProcessor) { .config(function(log, readFilesProcessor, templateFinder, writeFilesProcessor, computeIdsProcessor, computePathsProcessor, getAliases) {
// Set logging level // Set logging level
log.level = 'info'; log.level = 'info';
...@@ -26,7 +28,7 @@ module.exports = new Package('docs_conf', [ ...@@ -26,7 +28,7 @@ module.exports = new Package('docs_conf', [
readFilesProcessor.sourceFiles = [ readFilesProcessor.sourceFiles = [
{ {
// Process all js files in `app` and its subfolders ... // Process all js files in `app` and its subfolders ...
include: 'app/components/**/*.js', include: ['app/components/**/*.js', 'app/zetalib/*.js', 'app/shared/**/*.js'],
// ... except for this one! // ... except for this one!
exclude: 'app/**/*_test.js', exclude: 'app/**/*_test.js',
// When calculating the relative path to these files use this as the base path. // When calculating the relative path to these files use this as the base path.
...@@ -35,13 +37,24 @@ module.exports = new Package('docs_conf', [ ...@@ -35,13 +37,24 @@ module.exports = new Package('docs_conf', [
} }
]; ];
// Add a folder to search for our own templates to use when rendering docs // Specify where the writeFilesProcessor will write our generated doc files
templateFinder.templateFolders.unshift(path.resolve(__dirname, 'templates')); writeFilesProcessor.outputFolder = 'docs/html';
templateFinder.templateFolders.push(path.resolve(__dirname, 'templates'));
// Specify how to match docs to templates. // Specify how to match docs to templates.
// In this case we just use the same static template for all docs // In this case we just use the same static template for all docs
templateFinder.templatePatterns.unshift('docs-template.html'); templateFinder.templatePatterns.push('common.template.html');
// Specify where the writeFilesProcessor will write our generated doc files computeIdsProcessor.idTemplates.push({
writeFilesProcessor.outputFolder = 'docs/html'; 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'
});
}); });
\ No newline at end of file
{% extends "api/object.template.html" %}
{% block related_components %}
{% if doc.providerDoc -%}
<li>
<a href="{$ doc.providerDoc.path $}">- {$ doc.providerDoc.name $}</a>
</li>
{%- endif %}
{% endblock %}
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