Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
1cffc00a
Commit
1cffc00a
authored
Jan 13, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX refs GH-6 dgeni controller tag and add ngdoc tag to items
parent
5e41c3c2
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
181 additions
and
46 deletions
+181
-46
crud_controller.js
app/components/crud/crud_controller.js
+23
-3
form_service.js
app/zetalib/form_service.js
+128
-35
docs_conf.js
docs/docs_conf.js
+21
-8
controller.template.html
docs/templates/controller.template.html
+9
-0
No files found.
app/components/crud/crud_controller.js
View file @
1cffc00a
...
...
@@ -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.
*
...
...
app/zetalib/form_service.js
View file @
1cffc00a
This diff is collapsed.
Click to expand it.
docs/docs_conf.js
View file @
1cffc00a
...
...
@@ -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
docs/templates/controller.template.html
0 → 100644
View file @
1cffc00a
{% extends "api/object.template.html" %}
{% block related_components %}
{% if doc.providerDoc -%}
<li>
<a
href=
"{$ doc.providerDoc.path $}"
>
- {$ doc.providerDoc.name $}
</a>
</li>
{%- endif %}
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment