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 @@
*/
'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'])
.config(function (sfErrorMessageProvider) {
sfErrorMessageProvider.setDefaultMessage(302, 'Bu alan zorunludur.');
......@@ -16,18 +23,24 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
})
/**
* @ngdoc service
* @name CrudUtility
* @module ulakbus.crud
* @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}
*/
.service('CrudUtility', function ($log, $rootScope) {
return {
/**
* @ngdoc function
* @name generateParam
* @module ulakbus.crud
* @description
* generateParam is a function to generate required params to post backend api.
*
* scope
*
* @param scope
* @param routeParams
* @param cmd
......@@ -66,9 +79,11 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
return scope;
},
/**
* @ngdoc function
* @name listPageItems
* @module ulakbus.crud
* @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 pageData
......@@ -104,7 +119,9 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
})
/**
* @ngdoc controller
* @name CRUDCtrl
* @module ulakbus.crud
* @description
* CRUDCtrl controller is base controller for crud module to redirect to related controller
* This controller play an empty role for api calls.
......@@ -119,7 +136,9 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
})
/**
* @ngdoc controller
* @name CRUDListFormCtrl
* @module ulakbus.crud
* @description
* CRUDListFormCtrl is the main controller for crud module
* Based on the client_cmd parameter it generates its scope items.
......@@ -127,6 +146,7 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
* There are 3 directives to manipulate controllers scope objects in crud.html
*
* 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
* 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;
// 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'),
require('dgeni-packages/nunjucks'),
require('dgeni-packages/ngdoc'),
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) {
.config(function(log, readFilesProcessor, templateFinder, writeFilesProcessor, computeIdsProcessor, computePathsProcessor, getAliases) {
// Set logging level
log.level = 'info';
......@@ -26,7 +28,7 @@ module.exports = new Package('docs_conf', [
readFilesProcessor.sourceFiles = [
{
// 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!
exclude: 'app/**/*_test.js',
// When calculating the relative path to these files use this as the base path.
......@@ -35,13 +37,24 @@ module.exports = new Package('docs_conf', [
}
];
// Add a folder to search for our own templates to use when rendering docs
templateFinder.templateFolders.unshift(path.resolve(__dirname, 'templates'));
// 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.unshift('docs-template.html');
templateFinder.templatePatterns.push('common.template.html');
// Specify where the writeFilesProcessor will write our generated doc files
writeFilesProcessor.outputFolder = 'docs/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'
});
});
\ 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